packageWater
Extends from Modelica.Media.Water.ConstantPropertyLiquidWater (Water: Simple liquid water medium (incompressible, constant data)), Modelica.Icons.Package (Icon for standard packages).
Information
This medium package models liquid water.
The mass density is computed using a constant value of 995.586 kg/s. For a medium model in which the density is a function of temperature, use Buildings.Media.Specialized.Water.TemperatureDependentDensity which may have considerably higher computing time.
For the specific heat capacities at constant pressure and at constant volume, a constant value of 4184 J/(kg K), which corresponds to 20°C is used. The figure below shows the relative error of the specific heat capacity that is introduced by this simplification.
The enthalpy is computed using the convention that h=0 if T=0 °C.
Limitations
Density, specific heat capacity, thermal conductivity and viscosity are constant. Water is modeled as an incompressible liquid. There are no phase changes.
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Media.Interfaces.Types.Basic.FluidConstants | simpleWaterConstants (from ConstantPropertyLiquidWater) | ||
| Modelica.Media.Interfaces.Choices.IndependentVariables | ThermoStates (from PartialMedium) | Enumeration type for independent variables | |
| String | mediumName (from PartialMedium) | "unusablePartialMedium" | Name of the medium |
| String[:] | substanceNames (from PartialMedium) | {mediumName} | Names of the mixture substances. Set substanceNames={mediumName} if only one substance. |
| String[:] | extraPropertiesNames (from PartialMedium) | fill("", 0) | Names of the additional (extra) transported properties. Set extraPropertiesNames=fill("",0) if unused |
| Boolean | singleState (from PartialMedium) | = true, if u and d are not a function of pressure | |
| Boolean | reducedX (from PartialMedium) | true | = true, if medium contains the equation sum(X) = 1.0; set reducedX=true, if only one substance (see docu for details) |
| Boolean | fixedX (from PartialMedium) | false | = true, if medium contains the equation X = reference_X |
| AbsolutePressure | reference_p (from PartialMedium) | 101325 | Reference pressure of Medium: default 1 atmosphere |
| Temperature | reference_T (from PartialMedium) | 298.15 | Reference temperature of Medium: default 25 deg Celsius |
| MassFraction[nX] | reference_X (from PartialMedium) | fill(1/nX, nX) | Default mass fractions of medium |
| AbsolutePressure | p_default (from PartialMedium) | 101325 | Default value for pressure of medium (for initialization) |
| Temperature | T_default (from PartialMedium) | Modelica.Units.Conversions.from_degC(20) | Default value for temperature of medium (for initialization) |
| SpecificEnthalpy | h_default (from PartialMedium) | specificEnthalpy_pTX(p_default, T_default, X_default) | Default value for specific enthalpy of medium (for initialization) |
| MassFraction[nX] | X_default (from PartialMedium) | reference_X | Default value for mass fractions of medium (for initialization) |
| ExtraProperty[nC] | C_default (from PartialMedium) | fill(0, nC) | Default value for trace substances of medium (for initialization) |
| Integer | nS (from PartialMedium) | size(substanceNames, 1) | Number of substances |
| Integer | nX (from PartialMedium) | nS | Number of mass fractions |
| Integer | nXi (from PartialMedium) | if fixedX then 0 else if reducedX then nS - 1 else nS | Number of structurally independent mass fractions (see docu for details) |
| Integer | nC (from PartialMedium) | size(extraPropertiesNames, 1) | Number of extra (outside of standard mass-balance) transported properties |
| Real[nC] | C_nominal (from PartialMedium) | 1.0e-6*ones(nC) | Default for the nominal values for the extra properties |
| SpecificHeatCapacity | cp_const (from PartialSimpleMedium) | Constant specific heat capacity at constant pressure | |
| SpecificHeatCapacity | cv_const (from PartialSimpleMedium) | Constant specific heat capacity at constant volume | |
| Density | d_const (from PartialSimpleMedium) | Constant density | |
| DynamicViscosity | eta_const (from PartialSimpleMedium) | Constant dynamic viscosity | |
| ThermalConductivity | lambda_const (from PartialSimpleMedium) | Constant thermal conductivity | |
| VelocityOfSound | a_const (from PartialSimpleMedium) | Constant velocity of sound | |
| Temperature | T_min (from PartialSimpleMedium) | Minimum temperature valid for medium model | |
| Temperature | T_max (from PartialSimpleMedium) | Maximum temperature valid for medium model | |
| Temperature | T0 (from PartialSimpleMedium) | reference_T | Zero enthalpy temperature |
| MolarMass | MM_const (from PartialSimpleMedium) | Molar mass | |
| FluidConstants | fluidConstants (from PartialSimpleMedium) | Fluid constants |
Contents
| Name | Description |
|---|---|
| BaseProperties | Base properties (p, d, T, h, u, R, MM and X and Xi) of a medium |
| Return the specific enthalpy of liquid |
Revisions
-
June 18, 2024, by Michael Wetter:
Addedstartandnominalattributes to avoid warnings in OpenModelica due to conflicting values.
This is for IBPSA, #1890. -
September 28, 2020, by Michael Wetter:
ReformulatedBasePropertiesto avoid event-triggering assertions.
This is for #1401. -
October 26, 2018, by Filip Jorissen and Michael Wetter:
Now printing different messages if temperature is above or below its limit, and adding instance name as JModelica does not print the full instance name in the assertion. This is for #1045. -
June 6, 2015, by Michael Wetter:
SetAbsolutePressure(start=p_default)to avoid a translation error if Buildings.Fluid.Sources.Examples.TraceSubstancesFlowSource (if used with water instead of air) is translated in pedantic mode in Dymola 2016. The reason is that pressures useMedium.p_defaultas start values, but Modelica.Media.Interfaces.Types sets a default value of 1E-5. A similar change has been done for pressure and density. This fixes #266. -
June 6, 2015, by Michael Wetter:
Changed type ofBaseProperties.TfromModelica.Units.SI.TemperaturetoTemperature. Otherwise, it has a different start value thanMedium.T, which causes an error if Buildings.Media.Examples.WaterProperties is translated in pedantic mode. This fixes #266. -
June 5, 2015, by Michael Wetter:
AddedstateSelectattribute inBaseProperties.Tto allow correct use ofpreferredMediumStateas described in Modelica.Media.Interfaces.PartialMedium, and setpreferredMediumState=falseto keep the same states as were used before. This is for #260. -
June 5, 2015, by Michael Wetter:
RemovedThermodynamicStatedeclaration as this lead to the error "Attempting to redeclare record ThermodynamicState when the original was not replaceable." in Dymola 2016 using the pedantic model check. -
May 1, 2015, by Michael Wetter:
AddedInline=truefor issue 227. -
February 25, 2015, by Michael Wetter:
RemovedstateSelectattribute on pressure as this caused Buildings.Examples.Tutorial.SpaceCooling.System3 to fail with the error message "differentiated if-then-else was not continuous". -
October 15, 2014, by Michael Wetter:
Reimplemented media based on 446aa83. -
November 15, 2013, by Michael Wetter:
Complete new reimplementation because the previous version had the option to add a compressibility to the medium, which has never been used.