Regression
simulation_libraries_3rdParty_TestMedia.TestSteam.mos (from (result.xml))
Stacktrace
Output mismatch (see stdout for details)
Standard Output
+ TestSteam.mos [instantiate/check/simulate] ... equation mismatch [time: 23] ==== Log C:\Windows\TEMP/omc-rtest-OpenModelica/simulation/libraries/3rdParty/TestMedia/TestSteam.mos_temp8199/log-TestSteam.mos true "" true "" "function Modelica.Math.acos \"Inverse cosine (-1 <= u <= 1)\" input Real u; output Real y(quantity = \"Angle\", unit = \"rad\", displayUnit = \"deg\"); external \"C\" y = acos(u); end Modelica.Math.acos; function Modelica.Math.asin \"Inverse sine (-1 <= u <= 1)\" input Real u; output Real y(quantity = \"Angle\", unit = \"rad\", displayUnit = \"deg\"); external \"C\" y = asin(u); end Modelica.Math.asin; function Modelica.Math.log \"Natural (base e) logarithm (u shall be > 0)\" input Real u; output Real y; external \"C\" y = log(u); end Modelica.Math.log; function Modelica.Media.Common.GibbsDerivs \"Automatically generated record constructor for Modelica.Media.Common.GibbsDerivs\" input Real p(quantity = \"Pressure\", unit = \"Pa\", min = -1e9, max = 1e9, nominal = 1e5, start = 1e5, displayUnit = \"bar\"); input Real T(quantity = \"ThermodynamicTemperature\", unit = \"K\", min = 1.0, max = 6000.0, start = 288.15, nominal = 300.0, displayUnit = \"degC\"); input Real R(quantity = \"SpecificHeatCapacity\", unit = \"J/(kg.K)\"); input Real pi(unit = \"1\"); input Real tau(unit = \"1\"); input Real g(unit = \"1\"); input Real gpi(unit = \"1\"); input Real gpipi(unit = \"1\"); input Real gtau(unit = \"1\"); input Real gtautau(unit = \"1\"); input Real gtaupi(unit = \"1\"); output GibbsDerivs res; end Modelica.Media.Common.GibbsDerivs; function Modelica.Media.Common.HelmholtzDerivs \"Automatically generated record constructor for Modelica.Media.Common.HelmholtzDerivs\" input Real d(quantity = \"Density\", unit = \"kg/m3\", displayUnit = \"g/cm3\", min = 1e-6, max = 3e4); input Real T(quantity = \"ThermodynamicTemperature\", unit = \"K\", min = 1.0, max = 6000.0, start = 288.15, nominal = 300.0, displayUnit = \"degC\"); input Real R(quantity = \"SpecificHeatCapacity\", unit = \"J/(kg.K)\"); input Real delta(unit = \"1\"); input Real tau(unit = \"1\"); input Real f(unit = \"1\"); input Real fdelta(unit = \"1\"); input Real fdeltadelta(unit = \"1\"); input Real ftau(unit = \"1\"); input Real ftautau(unit = \"1\"); input Real fdeltatau(unit = \"1\"); output HelmholtzDerivs res; end Modelica.Media.Common.HelmholtzDerivs; function Modelica.Media.Common.Helmholtz_ph \"function to calculate analytic derivatives for computing d and t given p and h\" input Modelica.Media.Common.HelmholtzDerivs f \"dimensionless derivatives of Helmholtz function\"; output Modelica.Media.Common.NewtonDerivatives_ph nderivs \"derivatives for Newton iteration to calculate d and t from p and h\"; protected Real cv(quantity = \"SpecificHeatCapacity\", unit = \"J/(kg.K)\") \"isochoric heat capacity\"; algorithm cv := (-f.R) * f.tau ^ 2.0 * f.ftautau; nderivs.p := f.d * f.R * f.T * f.delta * f.fdelta; nderivs.h := f.R * f.T * (f.tau * f.ftau + f.delta * f.fdelta); nderivs.pd := f.R * f.T * f.delta * (2.0 * f.fdelta + f.delta * f.fdeltadelta); nderivs.pt := f.R * f.d * f.delta * (f.fdelta - f.tau * f.fdeltatau); nderivs.ht := cv + nderivs.pt / f.d; nderivs.hd := (nderivs.pd - f.T * nderivs.pt / f.d) / f.d; end Modelica.Media.Common.Helmholtz_ph; function Modelica.Media.Common.IF97BaseTwoPhase \"Automatically generated record constructor for Modelica.Media.Common.IF97BaseTwoPhase\" input Integer phase = 0; input Integer region(min = 1, max = 5); input Real p(quantity = \"Pressure\", unit = \"Pa\", min = -1e9, max = 1e9, nominal = 1e5, start = 1e5, displayUnit = \"bar\"); input Real T(quantity = \"ThermodynamicTemperature\", unit = \"K\", min = 1.0, max = 6000.0, start = 288.15, nominal = 300.0, displayUnit = \"degC\"); input Real h(quantity = \"SpecificEnergy\", unit = \"J/kg\", nominal = 1e6); input Real R(quantity = \"SpecificHeatCapacity\", unit = \"J/(kg.K)\"); input Real cp(quantity = \"SpecificHeatCapacity\", unit = \"J/(kg.K)\"); input Real cv(quantity = \"SpecificHeatCapacity\", unit = \"J/(kg.K)\"); input Real rho(quantity = \"Density\", unit = \"kg/m3\", displayUnit = \"g/cm3\", min = 1e-6, max = 3e4); input Real s(quantity = \"SpecificEntropy\", unit = \"J/(kg.K)\", nominal = 1000.0); input Real pt(quantity = \"DerPressureByTemperature\", unit = \"Pa/K\"); input Real pd(quantity = \"DerPressureByDensity\", unit = \"Pa.m3/kg\"); input Real vt; input Real vp; input Real x; input Real dpT; output IF97BaseTwoPhase res; end Modelica.Media.Common.IF97BaseTwoPhase; function Modelica.Media.Common.IF97PhaseBoundaryProperties \"Automatically generated record constructor for Modelica.Media.Common.IF97PhaseBoundaryProperties\" input Boolean region3boundary; input Real R(quantity = \"SpecificHeatCapacity\", unit = \"J/(kg.K)\"); input Real T(quantity = \"ThermodynamicTemperature\", unit = \"K\", min = 1.0, max = 6000.0, start = 288.15, nominal = 300.0, displayUnit = \"degC\"); input Real d(quantity = \"Density\", unit = \"kg/m3\", displayUnit = \"g/cm3\", min = 1e-6, max = 3e4); input Real h(quantity = \"SpecificEnergy\", unit = \"J/kg\", nominal = 1e6); input Real s(quantity = \"SpecificEntropy\", unit = \"J/(kg.K)\", nominal = 1000.0); input Real cp(quantity = \"SpecificHeatCapacity\", unit = \"J/(kg.K)\"); input Real cv(quantity = \"SpecificHeatCapacity\", unit = \"J/(kg.K)\"); input Real dpT(quantity = \"DerPressureByTemperature\", unit = \"Pa/K\"); input Real pt(quantity = \"DerPressureByTemperature\", unit = \"Pa/K\"); input Real pd(quantity = \"DerPressureByDensity\", unit = \"Pa.m3/kg\"); input Real vt(unit = \"m3/(kg.K)\"); input Real vp(unit = \"m3/(kg.Pa)\"); output IF97PhaseBoundaryProperties res; end Modelica.Media.Common.IF97PhaseBoundaryProperties; function Modelica.Media.Common.NewtonDerivatives_ph \"Automatically generated record constructor for Modelica.Media.Common.NewtonDerivatives_ph\" input Real p(quantity = \"Pressure\", unit = \"Pa\", min = -1e9, max = 1e9, nominal = 1e5, start = 1e5, displayUnit = \"bar\"); input Real h(quantity = \"SpecificEnergy\", unit = \"J/kg\", nominal = 1e6); input Real pd(quantity = \"DerPressureByDensity\", unit = \"Pa.m3/kg\"); input Real pt(quantity = \"DerPressureByTemperature\", unit = \"Pa/K\"); input Real hd; input Real ht; output NewtonDerivatives_ph res; end Modelica.Media.Common.NewtonDerivatives_ph; function Modelica.Media.Common.PhaseBoundaryProperties \"Automatically generated record constructor for Modelica.Media.Common.PhaseBoundaryProperties\" input Real d(quantity = \"Density\", unit = \"kg/m3\", displayUnit = \"g/cm3\", min = 1e-6, max = 3e4); input Real h(quantity = \"SpecificEnergy\", unit = \"J/kg\", nominal = 1e6); input Real u(quantity = \"SpecificEnergy\", unit = \"J/kg\", nominal = 1e6); input Real s(quantity = \"SpecificEntropy\", unit = \"J/(kg.K)\", nominal = 1000.0); input Real cp(quantity = \"SpecificHeatCapacity\", unit = \"J/(kg.K)\"); input Real cv(quantity = \"SpecificHeatCapacity\", unit = \"J/(kg.K)\"); input Real pt(quantity = \"DerPressureByTemperature\", unit = \"Pa/K\"); input Real pd(quantity = \"DerPressureByDensity\", unit = \"Pa.m3/kg\"); output PhaseBoundaryProperties res; end Modelica.Media.Common.PhaseBoundaryProperties; function Modelica.Media.Common.cv2Phase \"compute isochoric specific heat capacity inside the two-phase region\" input Modelica.Media.Common.PhaseBoundaryProperties liq \"properties on the boiling curve\"; input Modelica.Media.Common.PhaseBoundaryProperties vap \"properties on the condensation curve\"; input Real x(quantity = \"MassFraction\", unit = \"1\", min = 0.0, max = 1.0, start = 0.2, nominal = 0.01) \"vapour mass fraction\"; input Real T(quantity = \"ThermodynamicTemperature\", unit = \"K\", displayUnit = \"degC\", min = 1.0, max = 6000.0, start = 288.15, nominal = 300.0) \"temperature\"; input Real p(quantity = \"Pressure\", unit = \"Pa\", displayUnit = \"bar\", min = -1e9, max = 1e9, start = 1e5, nominal = 1e5) \"preoperties\"; output Real cv(quantity = \"SpecificHeatCapacity\", unit = \"J/(kg.K)\") \"isochoric specific heat capacity\"; protected Real dpT \"derivative of pressure w.r.t. temperature\"; protected Real dxv \"derivative of vapour mass fraction w.r.t. specific volume\"; protected Real dvTl \"derivative of liquid specific volume w.r.t. temperature\"; protected Real dvTv \"derivative of vapour specific volume w.r.t. temperature\"; protected Real duTl \"derivative of liquid specific inner energy w.r.t. temperature\"; protected Real duTv \"derivative of vapour specific inner energy w.r.t. temperature\"; protected Real dxt \"derivative of vapour mass fraction w.r.t. temperature\"; algorithm dxv := if liq.d <> vap.d then liq.d * vap.d / (liq.d - vap.d) else 0.0; dpT := (vap.s - liq.s) * dxv; dvTl := (liq.pt - dpT) / (liq.d ^ 2.0 * liq.pd); dvTv := (vap.pt - dpT) / (vap.d ^ 2.0 * vap.pd); dxt := (-dxv) * (dvTl + x * (dvTv - dvTl)); duTl := liq.cv + (T * liq.pt - p) * dvTl; duTv := vap.cv + (T * vap.pt - p) * dvTv; cv := duTl + x * (duTv - duTl) + dxt * (vap.u - liq.u); end Modelica.Media.Common.cv2Phase; function Modelica.Media.Common.gibbsToBoundaryProps \"calulate phase boundary property record from dimensionless Gibbs function\" input Modelica.Media.Common.GibbsDerivs g \"dimensionless derivatives of Gibbs function\"; output Modelica.Media.Common.PhaseBoundaryProperties sat \"phase boundary properties\"; protected Real vt \"derivative of specific volume w.r.t. temperature\"; protected Real vp \"derivative of specific volume w.r.t. pressure\"; algorithm sat.d := g.p / (g.gpi * g.pi * g.T * g.R); sat.h := g.R * g.T * g.tau * g.gtau; sat.u := g.T * g.R * (g.tau * g.gtau - g.pi * g.gpi); sat.s := g.R * (g.tau * g.gtau - g.g); sat.cp := (-g.R) * g.tau ^ 2.0 * g.gtautau; sat.cv := g.R * ((g.gpi - g.tau * g.gtaupi) ^ 2.0 / g.gpipi - g.tau ^ 2.0 * g.gtautau); vt := g.R * (g.pi * g.gpi - g.tau * g.pi * g.gtaupi) / g.p; vp := g.R * g.T * g.p ^ (-2.0) * g.pi ^ 2.0 * g.gpipi; sat.pt := g.p * (g.tau * g.gtaupi - g.gpi) / (g.pi * g.gpipi * g.T); sat.pd := (-g.R) * g.T * g.gpi ^ 2.0 / g.gpipi; end Modelica.Media.Common.gibbsToBoundaryProps; function Modelica.Media.Common.helmholtzToBoundaryProps \"calulate phase boundary property record from dimensionless Helmholtz function\" input Modelica.Media.Common.HelmholtzDerivs f \"dimensionless derivatives of Helmholtz function\"; output Modelica.Media.Common.PhaseBoundaryProperties sat \"phase boundary property record\"; protected Real p(quantity = \"Pressure\", unit = \"Pa\", displayUnit = \"bar\", min = -1e9, max = 1e9, start = 1e5, nominal = 1e5) \"pressure\"; algorithm p := f.R * f.d * f.T * f.delta * f.fdelta; sat.d := f.d; sat.h := f.R * f.T * (f.tau * f.ftau + f.delta * f.fdelta); sat.s := f.R * (f.tau * f.ftau - f.f); sat.u := f.R * f.T * f.tau * f.ftau; sat.cp := f.R * ((f.delta * (f.fdelta - f.tau * f.fdeltatau)) ^ 2.0 / (2.0 * f.delta * f.fdelta + f.delta ^ 2.0 * f.fdeltadelta) - f.tau ^ 2.0 * f.ftautau); sat.cv := f.R * (-f.tau ^ 2.0) * f.ftautau; sat.pt := f.R * f.d * f.delta * (f.fdelta - f.tau * f.fdeltatau); sat.pd := f.R * f.T * f.delta * (2.0 * f.fdelta + f.delta * f.fdeltadelta); end Modelica.Media.Common.helmholtzToBoundaryProps; function Modelica.Media.Interfaces.PartialTwoPhaseMedium.FluidConstants \"Automatically generated record constructor for Modelica.Media.Interfaces.PartialTwoPhaseMedium.FluidConstants\" input String iupacName; input String casRegistryNumber; input String chemicalFormula; input String structureFormula; input Real molarMass(min = 0.001, max = 0.25, nominal = 0.032, quantity = \"MolarMass\", unit = \"kg/mol\"); input Real criticalTemperature(min = 1.0, max = 1e4, nominal = 300.0, start = 300.0, quantity = \"ThermodynamicTemperature\", unit = \"K\", displayUnit = \"degC\"); input Real criticalPressure(min = 0.0, max = 1e8, nominal = 1e5, start = 1e5, quantity = \"Pressure\", unit = \"Pa\", displayUnit = \"bar\"); input Real criticalMolarVolume(min = 1e-6, max = 1e6, nominal = 1.0, quantity = \"MolarVolume\", unit = \"m3/mol\"); input Real acentricFactor; input Real triplePointTemperature(min = 1.0, max = 1e4, nominal = 300.0, start = 300.0, quantity = \"ThermodynamicTemperature\", unit = \"K\", displayUnit = \"degC\"); input Real triplePointPressure(min = 0.0, max = 1e8, nominal = 1e5, start = 1e5, quantity = \"Pressure\", unit = \"Pa\", displayUnit = \"bar\"); input Real meltingPoint(min = 1.0, max = 1e4, nominal = 300.0, start = 300.0, quantity = \"ThermodynamicTemperature\", unit = \"K\", displayUnit = \"degC\"); input Real normalBoilingPoint(min = 1.0, max = 1e4, nominal = 300.0, start = 300.0, quantity = \"ThermodynamicTemperature\", unit = \"K\", displayUnit = \"degC\"); input Real dipoleMoment(min = 0.0, max = 2.0, unit = \"debye\", quantity = \"ElectricDipoleMoment\"); input Boolean hasIdealGasHeatCapacity = false; input Boolean hasCriticalData = false; input Boolean hasDipoleMoment = false; input Boolean hasFundamentalEquation = false; input Boolean hasLiquidHeatCapacity = false; input Boolean hasSolidHeatCapacity = false; input Boolean hasAccurateViscosityData = false; input Boolean hasAccurateConductivityData = false; input Boolean hasVapourPressureCurve = false; input Boolean hasAcentricFactor = false; input Real HCRIT0(min = -1e8, max = 1e8, nominal = 1e6, quantity = \"SpecificEnergy\", unit = \"J/kg\") = 0.0; input Real SCRIT0(min = -1e6, max = 1e6, nominal = 1000.0, quantity = \"SpecificEntropy\", unit = \"J/(kg.K)\") = 0.0; input Real deltah(min = -1e8, max = 1e8, nominal = 1e6, quantity = \"SpecificEnergy\", unit = \"J/kg\") = 0.0; input Real deltas(min = -1e6, max = 1e6, nominal = 1000.0, quantity = \"SpecificEntropy\", unit = \"J/(kg.K)\") = 0.0; output FluidConstants res; end Modelica.Media.Interfaces.PartialTwoPhaseMedium.FluidConstants; function Modelica.Media.Interfaces.PartialTwoPhaseMedium.FluidConstants$waterConstants \"Automatically generated record constructor for Modelica.Media.Interfaces.PartialTwoPhaseMedium.FluidConstants$waterConstants\" input String iupacName; input String casRegistryNumber; input String chemicalFormula; input String structureFormula; input Real molarMass(min = 0.001, max = 0.25, nominal = 0.032, quantity = \"MolarMass\", unit = \"kg/mol\"); input Real criticalTemperature(min = 1.0, max = 1e4, nominal = 300.0, start = 300.0, quantity = \"ThermodynamicTemperature\", unit = \"K\", displayUnit = \"degC\"); input Real criticalPressure(min = 0.0, max = 1e8, nominal = 1e5, start = 1e5, quantity = \"Pressure\", unit = \"Pa\", displayUnit = \"bar\"); input Real criticalMolarVolume(min = 1e-6, max = 1e6, nominal = 1.0, quantity = \"MolarVolume\", unit = \"m3/mol\"); input Real acentricFactor; input Real triplePointTemperature(min = 1.0, max = 1e4, nominal = 300.0, start = 300.0, quantity = \"ThermodynamicTemperature\", unit = \"K\", displayUnit = \"degC\"); input Real triplePointPressure(min = 0.0, max = 1e8, nominal = 1e5, start = 1e5, quantity = \"Pressure\", unit = \"Pa\", displayUnit = \"bar\"); input Real meltingPoint(min = 1.0, max = 1e4, nominal = 300.0, start = 300.0, quantity = \"ThermodynamicTemperature\", unit = \"K\", displayUnit = \"degC\"); input Real normalBoilingPoint(min = 1.0, max = 1e4, nominal = 300.0, start = 300.0, quantity = \"ThermodynamicTemperature\", unit = \"K\", displayUnit = \"degC\"); input Real dipoleMoment(min = 0.0, max = 2.0, unit = \"debye\", quantity = \"ElectricDipoleMoment\"); input Boolean hasIdealGasHeatCapacity = false; input Boolean hasCriticalData = false; input Boolean hasDipoleMoment = false; input Boolean hasFundamentalEquation = false; input Boolean hasLiquidHeatCapacity = false; input Boolean hasSolidHeatCapacity = false; input Boolean hasAccurateViscosityData = false; input Boolean hasAccurateConductivityData = false; input Boolean hasVapourPressureCurve = false; input Boolean hasAcentricFactor = false; input Real HCRIT0(min = -1e8, max = 1e8, nominal = 1e6, quantity = \"SpecificEnergy\", unit = \"J/kg\") = 0.0; input Real SCRIT0(min = -1e6, max = 1e6, nominal = 1000.0, quantity = \"SpecificEntropy\", unit = \"J/(kg.K)\") = 0.0; input Real deltah(min = -1e8, max = 1e8, nominal = 1e6, quantity = \"SpecificEnergy\", unit = \"J/kg\") = 0.0; input Real deltas(min = -1e6, max = 1e6, nominal = 1000.0, quantity = \"SpecificEntropy\", unit = \"J/(kg.K)\") = 0.0; output FluidConstants$waterConstants res; end Modelica.Media.Interfaces.PartialTwoPhaseMedium.FluidConstants$waterConstants; function Modelica.Media.Water.IF97_Utilities.BaseIF97.Basic.T3a_ph \"Region 3 a: inverse function T(p,h)\" input Real p(quantity = \"Pressure\", unit = \"Pa\", displayUnit = \"bar\", min = -1e9, max = 1e9, start = 1e5, nominal = 1e5) \"Pressure\"; input Real h(quantity = \"SpecificEnergy\", unit = \"J/kg\", nominal = 1e6) \"specific enthalpy\"; output Real T(quantity = \"ThermodynamicTemperature\", unit = \"K\", displayUnit = \"degC\", min = 1.0, max = 6000.0, start = 288.15, nominal = 300.0) \"Temperature\"; protected constant Real[31] n = {-1.33645667811215e-7, 4.55912656802978e-6, -1.46294640700979e-5, 0.0063934131297008, 372.783927268847, -7186.54377460447, 573494.7521034, -2.67569329111439e6, -3.34066283302614e-5, -0.0245479214069597, 47.8087847764996, 7.64664131818904e-6, 0.00128350627676972, 0.0171219081377331, -8.51007304583213, -0.0136513461629781, -3.84460997596657e-6, 0.00337423807911655, -0.551624873066791, 0.72920227710747, -0.00992522757376041, -0.119308831407288, 0.793929190615421, 0.454270731799386, 0.20999859125991, -0.00642109823904738, -0.023515586860454, 0.00252233108341612, -0.00764885133368119, 0.0136176427574291, -0.0133027883575669}; protected constant Real[31] I = {-12.0, -12.0, -12.0, -12.0, -12.0, -12.0, -12.0, -12.0, -10.0, -10.0, -10.0, -8.0, -8.0, -8.0, -8.0, -5.0, -3.0, -2.0, -2.0, -2.0, -1.0, -1.0, 0.0, 0.0, 1.0, 3.0, 3.0, 4.0, 4.0, 10.0, 12.0}; protected constant Real[31] J = {0.0, 1.0, 2.0, 6.0, 14.0, 16.0, 20.0, 22.0, 1.0, 5.0, 12.0, 0.0, 2.0, 4.0, 10.0, 2.0, 0.0, 1.0, 3.0, 4.0, 0.0, 2.0, 0.0, 1.0, 1.0, 0.0, 1.0, 0.0, 3.0, 4.0, 5.0}; protected constant Real hstar(quantity = \"SpecificEnergy\", unit = \"J/kg\", nominal = 1e6) = 2.3e6 \"normalization enthalpy\"; protected constant Real pstar(quantity = \"Pressure\", unit = \"Pa\", displayUnit = \"bar\", min = -1e9, max = 1e9, start = 1e5, nominal = 1e5) = 1e8 \"normalization pressure\"; protected constant Real Tstar(quantity = \"ThermodynamicTemperature\", unit = \"K\", displayUnit = \"degC\", min = 1.0, max = 6000.0, start = 288.15, nominal = 300.0) = 760.0 \"normalization temperature\"; protected Real eta = 4.347826086956522e-7 * h \"normalized specific enthalpy\"; protected Real pi = 1e-8 * p \"normalized specific pressure\"; algorithm T := 760.0 * (0.793929190615421 + (-1.33645667811215e-7) / (0.24 + pi) ^ 12.0 + 4.55912656802978e-6 * (0.24 + pi) ^ (-12.0) * (-0.615 + eta) + (-1.46294640700979e-5) * (0.24 + pi) ^ (-12.0) * (-0.615 + eta) ^ 2.0 + 0.0063934131297008 * (0.24 + pi) ^ (-12.0) * (-0.615 + eta) ^ 6.0 + 372.783927268847 * (0.24 + pi) ^ (-12.0) * (-0.615 + eta) ^ 14.0 + (-7186.54377460447) * (0.24 + pi) ^ (-12.0) * (-0.615 + eta) ^ 16.0 + 573494.7521034 * (0.24 + pi) ^ (-12.0) * (-0.615 + eta) ^ 20.0 + (-2.67569329111439e6) * (0.24 + pi) ^ (-12.0) * (-0.615 + eta) ^ 22.0 + (-3.34066283302614e-5) * (0.24 + pi) ^ (-10.0) * (-0.615 + eta) + (-0.0245479214069597) * (0.24 + pi) ^ (-10.0) * (-0.615 + eta) ^ 5.0 + 47.8087847764996 * (0.24 + pi) ^ (-10.0) * (-0.615 + eta) ^ 12.0 + 7.64664131818904e-6 / (0.24 + pi) ^ 8.0 + 0.00128350627676972 * (0.24 + pi) ^ (-8.0) * (-0.615 + eta) ^ 2.0 + 0.0171219081377331 * (0.24 + pi) ^ (-8.0) * (-0.615 + eta) ^ 4.0 + (-8.51007304583213) * (0.24 + pi) ^ (-8.0) * (-0.615 + eta) ^ 10.0 + (-0.0136513461629781) * (0.24 + pi) ^ (-5.0) * (-0.615 + eta) ^ 2.0 + (-3.84460997596657e-6) / (0.24 + pi) ^ 3.0 + 0.00337423807911655 * (0.24 + pi) ^ (-2.0) * (-0.615 + eta) + (-0.551624873066791) * (0.24 + pi) ^ (-2.0) * (-0.615 + eta) ^ 3.0 + 0.72920227710747 * (0.24 + pi) ^ (-2.0) * (-0.615 + eta) ^ 4.0 + (-0.00992522757376041) / (0.24 + pi) + (-0.119308831407288) * (-0.615 + eta) ^ 2.0 / (0.24 + pi) + 0.454270731799386 * (-0.615 + eta) + 0.20999859125991 * (0.24 + pi) * (-0.615 + eta) + (-0.00642109823904738) * (0.24 + pi) ^ 3.0 + (-0.023515586860454) * (0.24 + pi) ^ 3.0 * (-0.615 + eta) + 0.00252233108341612 * (0.24 + pi) ^ 4.0 + (-0.00764885133368119) * (0.24 + pi) ^ 4.0 * (-0.615 + eta) ^ 3.0 + 0.0136176427574291 * (0.24 + pi) ^ 10.0 * (-0.615 + eta) ^ 4.0 + (-0.0133027883575669) * (0.24 + pi) ^ 12.0 * (-0.615 + eta) ^ 5.0); end Modelica.Media.Water.IF97_Utilities.BaseIF97.Basic.T3a_ph; function Modelica.Media.Water.IF97_Utilities.BaseIF97.Basic.T3b_ph \"Region 3 b: inverse function T(p,h)\" input Real p(quantity = \"Pressure\", unit = \"Pa\", displayUnit = \"bar\", min = -1e9, max = 1e9, start = 1e5, nominal = 1e5) \"Pressure\"; input Real h(quantity = \"SpecificEnergy\", unit = \"J/kg\", nominal = 1e6) \"specific enthalpy\"; output Real T(quantity = \"ThermodynamicTemperature\", unit = \"K\", displayUnit = \"degC\", min = 1.0, max = 6000.0, start = 288.15, nominal = 300.0) \"Temperature\"; protected constant Real[33] n = {3.2325457364492e-5, -1.27575556587181e-4, -4.75851877356068e-4, 0.00156183014181602, 0.105724860113781, -85.8514221132534, 724.140095480911, 0.00296475810273257, -0.00592721983365988, -0.0126305422818666, -0.115716196364853, 84.9000969739595, -0.0108602260086615, 0.0154304475328851, 0.0750455441524466, 0.0252520973612982, -0.0602507901232996, -3.07622221350501, -0.0574011959864879, 5.03471360939849, -0.925081888584834, 3.91733882917546, -77.314600713019, 9493.08762098587, -1.41043719679409e6, 8.49166230819026e6, 0.861095729446704, 0.32334644281172, 0.873281936020439, -0.436653048526683, 0.286596714529479, -0.131778331276228, 0.00676682064330275}; protected constant Real[33] I = {-12.0, -12.0, -10.0, -10.0, -10.0, -10.0, -10.0, -8.0, -8.0, -8.0, -8.0, -8.0, -6.0, -6.0, -6.0, -4.0, -4.0, -3.0, -2.0, -2.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 0.0, 0.0, 1.0, 3.0, 5.0, 6.0, 8.0}; protected constant Real[33] J = {0.0, 1.0, 0.0, 1.0, 5.0, 10.0, 12.0, 0.0, 1.0, 2.0, 4.0, 10.0, 0.0, 1.0, 2.0, 0.0, 1.0, 5.0, 0.0, 4.0, 2.0, 4.0, 6.0, 10.0, 14.0, 16.0, 0.0, 2.0, 1.0, 1.0, 1.0, 1.0, 1.0}; protected constant Real Tstar(quantity = \"ThermodynamicTemperature\", unit = \"K\", displayUnit = \"degC\", min = 1.0, max = 6000.0, start = 288.15, nominal = 300.0) = 860.0 \"normalization temperature\"; protected constant Real pstar(quantity = \"Pressure\", unit = \"Pa\", displayUnit = \"bar\", min = -1e9, max = 1e9, start = 1e5, nominal = 1e5) = 1e8 \"normalization pressure\"; protected constant Real hstar(quantity = \"SpecificEnergy\", unit = \"J/kg\", nominal = 1e6) = 2.8e6 \"normalization enthalpy\"; protected Real pi = 1e-8 * p \"normalized specific pressure\"; protected Real eta = 3.5714285714285716e-7 * h \"normalized specific enthalpy\"; algorithm T := 860.0 * (0.861095729446704 + 3.2325457364492e-5 / (0.298 + pi) ^ 12.0 + (-1.27575556587181e-4) * (0.298 + pi) ^ (-12.0) * (-0.72 + eta) + (-4.75851877356068e-4) / (0.298 + pi) ^ 10.0 + 0.00156183014181602 * (0.298 + pi) ^ (-10.0) * (-0.72 + eta) + 0.105724860113781 * (0.298 + pi) ^ (-10.0) * (-0.72 + eta) ^ 5.0 + (-85.8514221132534) * (0.298 + pi) ^ (-10.0) * (-0.72 + eta) ^ 10.0 + 724.140095480911 * (0.298 + pi) ^ (-10.0) * (-0.72 + eta) ^ 12.0 + 0.00296475810273257 / (0.298 + pi) ^ 8.0 + (-0.00592721983365988) * (0.298 + pi) ^ (-8.0) * (-0.72 + eta) + (-0.0126305422818666) * (0.298 + pi) ^ (-8.0) * (-0.72 + eta) ^ 2.0 + (-0.115716196364853) * (0.298 + pi) ^ (-8.0) * (-0.72 + eta) ^ 4.0 + 84.9000969739595 * (0.298 + pi) ^ (-8.0) * (-0.72 + eta) ^ 10.0 + (-0.0108602260086615) / (0.298 + pi) ^ 6.0 + 0.0154304475328851 * (0.298 + pi) ^ (-6.0) * (-0.72 + eta) + 0.0750455441524466 * (0.298 + pi) ^ (-6.0) * (-0.72 + eta) ^ 2.0 + 0.0252520973612982 / (0.298 + pi) ^ 4.0 + (-0.0602507901232996) * (0.298 + pi) ^ (-4.0) * (-0.72 + eta) + (-3.07622221350501) * (0.298 + pi) ^ (-3.0) * (-0.72 + eta) ^ 5.0 + (-0.0574011959864879) / (0.298 + pi) ^ 2.0 + 5.03471360939849 * (0.298 + pi) ^ (-2.0) * (-0.72 + eta) ^ 4.0 + (-0.925081888584834) * (-0.72 + eta) ^ 2.0 / (0.298 + pi) + 3.91733882917546 * (-0.72 + eta) ^ 4.0 / (0.298 + pi) + (-77.314600713019) * (-0.72 + eta) ^ 6.0 / (0.298 + pi) + 9493.08762098587 * (-0.72 + eta) ^ 10.0 / (0.298 + pi) + (-1.41043719679409e6) * (-0.72 + eta) ^ 14.0 / (0.298 + pi) + 8.49166230819026e6 * (-0.72 + eta) ^ 16.0 / (0.298 + pi) + 0.32334644281172 * (-0.72 + eta) ^ 2.0 + 0.873281936020439 * (0.298 + pi) * (-0.72 + eta) + (-0.436653048526683) * (0.298 + pi) ^ 3.0 * (-0.72 + eta) + 0.286596714529479 * (0.298 + pi) ^ 5.0 * (-0.72 + eta) + (-0.131778331276228) * (0.298 + pi) ^ 6.0 * (-0.72 + eta) + 0.00676682064330275 * (0.298 + pi) ^ 8.0 * (-0.72 + eta)); end Modelica.Media.Water.IF97_Utilities.BaseIF97.Basic.T3b_ph; function Modelica.Media.Water.IF97_Utilities.BaseIF97.Basic.dptofT \"derivative of pressure wrt temperature along the saturation pressure curve\" input Real T(quantity = \"ThermodynamicTemperature\", unit = \"K\", displayUnit = \"degC\", min = 1.0, max = 6000.0, start = 288.15, nominal = 300.0) \"temperature (K)\"; output Real dpt(unit = \"Pa/K\") \"temperature derivative of pressure\"; protected Real[31] o \"vector of auxiliary variables\"; protected Real Tlim \"temeprature limited to TCRIT\"; algorithm Tlim := min(T, 647.096); o[1] := -650.17534844798 + Tlim; o[2] := 1.0 / o[1]; o[3] := (-0.23855557567849) * o[2]; o[4] := o[3] + Tlim; o[5] := (-4823.2657361591) * o[4]; o[6] := o[4] ^ 2.0; o[7] := 14.91510861353 * o[6]; o[8] := 405113.40542057 + o[5] + o[7]; o[9] := o[8] ^ 2.0; o[10] := o[9] ^ 2.0; o[11] := o[1] ^ 2.0; o[12] := 1.0 / o[11]; o[13] := 0.23855557567849 * o[12]; o[14] := 1.0 + o[13]; o[15] := 12020.82470247 * o[4]; o[16] := (-17.073846940092) * o[6]; o[17] := -3.2325550322333e6 + o[15] + o[16]; o[18] := (-4823.2657361591) * o[14]; o[19] := 29.83021722706 * o[14] * o[4]; o[20] := o[18] + o[19]; o[21] := 1167.0521452767 * o[4]; o[22] := -724213.16703206 + o[21] + o[6]; o[23] := o[17] ^ 2.0; o[24] := (-4.0) * o[22] * o[8]; o[25] := o[23] + o[24]; o[26] := sqrt(o[25]); o[27] := (-12020.82470247) * o[4]; o[28] := 17.073846940092 * o[6]; o[29] := 3.2325550322333e6 + o[26] + o[27] + o[28]; o[30] := o[29] ^ 2.0; o[31] := o[30] ^ 2.0; dpt := 1e6 * ((-64.0) * o[10] * (o[14] * (-12020.82470247 + 34.147693880184 * o[4]) + 0.5 * (2.0 * o[17] * o[14] * (12020.82470247 + (-34.147693880184) * o[4]) + (-4.0) * (o[20] * o[22] + o[14] * (1167.0521452767 + 2.0 * o[4]) * o[8])) / o[26]) / (o[31] * o[29]) + 64.0 * o[20] * o[8] * o[9] / o[31]); end Modelica.Media.Water.IF97_Utilities.BaseIF97.Basic.dptofT; function Modelica.Media.Water.IF97_Utilities.BaseIF97.Basic.dtsatofp \"derivative of saturation temperature w.r.t. pressure\" input Real p(quantity = \"Pressure\", unit = \"Pa\", displayUnit = \"bar\", min = -1e9, max = 1e9, start = 1e5, nominal = 1e5) \"pressure\"; output Real dtsat(unit = \"K/Pa\") \"derivative of T w.r.t. p\"; protected Real pi \"dimensionless pressure\"; protected Real[49] o \"vector of auxiliary variables\"; algorithm pi := max(1e-60, 1e-6 * p); o[1] := pi ^ 0.75; o[2] := 1.0 / o[1]; o[3] := (-4.268461735023) * o[2]; o[4] := sqrt(pi); o[5] := 1.0 / o[4]; o[6] := 0.5 * o[5]; o[7] := o[3] + o[6]; o[8] := pi ^ 0.25; o[9] := (-3.2325550322333e6) * o[8]; o[10] := (-724213.16703206) * o[4]; o[11] := 405113.40542057 + o[10] + o[9]; o[12] := (-4.0) * o[11] * o[7]; o[13] := (-808138.758058325) * o[2]; o[14] := (-362106.58351603) * o[5]; o[15] := o[13] + o[14]; o[16] := (-17.073846940092) * o[8]; o[17] := 14.91510861353 + o[16] + o[4]; o[18] := (-4.0) * o[15] * o[17]; o[19] := 3005.2061756175 * o[2]; o[20] := 583.52607263835 * o[5]; o[21] := o[19] + o[20]; o[22] := 12020.82470247 * o[8]; o[23] := 1167.0521452767 * o[4]; o[24] := -4823.2657361591 + o[22] + o[23]; o[25] := 2.0 * o[21] * o[24]; o[26] := o[12] + o[18] + o[25]; o[27] := (-4.0) * o[11] * o[17]; o[28] := o[24] ^ 2.0; o[29] := o[27] + o[28]; o[30] := sqrt(o[29]); o[31] := 1.0 / o[30]; o[32] := -o[30]; o[33] := (-12020.82470247) * o[8]; o[34] := (-1167.0521452767) * o[4]; o[35] := 4823.2657361591 + o[32] + o[33] + o[34]; o[36] := o[30]; o[37] := -4823.2657361591 + o[22] + o[23] + o[36]; o[38] := o[37] ^ 2.0; o[39] := 1.0 / o[38]; o[40] := (-1.72207339365771) * o[30]; o[41] := 21592.2055343628 * o[8]; o[42] := o[30] * o[8]; o[43] := (-8192.87114842946) * o[4]; o[44] := (-0.510632954559659) * o[30] * o[4]; o[45] := (-3100.02526152368) * o[1]; o[46] := pi; o[47] := 1295.95640782102 * o[46]; o[48] := 2862.09212505088 + o[40] + o[41] + o[42] + o[43] + o[44] + o[45] + o[47]; o[49] := o[35] ^ (-2.0); dtsat := 5e-7 * (2.0 * (o[15] / o[35] - o[11] * ((-3005.2061756175) * o[2] + (-0.5) * o[26] * o[31] + (-583.52607263835) * o[5]) * o[49]) + (-20953.46356643991) * (o[39] * (1295.95640782102 + o[2] * (5398.05138359071 + 0.25 * o[30]) + o[26] * o[31] * (-0.861036696828853 + (-0.255316477279829) * o[4]) + (-4096.43557421473) * o[5] + (-0.255316477279829) * o[30] * o[5] + (-2325.01894614276) / o[8] + 0.5 * o[26] * o[31] * o[8]) + (-2.0) * (o[19] + o[20] + 0.5 * o[26] * o[31]) * o[48] / o[37] ^ 3.0) / sqrt(o[39] * o[48])); end Modelica.Media.Water.IF97_Utilities.BaseIF97.Basic.dtsatofp; function Modelica.Media.Water.IF97_Utilities.BaseIF97.Basic.f3 \"Helmholtz function for region 3: f(d,T)\" input Real d(quantity = \"Density\", unit = \"kg/m3\", displayUnit = \"g/cm3\", min = 1e-6, max = 3e4) \"density\"; input Real T(quantity = \"ThermodynamicTemperature\", unit = \"K\", displayUnit = \"degC\", min = 1.0, max = 6000.0, start = 288.15, nominal = 300.0) \"temperature (K)\"; output Modelica.Media.Common.HelmholtzDerivs f \"dimensionless Helmholtz function and dervatives wrt delta and tau\"; protected Real[40] o \"vector of auxiliary variables\"; algorithm f.T := T; f.d := d; f.R := 461.526; f.tau := 647.096 / T; f.delta := if d == 322.0 and T == 647.096 then 0.999999999999999 else abs(0.003105590062111801 * d); o[1] := f.tau ^ 2.0; o[2] := o[1] ^ 2.0; o[3] := o[2] * f.tau; o[4] := o[1] * f.tau; o[5] := o[2] ^ 2.0; o[6] := o[1] * o[5] * f.tau; o[7] := o[5] * f.tau; o[8] := (-0.64207765181607) * o[1]; o[9] := 0.88521043984318 + o[8]; o[10] := o[7] * o[9]; o[11] := -1.1524407806681 + o[10]; o[12] := o[11] * o[2]; o[13] := -1.2654315477714 + o[12]; o[14] := o[1] * o[13]; o[15] := o[1] * o[2] * o[5] * f.tau; o[16] := o[2] * o[5]; o[17] := o[1] * o[5]; o[18] := o[5] ^ 2.0; o[19] := o[1] * o[18] * o[2]; o[20] := o[1] * o[18] * o[2] * f.tau; o[21] := o[18] * o[5]; o[22] := o[1] * o[18] * o[5]; o[23] := 0.25116816848616 * o[2]; o[24] := 0.078841073758308 + o[23]; o[25] := o[15] * o[24]; o[26] := -6.100523451393 + o[25]; o[27] := o[26] * f.tau; o[28] := 9.7944563083754 + o[27]; o[29] := o[2] * o[28]; o[30] := -1.70429417648412 + o[29]; o[31] := o[1] * o[30]; o[32] := f.delta ^ 2.0; o[33] := (-10.9153200808732) * o[1]; o[34] := 13.2781565976477 + o[33]; o[35] := o[34] * o[7]; o[36] := -6.9146446840086 + o[35]; o[37] := o[2] * o[36]; o[38] := -2.5308630955428 + o[37]; o[39] := o[38] * f.tau; o[40] := o[18] * o[5] * f.tau; f.f := -15.732845290239 + f.tau * (20.944396974307 + (-7.6867707878716 + o[3] * (2.6185947787954 + o[4] * (-2.808078114862 + o[1] * (1.2053369696517 + (-0.0084566812812502) * o[6])))) * f.tau) + f.delta * (o[14] + f.delta * (0.38493460186671 + o[1] * (-0.85214708824206 + o[2] * (4.8972281541877 + (-3.0502617256965 + o[15] * (0.039420536879154 + 0.12558408424308 * o[2])) * f.tau)) + f.delta * (-0.2799932969871 + o[1] * (1.389979956946 + o[1] * (-2.018991502357 + o[16] * (-0.0082147637173963 + (-0.47596035734923) * o[17]))) + f.delta * (0.0439840744735 + o[1] * (-0.44476435428739 + o[1] * (0.90572070719733 + 0.70522450087967 * o[19])) + f.delta * (f.delta * (-0.022175400873096 + o[1] * (0.094260751665092 + 0.16436278447961 * o[21]) + f.delta * (f.delta * (f.delta * (o[1] * (5.7922953628084e-4 + 0.0032308904703711 * o[21]) + f.delta * (8.0964802996215e-5 + (-4.4923899061815e-5) * f.delta * o[22] + (-1.6557679795037e-4) * f.tau)) + (-0.014834345352472) * o[22]) + (-0.013503372241348) * o[1])) + (0.10770512626332 + o[1] * (-0.32913623258954 + (-0.50871062041158) * o[20])) * f.tau))))) + 1.0658070028513 * log(f.delta); f.fdelta := (1.0658070028513 + f.delta * (o[14] + f.delta * (0.76986920373342 + o[31] + f.delta * (-0.8399798909613 + o[1] * (4.169939870838 + o[1] * (-6.056974507071 + o[16] * (-0.0246442911521889 + (-1.42788107204769) * o[17]))) + f.delta * (0.175936297894 + o[1] * (-1.77905741714956 + o[1] * (3.6228828287893 + 2.82089800351868 * o[19])) + f.delta * (f.delta * (-0.133052405238576 + o[1] * (0.56556450999055 + 0.98617670687766 * o[21]) + f.delta * (f.delta * (f.delta * (o[1] * (0.0052130658265276 + 0.0290780142333399 * o[21]) + f.delta * (8.0964802996215e-4 + (-4.9416288967996e-4) * f.delta * o[22] + (-0.0016557679795037) * f.tau)) + (-0.118674762819776) * o[22]) + (-0.094523605689436) * o[1])) + (0.5385256313166 + o[1] * (-1.6456811629477 + (-2.5435531020579) * o[20])) * f.tau)))))) / f.delta; f.fdeltadelta := (-1.0658070028513 + o[32] * (0.76986920373342 + o[31] + f.delta * (-1.6799597819226 + o[1] * (8.339879741676 + o[1] * (-12.113949014142 + o[16] * (-0.049288582304378 + (-2.85576214409538) * o[17]))) + f.delta * (0.527808893682 + o[1] * (-5.3371722514487 + o[1] * (10.868648486368 + 8.462694010556 * o[19])) + f.delta * (f.delta * (-0.66526202619288 + o[1] * (2.82782254995276 + 4.9308835343883 * o[21]) + f.delta * (f.delta * (f.delta * (o[1] * (0.04170452661222 + 0.232624113866719 * o[21]) + f.delta * (0.0072868322696594 + (-0.0049416288967996) * f.delta * o[22] + (-0.0149019118155333) * f.tau)) + (-0.83072333973843) * o[22]) + (-0.56714163413662) * o[1])) + (2.1541025252664 + o[1] * (-6.5827246517908 + (-10.1742124082316) * o[20])) * f.tau))))) / o[32]; f.ftau := 20.944396974307 + (-15.3735415757432 + o[3] * (18.3301634515678 + o[4] * (-28.08078114862 + o[1] * (14.4640436358204 + (-0.194503669468755) * o[6])))) * f.tau + f.delta * (o[39] + f.delta * (f.tau * (-1.70429417648412 + o[2] * (29.3833689251262 + (-21.3518320798755 + o[15] * (0.86725181134139 + 3.2651861903201 * o[2])) * f.tau)) + f.delta * ((2.779959913892 + o[1] * (-8.075966009428 + o[16] * (-0.131436219478341 + (-12.37496929108) * o[17]))) * f.tau + f.delta * ((-0.88952870857478 + o[1] * (3.6228828287893 + 18.3358370228714 * o[19])) * f.tau + f.delta * (0.10770512626332 + o[1] * (-0.98740869776862 + (-13.2264761307011) * o[20]) + f.delta * ((0.188521503330184 + 4.2734323964699 * o[21]) * f.tau + f.delta * (f.delta * (f.delta * (f.delta * (-1.6557679795037e-4 + (-0.00116802137560719) * f.delta * o[40]) + (0.00115845907256168 + 0.084003152229649 * o[21]) * f.tau) + (-0.38569297916427) * o[40]) + (-0.027006744482696) * f.tau))))))); f.ftautau := -15.3735415757432 + o[3] * (109.980980709407 + o[4] * (-252.72703033758 + o[1] * (159.104479994024 + (-4.2790807283126) * o[6]))) + f.delta * (-2.5308630955428 + o[2] * (-34.573223420043 + (185.894192367068 + (-174.645121293971) * o[1]) * o[7]) + f.delta * (-1.70429417648412 + o[2] * (146.916844625631 + (-128.110992479253 + o[15] * (18.2122880381691 + 81.629654758002 * o[2])) * f.tau) + f.delta * (2.779959913892 + o[1] * (-24.227898028284 + o[16] * (-1.97154329217511 + (-309.374232277) * o[17])) + f.delta * (-0.88952870857478 + o[1] * (10.868648486368 + 458.39592557179 * o[19]) + f.delta * (f.delta * (0.188521503330184 + 106.835809911747 * o[21] + f.delta * (-0.027006744482696 + f.delta * (f.delta * (0.00115845907256168 + o[21] * (2.10007880574121 + (-0.0292005343901797) * o[32])) + (-9.6423244791068) * o[21]))) + (-1.97481739553724 + (-330.66190326753) * o[20]) * f.tau))))); f.fdeltatau := o[39] + f.delta * (f.tau * (-3.4085883529682 + o[2] * (58.766737850252 + (-42.703664159751 + o[15] * (1.73450362268278 + 6.5303723806402 * o[2])) * f.tau)) + f.delta * ((8.339879741676 + o[1] * (-24.227898028284 + o[16] * (-0.39430865843502 + (-37.12490787324) * o[17]))) * f.tau + f.delta * ((-3.5581148342991 + o[1] * (14.4915313151573 + 73.343348091486 * o[19])) * f.tau + f.delta * (0.5385256313166 + o[1] * (-4.9370434888431 + (-66.132380653505) * o[20]) + f.delta * ((1.1311290199811 + 25.6405943788192 * o[21]) * f.tau + f.delta * (f.delta * (f.delta * (f.delta * (-0.0016557679795037 + (-0.0128482351316791) * f.delta * o[40]) + (0.0104261316530551 + 0.75602837006684 * o[21]) * f.tau) + (-3.08554383331418) * o[40]) + (-0.189047211378872) * f.tau)))))); end Modelica.Media.Water.IF97_Utilities.BaseIF97.Basic.f3; function Modelica.Media.Water.IF97_Utilities.BaseIF97.Basic.g1 \"Gibbs function for region 1: g(p,T)\" input Real p(quantity = \"Pressure\", unit = \"Pa\", displayUnit = \"bar\", min = -1e9, max = 1e9, start = 1e5, nominal = 1e5) \"pressure\"; input Real T(quantity = \"ThermodynamicTemperature\", unit = \"K\", displayUnit = \"degC\", min = 1.0, max = 6000.0, start = 288.15, nominal = 300.0) \"temperature (K)\"; output Modelica.Media.Common.GibbsDerivs g \"dimensionless Gibbs funcion and dervatives wrt pi and tau\"; protected Real pi1 \"dimensionless pressure\"; protected Real tau1 \"dimensionless temperature\"; protected Real[45] o \"vector of auxiliary variables\"; protected Real pl \"auxiliary variable\"; algorithm pl := min(p, 2.2063999e7); assert(p > 611.657, \"IF97 medium function g1 called with too low pressure p = \" + String(p, 6, 0, true) + \" Pa <= \" + String(611.657, 6, 0, true) + \" Pa (triple point pressure)\"); assert(p <= 1e8, \"IF97 medium function g1: the input pressure (= \" + String(p, 6, 0, true) + \" Pa) is higher than 100 Mpa\"); assert(T >= 273.15, \"IF97 medium function g1: the temperature (= \" + String(T, 6, 0, true) + \" K) is lower than 273.15 K!\"); g.p := p; g.T := T; g.R := 461.526; g.pi := 6.049606775559589e-8 * p; g.tau := 1386.0 / T; pi1 := 7.1 - g.pi; tau1 := -1.222 + g.tau; o[1] := tau1 ^ 2.0; o[2] := o[1] ^ 2.0; o[3] := o[2] ^ 2.0; o[4] := o[3] * tau1; o[5] := 1.0 / o[4]; o[6] := o[1] * o[2]; o[7] := o[1] * tau1; o[8] := 1.0 / o[7]; o[9] := o[1] * o[2] * o[3]; o[10] := 1.0 / o[2]; o[11] := o[2] * tau1; o[12] := 1.0 / o[11]; o[13] := o[2] * o[3]; o[14] := 1.0 / o[3]; o[15] := pi1 ^ 2.0; o[16] := o[15] * pi1; o[17] := o[15] ^ 2.0; o[18] := o[17] ^ 2.0; o[19] := o[17] * o[18] * pi1; o[20] := o[15] * o[17]; o[21] := o[3] ^ 2.0; o[22] := o[21] ^ 2.0; o[23] := o[22] * o[3] * tau1; o[24] := 1.0 / o[23]; o[25] := o[22] * o[3]; o[26] := 1.0 / o[25]; o[27] := o[1] * o[2] * o[22] * tau1; o[28] := 1.0 / o[27]; o[29] := o[1] * o[2] * o[22]; o[30] := 1.0 / o[29]; o[31] := o[1] * o[2] * o[21] * o[3] * tau1; o[32] := 1.0 / o[31]; o[33] := o[2] * o[21] * o[3] * tau1; o[34] := 1.0 / o[33]; o[35] := o[1] * o[3] * tau1; o[36] := 1.0 / o[35]; o[37] := o[1] * o[3]; o[38] := 1.0 / o[37]; o[39] := 1.0 / o[6]; o[40] := o[1] * o[22] * o[3]; o[41] := 1.0 / o[40]; o[42] := 1.0 / o[22]; o[43] := o[1] * o[2] * o[21] * o[3]; o[44] := 1.0 / o[43]; o[45] := 1.0 / o[13]; g.g := pi1 * (pi1 * (pi1 * (o[10] * (-3.1679644845054e-5 + o[2] * (-2.8270797985312e-6 + (-8.5205128120103e-10) * o[6])) + pi1 * (o[12] * (-2.2425281908e-6 + (-6.5171222895601e-7 + (-1.4341729937924e-13) * o[13]) * o[7]) + pi1 * (o[16] * ((-1.2734301741641e-9 + (-1.7424871230634e-10) * o[11]) * o[36] + o[19] * (o[15] * (1.4478307828521e-20 * o[32] + o[20] * (2.6335781662795e-23 * o[30] + pi1 * (pi1 * (1.8228094581404e-24 * o[26] + (-9.3537087292458e-26) * o[24] * pi1) + (-1.1947622640071e-23) * o[28]))) + (-6.8762131295531e-19) * o[34])) + (-4.0516996860117e-7) * o[14]))) + o[8] * (-4.7184321073267e-4 + o[7] * (-3.0001780793026e-4 + (4.7661393906987e-5 + o[1] * (-4.4141845330846e-6 + (-7.2694996297594e-16) * o[9])) * tau1))) + o[5] * (2.8319080123804e-4 + o[1] * (-6.0706301565874e-4 + o[6] * (-0.018990068218419 + tau1 * (-0.032529748770505 + (-0.021841717175414 + (-5.283835796993e-5) * o[1]) * tau1))))) + (0.14632971213167 + tau1 * (-0.84548187169114 + tau1 * (-3.756360367204 + tau1 * (3.3855169168385 + tau1 * (-0.95791963387872 + tau1 * (0.15772038513228 + (-0.016616417199501 + 8.1214629983568e-4 * tau1) * tau1)))))) / o[1]; g.gpi := pi1 * (pi1 * (o[10] * (9.5038934535162e-5 + o[2] * (8.4812393955936e-6 + 2.55615384360309e-9 * o[6])) + pi1 * (o[12] * (8.9701127632e-6 + (2.60684891582404e-6 + 5.7366919751696e-13 * o[13]) * o[7]) + pi1 * (2.02584984300585e-6 * o[14] + o[16] * ((1.01874413933128e-8 + 1.39398969845072e-9 * o[11]) * o[36] + o[19] * (1.44400475720615e-17 * o[34] + o[15] * (o[20] * (pi1 * (3.5842867920213e-22 * o[28] + pi1 * (2.99318679335866e-24 * o[24] * pi1 + (-5.6507093202352e-23) * o[26])) + (-7.6373766822106e-22) * o[30]) + (-3.3300108005598e-19) * o[32])))))) + o[8] * (9.4368642146534e-4 + o[7] * (6.0003561586052e-4 + (-9.5322787813974e-5 + o[1] * (8.8283690661692e-6 + 1.45389992595188e-15 * o[9])) * tau1))) + o[5] * (-2.8319080123804e-4 + o[1] * (6.0706301565874e-4 + o[6] * (0.018990068218419 + tau1 * (0.032529748770505 + (0.021841717175414 + 5.283835796993e-5 * o[1]) * tau1)))); g.gpipi := pi1 * (o[10] * (-1.90077869070324e-4 + o[2] * (-1.69624787911872e-5 + (-5.1123076872062e-9) * o[6])) + pi1 * (o[12] * (-2.69103382896e-5 + (-7.8205467474721e-6 + (-1.72100759255088e-12) * o[13]) * o[7]) + pi1 * (o[16] * ((-7.131208975319e-8 + (-9.757927889155e-9) * o[11]) * o[36] + o[19] * (o[15] * (7.3260237612316e-18 * o[32] + o[20] * (2.13846547101895e-20 * o[30] + pi1 * (pi1 * (1.69521279607057e-21 * o[26] + (-9.2788790594118e-23) * o[24] * pi1) + (-1.03944316968618e-20) * o[28]))) + (-2.8880095144123e-16) * o[34])) + (-8.1033993720234e-6) * o[14]))) + o[8] * (-9.4368642146534e-4 + o[7] * (-6.0003561586052e-4 + (9.5322787813974e-5 + o[1] * (-8.8283690661692e-6 + (-1.45389992595188e-15) * o[9])) * tau1)); g.gtau := pi1 * (o[38] * (-0.00254871721114236 + o[1] * (0.0042494411096112 + (0.018990068218419 + (-0.021841717175414 + (-1.5851507390979e-4) * o[1]) * o[1]) * o[6])) + pi1 * (o[10] * (0.00141552963219801 + o[2] * (4.7661393906987e-5 + o[1] * (-1.32425535992538e-5 + (-1.2358149370591e-14) * o[9]))) + pi1 * (o[12] * (1.26718579380216e-4 + (-5.1123076872062e-9) * o[37]) + pi1 * (o[39] * (1.1212640954e-5 + (1.30342445791202e-6 + (-1.4341729937924e-12) * o[13]) * o[7]) + pi1 * (3.2413597488094e-6 * o[5] + o[16] * ((1.40077319158051e-8 + 1.04549227383804e-9 * o[11]) * o[45] + o[19] * (1.9941018075704e-17 * o[44] + o[15] * (o[20] * (pi1 * (4.6595728296277e-22 * o[26] + pi1 * (3.8350205789908e-24 * o[41] * pi1 + (-7.2912378325616e-23) * o[24])) + (-1.00075970318621e-21) * o[28]) + (-4.4882754268415e-19) * o[42])))))))) + o[8] * (-0.29265942426334 + tau1 * (0.84548187169114 + o[1] * (3.3855169168385 + tau1 * (-1.91583926775744 + tau1 * (0.47316115539684 + (-0.066465668798004 + 0.0040607314991784 * tau1) * tau1))))); g.gtautau := pi1 * (o[36] * (0.0254871721114236 + o[1] * (-0.033995528876889 + (-0.037980136436838 + (-3.1703014781958e-4) * o[2]) * o[6])) + pi1 * (o[12] * (-0.005662118528792 + o[6] * (-2.64851071985076e-5 + (-1.97730389929456e-13) * o[9])) + pi1 * ((-6.3359289690108e-4 + (-2.55615384360309e-8) * o[37]) * o[39] + pi1 * (pi1 * (o[16] * (o[19] * (o[15] * (o[20] * (3.9029628424262e-20 * o[26] + pi1 * (pi1 * (2.98940751135026e-21 * o[41] + (-1.61070864317613e-22) * pi1 / (o[1] * o[22] * o[3] * tau1)) + (-1.86382913185108e-20) * o[24])) + 1.43624813658928e-17 / (o[22] * tau1)) + (-5.9823054227112e-16) * o[32]) + (-1.68092782989661e-7 + (-7.3184459168663e-9) * o[11]) / (o[2] * o[3] * tau1)) + (-2.91722377392842e-5) * o[38]) + (-6.7275845724e-5 + (-3.9102733737361e-6 + (-1.29075569441316e-11) * o[13]) * o[7]) / (o[1] * o[2] * tau1))))) + o[10] * (0.87797827279002 + tau1 * (-1.69096374338228 + o[7] * (-1.91583926775744 + tau1 * (0.94632231079368 + (-0.199397006394012 + 0.0162429259967136 * tau1) * tau1)))); g.gtaupi := o[38] * (0.00254871721114236 + o[1] * (-0.0042494411096112 + (-0.018990068218419 + (0.021841717175414 + 1.5851507390979e-4 * o[1]) * o[1]) * o[6])) + pi1 * (o[10] * (-0.00283105926439602 + o[2] * (-9.5322787813974e-5 + o[1] * (2.64851071985076e-5 + 2.4716298741182e-14 * o[9]))) + pi1 * (o[12] * (-3.8015573814065e-4 + 1.53369230616185e-8 * o[37]) + pi1 * (o[39] * (-4.4850563816e-5 + (-5.2136978316481e-6 + 5.7366919751696e-12 * o[13]) * o[7]) + pi1 * (o[16] * ((-1.12061855326441e-7 + (-8.3639381907043e-9) * o[11]) * o[45] + o[19] * (o[15] * (1.03230334817355e-17 * o[42] + o[20] * (2.90220313924001e-20 * o[28] + pi1 * (pi1 * (2.2602837280941e-21 * o[24] + (-1.22720658527705e-22) * o[41] * pi1) + (-1.39787184888831e-20) * o[26]))) + (-4.1876137958978e-16) * o[44])) + (-1.62067987440468e-5) * o[5])))); end Modelica.Media.Water.IF97_Utilities.BaseIF97.Basic.g1; function Modelica.Media.Water.IF97_Utilities.BaseIF97.Basic.g2 \"Gibbs function for region 2: g(p,T)\" input Real p(quantity = \"Pressure\", unit = \"Pa\", displayUnit = \"bar\", min = -1e9, max = 1e9, start = 1e5, nominal = 1e5) \"pressure\"; input Real T(quantity = \"ThermodynamicTemperature\", unit = \"K\", displayUnit = \"degC\", min = 1.0, max = 6000.0, start = 288.15, nominal = 300.0) \"temperature (K)\"; output Modelica.Media.Common.GibbsDerivs g \"dimensionless Gibbs funcion and dervatives wrt pi and tau\"; protected Real tau2 \"dimensionless temperature\"; protected Real[55] o \"vector of auxiliary variables\"; algorithm g.p := p; g.T := T; g.R := 461.526; assert(p > 0.0, \"IF97 medium function g2 called with too low pressure p = \" + String(p, 6, 0, true) + \" Pa <= \" + String(611.657, 6, 0, true) + \" Pa (triple point pressure)\"); assert(p <= 1e8, \"IF97 medium function g2: the input pressure (= \" + String(p, 6, 0, true) + \" Pa) is higher than 100 Mpa\"); assert(T >= 273.15, \"IF97 medium function g2: the temperature (= \" + String(T, 6, 0, true) + \" K) is lower than 273.15 K!\"); assert(T <= 1073.15, \"IF97 medium function g2: the input temperature (= \" + String(T, 6, 0, true) + \" K) is higher than the limit of 1073.15 K\"); g.pi := 1e-6 * p; g.tau := 540.0 / T; tau2 := -0.5 + g.tau; o[1] := tau2 ^ 2.0; o[2] := o[1] * tau2; o[3] := (-0.05032527872793) * o[2]; o[4] := -0.057581259083432 + o[3]; o[5] := o[4] * tau2; o[6] := -0.045996013696365 + o[5]; o[7] := o[6] * tau2; o[8] := -0.017834862292358 + o[7]; o[9] := o[8] * tau2; o[10] := o[1] ^ 2.0; o[11] := o[10] ^ 2.0; o[12] := o[11] ^ 2.0; o[13] := o[10] * o[11] * o[12] * tau2; o[14] := o[1] * o[10] * tau2; o[15] := o[10] * o[11] * tau2; o[16] := o[1] * o[12] * tau2; o[17] := o[1] * o[11] * tau2; o[18] := o[1] * o[10] * o[11]; o[19] := o[10] * o[11] * o[12]; o[20] := o[1] * o[10]; o[21] := g.pi ^ 2.0; o[22] := o[21] ^ 2.0; o[23] := o[21] * o[22]; o[24] := o[10] * o[12] * tau2; o[25] := o[12] ^ 2.0; o[26] := o[11] * o[12] * o[25] * tau2; o[27] := o[10] * o[12]; o[28] := o[1] * o[10] * o[11] * tau2; o[29] := o[10] * o[12] * o[25] * tau2; o[30] := o[1] * o[10] * o[25] * tau2; o[31] := o[1] * o[11] * o[12]; o[32] := o[1] * o[12]; o[33] := g.tau ^ 2.0; o[34] := o[33] ^ 2.0; o[35] := (-5.3349095828174e-5) * o[13]; o[36] := -0.087594591301146 + o[35]; o[37] := o[2] * o[36]; o[38] := -0.007878555448671 + o[37]; o[39] := o[1] * o[38]; o[40] := -3.789797503263e-4 + o[39]; o[41] := o[40] * tau2; o[42] := -6.6065283340406e-5 + o[41]; o[43] := o[42] * tau2; o[44] := 5.7870447262208e-6 * tau2; o[45] := (-0.30195167236758) * o[2]; o[46] := -0.172743777250296 + o[45]; o[47] := o[46] * tau2; o[48] := -0.09199202739273 + o[47]; o[49] := o[48] * tau2; o[50] := o[1] * o[11]; o[51] := o[10] * o[11]; o[52] := o[11] * o[12] * o[25]; o[53] := o[10] * o[12] * o[25]; o[54] := o[1] * o[10] * o[25]; o[55] := o[11] * o[12] * tau2; g.g := g.pi * (-0.0017731742473213 + o[9] + g.pi * (tau2 * (-3.3032641670203e-5 + (-1.8948987516315e-4 + o[1] * (-0.0039392777243355 + (-0.043797295650573 + (-2.6674547914087e-5) * o[13]) * o[2])) * tau2) + g.pi * (2.0481737692309e-8 + (4.3870667284435e-7 + o[1] * (-3.227767723857e-5 + (-0.0015033924542148 + (-0.040668253562649) * o[13]) * o[2])) * tau2 + g.pi * (g.pi * (2.2922076337661e-6 * o[14] + g.pi * ((-1.6714766451061e-11 + o[15] * (-0.0021171472321355 + (-23.895741934104) * o[16])) * o[2] + g.pi * (-5.905956432427e-18 + o[17] * (-1.2621808899101e-6 + (-0.038946842435739) * o[18]) + g.pi * (o[11] * (1.1256211360459e-11 + (-8.2311340897998) * o[19]) + g.pi * (1.9809712802088e-8 * o[15] + g.pi * (o[10] * (1.0406965210174e-19 + (-1.0234747095929e-13 + (-1.0018179379511e-9) * o[10]) * o[20]) + o[23] * (o[13] * (-8.0882908646985e-11 + 0.10693031879409 * o[24]) + o[21] * (o[21] * (o[27] * (8.9185845355421e-25 + (3.0629316876232e-13 + (-4.2002467698208e-6) * o[15]) * o[28]) + g.pi * (g.pi * (3.7826947613457e-6 * o[29] + g.pi * (o[31] * (7.3087610595061e-29 + o[18] * (5.5414715350778e-17 + (-9.436970724121e-7) * o[32])) * g.pi + (-1.2768608934681e-15) * o[30])) + (-5.9056029685639e-26) * o[24])) + (-0.33662250574171) * o[26])))))))) + tau2 * (-7.8847309559367e-10 + (1.279071785 ...[truncated 259988 chars]... .18568363667416e-19 + o[1] * o[2] * (-9.19148577641497e-22 + pi1 * (4.27026404402408e-22 + (-6.66749357417962e-23 + 3.49930466305574e-24 * pi1) * pi1))))))))))); +h := 639675.036 * (2.42896927729349 + pi1 * (-0.00141131225285294 + pi1 * (0.00143759406818289 + pi1 * (1.25338925082983e-4 + pi1 * (1.23617764767172e-5 + pi1 * (3.17834967400818e-6 + o[1] * pi1 * (1.46754947271665e-8 + o[2] * o[3] * pi1 * (1.86779322717506e-17 + o[1] * (-4.18568363667416e-19 + o[1] * o[2] * (-9.19148577641497e-22 + pi1 * (4.27026404402408e-22 + (-6.66749357417962e-23 + 3.49930466305574e-24 * pi1) * pi1))))))))))); end Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.hupperofp1; function Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.hupperofp2 \"explicit upper specific enthalpy limit of region 2 as function of pressure\" -input Real p(quantity = \"Pressure\", unit = \"Pa\", displayUnit = \"bar\", min = -1000000000.0, max = 1000000000.0, start = 100000.0, nominal = 100000.0) \"pressure\"; -output Real h(quantity = \"SpecificEnergy\", unit = \"J/kg\", nominal = 1000000.0) \"specific enthalpy\"; +input Real p(quantity = \"Pressure\", unit = \"Pa\", displayUnit = \"bar\", min = -1e9, max = 1e9, start = 1e5, nominal = 1e5) \"pressure\"; +output Real h(quantity = \"SpecificEnergy\", unit = \"J/kg\", nominal = 1e6) \"specific enthalpy\"; protected Real pi \"dimensionless pressure\"; protected Real[2] o \"vector of auxiliary variables\"; algorithm -pi := 1e-06 * p; +pi := 1e-6 * p; assert(p > 611.657, \"IF97 medium function hupperofp2 called with too low pressure p = \" + String(p, 6, 0, true) + \" Pa <= \" + String(611.657, 6, 0, true) + \" Pa (triple point pressure)\"); o[1] := pi ^ 2.0; o[2] := o[1] ^ 3.0; -h := 4160663.37647071 + pi * (-4518.48617188327 + pi * (-8.53409968320258 + pi * (0.109090430596056 + pi * (-0.000172486052272327 + pi * (4.2261295097284e-15 + pi * (-1.27295130636232e-10 + pi * (-3.79407294691742e-25 + pi * (7.56960433802525e-23 + pi * (7.16825117265975e-32 + pi * (3.37267475986401e-21 + (-7.5656940729795e-74 + o[1] * (-8.00969737237617e-134 + (1.6746290980312e-65 + pi * (-3.71600586812966e-69 + pi * (8.066305891708841e-129 + (-1.76117969553159e-103 + 1.88543121025106e-84 * pi) * pi))) * o[1])) * o[2])))))))))); +h := 4.16066337647071e6 + pi * (-4518.48617188327 + pi * (-8.53409968320258 + pi * (0.109090430596056 + pi * (-1.72486052272327e-4 + pi * (4.2261295097284e-15 + pi * (-1.27295130636232e-10 + pi * (-3.79407294691742e-25 + pi * (7.56960433802525e-23 + pi * (7.16825117265975e-32 + pi * (3.37267475986401e-21 + (-7.5656940729795e-74 + o[1] * (-8.00969737237617e-134 + (1.6746290980312e-65 + pi * (-3.71600586812966e-69 + pi * (8.06630589170884e-129 + (-1.76117969553159e-103 + 1.88543121025106e-84 * pi) * pi))) * o[1])) * o[2])))))))))); end Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.hupperofp2; function Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.hupperofp5 \"explicit upper specific enthalpy limit of region 5 as function of pressure\" -input Real p(quantity = \"Pressure\", unit = \"Pa\", displayUnit = \"bar\", min = -1000000000.0, max = 1000000000.0, start = 100000.0, nominal = 100000.0) \"pressure\"; -output Real h(quantity = \"SpecificEnergy\", unit = \"J/kg\", nominal = 1000000.0) \"specific enthalpy\"; +input Real p(quantity = \"Pressure\", unit = \"Pa\", displayUnit = \"bar\", min = -1e9, max = 1e9, start = 1e5, nominal = 1e5) \"pressure\"; +output Real h(quantity = \"SpecificEnergy\", unit = \"J/kg\", nominal = 1e6) \"specific enthalpy\"; protected Real pi \"dimensionless pressure\"; algorithm -pi := 1e-06 * p; +pi := 1e-6 * p; assert(p > 611.657, \"IF97 medium function hupperofp5 called with too low pressure p = \" + String(p, 6, 0, true) + \" Pa <= \" + String(611.657, 6, 0, true) + \" Pa (triple point pressure)\"); -h := 461526.0 * (15.9838891400332 + pi * (-0.000489898813722568 + (-5.01510211858761e-08 + 7.5006972718273e-08 * pi) * pi)); +h := 461526.0 * (15.9838891400332 + pi * (-4.89898813722568e-4 + (-5.01510211858761e-8 + 7.5006972718273e-8 * pi) * pi)); end Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.hupperofp5; function Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.hv_p \"vapour specific enthalpy on the boundary between regions 4 and 3 or 2\" -input Real p(quantity = \"Pressure\", unit = \"Pa\", displayUnit = \"bar\", min = -1000000000.0, max = 1000000000.0, start = 100000.0, nominal = 100000.0) \"pressure\"; -output Real h(quantity = \"SpecificEnergy\", unit = \"J/kg\", nominal = 1000000.0) \"specific enthalpy\"; +input Real p(quantity = \"Pressure\", unit = \"Pa\", displayUnit = \"bar\", min = -1e9, max = 1e9, start = 1e5, nominal = 1e5) \"pressure\"; +output Real h(quantity = \"SpecificEnergy\", unit = \"J/kg\", nominal = 1e6) \"specific enthalpy\"; algorithm h := Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.hvl_p(p, Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.dewcurve_p(p)); end Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.hv_p; function Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.hv_p_R4b \"explicit approximation of vapour specific enthalpy on the boundary between regions 4 and 3\" -input Real p(quantity = \"Pressure\", unit = \"Pa\", displayUnit = \"bar\", min = -1000000000.0, max = 1000000000.0, start = 100000.0, nominal = 100000.0) \"pressure\"; -output Real h(quantity = \"SpecificEnergy\", unit = \"J/kg\", nominal = 1000000.0) \"specific enthalpy\"; +input Real p(quantity = \"Pressure\", unit = \"Pa\", displayUnit = \"bar\", min = -1e9, max = 1e9, start = 1e5, nominal = 1e5) \"pressure\"; +output Real h(quantity = \"SpecificEnergy\", unit = \"J/kg\", nominal = 1e6) \"specific enthalpy\"; protected Real x \"auxiliary variable\"; algorithm -x := acos(4.532269760696156e-08 * p); -h := 2087546.84511715 * (1.0 + x * (0.4880153718655694 + x * (0.2079670746250689 + x * (-6.084122698421623 + x * (25.08887602293532 + x * (-48.38215180269516 + x * (45.66489164833212 + (-16.98555442961553 + 0.0006616936460057692 * x) * x))))))); +x := acos(4.532269760696156e-8 * p); +h := 2.08754684511715e6 * (1.0 + x * (0.4880153718655694 + x * (0.2079670746250689 + x * (-6.084122698421623 + x * (25.08887602293532 + x * (-48.38215180269516 + x * (45.66489164833212 + (-16.98555442961553 + 6.616936460057692e-4 * x) * x))))))); end Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.hv_p_R4b; function Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.hvl_p \"Icon for a function\" -input Real p(quantity = \"Pressure\", unit = \"Pa\", displayUnit = \"bar\", min = -1000000000.0, max = 1000000000.0, start = 100000.0, nominal = 100000.0) \"pressure\"; +input Real p(quantity = \"Pressure\", unit = \"Pa\", displayUnit = \"bar\", min = -1e9, max = 1e9, start = 1e5, nominal = 1e5) \"pressure\"; input Modelica.Media.Common.IF97PhaseBoundaryProperties bpro \"property record\"; -output Real h(quantity = \"SpecificEnergy\", unit = \"J/kg\", nominal = 1000000.0) \"specific enthalpy\"; +output Real h(quantity = \"SpecificEnergy\", unit = \"J/kg\", nominal = 1e6) \"specific enthalpy\"; algorithm h := bpro.h; end Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.hvl_p; function Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.hvl_p_der \"derivative function for the specific enthalpy along the phase boundary\" -input Real p(quantity = \"Pressure\", unit = \"Pa\", displayUnit = \"bar\", min = -1000000000.0, max = 1000000000.0, start = 100000.0, nominal = 100000.0) \"pressure\"; +input Real p(quantity = \"Pressure\", unit = \"Pa\", displayUnit = \"bar\", min = -1e9, max = 1e9, start = 1e5, nominal = 1e5) \"pressure\"; input Modelica.Media.Common.IF97PhaseBoundaryProperties bpro \"property record\"; input Real p_der \"derivative of pressure\"; output Real h_der \"time derivative of specific enthalpy along the phase boundary\"; algorithm if bpro.region3boundary then @@ -1276,33 +1276,33 @@ h_der := p_der * (1.0 / bpro.d + bpro.cp / bpro.dpT - bpro.T * bpro.vt); end if; end Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.hvl_p_der; function Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.region_ph \"return the current region (valid values: 1,2,3,4,5) in IF97 for given pressure and specific enthalpy\" -input Real p(quantity = \"Pressure\", unit = \"Pa\", displayUnit = \"bar\", min = -1000000000.0, max = 1000000000.0, start = 100000.0, nominal = 100000.0) \"pressure\"; -input Real h(quantity = \"SpecificEnergy\", unit = \"J/kg\", nominal = 1000000.0) \"specific enthalpy\"; +input Real p(quantity = \"Pressure\", unit = \"Pa\", displayUnit = \"bar\", min = -1e9, max = 1e9, start = 1e5, nominal = 1e5) \"pressure\"; +input Real h(quantity = \"SpecificEnergy\", unit = \"J/kg\", nominal = 1e6) \"specific enthalpy\"; input Integer phase = 0 \"phase: 2 for two-phase, 1 for one phase, 0 if not known\"; input Integer mode = 0 \"mode: 0 means check, otherwise assume region=mode\"; output Integer region \"region (valid values: 1,2,3,4,5) in IF97\"; protected Boolean hsubcrit; protected Real Ttest(quantity = \"ThermodynamicTemperature\", unit = \"K\", displayUnit = \"degC\", min = 1.0, max = 6000.0, start = 288.15, nominal = 300.0); -protected Real hl(quantity = \"SpecificEnergy\", unit = \"J/kg\", nominal = 1000000.0) \"bubble enthalpy\"; -protected Real hv(quantity = \"SpecificEnergy\", unit = \"J/kg\", nominal = 1000000.0) \"dew enthalpy\"; +protected Real hl(quantity = \"SpecificEnergy\", unit = \"J/kg\", nominal = 1e6) \"bubble enthalpy\"; +protected Real hv(quantity = \"SpecificEnergy\", unit = \"J/kg\", nominal = 1e6) \"dew enthalpy\"; algorithm if mode <> 0 then region := mode; else hl := Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.hl_p(p); hv := Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.hv_p(p); if phase == 2 then region := 4; else -if p < 611.657 or p > 100000000.0 or h < Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.hlowerofp1(p) or p < 10000000.0 and h > Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.hupperofp5(p) or p >= 10000000.0 and h > Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.hupperofp2(p) then +if p < 611.657 or p > 1e8 or h < Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.hlowerofp1(p) or p < 1e7 and h > Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.hupperofp5(p) or p >= 1e7 and h > Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.hupperofp2(p) then region := -1; else -hsubcrit := h < 2087546.84511715; -if p < 16529200.0 then +hsubcrit := h < 2.08754684511715e6; +if p < 1.65292e7 then if hsubcrit then if phase == 1 then region := 1; else if h < Modelica.Media.Water.IF97_Utilities.BaseIF97.Isentropic.hofpT1(p, Modelica.Media.Water.IF97_Utilities.BaseIF97.Basic.tsat(p)) then @@ -1311,11 +1311,11 @@ region := 4; end if; end if; else if h > Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.hlowerofp5(p) then -if p < 10000000.0 and h < Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.hupperofp5(p) then +if p < 1e7 and h < Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.hupperofp5(p) then region := 5; else region := -2; end if; else @@ -1333,21 +1333,21 @@ else if hsubcrit then if h < Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.hupperofp1(p) then region := 1; else -if h < hl or p > 22064000.0 then +if h < hl or p > 2.2064e7 then region := 3; else region := 4; end if; end if; else if h > Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.hlowerofp2(p) then region := 2; else -if h > hv or p > 22064000.0 then +if h > hv or p > 2.2064e7 then region := 3; else region := 4; end if; end if; @@ -1357,48 +1357,48 @@ end if; end if; end Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.region_ph; function Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.rhol_p_R4b \"explicit approximation of liquid density on the boundary between regions 4 and 3\" -input Real p(quantity = \"Pressure\", unit = \"Pa\", displayUnit = \"bar\", min = -1000000000.0, max = 1000000000.0, start = 100000.0, nominal = 100000.0) \"pressure\"; -output Real dl(quantity = \"Density\", unit = \"kg/m3\", displayUnit = \"g/cm3\", min = 1e-06, max = 30000.0) \"liquid density\"; +input Real p(quantity = \"Pressure\", unit = \"Pa\", displayUnit = \"bar\", min = -1e9, max = 1e9, start = 1e5, nominal = 1e5) \"pressure\"; +output Real dl(quantity = \"Density\", unit = \"kg/m3\", displayUnit = \"g/cm3\", min = 1e-6, max = 3e4) \"liquid density\"; protected Real x \"auxiliary variable\"; algorithm -if p < 22064000.0 then -x := acos(4.532269760696156e-08 * p); -dl := 322.0 * (1.0 + x * (1.903224079094824 + x * (-2.531486180240112 + x * (-8.191449323843552 + x * (94.34196116778385 + x * (-369.3676833623383 + x * (796.6627910598293 + x * (-994.5385383600702 + x * (673.2581177021598 + (-191.4307733640516 + 0.00052536560808895 * x) * x))))))))); +if p < 2.2064e7 then +x := acos(4.532269760696156e-8 * p); +dl := 322.0 * (1.0 + x * (1.903224079094824 + x * (-2.5314861802401123 + x * (-8.191449323843552 + x * (94.34196116778385 + x * (-369.3676833623383 + x * (796.6627910598293 + x * (-994.5385383600702 + x * (673.2581177021598 + (-191.43077336405156 + 5.2536560808895e-4 * x) * x))))))))); else dl := 322.0; end if; end Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.rhol_p_R4b; function Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.rhov_p_R4b \"explicit approximation of vapour density on the boundary between regions 4 and 2\" -input Real p(quantity = \"Pressure\", unit = \"Pa\", displayUnit = \"bar\", min = -1000000000.0, max = 1000000000.0, start = 100000.0, nominal = 100000.0) \"pressure\"; -output Real dv(quantity = \"Density\", unit = \"kg/m3\", displayUnit = \"g/cm3\", min = 1e-06, max = 30000.0) \"vapour density\"; +input Real p(quantity = \"Pressure\", unit = \"Pa\", displayUnit = \"bar\", min = -1e9, max = 1e9, start = 1e5, nominal = 1e5) \"pressure\"; +output Real dv(quantity = \"Density\", unit = \"kg/m3\", displayUnit = \"g/cm3\", min = 1e-6, max = 3e4) \"vapour density\"; protected Real x \"auxiliary variable\"; algorithm -if p < 22064000.0 then -x := acos(4.532269760696156e-08 * p); -dv := 322.0 * (1.0 + x * (-1.84638508033626 + x * (-1.144787271887849 + x * (59.18702203076563 + x * (-403.5391431811611 + x * (1437.200724533239 + x * (-3015.853540307519 + x * (3740.579034867006 + x * (-2537.375817253895 + (725.8761975803782 + (-0.001115111165833234) * x) * x))))))))); +if p < 2.2064e7 then +x := acos(4.532269760696156e-8 * p); +dv := 322.0 * (1.0 + x * (-1.8463850803362596 + x * (-1.1447872718878493 + x * (59.18702203076563 + x * (-403.5391431811611 + x * (1437.2007245332388 + x * (-3015.853540307519 + x * (3740.5790348670057 + x * (-2537.375817253895 + (725.8761975803782 + (-0.0011151111658332337) * x) * x))))))))); else dv := 322.0; end if; end Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.rhov_p_R4b; function Modelica.Media.Water.IF97_Utilities.T_ph \"temperature as function of pressure and specific enthalpy\" -input Real p(quantity = \"Pressure\", unit = \"Pa\", displayUnit = \"bar\", min = -1000000000.0, max = 1000000000.0, start = 100000.0, nominal = 100000.0) \"pressure\"; -input Real h(quantity = \"SpecificEnergy\", unit = \"J/kg\", nominal = 1000000.0) \"specific enthalpy\"; +input Real p(quantity = \"Pressure\", unit = \"Pa\", displayUnit = \"bar\", min = -1e9, max = 1e9, start = 1e5, nominal = 1e5) \"pressure\"; +input Real h(quantity = \"SpecificEnergy\", unit = \"J/kg\", nominal = 1e6) \"specific enthalpy\"; input Integer phase = 0 \"2 for two-phase, 1 for one-phase, 0 if not known\"; input Integer region = 0 \"if 0, region is unknown, otherwise known and this input\"; output Real T(quantity = \"ThermodynamicTemperature\", unit = \"K\", displayUnit = \"degC\", min = 1.0, max = 6000.0, start = 288.15, nominal = 300.0) \"Temperature\"; algorithm T := Modelica.Media.Water.IF97_Utilities.T_props_ph(p, h, Modelica.Media.Water.IF97_Utilities.waterBaseProp_ph(p, h, phase, region)); end Modelica.Media.Water.IF97_Utilities.T_ph; function Modelica.Media.Water.IF97_Utilities.T_ph_der \"derivative function of T_ph\" -input Real p(quantity = \"Pressure\", unit = \"Pa\", displayUnit = \"bar\", min = -1000000000.0, max = 1000000000.0, start = 100000.0, nominal = 100000.0) \"pressure\"; -input Real h(quantity = \"SpecificEnergy\", unit = \"J/kg\", nominal = 1000000.0) \"specific enthalpy\"; +input Real p(quantity = \"Pressure\", unit = \"Pa\", displayUnit = \"bar\", min = -1e9, max = 1e9, start = 1e5, nominal = 1e5) \"pressure\"; +input Real h(quantity = \"SpecificEnergy\", unit = \"J/kg\", nominal = 1e6) \"specific enthalpy\"; input Modelica.Media.Common.IF97BaseTwoPhase aux \"auxiliary record\"; input Real p_der \"derivative of pressure\"; input Real h_der \"derivative of specific enthalpy\"; output Real T_der \"derivative of temperature\"; algorithm @@ -1410,45 +1410,45 @@ T_der := (aux.T * aux.vt + (-1.0) / aux.rho) * p_der / aux.cp + h_der / aux.cp; end if; end Modelica.Media.Water.IF97_Utilities.T_ph_der; function Modelica.Media.Water.IF97_Utilities.T_props_ph \"temperature as function of pressure and specific enthalpy\" -input Real p(quantity = \"Pressure\", unit = \"Pa\", displayUnit = \"bar\", min = -1000000000.0, max = 1000000000.0, start = 100000.0, nominal = 100000.0) \"pressure\"; -input Real h(quantity = \"SpecificEnergy\", unit = \"J/kg\", nominal = 1000000.0) \"specific enthalpy\"; +input Real p(quantity = \"Pressure\", unit = \"Pa\", displayUnit = \"bar\", min = -1e9, max = 1e9, start = 1e5, nominal = 1e5) \"pressure\"; +input Real h(quantity = \"SpecificEnergy\", unit = \"J/kg\", nominal = 1e6) \"specific enthalpy\"; input Modelica.Media.Common.IF97BaseTwoPhase properties \"auxiliary record\"; output Real T(quantity = \"ThermodynamicTemperature\", unit = \"K\", displayUnit = \"degC\", min = 1.0, max = 6000.0, start = 288.15, nominal = 300.0) \"temperature\"; algorithm T := properties.T; end Modelica.Media.Water.IF97_Utilities.T_props_ph; function Modelica.Media.Water.IF97_Utilities.hl_p \"compute the saturated liquid specific h(p)\" -input Real p(quantity = \"Pressure\", unit = \"Pa\", displayUnit = \"bar\", min = -1000000000.0, max = 1000000000.0, start = 100000.0, nominal = 100000.0) \"pressure\"; -output Real h(quantity = \"SpecificEnergy\", unit = \"J/kg\", nominal = 1000000.0) \"specific enthalpy\"; +input Real p(quantity = \"Pressure\", unit = \"Pa\", displayUnit = \"bar\", min = -1e9, max = 1e9, start = 1e5, nominal = 1e5) \"pressure\"; +output Real h(quantity = \"SpecificEnergy\", unit = \"J/kg\", nominal = 1e6) \"specific enthalpy\"; algorithm h := Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.hvl_p(p, Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.boilingcurve_p(p)); end Modelica.Media.Water.IF97_Utilities.hl_p; function Modelica.Media.Water.IF97_Utilities.hv_p \"compute the saturated vapour specific h(p)\" -input Real p(quantity = \"Pressure\", unit = \"Pa\", displayUnit = \"bar\", min = -1000000000.0, max = 1000000000.0, start = 100000.0, nominal = 100000.0) \"pressure\"; -output Real h(quantity = \"SpecificEnergy\", unit = \"J/kg\", nominal = 1000000.0) \"specific enthalpy\"; +input Real p(quantity = \"Pressure\", unit = \"Pa\", displayUnit = \"bar\", min = -1e9, max = 1e9, start = 1e5, nominal = 1e5) \"pressure\"; +output Real h(quantity = \"SpecificEnergy\", unit = \"J/kg\", nominal = 1e6) \"specific enthalpy\"; algorithm h := Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.hvl_p(p, Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.dewcurve_p(p)); end Modelica.Media.Water.IF97_Utilities.hv_p; function Modelica.Media.Water.IF97_Utilities.rho_ph \"density as function of pressure and specific enthalpy\" -input Real p(quantity = \"Pressure\", unit = \"Pa\", displayUnit = \"bar\", min = -1000000000.0, max = 1000000000.0, start = 100000.0, nominal = 100000.0) \"pressure\"; -input Real h(quantity = \"SpecificEnergy\", unit = \"J/kg\", nominal = 1000000.0) \"specific enthalpy\"; +input Real p(quantity = \"Pressure\", unit = \"Pa\", displayUnit = \"bar\", min = -1e9, max = 1e9, start = 1e5, nominal = 1e5) \"pressure\"; +input Real h(quantity = \"SpecificEnergy\", unit = \"J/kg\", nominal = 1e6) \"specific enthalpy\"; input Integer phase = 0 \"2 for two-phase, 1 for one-phase, 0 if not known\"; input Integer region = 0 \"if 0, region is unknown, otherwise known and this input\"; -output Real rho(quantity = \"Density\", unit = \"kg/m3\", displayUnit = \"g/cm3\", min = 1e-06, max = 30000.0) \"density\"; +output Real rho(quantity = \"Density\", unit = \"kg/m3\", displayUnit = \"g/cm3\", min = 1e-6, max = 3e4) \"density\"; algorithm rho := Modelica.Media.Water.IF97_Utilities.rho_props_ph(p, h, Modelica.Media.Water.IF97_Utilities.waterBaseProp_ph(p, h, phase, region)); end Modelica.Media.Water.IF97_Utilities.rho_ph; function Modelica.Media.Water.IF97_Utilities.rho_ph_der \"derivative function of rho_ph\" -input Real p(quantity = \"Pressure\", unit = \"Pa\", displayUnit = \"bar\", min = -1000000000.0, max = 1000000000.0, start = 100000.0, nominal = 100000.0) \"pressure\"; -input Real h(quantity = \"SpecificEnergy\", unit = \"J/kg\", nominal = 1000000.0) \"specific enthalpy\"; +input Real p(quantity = \"Pressure\", unit = \"Pa\", displayUnit = \"bar\", min = -1e9, max = 1e9, start = 1e5, nominal = 1e5) \"pressure\"; +input Real h(quantity = \"SpecificEnergy\", unit = \"J/kg\", nominal = 1e6) \"specific enthalpy\"; input Modelica.Media.Common.IF97BaseTwoPhase aux \"auxiliary record\"; input Real p_der \"derivative of pressure\"; input Real h_der \"derivative of specific enthalpy\"; output Real rho_der \"derivative of density\"; algorithm @@ -1460,22 +1460,22 @@ rho_der := (-aux.rho ^ 2.0) * ((aux.vp + (aux.T * aux.vt ^ 2.0 - aux.vt / aux.rho) / aux.cp) * p_der + aux.vt * h_der / aux.cp); end if; end Modelica.Media.Water.IF97_Utilities.rho_ph_der; function Modelica.Media.Water.IF97_Utilities.rho_props_ph \"density as function of pressure and specific enthalpy\" -input Real p(quantity = \"Pressure\", unit = \"Pa\", displayUnit = \"bar\", min = -1000000000.0, max = 1000000000.0, start = 100000.0, nominal = 100000.0) \"pressure\"; -input Real h(quantity = \"SpecificEnergy\", unit = \"J/kg\", nominal = 1000000.0) \"specific enthalpy\"; +input Real p(quantity = \"Pressure\", unit = \"Pa\", displayUnit = \"bar\", min = -1e9, max = 1e9, start = 1e5, nominal = 1e5) \"pressure\"; +input Real h(quantity = \"SpecificEnergy\", unit = \"J/kg\", nominal = 1e6) \"specific enthalpy\"; input Modelica.Media.Common.IF97BaseTwoPhase properties \"auxiliary record\"; -output Real rho(quantity = \"Density\", unit = \"kg/m3\", displayUnit = \"g/cm3\", min = 1e-06, max = 30000.0) \"density\"; +output Real rho(quantity = \"Density\", unit = \"kg/m3\", displayUnit = \"g/cm3\", min = 1e-6, max = 3e4) \"density\"; algorithm rho := properties.rho; end Modelica.Media.Water.IF97_Utilities.rho_props_ph; function Modelica.Media.Water.IF97_Utilities.rhol_T \"compute the saturated liquid d(T)\" input Real T(quantity = \"ThermodynamicTemperature\", unit = \"K\", displayUnit = \"degC\", min = 1.0, max = 6000.0, start = 288.15, nominal = 300.0) \"temperature\"; -output Real d(quantity = \"Density\", unit = \"kg/m3\", displayUnit = \"g/cm3\", min = 1e-06, max = 30000.0) \"density of water at the boiling point\"; -protected Real p(quantity = \"Pressure\", unit = \"Pa\", displayUnit = \"bar\", min = -1000000000.0, max = 1000000000.0, start = 100000.0, nominal = 100000.0) \"saturation pressure\"; +output Real d(quantity = \"Density\", unit = \"kg/m3\", displayUnit = \"g/cm3\", min = 1e-6, max = 3e4) \"density of water at the boiling point\"; +protected Real p(quantity = \"Pressure\", unit = \"Pa\", displayUnit = \"bar\", min = -1e9, max = 1e9, start = 1e5, nominal = 1e5) \"saturation pressure\"; algorithm p := Modelica.Media.Water.IF97_Utilities.BaseIF97.Basic.psat(T); if T < 623.15 then d := Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.d1n(p, T); elseif T < 647.096 then @@ -1485,12 +1485,12 @@ end if; end Modelica.Media.Water.IF97_Utilities.rhol_T; function Modelica.Media.Water.IF97_Utilities.rhov_T \"compute the saturated vapour d(T)\" input Real T(quantity = \"ThermodynamicTemperature\", unit = \"K\", displayUnit = \"degC\", min = 1.0, max = 6000.0, start = 288.15, nominal = 300.0) \"temperature\"; -output Real d(quantity = \"Density\", unit = \"kg/m3\", displayUnit = \"g/cm3\", min = 1e-06, max = 30000.0) \"density of steam at the condensation point\"; -protected Real p(quantity = \"Pressure\", unit = \"Pa\", displayUnit = \"bar\", min = -1000000000.0, max = 1000000000.0, start = 100000.0, nominal = 100000.0) \"saturation pressure\"; +output Real d(quantity = \"Density\", unit = \"kg/m3\", displayUnit = \"g/cm3\", min = 1e-6, max = 3e4) \"density of steam at the condensation point\"; +protected Real p(quantity = \"Pressure\", unit = \"Pa\", displayUnit = \"bar\", min = -1e9, max = 1e9, start = 1e5, nominal = 1e5) \"saturation pressure\"; algorithm p := Modelica.Media.Water.IF97_Utilities.BaseIF97.Basic.psat(T); if T < 623.15 then d := Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.d2n(p, T); elseif T < 647.096 then @@ -1499,22 +1499,22 @@ d := 322.0; end if; end Modelica.Media.Water.IF97_Utilities.rhov_T; function Modelica.Media.Water.IF97_Utilities.waterBaseProp_ph \"intermediate property record for water\" -input Real p(quantity = \"Pressure\", unit = \"Pa\", displayUnit = \"bar\", min = -1000000000.0, max = 1000000000.0, start = 100000.0, nominal = 100000.0) \"pressure\"; -input Real h(quantity = \"SpecificEnergy\", unit = \"J/kg\", nominal = 1000000.0) \"specific enthalpy\"; +input Real p(quantity = \"Pressure\", unit = \"Pa\", displayUnit = \"bar\", min = -1e9, max = 1e9, start = 1e5, nominal = 1e5) \"pressure\"; +input Real h(quantity = \"SpecificEnergy\", unit = \"J/kg\", nominal = 1e6) \"specific enthalpy\"; input Integer phase = 0 \"phase: 2 for two-phase, 1 for one phase, 0 if unknown\"; input Integer region = 0 \"if 0, do region computation, otherwise assume the region is this input\"; output Modelica.Media.Common.IF97BaseTwoPhase aux \"auxiliary record\"; protected Modelica.Media.Common.GibbsDerivs g \"dimensionless Gibbs funcion and dervatives wrt pi and tau\"; protected Modelica.Media.Common.HelmholtzDerivs f \"dimensionless Helmholtz funcion and dervatives wrt delta and tau\"; protected Integer error \"error flag for inverse iterations\"; -protected Real h_liq(quantity = \"SpecificEnergy\", unit = \"J/kg\", nominal = 1000000.0) \"liquid specific enthalpy\"; -protected Real d_liq(quantity = \"Density\", unit = \"kg/m3\", displayUnit = \"g/cm3\", min = 1e-06, max = 30000.0) \"liquid density\"; -protected Real h_vap(quantity = \"SpecificEnergy\", unit = \"J/kg\", nominal = 1000000.0) \"vapour specific enthalpy\"; -protected Real d_vap(quantity = \"Density\", unit = \"kg/m3\", displayUnit = \"g/cm3\", min = 1e-06, max = 30000.0) \"vapour density\"; +protected Real h_liq(quantity = \"SpecificEnergy\", unit = \"J/kg\", nominal = 1e6) \"liquid specific enthalpy\"; +protected Real d_liq(quantity = \"Density\", unit = \"kg/m3\", displayUnit = \"g/cm3\", min = 1e-6, max = 3e4) \"liquid density\"; +protected Real h_vap(quantity = \"SpecificEnergy\", unit = \"J/kg\", nominal = 1e6) \"vapour specific enthalpy\"; +protected Real d_vap(quantity = \"Density\", unit = \"kg/m3\", displayUnit = \"g/cm3\", min = 1e-6, max = 3e4) \"vapour density\"; protected Modelica.Media.Common.PhaseBoundaryProperties liq \"phase boundary property record\"; protected Modelica.Media.Common.PhaseBoundaryProperties vap \"phase boundary property record\"; protected Modelica.Media.Common.GibbsDerivs gl \"dimensionless Gibbs funcion and dervatives wrt pi and tau\"; protected Modelica.Media.Common.GibbsDerivs gv \"dimensionless Gibbs funcion and dervatives wrt pi and tau\"; protected Modelica.Media.Common.HelmholtzDerivs fl \"dimensionless Helmholtz function and dervatives wrt delta and tau\"; @@ -1548,11 +1548,11 @@ aux.cp := (-aux.R) * g.tau ^ 2.0 * g.gtautau; aux.cv := aux.R * ((g.gpi - g.tau * g.gtaupi) ^ 2.0 / g.gpipi - g.tau ^ 2.0 * g.gtautau); aux.x := 1.0; aux.dpT := (-aux.vt) / aux.vp; elseif aux.region == 3 then -(aux.rho, aux.T, error) := Modelica.Media.Water.IF97_Utilities.BaseIF97.Inverses.dtofph3(aux.p, aux.h, 1e-07, 1e-06); +(aux.rho, aux.T, error) := Modelica.Media.Water.IF97_Utilities.BaseIF97.Inverses.dtofph3(aux.p, aux.h, 1e-7, 1e-6); f := Modelica.Media.Water.IF97_Utilities.BaseIF97.Basic.f3(aux.rho, aux.T); aux.h := aux.R * aux.T * (f.tau * f.ftau + f.delta * f.fdelta); aux.s := aux.R * (f.tau * f.ftau - f.f); aux.pd := aux.R * aux.T * f.delta * (2.0 * f.fdelta + f.delta * f.fdeltadelta); aux.pt := aux.R * aux.rho * f.delta * (f.fdelta - f.tau * f.fdeltatau); @@ -1562,11 +1562,11 @@ aux.dpT := aux.pt; elseif aux.region == 4 then h_liq := Modelica.Media.Water.IF97_Utilities.hl_p(p); h_vap := Modelica.Media.Water.IF97_Utilities.hv_p(p); aux.x := if h_vap <> h_liq then (h - h_liq) / (h_vap - h_liq) else 1.0; -if p < 16529200.0 then +if p < 1.65292e7 then t1 := Modelica.Media.Water.IF97_Utilities.BaseIF97.Basic.tph1(aux.p, h_liq); t2 := Modelica.Media.Water.IF97_Utilities.BaseIF97.Basic.tph2(aux.p, h_vap); gl := Modelica.Media.Water.IF97_Utilities.BaseIF97.Basic.g1(aux.p, t1); gv := Modelica.Media.Water.IF97_Utilities.BaseIF97.Basic.g2(aux.p, t2); liq := Modelica.Media.Common.gibbsToBoundaryProps(gl); @@ -1587,11 +1587,11 @@ aux.cv := Modelica.Media.Common.cv2Phase(liq, vap, aux.x, aux.T, p); aux.cp := liq.cp + aux.x * (vap.cp - liq.cp); aux.pt := liq.pt + aux.x * (vap.pt - liq.pt); aux.pd := liq.pd + aux.x * (vap.pd - liq.pd); elseif aux.region == 5 then -(aux.T, error) := Modelica.Media.Water.IF97_Utilities.BaseIF97.Inverses.tofph5(aux.p, aux.h, 1e-07); +(aux.T, error) := Modelica.Media.Water.IF97_Utilities.BaseIF97.Inverses.tofph5(aux.p, aux.h, 1e-7); assert(error == 0, \"error in inverse iteration of steam tables\"); g := Modelica.Media.Water.IF97_Utilities.BaseIF97.Basic.g5(aux.p, aux.T); aux.s := aux.R * (g.tau * g.gtau - g.g); aux.rho := p / (g.gpi * g.pi * aux.T * aux.R); aux.vt := aux.R * (g.pi * g.gpi - g.tau * g.pi * g.gtaupi) / p; @@ -1615,18 +1615,18 @@ input String iupacName; input String casRegistryNumber; input String chemicalFormula; input String structureFormula; input Real molarMass(min = 0.001, max = 0.25, nominal = 0.032, quantity = \"MolarMass\", unit = \"kg/mol\"); -input Real criticalTemperature(start = 500.0, nominal = 500.0, min = 1.0, max = 10000.0, quantity = \"ThermodynamicTemperature\", unit = \"K\", displayUnit = \"degC\"); -input Real criticalPressure(start = 5000000.0, nominal = 1000000.0, min = 0.0, max = 100000000.0, quantity = \"Pressure\", unit = \"Pa\", displayUnit = \"bar\"); -input Real criticalMolarVolume(min = 1e-06, max = 1000000.0, nominal = 1.0, quantity = \"MolarVolume\", unit = \"m3/mol\"); +input Real criticalTemperature(start = 500.0, nominal = 500.0, min = 1.0, max = 1e4, quantity = \"ThermodynamicTemperature\", unit = \"K\", displayUnit = \"degC\"); +input Real criticalPressure(start = 5e6, nominal = 1e6, min = 0.0, max = 1e8, quantity = \"Pressure\", unit = \"Pa\", displayUnit = \"bar\"); +input Real criticalMolarVolume(min = 1e-6, max = 1e6, nominal = 1.0, quantity = \"MolarVolume\", unit = \"m3/mol\"); input Real acentricFactor; -input Real triplePointTemperature(start = 500.0, nominal = 500.0, min = 1.0, max = 10000.0, quantity = \"ThermodynamicTemperature\", unit = \"K\", displayUnit = \"degC\"); -input Real triplePointPressure(start = 5000000.0, nominal = 1000000.0, min = 0.0, max = 100000000.0, quantity = \"Pressure\", unit = \"Pa\", displayUnit = \"bar\"); -input Real meltingPoint(start = 500.0, nominal = 500.0, min = 1.0, max = 10000.0, quantity = \"ThermodynamicTemperature\", unit = \"K\", displayUnit = \"degC\"); -input Real normalBoilingPoint(start = 500.0, nominal = 500.0, min = 1.0, max = 10000.0, quantity = \"ThermodynamicTemperature\", unit = \"K\", displayUnit = \"degC\"); +input Real triplePointTemperature(start = 500.0, nominal = 500.0, min = 1.0, max = 1e4, quantity = \"ThermodynamicTemperature\", unit = \"K\", displayUnit = \"degC\"); +input Real triplePointPressure(start = 5e6, nominal = 1e6, min = 0.0, max = 1e8, quantity = \"Pressure\", unit = \"Pa\", displayUnit = \"bar\"); +input Real meltingPoint(start = 500.0, nominal = 500.0, min = 1.0, max = 1e4, quantity = \"ThermodynamicTemperature\", unit = \"K\", displayUnit = \"degC\"); +input Real normalBoilingPoint(start = 500.0, nominal = 500.0, min = 1.0, max = 1e4, quantity = \"ThermodynamicTemperature\", unit = \"K\", displayUnit = \"degC\"); input Real dipoleMoment(min = 0.0, max = 2.0, unit = \"debye\", quantity = \"ElectricDipoleMoment\"); input Boolean hasIdealGasHeatCapacity = false; input Boolean hasCriticalData = false; input Boolean hasDipoleMoment = false; input Boolean hasFundamentalEquation = false; @@ -1634,90 +1634,90 @@ input Boolean hasSolidHeatCapacity = false; input Boolean hasAccurateViscosityData = false; input Boolean hasAccurateConductivityData = false; input Boolean hasVapourPressureCurve = false; input Boolean hasAcentricFactor = false; -input Real HCRIT0(start = 100000.0, nominal = 500000.0, min = -100000000.0, max = 100000000.0, quantity = \"SpecificEnergy\", unit = \"J/kg\") = 0.0; -input Real SCRIT0(min = -1000000.0, max = 1000000.0, nominal = 1000.0, quantity = \"SpecificEntropy\", unit = \"J/(kg.K)\") = 0.0; -input Real deltah(start = 100000.0, nominal = 500000.0, min = -100000000.0, max = 100000000.0, quantity = \"SpecificEnergy\", unit = \"J/kg\") = 0.0; -input Real deltas(min = -1000000.0, max = 1000000.0, nominal = 1000.0, quantity = \"SpecificEntropy\", unit = \"J/(kg.K)\") = 0.0; +input Real HCRIT0(start = 1e5, nominal = 5e5, min = -1e8, max = 1e8, quantity = \"SpecificEnergy\", unit = \"J/kg\") = 0.0; +input Real SCRIT0(min = -1e6, max = 1e6, nominal = 1000.0, quantity = \"SpecificEntropy\", unit = \"J/(kg.K)\") = 0.0; +input Real deltah(start = 1e5, nominal = 5e5, min = -1e8, max = 1e8, quantity = \"SpecificEnergy\", unit = \"J/kg\") = 0.0; +input Real deltas(min = -1e6, max = 1e6, nominal = 1000.0, quantity = \"SpecificEntropy\", unit = \"J/(kg.K)\") = 0.0; output FluidConstants res; end TestMedia.TestModels.TestSteam.Medium.FluidConstants; function TestMedia.TestModels.TestSteam.Medium.ThermodynamicState \"Automatically generated record constructor for TestMedia.TestModels.TestSteam.Medium.ThermodynamicState\" input Integer phase(min = 0, max = 2); -input Real h(start = 100000.0, nominal = 500000.0, min = -100000000.0, max = 100000000.0, quantity = \"SpecificEnergy\", unit = \"J/kg\"); -input Real d(start = 150.0, nominal = 500.0, min = 0.0, max = 100000.0, quantity = \"Density\", unit = \"kg/m3\", displayUnit = \"g/cm3\"); -input Real T(start = 500.0, nominal = 500.0, min = 1.0, max = 10000.0, quantity = \"ThermodynamicTemperature\", unit = \"K\", displayUnit = \"degC\"); -input Real p(start = 5000000.0, nominal = 1000000.0, min = 0.0, max = 100000000.0, quantity = \"Pressure\", unit = \"Pa\", displayUnit = \"bar\"); +input Real h(start = 1e5, nominal = 5e5, min = -1e8, max = 1e8, quantity = \"SpecificEnergy\", unit = \"J/kg\"); +input Real d(start = 150.0, nominal = 500.0, min = 0.0, max = 1e5, quantity = \"Density\", unit = \"kg/m3\", displayUnit = \"g/cm3\"); +input Real T(start = 500.0, nominal = 500.0, min = 1.0, max = 1e4, quantity = \"ThermodynamicTemperature\", unit = \"K\", displayUnit = \"degC\"); +input Real p(start = 5e6, nominal = 1e6, min = 0.0, max = 1e8, quantity = \"Pressure\", unit = \"Pa\", displayUnit = \"bar\"); output ThermodynamicState res; end TestMedia.TestModels.TestSteam.Medium.ThermodynamicState; function TestMedia.TestModels.TestSteam.Medium.density \"return density of ideal gas\" input TestMedia.TestModels.TestSteam.Medium.ThermodynamicState state \"thermodynamic state record\"; -output Real d(quantity = \"Density\", unit = \"kg/m3\", displayUnit = \"g/cm3\", min = 0.0, max = 100000.0, start = 150.0, nominal = 500.0) \"Density\"; +output Real d(quantity = \"Density\", unit = \"kg/m3\", displayUnit = \"g/cm3\", min = 0.0, max = 1e5, start = 150.0, nominal = 500.0) \"Density\"; algorithm d := state.d; end TestMedia.TestModels.TestSteam.Medium.density; function TestMedia.TestModels.TestSteam.Medium.density_ph \"Computes density as a function of pressure and specific enthalpy\" -input Real p(quantity = \"Pressure\", unit = \"Pa\", displayUnit = \"bar\", min = 0.0, max = 100000000.0, start = 5000000.0, nominal = 1000000.0) \"Pressure\"; -input Real h(quantity = \"SpecificEnergy\", unit = \"J/kg\", min = -100000000.0, max = 100000000.0, start = 100000.0, nominal = 500000.0) \"Specific enthalpy\"; +input Real p(quantity = \"Pressure\", unit = \"Pa\", displayUnit = \"bar\", min = 0.0, max = 1e8, start = 5e6, nominal = 1e6) \"Pressure\"; +input Real h(quantity = \"SpecificEnergy\", unit = \"J/kg\", min = -1e8, max = 1e8, start = 1e5, nominal = 5e5) \"Specific enthalpy\"; input Integer phase(min = 0, max = 2) = 0 \"2 for two-phase, 1 for one-phase, 0 if not known\"; -output Real d(quantity = \"Density\", unit = \"kg/m3\", displayUnit = \"g/cm3\", min = 0.0, max = 100000.0, start = 150.0, nominal = 500.0) \"Density\"; +output Real d(quantity = \"Density\", unit = \"kg/m3\", displayUnit = \"g/cm3\", min = 0.0, max = 1e5, start = 150.0, nominal = 500.0) \"Density\"; algorithm d := Modelica.Media.Water.IF97_Utilities.rho_ph(p, h, phase, 0); end TestMedia.TestModels.TestSteam.Medium.density_ph; function TestMedia.TestModels.TestSteam.Medium.setState_ph \"Return thermodynamic state from p and h\" -input Real p(quantity = \"Pressure\", unit = \"Pa\", displayUnit = \"bar\", min = 0.0, max = 100000000.0, start = 5000000.0, nominal = 1000000.0) \"Pressure\"; -input Real h(quantity = \"SpecificEnergy\", unit = \"J/kg\", min = -100000000.0, max = 100000000.0, start = 100000.0, nominal = 500000.0) \"Specific enthalpy\"; +input Real p(quantity = \"Pressure\", unit = \"Pa\", displayUnit = \"bar\", min = 0.0, max = 1e8, start = 5e6, nominal = 1e6) \"Pressure\"; +input Real h(quantity = \"SpecificEnergy\", unit = \"J/kg\", min = -1e8, max = 1e8, start = 1e5, nominal = 5e5) \"Specific enthalpy\"; input Integer phase(min = 0, max = 2) = 0 \"2 for two-phase, 1 for one-phase, 0 if not known\"; output TestMedia.TestModels.TestSteam.Medium.ThermodynamicState state \"thermodynamic state record\"; algorithm state := TestMedia.TestModels.TestSteam.Medium.setState_phX(p, h, {}, phase); end TestMedia.TestModels.TestSteam.Medium.setState_ph; function TestMedia.TestModels.TestSteam.Medium.setState_phX \"Return thermodynamic state of water as function of p and h\" -input Real p(quantity = \"Pressure\", unit = \"Pa\", displayUnit = \"bar\", min = 0.0, max = 100000000.0, start = 5000000.0, nominal = 1000000.0) \"Pressure\"; -input Real h(quantity = \"SpecificEnergy\", unit = \"J/kg\", min = -100000000.0, max = 100000000.0, start = 100000.0, nominal = 500000.0) \"Specific enthalpy\"; +input Real p(quantity = \"Pressure\", unit = \"Pa\", displayUnit = \"bar\", min = 0.0, max = 1e8, start = 5e6, nominal = 1e6) \"Pressure\"; +input Real h(quantity = \"SpecificEnergy\", unit = \"J/kg\", min = -1e8, max = 1e8, start = 1e5, nominal = 5e5) \"Specific enthalpy\"; input Real[:] X(quantity = \"MassFraction\", unit = \"kg/kg\", min = 0.0, max = 1.0, nominal = 0.1) = {1.0} \"Mass fractions\"; output TestMedia.TestModels.TestSteam.Medium.ThermodynamicState state \"thermodynamic state record\"; input Integer phase(min = 0, max = 2) = 0 \"2 for two-phase, 1 for one-phase, 0 if not known\"; algorithm state := TestMedia.TestModels.TestSteam.Medium.ThermodynamicState(0, h, TestMedia.TestModels.TestSteam.Medium.density_ph(p, h, 0), TestMedia.TestModels.TestSteam.Medium.temperature_ph(p, h, 0), p); end TestMedia.TestModels.TestSteam.Medium.setState_phX; function TestMedia.TestModels.TestSteam.Medium.temperature \"return temperature of ideal gas\" input TestMedia.TestModels.TestSteam.Medium.ThermodynamicState state \"thermodynamic state record\"; -output Real T(quantity = \"ThermodynamicTemperature\", unit = \"K\", displayUnit = \"degC\", min = 1.0, max = 10000.0, start = 500.0, nominal = 500.0) \"Temperature\"; +output Real T(quantity = \"ThermodynamicTemperature\", unit = \"K\", displayUnit = \"degC\", min = 1.0, max = 1e4, start = 500.0, nominal = 500.0) \"Temperature\"; algorithm T := state.T; end TestMedia.TestModels.TestSteam.Medium.temperature; function TestMedia.TestModels.TestSteam.Medium.temperature_ph \"Computes temperature as a function of pressure and specific enthalpy\" -input Real p(quantity = \"Pressure\", unit = \"Pa\", displayUnit = \"bar\", min = 0.0, max = 100000000.0, start = 5000000.0, nominal = 1000000.0) \"Pressure\"; -input Real h(quantity = \"SpecificEnergy\", unit = \"J/kg\", min = -100000000.0, max = 100000000.0, start = 100000.0, nominal = 500000.0) \"Specific enthalpy\"; +input Real p(quantity = \"Pressure\", unit = \"Pa\", displayUnit = \"bar\", min = 0.0, max = 1e8, start = 5e6, nominal = 1e6) \"Pressure\"; +input Real h(quantity = \"SpecificEnergy\", unit = \"J/kg\", min = -1e8, max = 1e8, start = 1e5, nominal = 5e5) \"Specific enthalpy\"; input Integer phase(min = 0, max = 2) = 0 \"2 for two-phase, 1 for one-phase, 0 if not known\"; -output Real T(quantity = \"ThermodynamicTemperature\", unit = \"K\", displayUnit = \"degC\", min = 1.0, max = 10000.0, start = 500.0, nominal = 500.0) \"Temperature\"; +output Real T(quantity = \"ThermodynamicTemperature\", unit = \"K\", displayUnit = \"degC\", min = 1.0, max = 1e4, start = 500.0, nominal = 500.0) \"Temperature\"; algorithm T := Modelica.Media.Water.IF97_Utilities.T_ph(p, h, phase, 0); end TestMedia.TestModels.TestSteam.Medium.temperature_ph; class TestMedia.TestModels.TestSteam Integer state.phase(min = 0, max = 2) \"phase of the fluid: 1 for 1-phase, 2 for two-phase, 0 for not known, e.g. interactive use\"; -Real state.h(quantity = \"SpecificEnergy\", unit = \"J/kg\", min = -100000000.0, max = 100000000.0, start = 100000.0, nominal = 500000.0) \"specific enthalpy\"; -Real state.d(quantity = \"Density\", unit = \"kg/m3\", displayUnit = \"g/cm3\", min = 0.0, max = 100000.0, start = 150.0, nominal = 500.0) \"density\"; -Real state.T(quantity = \"ThermodynamicTemperature\", unit = \"K\", displayUnit = \"degC\", min = 1.0, max = 10000.0, start = 500.0, nominal = 500.0) \"temperature\"; -Real state.p(quantity = \"Pressure\", unit = \"Pa\", displayUnit = \"bar\", min = 0.0, max = 100000000.0, start = 5000000.0, nominal = 1000000.0) \"pressure\"; -Real p(quantity = \"Pressure\", unit = \"Pa\", displayUnit = \"bar\", min = 0.0, max = 100000000.0, start = 5000000.0, nominal = 1000000.0); -Real h(quantity = \"SpecificEnergy\", unit = \"J/kg\", min = -100000000.0, max = 100000000.0, start = 100000.0, nominal = 500000.0); -Real d(quantity = \"Density\", unit = \"kg/m3\", displayUnit = \"g/cm3\", min = 0.0, max = 100000.0, start = 150.0, nominal = 500.0); -Real T(quantity = \"ThermodynamicTemperature\", unit = \"K\", displayUnit = \"degC\", min = 1.0, max = 10000.0, start = 500.0, nominal = 500.0); +Real state.h(quantity = \"SpecificEnergy\", unit = \"J/kg\", min = -1e8, max = 1e8, start = 1e5, nominal = 5e5) \"specific enthalpy\"; +Real state.d(quantity = \"Density\", unit = \"kg/m3\", displayUnit = \"g/cm3\", min = 0.0, max = 1e5, start = 150.0, nominal = 500.0) \"density\"; +Real state.T(quantity = \"ThermodynamicTemperature\", unit = \"K\", displayUnit = \"degC\", min = 1.0, max = 1e4, start = 500.0, nominal = 500.0) \"temperature\"; +Real state.p(quantity = \"Pressure\", unit = \"Pa\", displayUnit = \"bar\", min = 0.0, max = 1e8, start = 5e6, nominal = 1e6) \"pressure\"; +Real p(quantity = \"Pressure\", unit = \"Pa\", displayUnit = \"bar\", min = 0.0, max = 1e8, start = 5e6, nominal = 1e6); +Real h(quantity = \"SpecificEnergy\", unit = \"J/kg\", min = -1e8, max = 1e8, start = 1e5, nominal = 5e5); +Real d(quantity = \"Density\", unit = \"kg/m3\", displayUnit = \"g/cm3\", min = 0.0, max = 1e5, start = 150.0, nominal = 500.0); +Real T(quantity = \"ThermodynamicTemperature\", unit = \"K\", displayUnit = \"degC\", min = 1.0, max = 1e4, start = 500.0, nominal = 500.0); equation -h = 2800000.0 + 300000.0 * time; -p = 6000000.0; +h = 2.8e6 + 3e5 * time; +p = 6e6; state = TestMedia.TestModels.TestSteam.Medium.setState_ph(p, h, 0); d = TestMedia.TestModels.TestSteam.Medium.density(state); T = TestMedia.TestModels.TestSteam.Medium.temperature(state); end TestMedia.TestModels.TestSteam; " @@ -1725,12 +1725,21 @@ "Check of TestMedia.TestModels.TestSteam completed successfully. Class TestMedia.TestModels.TestSteam has 9 equation(s) and 9 variable(s). 2 of these are trivial equation(s)." "" record SimulationResult -resultFile = "TestMedia.TestModels.TestSteam_res.mat", -simulationOptions = "startTime = 0.0, stopTime = 1.0, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'TestMedia.TestModels.TestSteam', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = ''", -messages = "LOG_SUCCESS | info | The initialization finished successfully without homotopy method. -LOG_SUCCESS | info | The simulation finished successfully. -" +resultFile = "", +simulationOptions = "startTime = 0.0, stopTime = 1.0, numberOfIntervals = 500, tolerance = 1e-6, method = 'dassl', fileNamePrefix = 'TestMedia.TestModels.TestSteam', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = ''", +messages = "Failed to build model: TestMedia.TestModels.TestSteam" end SimulationResult; -"" +"Error: Error building simulator. Build log: make: Entering directory '/c/dev/jenkins/ws/Windows/OM_Win/TESTSU~1/SIMULA~1/LIBRAR~1/3rdParty/TESTME~1/TESTST~2.MOS' +clang -municode -O0 -DOM_HAVE_PTHREADS -Wno-parentheses-equality -falign-functions -mstackrealign -msse2 -mfpmath=sse -I\"C:/dev/jenkins/ws/Windows/OM_Win/build/include/omc/c\" -I\"C:/dev/jenkins/ws/Windows/OM_Win/build/include/omc\" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=TestMedia_TestModels_TestSteam -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -c -o TestMedia.TestModels.TestSteam.o TestMedia.TestModels.TestSteam.c +clang -municode -O0 -DOM_HAVE_PTHREADS -Wno-parentheses-equality -falign-functions -mstackrealign -msse2 -mfpmath=sse -I\"C:/dev/jenkins/ws/Windows/OM_Win/build/include/omc/c\" -I\"C:/dev/jenkins/ws/Windows/OM_Win/build/include/omc\" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=TestMedia_TestModels_TestSteam -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -c -o TestMedia.TestModels.TestSteam_functions.o TestMedia.TestModels.TestSteam_functions.c +clang -municode -O0 -DOM_HAVE_PTHREADS -Wno-parentheses-equality -falign-functions -mstackrealign -msse2 -mfpmath=sse -I\"C:/dev/jenkins/ws/Windows/OM_Win/build/include/omc/c\" -I\"C:/dev/jenkins/ws/Windows/OM_Win/build/include/omc\" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=TestMedia_TestModels_TestSteam -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -c -o TestMedia.TestModels.TestSteam_records.o TestMedia.TestModels.TestSteam_records.c +clang -municode -O0 -DOM_HAVE_PTHREADS -Wno-parentheses-equality -falign-functions -mstackrealign -msse2 -mfpmath=sse -I\"C:/dev/jenkins/ws/Windows/OM_Win/build/include/omc/c\" -I\"C:/dev/jenkins/ws/Windows/OM_Win/build/include/omc\" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=TestMedia_TestModels_TestSteam -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -c -o TestMedia.TestModels.TestSteam_01exo.o TestMedia.TestModels.TestSteam_01exo.c +clang -municode -O0 -DOM_HAVE_PTHREADS -Wno-parentheses-equality -falign-functions -mstackrealign -msse2 -mfpmath=sse -I\"C:/dev/jenkins/ws/Windows/OM_Win/build/include/omc/c\" -I\"C:/dev/jenkins/ws/Windows/OM_Win/build/include/omc\" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=TestMedia_TestModels_TestSteam -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -c -o TestMedia.TestModels.TestSteam_02nls.o TestMedia.TestModels.TestSteam_02nls.c +clang -municode -O0 -DOM_HAVE_PTHREADS -Wno-parentheses-equality -falign-functions -mstackrealign -msse2 -mfpmath=sse -I\"C:/dev/jenkins/ws/Windows/OM_Win/build/include/omc/c\" -I\"C:/dev/jenkins/ws/Windows/OM_Win/build/include/omc\" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=TestMedia_TestModels_TestSteam -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -c -o TestMedia.TestModels.TestSteam_03lsy.o TestMedia.TestModels.TestSteam_03lsy.c +Mingw-w64 runtime failure: +VirtualProtect failed with code 0x5afmake: *** [<builtin>: TestMedia.TestModels.TestSteam_03lsy.o] Error 127 +make: Leaving directory '/c/dev/jenkins/ws/Windows/OM_Win/TESTSU~1/SIMULA~1/LIBRAR~1/3rdParty/TESTME~1/TESTST~2.MOS' +RESULT: 2 +" '' Equation mismatch: omc-diff says: Failed 'T' '"' Line 1730: Text differs: expected: resultFile = "TestMedia.TestModels.TestSteam_res.mat", got: resultFile = "", == 1 out of 1 tests failed [simulation/libraries/3rdParty/TestMedia/TestSteam.mos_temp8199, time: 32]