You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current on the resistor should flow in the direction p -> n, and thus be positive.
However, resistor.i is an alias for resistor.p.i which measures the current in the reverse direction.
We could alias i as n.i in OnePort which will then measure the current out of the component.
The text was updated successfully, but these errors were encountered:
Both are subtypes of a OnePort and follow the Modelica standard library. The sign convention is that the flow variable (in this case the current) is positive if the flow flows in the component. And the convention for the pin is "Positive pin (potential p.v > n.v for positive voltage drop v)".
Take a look at this simple example - it's the same as in the docs, but with a
Current
source instead of aVoltage
source:if we inquire the current at the source we get:
which makes sense.
However, the current on the resistor is:
which looks weird.
The current on the resistor should flow in the direction p -> n, and thus be positive.
However, resistor.i is an alias for
resistor.p.i
which measures the current in the reverse direction.We could alias
i
asn.i
inOnePort
which will then measure the current out of the component.The text was updated successfully, but these errors were encountered: