Class PSDValve

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

public class PSDValve extends ThrottlingValve
Process Shutdown (PSD) Valve that automatically closes on High-High Alarm (PAHH).

A PSD valve is a fast-acting isolation valve that provides emergency shutdown protection. It monitors a pressure transmitter and closes rapidly when a High-High (HIHI) alarm is triggered, preventing overpressure conditions from propagating through the process.

Key features:

  • Automatic closure on HIHI alarm from linked pressure transmitter
  • Configurable fast closure time (default 2 seconds)
  • Manual reset capability after alarm clears
  • Trip state tracking for safety interlock logic

Typical usage:

// Create pressure transmitter with alarm configuration
PressureTransmitter PT = new PressureTransmitter("PT-101", separatorInlet);
PT.setAlarmConfig(
    AlarmConfig.builder().highHighLimit(55.0).deadband(1.0).delay(0.5).unit("bara").build());

// Create PSD valve linked to transmitter
PSDValve psdValve = new PSDValve("PSD-101", feedStream);
psdValve.linkToPressureTransmitter(PT);
psdValve.setClosureTime(2.0); // 2 seconds fast closure

// In dynamic simulation loop
system.runTransient(dt, UUID.randomUUID());
// Valve automatically closes if PT-101 goes into HIHI alarm
Version:
$Id: $Id
Author:
ESOL
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      Serialization version UID.
      See Also:
    • pressureTransmitter

      private MeasurementDeviceInterface pressureTransmitter
      Pressure transmitter monitored for HIHI alarm.
    • hasTripped

      private boolean hasTripped
      Indicates if valve has tripped due to HIHI alarm.
    • closureTime

      private double closureTime
      Time required for valve to close (seconds).
    • tripEnabled

      private boolean tripEnabled
      Flag to enable/disable automatic trip on HIHI.
  • Constructor Details

    • PSDValve

      public PSDValve(String name)
      Constructor for PSDValve.
      Parameters:
      name - name of PSD valve
    • PSDValve

      public PSDValve(String name, StreamInterface inletStream)
      Constructor for PSDValve.
      Parameters:
      name - name of PSD valve
      inletStream - inlet stream to valve
  • Method Details

    • linkToPressureTransmitter

      public void linkToPressureTransmitter(MeasurementDeviceInterface transmitter)
      Links this PSD valve to a pressure transmitter for alarm monitoring.
      Parameters:
      transmitter - pressure transmitter to monitor for HIHI alarm
    • setClosureTime

      public void setClosureTime(double closureTime)
      Sets the valve closure time.
      Parameters:
      closureTime - time in seconds for valve to close completely
    • getClosureTime

      public double getClosureTime()
      Gets the configured closure time.
      Returns:
      closure time in seconds
    • hasTripped

      public boolean hasTripped()
      Checks if valve has tripped.
      Returns:
      true if valve has tripped on HIHI alarm
    • reset

      public void reset()
      Resets the trip state, allowing valve to be reopened.

      In real operations, this would require operator action and verification that the alarm condition has cleared. The valve will not automatically reopen after reset - it must be manually opened via setPercentValveOpening().

    • setTripEnabled

      public void setTripEnabled(boolean enabled)
      Enables or disables automatic trip on HIHI alarm.
      Parameters:
      enabled - true to enable trip on HIHI, false to disable
    • isTripEnabled

      public boolean isTripEnabled()
      Checks if trip is enabled.
      Returns:
      true if trip on HIHI is enabled
    • runTransient

      public void runTransient(double dt, UUID id)
      Performs dynamic simulation step with automatic trip logic.

      This method overrides the base class to add HIHI alarm monitoring. If the linked pressure transmitter reports a HIHI alarm and trip is enabled, the valve will automatically command closure.

      Specified by:
      runTransient in interface SimulationInterface
      Overrides:
      runTransient in class ThrottlingValve
      Parameters:
      dt - time step in seconds
      id - unique identifier for this calculation
    • getPressureTransmitter

      public MeasurementDeviceInterface getPressureTransmitter()
      Gets the linked pressure transmitter.
      Returns:
      pressure transmitter being monitored, or null if not linked
    • setPercentValveOpening

      public void setPercentValveOpening(double opening)
      Overrides setPercentValveOpening to prevent opening when tripped.

      If the valve has tripped, it cannot be opened until reset() is called. This prevents inadvertent reopening during an alarm condition.

      Specified by:
      setPercentValveOpening in interface ValveInterface
      Overrides:
      setPercentValveOpening in class ThrottlingValve
      Parameters:
      opening - desired valve opening percentage (0-100)
    • toString

      public String toString()
      Gets a string representation of the PSD valve state.
      Overrides:
      toString in class Object
      Returns:
      string describing valve state including trip status