Class SafetyReliefValve
- All Implemented Interfaces:
Serializable, Runnable, ProcessEquipmentInterface, TwoPortInterface, ValveInterface, SimulationInterface, NamedInterface
Features: - Set pressure, overpressure (relieving threshold), blowdown (reseat). - Opening laws: SNAP (pop) or MODULATING, with hysteresis. - Backpressure de-rating: Conventional, Balanced Bellows, Pilot Modulating. - Transient anti-chatter: first-order inertia, min open/close dwell, lift rate limit. Assumptions: - Pressures in bar(a) as typically used in NeqSim SystemInterface. - Cv mapping is linear w.r.t. opening; replace with vendor lift curve if available.
- Author:
- esol
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic enum -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final doubleprivate doubleprivate doubleprivate static final doubleprivate doubleprivate doubleprivate static final doubleprivate doubleprivate doubleprivate doubleprivate doubleprivate doubleprivate SafetyReliefValve.OpeningLawprivate doubleprivate doubleprivate static final longprivate doubleprivate doubleprivate doubleprivate doubleprivate doubleprivate SafetyReliefValve.ValveTypeprivate booleanFields inherited from class ThrottlingValve
isCalcPressure, logger, molarFlow, pressure, thermoSystem, valveMechanicalDesignFields inherited from class TwoPortEquipment
inStream, outStreamFields inherited from class ProcessEquipmentBaseClass
conditionAnalysisMessage, energyStream, hasController, isSolved, properties, reportFields inherited from class SimulationBaseClass
calcIdentifier, calculateSteadyState, timeFields inherited from class NamedBaseClass
name -
Constructor Summary
ConstructorsConstructorDescriptionConstructor for SafetyReliefValve.SafetyReliefValve(String name, StreamInterface inletStream) Constructor for SafetyReliefValve. -
Method Summary
Modifier and TypeMethodDescriptionprivate voidapplyOpeningToCv(double openFrac, double kb) private doublecapacityBackpressureFactor(double pUpBar, double pDownBar) private doublecomputeOpeningFraction(double pUpBar) configureBalancedModulating(double psetBar, double overFrac, double blowFrac, double cvRated) configureBalancedModulating.configureConventionalSnap(double psetBar, double overFrac, double blowFrac, double cvRated) configureConventionalSnap.private doubleensureBar(double pressure) doubleGetter for the fieldbackpressureSensitivity.doubleGetter for the fieldblowdownFrac.doublegetKbMax()Getter for the fieldkbMax.doublegetKd()Getter for the fieldkd.doubleGetter for the fieldminStableOpenFrac.doubleGetter for the fieldopenFraction.Getter for the fieldopeningLaw.doubleGetter for the fieldoverpressureFrac.doubleGetter for the fieldratedCv.doublegetRelievingPressureBar.doublegetReseatPressureBar.doubleGetter for the fieldsetPressureBar.Getter for the fieldvalveType.voidInitialize ainitMechanicalDesignfor the equipment.private doubleprivate doublevoidrun()voidrunTransient(double dt) runTransientvoidsetBackpressureSensitivity(double v) Setter for the fieldbackpressureSensitivity.voidsetBlowdownFrac(double v) Setter for the fieldblowdownFrac.voidsetKbMax(double v) Setter for the fieldkbMax.voidsetKd(double v) Setter for the fieldkd.voidsetMaxLiftRatePerSec(double v) Setter for the fieldmaxLiftRatePerSec.voidsetMinCloseTimeSec(double v) Setter for the fieldminCloseTimeSec.voidsetMinOpenTimeSec(double v) Setter for the fieldminOpenTimeSec.voidsetMinStableOpenFrac(double v) Setter for the fieldminStableOpenFrac.voidSetter for the fieldopeningLaw.voidsetOverpressureFrac(double v) Setter for the fieldoverpressureFrac.voidsetRatedCv(double v) Setter for the fieldratedCv.voidsetSetPressureBar(double v) Setter for the fieldsetPressureBar.voidsetTauCloseSec(double v) Setter for the fieldtauCloseSec.voidsetTauOpenSec(double v) Setter for the fieldtauOpenSec.voidSetter for the fieldvalveType.Methods inherited from class ThrottlingValve
calcKv, calculateMolarFlow, calculateOutletPressure, displayResult, getCapacityDuty, getCapacityMax, getCg, getClosingTravelTime, getCv, getCv, getDeltaPressure, getDeltaPressure, getEntropyProduction, getExergyChange, getFp, getInletPressure, getKv, getMechanicalDesign, getOpeningTravelTime, getOutletPressure, getPercentValveOpening, getResultTable, getTargetPercentValveOpening, getThermoSystem, getTravelModel, getTravelTime, getTravelTimeConstant, isAcceptNegativeDP, isAllowChoked, isAllowLaminar, isGasValve, isIsoThermal, isValveKvSet, needRecalculation, run, runController, runTransient, setAcceptNegativeDP, setAllowChoked, setAllowLaminar, setClosingTravelTime, setCv, setCv, setDeltaPressure, setFp, setGasValve, setIsCalcOutPressure, setIsoThermal, setKv, setMaximumValveOpening, setMinimumValveOpening, setOpeningTravelTime, setOutletPressure, setOutletPressure, setPercentValveOpening, setPressure, setPressure, setTargetPercentValveOpening, setTravelModel, setTravelTime, setTravelTimeConstant, setValveKvSet, toJson, toJsonMethods inherited from class TwoPortEquipment
getInletStream, getInletTemperature, getMassBalance, getOutletStream, getOutletTemperature, setInletPressure, setInletStream, setInletTemperature, setOutletStream, setOutletTemperature, validateSetupMethods inherited from class ProcessEquipmentBaseClass
copy, equals, getConditionAnalysisMessage, getController, getEnergyStream, getMassBalance, getMinimumFlow, getPressure, getPressure, getProperty, getReport_json, getSpecification, getTemperature, getTemperature, hashCode, isActive, isActive, isSetEnergyStream, reportResults, run_step, runConditionAnalysis, setController, setEnergyStream, setEnergyStream, setFlowValveController, setMinimumFlow, setRegulatorOutSignal, setSpecification, setTemperature, solvedMethods inherited from class SimulationBaseClass
getCalculateSteadyState, getCalculationIdentifier, getTime, increaseTime, isRunInSteps, setCalculateSteadyState, setCalculationIdentifier, setRunInSteps, setTimeMethods inherited from class NamedBaseClass
getName, getTagName, setName, setTagNameMethods inherited from class Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface NamedInterface
getName, getTagName, setName, setTagNameMethods inherited from interface ProcessEquipmentInterface
equals, getConditionAnalysisMessage, getController, getExergyChange, getFluid, getMassBalance, getMassBalance, getPressure, getPressure, getReport_json, getRestCapacity, getSpecification, getTemperature, getTemperature, hashCode, reportResults, runConditionAnalysis, setController, setRegulatorOutSignal, setSpecification, setTemperature, validateSetupMethods inherited from interface SimulationInterface
getCalculateSteadyState, getCalculationIdentifier, getTime, increaseTime, isRunInSteps, run_step, run_step, setCalculateSteadyState, setCalculationIdentifier, setRunInSteps, setTime, solvedMethods inherited from interface TwoPortInterface
getInletStream, getInletTemperature, getInStream, getOutletStream, getOutletTemperature, getOutStream, setInletPressure, setInletStream, setInletTemperature, setOutletStream, setOutletTemperature
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
EPS
private static final double EPS- See Also:
-
LARGE_TIME_SEC
private static final double LARGE_TIME_SEC- See Also:
-
ATM_PRESSURE_BAR
private static final double ATM_PRESSURE_BAR- See Also:
-
setPressureBar
private double setPressureBar -
overpressureFrac
private double overpressureFrac -
blowdownFrac
private double blowdownFrac -
ratedCv
private double ratedCv -
kd
private double kd -
kbMax
private double kbMax -
backpressureSensitivity
private double backpressureSensitivity -
minStableOpenFrac
private double minStableOpenFrac -
valveType
-
openingLaw
-
openFraction
private double openFraction -
wasOpenLastStep
private boolean wasOpenLastStep -
timeSinceOpenSec
private double timeSinceOpenSec -
timeSinceCloseSec
private double timeSinceCloseSec -
tauOpenSec
private double tauOpenSec -
tauCloseSec
private double tauCloseSec -
minOpenTimeSec
private double minOpenTimeSec -
minCloseTimeSec
private double minCloseTimeSec -
maxLiftRatePerSec
private double maxLiftRatePerSec
-
-
Constructor Details
-
SafetyReliefValve
public SafetyReliefValve()Constructor for SafetyReliefValve.
-
SafetyReliefValve
Constructor for SafetyReliefValve.
- Parameters:
name- aStringobjectinletStream- aStreamInterfaceobject
-
-
Method Details
-
initMechanicalDesign
public void initMechanicalDesign()Initialize a
initMechanicalDesignfor the equipment.- Specified by:
initMechanicalDesignin interfaceProcessEquipmentInterface- Overrides:
initMechanicalDesignin classThrottlingValve
-
getSetPressureBar
public double getSetPressureBar()Getter for the field
setPressureBar.- Returns:
- a double
-
setSetPressureBar
public void setSetPressureBar(double v) Setter for the field
setPressureBar.- Parameters:
v- a double
-
getOverpressureFrac
public double getOverpressureFrac()Getter for the field
overpressureFrac.- Returns:
- a double
-
setOverpressureFrac
public void setOverpressureFrac(double v) Setter for the field
overpressureFrac.- Parameters:
v- a double
-
getBlowdownFrac
public double getBlowdownFrac()Getter for the field
blowdownFrac.- Returns:
- a double
-
setBlowdownFrac
public void setBlowdownFrac(double v) Setter for the field
blowdownFrac.- Parameters:
v- a double
-
getRatedCv
public double getRatedCv()Getter for the field
ratedCv.- Returns:
- a double
-
setRatedCv
public void setRatedCv(double v) Setter for the field
ratedCv.- Parameters:
v- a double
-
getKd
public double getKd()Getter for the field
kd.- Returns:
- a double
-
setKd
public void setKd(double v) Setter for the field
kd.- Parameters:
v- a double
-
getKbMax
public double getKbMax()Getter for the field
kbMax.- Returns:
- a double
-
setKbMax
public void setKbMax(double v) Setter for the field
kbMax.- Parameters:
v- a double
-
getBackpressureSensitivity
public double getBackpressureSensitivity()Getter for the field
backpressureSensitivity.- Returns:
- a double
-
setBackpressureSensitivity
public void setBackpressureSensitivity(double v) Setter for the field
backpressureSensitivity.- Parameters:
v- a double
-
getMinStableOpenFrac
public double getMinStableOpenFrac()Getter for the field
minStableOpenFrac.- Returns:
- a double
-
setMinStableOpenFrac
public void setMinStableOpenFrac(double v) Setter for the field
minStableOpenFrac.- Parameters:
v- a double
-
getValveType
Getter for the field
valveType.- Returns:
- a
SafetyReliefValve.ValveTypeobject
-
setValveType
Setter for the field
valveType.- Parameters:
t- aSafetyReliefValve.ValveTypeobject
-
getOpeningLaw
Getter for the field
openingLaw.- Returns:
- a
SafetyReliefValve.OpeningLawobject
-
setOpeningLaw
Setter for the field
openingLaw.- Parameters:
law- aSafetyReliefValve.OpeningLawobject
-
getOpenFraction
public double getOpenFraction()Getter for the field
openFraction.- Returns:
- a double
-
setTauOpenSec
public void setTauOpenSec(double v) Setter for the field
tauOpenSec.- Parameters:
v- a double
-
setTauCloseSec
public void setTauCloseSec(double v) Setter for the field
tauCloseSec.- Parameters:
v- a double
-
setMinOpenTimeSec
public void setMinOpenTimeSec(double v) Setter for the field
minOpenTimeSec.- Parameters:
v- a double
-
setMinCloseTimeSec
public void setMinCloseTimeSec(double v) Setter for the field
minCloseTimeSec.- Parameters:
v- a double
-
setMaxLiftRatePerSec
public void setMaxLiftRatePerSec(double v) Setter for the field
maxLiftRatePerSec.- Parameters:
v- a double
-
relievingPressureBar
private double relievingPressureBar() -
reseatPressureBar
private double reseatPressureBar() -
computeOpeningFraction
private double computeOpeningFraction(double pUpBar) -
capacityBackpressureFactor
private double capacityBackpressureFactor(double pUpBar, double pDownBar) -
applyOpeningToCv
private void applyOpeningToCv(double openFrac, double kb) -
run
public void run() -
ensureBar
private double ensureBar(double pressure) -
runTransient
public void runTransient(double dt) runTransient
This method calculates thermodynamic and unit operations using difference equations if available and calculateSteadyState is true. Use setCalculateSteadyState to set the parameter. Sets calc identifier UUID.- Parameters:
dt- Delta time [s]
-
configureConventionalSnap
public SafetyReliefValve configureConventionalSnap(double psetBar, double overFrac, double blowFrac, double cvRated) configureConventionalSnap.
- Parameters:
psetBar- a doubleoverFrac- a doubleblowFrac- a doublecvRated- a double- Returns:
- a
SafetyReliefValveobject
-
configureBalancedModulating
public SafetyReliefValve configureBalancedModulating(double psetBar, double overFrac, double blowFrac, double cvRated) configureBalancedModulating.
- Parameters:
psetBar- a doubleoverFrac- a doubleblowFrac- a doublecvRated- a double- Returns:
- a
SafetyReliefValveobject
-
getRelievingPressureBar
public double getRelievingPressureBar()getRelievingPressureBar.
- Returns:
- a double
-
getReseatPressureBar
public double getReseatPressureBar()getReseatPressureBar.
- Returns:
- a double
-