From cc794bacce3ac4d91d19f9872b318691b8300183 Mon Sep 17 00:00:00 2001 From: hubertus Date: Tue, 6 Jan 2015 21:00:18 +0000 Subject: [PATCH] Fixes #1530 in trunk git-svn-id: https://svn.modelica.org/projects/Modelica/trunk@8035 7ce873d0-865f-4ce7-a662-4bb36ea78beb --- Modelica/Media/package.mo | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Modelica/Media/package.mo b/Modelica/Media/package.mo index 8e4d961baf..f7fa9f3392 100644 --- a/Modelica/Media/package.mo +++ b/Modelica/Media/package.mo @@ -6687,7 +6687,7 @@ quantities are assumed to be constant. "Return specific internal energy" extends Modelica.Icons.Function; algorithm - u := (cp_const - R_gas)*(state.T - T0); + u := cp_const*(T - T0) - R*T; end specificInternalEnergy; redeclare function extends specificEntropy "Return specific entropy" @@ -6708,7 +6708,7 @@ quantities are assumed to be constant. "Return specific Helmholtz energy" extends Modelica.Icons.Function; algorithm - f := (cp_const - R_gas)*(state.T - T0) - state.T*specificEntropy(state); + f := specificInternalEnergy(state) - state.T*specificEntropy(state); end specificHelmholtzEnergy; redeclare function extends dynamicViscosity "Return dynamic viscosity" @@ -8063,7 +8063,8 @@ public record IF97BaseTwoPhase "Intermediate property data record for IF 97" extends Modelica.Icons.Record; - Integer phase(start=0) "Phase: 2 for two-phase, 1 for one phase, 0 if unknown"; + Integer phase(start=0) + "Phase: 2 for two-phase, 1 for one phase, 0 if unknown"; Integer region(min=1, max=5) "IF 97 region"; SI.Pressure p "Pressure"; SI.Temperature T "Temperature";