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
| Type | Name | Default | Description |
|---|---|---|---|
| Ports links | |||
| Boolean | useElevDifference (from TwoFluidPorts) | true | introduces, or not, an equation for the ports elevation. Use only in one connector |
| FreeFluids.Types.ElevationOption | elevCalcMethod (from TwoFluidPorts) | FreeFluids.Types.ElevationOption.differential | if useElevDifference==true, selects the equation to use: differential, or absolute for PortB |
| Modelica.Units.SI.Length | elevDifference (from TwoFluidPorts) | 0.0 | used only if previously selected. Positive if PortB higher than PortA |
| Modelica.Units.SI.Length | portBelevation (from TwoFluidPorts) | 0.0 | used only if previously selected. |
| Boolean | calcEnthalpyDifference (from TwoFluidPorts) | true | if true, will calculate the enthalpy difference between ports. Use only in one connector |
| Boolean | passComposition (from TwoFluidPorts) | true | if true, the equation PortA.X=PortB.X will be activated |
| Flow | |||
| FreeFluids.Types.ValveFixOption | fix | FreeFluids.Types.ValveFixOption.fixKv | select the value to fix: Kv, pressure drop, or flow |
| Modelica.Units.SI.Area | fixedKv | 1.0 | Kv value if it is fixed |
| Modelica.Units.SI.PressureDifference | fixedDP | -0.5e5 | negative if PortB.P<PortA.P |
| Modelica.Units.SI.MassFlowRate | fixedFlow | 1.0 | fixed mass flow to maintain at Port A. Possitive if flow is in |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| FreeFluids.Interfaces.FluidPortA | PortA (from TwoFluidPorts) | ||
| FreeFluids.Interfaces.FluidPortB | PortB (from TwoFluidPorts) |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Units.SI.SpecificEnthalpy | Hdiff (from TwoFluidPorts) | specific enthalpy difference: Port B - Port A | |
| Modelica.Units.SI.PressureDifference | Pdiff (from TwoFluidPorts) | pressure difference: Port B - Port A | |
| Modelica.Units.SI.Area | Kv | ||
| Modelica.Units.SI.Area | Cv | ||
| Modelica.Units.SI.VolumeFlowRate | Q | ||
| Medium.ThermodynamicState | State | ||
| Medium.Density | Rho | ||
| Medium.Temperature | T | Temperature |