modelValveCompressible

Control valve model for compresible liquid flow

Extends from ValvePartial (General control valve model).

Information

Extends the ValvePartial model, fixing isCompressibleFlow=true.
It adds two Medium.ThermodynamicState StateA and StateB. In order to retrieve the physical properties at both ports. It defines also variables for temperature, density and velocity at both ports: Ta, RhoA,Va, Tb, RhoB, Vb.
The State variable (used for retrieving physical properties for the pressure drop calculation) is defined at the highest enthalpy of the two ports and at the lowest pressure of the ports (but not lowest than half of the highest pressure).
An equation is added relating the two ports enthalpy calcEnthalpyDifference=true. It will take into account the kinetic energy only if the valve diameter is higher than 0.

Parameters

TypeNameDefaultDescription
Ports links
BooleanuseElevDifference (from TwoFluidPorts)trueintroduces, or not, an equation for the ports elevation. Use only in one connector
FreeFluids.Types.ElevationOptionelevCalcMethod (from TwoFluidPorts)FreeFluids.Types.ElevationOption.differentialif useElevDifference==true, selects the equation to use: differential, or absolute for PortB
Modelica.Units.SI.LengthelevDifference (from TwoFluidPorts)0.0used only if previously selected. Positive if PortB higher than PortA
Modelica.Units.SI.LengthportBelevation (from TwoFluidPorts)0.0used only if previously selected.
BooleancalcEnthalpyDifference (from TwoFluidPorts)trueif true, will calculate the enthalpy difference between ports. Use only in one connector
BooleanpassComposition (from TwoFluidPorts)trueif true, the equation PortA.X=PortB.X will be activated
Flow
FreeFluids.Types.ValveFixOptionfix (from ValveBase)FreeFluids.Types.ValveFixOption.fixKvselect the value to fix: Kv, pressure drop, or flow
Modelica.Units.SI.AreafixedKv (from ValveBase)1.0Kv value if it is fixed
Modelica.Units.SI.PressureDifferencefixedDP (from ValveBase)-0.5e5negative if PortB.P<PortA.P
Modelica.Units.SI.MassFlowRatefixedFlow (from ValveBase)1.0fixed mass flow to maintain at Port A. Possitive if flow is in
BooleanisCompressibleFlow (from ValvePartial)falseif compressible, it will be treated always as adiabatic
BooleanisLinear (from ValvePartial)trueIf true, linear characteristic is applied, otherwise isoporcentual
BooleanuseFixedAperture (from ValvePartial)trueif true the aperture parameter is used. Otherwise aperture is supplied by the connector
Realaperture (from ValvePartial)1.0maximum just 1 valve should be closed (aperture=0) in a line
Physical data
SI.Lengthdi0.0if >0, kinetic energy is taken into account

Connectors

TypeNameDefaultDescription
FreeFluids.Interfaces.FluidPortAPortA (from TwoFluidPorts)
FreeFluids.Interfaces.FluidPortBPortB (from TwoFluidPorts)
Modelica.Blocks.Interfaces.RealInputOpening (from ValvePartial)

Components

TypeNameDefaultDescription
Modelica.Units.SI.SpecificEnthalpyHdiff (from TwoFluidPorts)specific enthalpy difference: Port B - Port A
Modelica.Units.SI.PressureDifferencePdiff (from TwoFluidPorts)pressure difference: Port B - Port A
Modelica.Units.SI.AreaKv (from ValveBase)
Modelica.Units.SI.AreaCv (from ValveBase)
Modelica.Units.SI.VolumeFlowRateQ (from ValveBase)
Medium.ThermodynamicStateState (from ValveBase)
Medium.DensityRho (from ValveBase)
Medium.TemperatureT (from ValveBase)Temperature
SI.AreaKvFlow (from ValvePartial)Kv at actual aperture
Medium.ThermodynamicStateStateAthermodynamic state at PortA
Medium.ThermodynamicStateStateBthermodynamic state at PortB
Medium.DensityRhoAdensity at PortA
Medium.DensityRhoBdensity at PortB
Modelica.Units.SI.VelocityVa
Modelica.Units.SI.VelocityVb
Medium.TemperatureTaTemperature at PortA
Medium.TemperatureTbTemperature at PortB