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
Reported by sjoelund.se on 29 Oct 2012 10:23 UTC
In Modelica.Media.Air.MoistAir.PsychrometricData.Medium.saturationTemperature.Internal.solve there is an undefined input:
diff -u -x .svn -r libraries/Modelica 3.2.1/Media/Air.mo build/lib/omlibrary/Modelica 3.2.1/Media/Air.mo--- libraries/Modelica 3.2.1/Media/Air.mo 2012-10-12 14:33:01.720035052 +0200+++ build/lib/omlibrary/Modelica 3.2.1/Media/Air.mo 2012-10-29 11:04:35.259722248 +0100@@ -474,7 +474,7 @@
end solve;
end Internal;
algorithm
- T:=Internal.solve(p, T_min, T_max);+ T:=Internal.solve(p, T_min, T_max, f_nonlinear_data = Internal.f_nonlinear_Data());
annotation (Documentation(info="<html>
Computes saturation temperature from (partial) pressure via numerical inversion of the function <a href=\"modelica://Modelica.Media.Air.MoistAir.saturationPressure\">saturationPressure</a>. Therefore additional inputs are required (or the defaults are used) for upper and lower temperature bounds.
</html>"));
An alternative patch would be to use:
redeclare function extends f_nonlinear(f_nonlinear_data = f_nonlinear_Data())
This does not work in OpenModelica, and I did not test it in any other tool. It is an internal use in only 1 place anyway, so the initial patch should cover it.
The root cause seems to be that Dymola allows an empty record as default input to a function because it considers empty records as constants...
function finput R r;
outputReal o;
algorithm
o :=1.0;
end f;
Dymola flat:
function M.f
constant input M.R r := M.R() = M.R();
output Real o;
algorithm
o := 1.0;
end M.f;
Reported by sjoelund.se on 29 Oct 2012 10:23 UTC
In Modelica.Media.Air.MoistAir.PsychrometricData.Medium.saturationTemperature.Internal.solve there is an undefined input:
An alternative patch would be to use:
This does not work in OpenModelica, and I did not test it in any other tool. It is an internal use in only 1 place anyway, so the initial patch should cover it.
The root cause seems to be that Dymola allows an empty record as default input to a function because it considers empty records as constants...
Dymola flat:
Migrated-From: https://trac.modelica.org/Modelica/ticket/890
The text was updated successfully, but these errors were encountered: