Building Dynamic Simulation #218
Replies: 1 comment
-
|
Does your simulation have any components with states, such as capacitors, inductors, transistors, etc.? [Edit] I re-read your question and realize that adding capacitors is the problem. Using initial conditions is relatively tricky. I've thought about dynamically changing the circuit mid-transient simulations as well but it really isn't straight-forward. If you add a node or component to the circuit, then the solver will need to introduce new elements into a matrix that is already optimized for the old circuit. Secondly, as most time simulations use a variable timestep algorithm, it is very difficult to guarantee in a general way that the discontinuity in the simulation won't lead to a So at the moment I don't see a straight-forward way to do what you want. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I am making a VR simulation in Unity using Spice#. I am trying to make a dynamic circuit simulation where I have
can interact with components in real time, such as switch, button, NTC-PTC, or potentiometer.
Yet, I have a problem with the input based components. The objects have a resistor model in it and sets their resistance relative to the input variable. When there is a change in them, the circuit recalculates.
While not sure whether it will work, I considered carry out the simulation in
FixedUpdate()and starting the simulation over and over again, but I don't know how should I transfer the final result of the first simulation as the next simulation's initial condition.Everything works properly when simulating a resistor circuit. But once I integrate a capacitor into the circuit, the circuit calculates itself and when it passes to the next tick, the components' values are resetting themselves and the simulation starts with zero voltage at all nodes.
So, are there any optimal solution that you can suggest to overcome that process?
Beta Was this translation helpful? Give feedback.
All reactions