modelValveBase

General valve model

Extends from FreeFluids.Interfaces.TwoFluidPorts (To be used by equipment with two fluid ports.).

Information

It is an extension of the Interfaces.TwoFluidPorts model. It adds the following parameters to configure a two ports valve:
  • parameter FreeFluids.Types.ValveFixOption fix = FreeFluids.Types.ValveFixOption.fixKv, in order to select if we are going to specify a fized Kv, a fixed pressure drop or a fixed flow along the valve.
  • And the following parameters: fixedKv, fixedDP and fixedFlow, in order to allow the user specification of the needed value.
It adds also the following variables:
Kv for the valve Kv
Cv for the valve Cv
Medium.ThermodynamicState State, in order to specify the state at which physical properties will be evaluated.
Q for the volumetric flow at State conditions.
T for fluid temperature at State conditions.
Rho for fluid density at State conditions.

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.ValveFixOptionfixFreeFluids.Types.ValveFixOption.fixKvselect the value to fix: Kv, pressure drop, or flow
Modelica.Units.SI.AreafixedKv1.0Kv value if it is fixed
Modelica.Units.SI.PressureDifferencefixedDP-0.5e5negative if PortB.P<PortA.P
Modelica.Units.SI.MassFlowRatefixedFlow1.0fixed mass flow to maintain at Port A. Possitive if flow is in

Connectors

TypeNameDefaultDescription
FreeFluids.Interfaces.FluidPortAPortA (from TwoFluidPorts)
FreeFluids.Interfaces.FluidPortBPortB (from TwoFluidPorts)

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
Modelica.Units.SI.AreaCv
Modelica.Units.SI.VolumeFlowRateQ
Medium.ThermodynamicStateState
Medium.DensityRho
Medium.TemperatureTTemperature