Class ReliefValveSizing
java.lang.Object
neqsim.process.util.fire.ReliefValveSizing
Dynamic relief valve (PSV) sizing for fire scenarios per API 521.
This class provides methods for sizing pressure safety valves (PSVs) for gas-filled vessels subject to fire exposure. Unlike the traditional conservative API 521 approach which sizes for peak flow, this implementation supports dynamic sizing that accounts for the transient nature of fire-induced blowdown.
Key features:
- API 520/521 compliant orifice area calculations
- Support for both conventional and balanced-bellows PSVs
- Dynamic fire scenarios with time-varying heat input
- Back pressure effects for multiple PSV installations
References:
- API Standard 521, 7th Edition (2020) - Pressure-relieving and Depressuring Systems
- Andreasen, A. (2021). HydDown: A Python package for calculation of hydrogen (or other gas) pressure vessel filling and discharge. Journal of Open Source Software, 6(66), 3695.
- Author:
- ESOL
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classResult container for PSV sizing calculations. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final doubleGas constant [J/(mol*K)].static final double[]Standard API 520 orifice areas [in²].static final String[]Standard API 520 orifice letter designations. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic doublecalculateBlowdownPressure(double setPressure, double blowdownPercent) Calculates the blowdown (reseat) pressure for a PSV.static doublecalculateCv(double orificeArea, double dischargeCoefficient) Calculates the flow coefficient Cv for a PSV at given conditions.static doublecalculateMassFlowCapacity(double orificeArea, double setPressure, double overpressureFraction, double backPressure, double temperature, double molecularWeight, double compressibility, double specificHeatRatio, double dischargeCoefficient) Calculates the mass flow capacity of a PSV for gas/vapor service.static doublecalculateMaxHeatAbsorption(double massFlowCapacity, double latentHeat) Calculates the required heat absorption rate for a given PSV size during fire.calculateRequiredArea(double massFlowRate, double setPressure, double overpressureFraction, double backPressure, double temperature, double molecularWeight, double compressibility, double specificHeatRatio, boolean isBalancedBellows, boolean hasRuptureDisk) Calculates the required PSV orifice area for gas/vapor service per API 520.dynamicFireSizing(double initialMass, double initialPressure, double setPressure, double initialTemperature, double fireHeatInput, double vesselVolume, double molecularWeight, double specificHeatRatio, double compressibility, double heatCapacity, double blowdownTime) Dynamic sizing calculation for fire scenarios.static StringgetNextLargerOrifice(String currentOrifice) Gets the next larger standard orifice size.static doublegetStandardOrificeArea(String orifice) Gets the orifice area for a standard API 520 orifice designation.static StringvalidateSizing(ReliefValveSizing.PSVSizingResult result, boolean isFireCase) Validates PSV sizing against API 521 requirements.
-
Field Details
-
R_GAS
public static final double R_GASGas constant [J/(mol*K)].- See Also:
-
STANDARD_ORIFICE_AREAS_IN2
public static final double[] STANDARD_ORIFICE_AREAS_IN2Standard API 520 orifice areas [in²]. -
STANDARD_ORIFICE_LETTERS
Standard API 520 orifice letter designations.
-
-
Constructor Details
-
ReliefValveSizing
private ReliefValveSizing()
-
-
Method Details
-
calculateRequiredArea
public static ReliefValveSizing.PSVSizingResult calculateRequiredArea(double massFlowRate, double setPressure, double overpressureFraction, double backPressure, double temperature, double molecularWeight, double compressibility, double specificHeatRatio, boolean isBalancedBellows, boolean hasRuptureDisk) Calculates the required PSV orifice area for gas/vapor service per API 520.Uses the API 520 equation for critical (sonic) flow:
A = W / (C * Kd * P1 * Kb * Kc) * sqrt(T * Z / M)
- Parameters:
massFlowRate- Required relieving rate [kg/s]setPressure- PSV set pressure [Pa absolute]overpressureFraction- Overpressure fraction (0.10 for fire, 0.21 for external fire)backPressure- Downstream/back pressure [Pa absolute]temperature- Relieving temperature [K]molecularWeight- Molecular weight [kg/mol]compressibility- Compressibility factor ZspecificHeatRatio- Cp/Cv ratio (gamma/k)isBalancedBellows- true for balanced-bellows PSVhasRuptureDisk- true if rupture disk is installed upstream- Returns:
- PSV sizing result
-
calculateMassFlowCapacity
public static double calculateMassFlowCapacity(double orificeArea, double setPressure, double overpressureFraction, double backPressure, double temperature, double molecularWeight, double compressibility, double specificHeatRatio, double dischargeCoefficient) Calculates the mass flow capacity of a PSV for gas/vapor service.- Parameters:
orificeArea- Effective orifice area [m²]setPressure- PSV set pressure [Pa absolute]overpressureFraction- Overpressure fractionbackPressure- Back pressure [Pa absolute]temperature- Relieving temperature [K]molecularWeight- Molecular weight [kg/mol]compressibility- Compressibility factor ZspecificHeatRatio- Cp/Cv ratiodischargeCoefficient- Discharge coefficient (typically 0.975)- Returns:
- Mass flow capacity [kg/s]
-
calculateMaxHeatAbsorption
public static double calculateMaxHeatAbsorption(double massFlowCapacity, double latentHeat) Calculates the required heat absorption rate for a given PSV size during fire.This is useful for determining if a given PSV size can handle the heat input from a fire scenario.
- Parameters:
massFlowCapacity- PSV mass flow capacity [kg/s]latentHeat- Latent heat of vaporization (or Cp*dT for sensible heating) [J/kg]- Returns:
- Maximum heat absorption rate [W]
-
dynamicFireSizing
public static ReliefValveSizing.PSVSizingResult dynamicFireSizing(double initialMass, double initialPressure, double setPressure, double initialTemperature, double fireHeatInput, double vesselVolume, double molecularWeight, double specificHeatRatio, double compressibility, double heatCapacity, double blowdownTime) Dynamic sizing calculation for fire scenarios.Unlike static sizing which uses peak flow, this method evaluates the transient response and can result in smaller (more realistic) PSV sizes.
- Parameters:
initialMass- Initial fluid inventory [kg]initialPressure- Initial pressure [Pa]setPressure- PSV set pressure [Pa]initialTemperature- Initial temperature [K]fireHeatInput- Constant fire heat input [W]vesselVolume- Vessel volume [m³]molecularWeight- Molecular weight [kg/mol]specificHeatRatio- Cp/Cv ratiocompressibility- Compressibility factorheatCapacity- Heat capacity [J/(kg*K)]blowdownTime- Target blowdown time [s] (typically 15 minutes = 900s per API 521)- Returns:
- PSV sizing result for fire case
-
calculateBlowdownPressure
public static double calculateBlowdownPressure(double setPressure, double blowdownPercent) Calculates the blowdown (reseat) pressure for a PSV.- Parameters:
setPressure- PSV set pressure [Pa]blowdownPercent- Blowdown percentage (typically 7-10%)- Returns:
- Blowdown/reseat pressure [Pa]
-
calculateCv
public static double calculateCv(double orificeArea, double dischargeCoefficient) Calculates the flow coefficient Cv for a PSV at given conditions.This allows the PSV to be modeled as an equivalent control valve in process simulations.
- Parameters:
orificeArea- Orifice area [m²]dischargeCoefficient- Discharge coefficient- Returns:
- Flow coefficient Cv [gpm/sqrt(psi)]
-
validateSizing
Validates PSV sizing against API 521 requirements.- Parameters:
result- PSV sizing result to validateisFireCase- true if this is a fire scenario- Returns:
- Validation message (empty if valid, otherwise describes issues)
-
getNextLargerOrifice
-
getStandardOrificeArea
Gets the orifice area for a standard API 520 orifice designation.- Parameters:
orifice- Orifice letter designation (D, E, F, G, H, J, K, L, M, N, P, Q, R, T)- Returns:
- Orifice area [m²]
-