modelSafetyValve
Single phase flow calculation using Medium's physical properties, and adiabatic, isentropic, flow
Extends from FreeFluids.Interfaces.TwoFluidPorts (To be used by equipment with two fluid ports.).
Information
Allows the calculation of the flow or the area of a safety relief valve or disk. It uses isentropic calculation between the inlet, supposed with velocity equal to 0, and the orifice. The gas flow can be chocked or not, and all the calculations are done with the physical properties calculated by the Medium, except the possibility of manual entering of the isentropic coefficient. Correction coefficients are applied for backpressure and for viscosity, according to the API 520 methodology. It is capable for biphasic flow calculation, but the model SafetyValveFlash, that conforms to the API recommenations, is probably more adequate.
Two thermodynamic states are declared at the orifice outlet, both isentropics with the inlet. One of them at the discharge pressure of the valve, the other adjusted to obtain sonic speed at the orifice. If the discharge pressure is below the obtained critical pressure, the flow is taken from the critical calculation, if not from the discharge pressure calculation.
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Units.SI.AbsolutePressure | pSet | 1.01325e5 | |
| Boolean | balancedValve | false | If balanced, Kb must be applied |
| Boolean | useFixedArea | true | if false, the flow will be fixed |
| Modelica.Units.SI.Area | fixedArea | 0.0 | area to use if useFixedArea=true |
| Modelica.Units.SI.MassFlowRate | fixedFlow | flow to use if useFixedArea=false | |
| Real | kd | 0.975 | discharge coefficient. Default gas:0.975, rup.disk: 0.62, liquid=0.65, biphasic=0.85 |
| Real | kc | 1.0 | 0.9 if it is a safety valve with an upstream bursting disk |
| 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 |
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 | A | Discharge orifice area | |
| Modelica.Units.SI.Area | Aeff | Effective orifice area | |
| Medium.ThermodynamicState | StateA | thermodynamic state at inlet | |
| Modelica.Units.SI.Density | RhoA | ||
| Modelica.Units.SI.DynamicViscosity | MuA | ||
| Modelica.Units.SI.AbsolutePressure | Pc | orifice outlet pressure for critical flow | |
| Medium.ThermodynamicState | StateC | orifice thermodynamic state at critical flow | |
| Modelica.Units.SI.SpecificEnthalpy | Hc | orifice specific enthalpy at critical flow | |
| Modelica.Units.SI.Density | RhoC | orifice density at critical flow | |
| Modelica.Units.SI.Velocity | Vc | velocity of sound at orifice discharge | |
| Modelica.Units.SI.MassFlowRate | Gc | critical flow | |
| Medium.ThermodynamicState | StateB | thermodynamic state at orifice at PortB pressure | |
| Modelica.Units.SI.Density | RhoB | orifice density at PortB pressure | |
| Modelica.Units.SI.SpecificEnthalpy | Hb | orifice specific enthalpy at P | |
| Modelica.Units.SI.Velocity | Vb | velocity at orifice discharge | |
| Modelica.Units.SI.MassFlowRate | Gb | ||
| Modelica.Units.SI.ReynoldsNumber | Re | Reynolds number at orifice | |
| Real | Kb | correction coefficient for back pressure | |
| Real | Kv | viscosity correction factor for liquids |