-
Notifications
You must be signed in to change notification settings - Fork 72
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
"External Variables" and "Internal Variables" in iPSL #52
Comments
Merging Jan's PR: - Fixed the angles to be consistently in degrees for Bus, BusExt, InfiniteBus, InfiniteBus - Corrected an "outer" modification to parameter nu in BusExt which was added in commit c4e5a96 - Updated/added documentation of model developments for Bus, BusExt, InfiniteBus, InfiniteBus
|
Aslo I agree with Jan about the capital |
I don't think this is a valid point to say that it will imply redoing a lot of changes... I know the feeling, but still, the goal is to have a coding convention that is logical, coherent and transparent to the user. |
I think we should have the following names:
|
@MaximeBaudette |
Just my two cents. Try to avoid Mx or kx as base units. Stick to the SI units and rather use Mega and kilo for display units. I've seen a lot of models getting into "scaling hell" because it was not clear that a power was expected in MW rather than W. Also Dymola offers nice UI help to actually enter M or k values as long as it knows the type (which is the case for power). |
@petitrenaudseb I am of course open for discussion. Maybe we could reinstate the power flow data in per unit for everything, but then we need to agree on how to mark the per unit in the system base (for power flow data), and per unit in the machine base . |
@dietmarw |
@MaximeBaudette I understand, but just thought to mention that you can have the UI using MW and kV whilst all calculations "below" are using the base units. |
@MaximeBaudette |
@dietmarw
This per uniting system is very not like in any other field, and therefore is very against established standards... But good luck getting a power engineer understand equations using SI units ;-) @petitrenaudseb About the two kinds of per unit, I agree it should be tackle within each model, but I am wondering if we shouldn't agree on a way to distinguish the two in the unit description (like |
@MaximeBaudette @dietmarw not using p.u. in equations can cause computation problems, there are some ancient papers that talked about this... I don't remember too well, I will have to ask a colleague. On the other hand, I think there should be a way in Modelica to map the per-unit into SI before/after calculations if a user wants to display simulation results in both? @petitrenaudseb I don't think that because internally iTesla stores in SI, then we have to do it also in the library. Regarding p.u. types, I guess we have to distinguish clearly to avoid ambiguity for the user. |
@lvanfretti @tinrabuzin and me were really disappointed by that yesterday... |
Of course pu is no problem at all. And having the equations in pu is neither a problem. I was not suggesting replacing pu equations with SI equations but trying to avoid M- k-SIunit based equations and rather stick to the base units in those equations if they exist. If everything is in pu anyway then this is a non-issue. Then it's probably just down to how the SI parameters are entered and if MW and kV are the domains standard units then it probably makes sense to use them. Internally they are going to get converted to pu any way. This can also be done dynamically for the user. You can find examples in the old Spot library, where the user has the choice to enter data in SI or pu. |
@MaximeBaudette We cross-posted there. It is possible to handle units properly in Modelica also independent of the tool. So you could let the user decide which base system he wants. In the Spot example above there is only a choice between SI and pu, but you could easily introduce "SI | pu_machine | pu_system". On the tool side, if you always use proper unit definitions instead of simply |
@dietmarw @adeas31 OMEdit does not support display units, but OM has some limited support for scaling via convertunits so it should be possible enhance OMEdit to handle these conversions... |
@dietmarw Anyway, whether or not we can have the conversion, I was thinking of ditching our current way of indicating units in parenthesis, and go for types and unit annotations. |
I stumbled upon a mistake in the PSAT LOADPQ model concerning the equations related to the change of base.
In all models of the iPSL the following convention must be respected and correctly implemented:
Also we should find a naming convention to distinguish the "internal variables" form the "interface variables", so we don't mix them.
I propose the suffix "_int", so we have: v_int, angle_v_int, P_int, Q_int (if there is a need for such internal variables, not all component require it)
The text was updated successfully, but these errors were encountered: