-
Notifications
You must be signed in to change notification settings - Fork 169
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modelica.Electrical.Analog.Examples.Resistor is not very simple #4471
Comments
(oops - wrong labels, both started on 'd'). |
Well, the electrical circuit is simple, I can't imagine anything simpler than a resistor connected to an ideal voltage source. The circuit behaviour maybe is not completely trivial because of the dependency of the resistance on the quadratic losses, but the circuit and its behaviour are two different concepts. Surfing the web I even found "A simple chaotic circuit with a light-emitting diode", so it seems that a simple circuit can even show chaotic behaviour with strange attractors. Maybe we should include it the Modelica.Electrical examples 😃 |
@HansOlsson what's the problem with a nonlinear set of algebraic equations? |
There's no problem with the equations. |
@HansOlsson What's easier with an additional ODE? IMHO the example is simple and demonstrates:
It can even be solved analytically - witt a linear temperature dependency of resistance it leads to a quadratic equation for temperature. The new user sees a circuit in the diagram layer which is nearly self-explanatory. Looking into the used components, he could obtain the above mentioned (quadratic) equation. |
Ok, but even if "simple" could we drop the "very"? |
No big deal, feel free to open a PR for that 😃 |
@HansOlsson yes we can drop the "very". I admit the circuit is simple but not very simple. |
@casella here you go: have a preview on the PR. |
The documentation of Modelica.Electrical.Analog.Examples.Resistor says
I don't agree with that.
Clearly the model looks simple and the electrical part is in itself simple, but the thermal coupling makes the behavior more complicated:
If you look at the code generated by Dymola you see that there's a non-linear system of equations!
The reason is that the thermal part isn't connected to a heat capacitor as one would naïvely expect, but only to a linear thermal conductor. Since the resistor's resistance depend on temperature we therefore have a non-linear system of equations keeping the loss-power (that is
v*i
orv^2/R(T)
right?) in balance with conducted heat power (G*(T-293.15)
).I see a number of possibilities:
The current model would be limit if we in the second possibility have a an epsilon-heat capacitor and let epsilon go to zero.
The text was updated successfully, but these errors were encountered: