Add loss-free resistor example circuit#252
Conversation
|
Circuit doesn't load correctly for me. |
|
Both issues fixed:
|
|
ok now it loads but the scopes are all weird. Why does the file have random changes in it? Very strange. also in the menu, move it to the bottom of the Misc Devices menu. |
Address Paul feedback on PR pfalstad#252: - Remove captured simulation state from capacitor (voltdiff, initialVoltage) - Fix floating-point noise in capacitance value (0.00009999999999999 -> 1e-4) - Remove extra minTimeStep parameter from settings line - Replace garbled scope lines with clean voltage/current scopes - Move Loss-Free Resistor to bottom of Misc Devices menu Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Addressed all feedback:
|
Address Paul feedback on PR pfalstad#252: - Remove captured simulation state from capacitor (voltdiff, initialVoltage) - Fix floating-point noise in capacitance value (0.00009999999999999 -> 1e-4) - Remove extra minTimeStep parameter from settings line - Replace garbled scope lines with clean voltage/current scopes - Move Loss-Free Resistor to bottom of Misc Devices menu Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
195ff04 to
4793406
Compare
Add an example circuit demonstrating a loss-free resistor (LFR) built from VCCS and VCVS controlled sources. The LFR presents a resistive input characteristic while transferring absorbed power losslessly to its output port, as modeled by Singer (1990). This uses the approach demonstrated by Paul Falstad in the issue discussion. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add missing inputCount (4) to VCVS element in lfr.txt, which caused a NumberFormatException and silently skipped the element - Remove submenu wrapper from setuplist.txt -- a single circuit does not need its own submenu Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Address Paul feedback on PR pfalstad#252: - Remove captured simulation state from capacitor (voltdiff, initialVoltage) - Fix floating-point noise in capacitance value (0.00009999999999999 -> 1e-4) - Remove extra minTimeStep parameter from settings line - Replace garbled scope lines with clean voltage/current scopes - Move Loss-Free Resistor to bottom of Misc Devices menu Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Decoded Paul's original circuit from issue pfalstad#132 tinyurl and restored the file to match it exactly (minus cleaned-up floating-point noise in capacitor value). Previous commits introduced random changes: - wrong speed value (18.27...555 vs 18.27...558) - missing 5e-11 minTimeStep - wrong VCVS flags (46 vs 0) - wrong capacitor initial voltage (0.001 vs 0.01) - replaced Paul's 3 scope lines with 2 made-up ones Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
4793406 to
d140810
Compare
Summary
Test plan
Fixes #132
🤖 Generated with Claude Code