Class SafetyReliefValve

All Implemented Interfaces:
Serializable, Runnable, ProcessEquipmentInterface, TwoPortInterface, ValveInterface, SimulationInterface, NamedInterface

public class SafetyReliefValve extends ThrottlingValve
Safety/Relief Valve built on top of ThrottlingValve.

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:
  • 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

      private SafetyReliefValve.ValveType valveType
    • openingLaw

      private SafetyReliefValve.OpeningLaw 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

      public SafetyReliefValve(String name, StreamInterface inletStream)

      Constructor for SafetyReliefValve.

      Parameters:
      name - a String object
      inletStream - a StreamInterface object
  • Method Details

    • initMechanicalDesign

      public void initMechanicalDesign()

      Initialize a initMechanicalDesign for the equipment.

      Specified by:
      initMechanicalDesign in interface ProcessEquipmentInterface
      Overrides:
      initMechanicalDesign in class ThrottlingValve
    • 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

      public SafetyReliefValve.ValveType getValveType()

      Getter for the field valveType.

      Returns:
      a SafetyReliefValve.ValveType object
    • setValveType

      public void setValveType(SafetyReliefValve.ValveType t)

      Setter for the field valveType.

      Parameters:
      t - a SafetyReliefValve.ValveType object
    • getOpeningLaw

      public SafetyReliefValve.OpeningLaw getOpeningLaw()

      Getter for the field openingLaw.

      Returns:
      a SafetyReliefValve.OpeningLaw object
    • setOpeningLaw

      public void setOpeningLaw(SafetyReliefValve.OpeningLaw law)

      Setter for the field openingLaw.

      Parameters:
      law - a SafetyReliefValve.OpeningLaw object
    • 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 double
      overFrac - a double
      blowFrac - a double
      cvRated - a double
      Returns:
      a SafetyReliefValve object
    • configureBalancedModulating

      public SafetyReliefValve configureBalancedModulating(double psetBar, double overFrac, double blowFrac, double cvRated)

      configureBalancedModulating.

      Parameters:
      psetBar - a double
      overFrac - a double
      blowFrac - a double
      cvRated - a double
      Returns:
      a SafetyReliefValve object
    • getRelievingPressureBar

      public double getRelievingPressureBar()

      getRelievingPressureBar.

      Returns:
      a double
    • getReseatPressureBar

      public double getReseatPressureBar()

      getReseatPressureBar.

      Returns:
      a double