
modelCheckFlow1DFV2phMassBalance
Checks Flow1DFV2ph equations for mass conservation
Extends from Modelica.Icons.Example (Icon for runnable examples).
Information
This model checks the dynamic mass balance equations of Flow1DFV2ph, by prescribing enthalpy and pressure values that will ensure complete coverage of the different cases.
Parameters
| Type | Name | Default | Description |
| Integer | N | 2 | |
| SI.Pressure | pzero | 10 | Small deltap for calculations |
| SI.Pressure | pc | Medium.fluidConstants[1].criticalPressure | |
| SI.SpecificEnthalpy | hzero | 1e-3 | Small value for deltah |
Components
| Type | Name | Default | Description |
| SmoothMedium.BaseProperties[N] | fluid | | Properties of the fluid at the nodes |
| Medium.SaturationProperties | sat | | Properties of saturated fluid |
| Medium.ThermodynamicState | dew | | Thermodynamic state at dewpoint |
| Medium.ThermodynamicState | bubble | | Thermodynamic state at bubblepoint |
| Medium.AbsolutePressure | p | | Fluid pressure for property calculations |
| Medium.Temperature[N] | T | | Fluid temperature |
| Medium.Temperature | Ts | | Saturated water temperature |
| Medium.SpecificEnthalpy[N] | h | | Fluid specific enthalpy |
| Medium.SpecificEnthalpy | hl | | Saturated liquid temperature |
| Medium.SpecificEnthalpy | hv | | Saturated vapour temperature |
| SI.PerUnit[N] | x | | Steam quality |
| Medium.Density[N] | rho | | Fluid density |
| Units.LiquidDensity | rhol | | Saturated liquid density |
| Units.GasDensity | rhov | | Saturated vapour density |
| SI.DerEnthalpyByPressure | dhldp | | Derivative of saturated liquid enthalpy by pressure |
| SI.DerEnthalpyByPressure | dhvdp | | Derivative of saturated vapour enthalpy by pressure |
| Medium.Density[N - 1] | rhobar | | Fluid average density |
| SI.DerDensityByPressure[N] | drdp | | Derivative of density by pressure |
| SI.DerDensityByPressure[N - 1] | drbdp | | Derivative of average density by pressure |
| SI.DerDensityByPressure | drldp | | Derivative of saturated liquid density by pressure |
| SI.DerDensityByPressure | drvdp | | Derivative of saturated vapour density by pressure |
| SI.DerDensityByEnthalpy[N] | drdh | | Derivative of density by enthalpy |
| SI.DerDensityByEnthalpy[N - 1] | drbdh1 | | Derivative of average density by left enthalpy |
| SI.DerDensityByEnthalpy[N - 1] | drbdh2 | | Derivative of average density by right enthalpy |
| Real | AA | | |
| Real | AA1 | | |
| Real[N - 1] | rhobar_check | | |
| Real[N - 1] | rhobar_err | rhobar - rhobar_check | |
| Real[N - 1] | case | | |