Open jmoeckel opened 8 years ago
Technologies.Photovoltaics.BaseClasses.ElectricalModels.ElectricalModelTwoDiodesGeneral
had units but we removed them, because parameter Real cs2 "2nd coefficient ISat2";
had the fractional unit cs2(final unit = "A.K-5/2")
and this is not allowed according to the spec, as discussed here:
https://trac.modelica.org/Modelica/ticket/376
In order to add a unit, one could change the equation
ISat2 = cs2 * sqrt(T * T * T * T * T) * Modelica.Math.exp(-(Eg * e)/(2.0 * k * T));
by moving the cs2
into the sqrt()
part
ISat2 = sqrt(cs2 * T * T * T * T * T) * Modelica.Math.exp(-(Eg * e)/(2.0 * k * T));
and then we can use the unit cs2(final unit = "A.K-5")
.
Also see: http://unitsofmeasure.org/trac/ticket/51
checkModel("BuildingSystems.HAM.HeatConduction.OneLayerHeatConduction3D");
returns a couple of warnings.
For dimensionless variables like factors or coefficients, use unit="1"
instead of unit="-"
.
This is a follow-up issue to #1.
There are several variables declared as
Real
and have aunit
. In many cases these are derived physical quantities which only appears once or twice.In order to have consistent code: Should we change the style-guide in such way, that a
Real
variable must not have aunit
property. Instead, each time aunit
is set, a newtype
must be declared or an already definedtype
must be used respectively.Would concern following 45 files: