Skip to content

Commit

Permalink
Removed stateSelect.prefer for variable p as this leads to differenti…
Browse files Browse the repository at this point in the history
…ation that requires for the FMI interface the derivatives of the inlet mass flow rate and inlet pressure.

This is for #27.
  • Loading branch information
mwetter committed Feb 12, 2014
1 parent 0337df6 commit e32128a
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions Annex60/Media/Water.mo
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ package Water "Package with model for liquid water with constant properties"
redeclare model extends BaseProperties(
T(stateSelect=if
preferredMediumStates then StateSelect.prefer else StateSelect.default),
p(stateSelect=if
preferredMediumStates then StateSelect.prefer else StateSelect.default),
p(stateSelect=StateSelect.never),
preferredMediumStates=true) "Base properties"
equation
h = (T - reference_T)*cp_const;
Expand Down Expand Up @@ -780,6 +779,27 @@ Water is modeled as an incompressible liquid, and there are no phase changes.
</html>", revisions="<html>
<ul>
<li>
February 6, 2014, by Michael Wetter:<br/>
Replaced in <code>BaseProperties</code> the declaration
<pre>
p(stateSelect=if
preferredMediumStates then StateSelect.prefer else StateSelect.default)
</pre>
with
<pre>
p(stateSelect=StateSelect.never)
</pre>
because the previous declaration led the translation error
<pre>
The model requires derivatives of some inputs as listed below:
1 inlet.m_flow
1 inlet.p
</pre>
when translating
<a href=\"modelica://Annex60.Fluid.FMI.Examples.HeaterCoolerPrescribed\">
Annex60.Fluid.FMI.Examples.HeaterCoolerPrescribed</a>.
</li>
<li>
December 18, 2013, by Michael Wetter:<br/>
First implementation.
</li>
Expand Down

0 comments on commit e32128a

Please sign in to comment.