Skip to content

Commit

Permalink
Generate events in functions; to avoid non-discrete booleans.
Browse files Browse the repository at this point in the history
  • Loading branch information
HansOlsson authored and beutlich committed Jan 18, 2024
1 parent 5fe4ebd commit 8dbbf55
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Modelica/Media/R134a.mo
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ package R134a "R134a: Medium model for R134a"
"Set state for pressure and specific enthalpy (X not used since single substance)"
algorithm
state := ThermodynamicState(phase=getPhase_ph(p, h), p=p, h=h, d=density_ph(p, h), T=temperature_ph(p, h));
annotation (Documentation(info="<html>
annotation (Documentation(GenerateEvents=true, info="<html>
<p>This function should be used by default in order to calculate the thermodynamic state record used as input by many functions.</p>
<p>
Example:
Expand Down Expand Up @@ -2228,7 +2228,7 @@ This function computes the residual helmholtz derivatives of the fundamental equ
phase := if ((h < hl) or (h > hv) or (p > R134aData.data.FPCRIT)) then 1
else 2;

annotation (Documentation(info="<html>
annotation (Documentation(GenerateEvents=true, info="<html>
This function computes the number of phases for R134a depending on the inputs for absolute pressure and specific enthalpy. It makes use of cubic spline functions for liquid and vapor specific enthalpy.
</html>"));
end getPhase_ph;
Expand Down

0 comments on commit 8dbbf55

Please sign in to comment.