Code Monkey home page Code Monkey logo

Comments (8)

sharpie7 avatar sharpie7 commented on August 17, 2024

Thanks for the comment. I shared it with Paul Falstad who wrote the simulation code. Basically the maths it uses won't work for this case (how will the current split between two zero resistance conductors?). Paul says "if there are any wire loops with no resistance (not just through the voltage source, but anywhere), the circuit matrix will be singular and unsolvable. The trip around the two switches at lower right clearly qualifies.".

from circuitjs1.

jonpatterns avatar jonpatterns commented on August 17, 2024

A possible solution to this would be to assign a very low default resistance value to wires and swtiches, that would be consistent with reality too. However, I'm not sure how the maths function would handle this - for example it may require good decimal accuracy.

from circuitjs1.

hausen avatar hausen commented on August 17, 2024

If it helps, in my branch of Paul Falstad's original simulator, I have made WireElm a subclass of ResistorElm to work around this isse. See: https://github.com/hausen/circuit-simulator/blob/master/src/WireElm.java

It causes some side effects, though, so I had to add an "ideal wires" option to the menu. The user may select which behavior she wants.

from circuitjs1.

jonpatterns avatar jonpatterns commented on August 17, 2024

Interesting, I'll take a look when I get a chance.

from circuitjs1.

Harvie avatar Harvie commented on August 17, 2024

Nice! I always thought that wires should have at least very tiny resistance to stabilize the simulation... However there should be global setting to set wire resistance. With 0 still being the option. Sometimes you might want to add your resistors manualy for more precise simulation. We still might want to make superconductor simulations :-)

from circuitjs1.

Harvie avatar Harvie commented on August 17, 2024

Also lot of times there are no "wires" in circuit, there are just multiple components bonded directly by it's pins. so "global wire resistance" should be applied to all component pins in the first place. once this will be done, the "wires" will not really need it as they will always end in some component with series resistance of it's own.

from circuitjs1.

sharpie7 avatar sharpie7 commented on August 17, 2024

The convention that wires in circuit simulators are ideal is pretty well established and benefits in consistency with components directly joined and helps the performance. Real wires are not simple resistors but also have inductive and capacitative effects (and perhaps even non-linear in extreme cases). If non-ideal performance of wires is critical to the design then users should create their own model.

Therefore wires as ideal will be retained as the behaviour for now.

from circuitjs1.

Harvie avatar Harvie commented on August 17, 2024

But there are cases where simulator fails to converge or throws error because of this.

from circuitjs1.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.