Class ESDValve

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

public class ESDValve extends ThrottlingValve
Emergency Shutdown (ESD) Valve / Isolation Valve (XV) for process safety systems.

An ESD valve is a normally-open isolation valve that closes automatically during emergency shutdown events. These valves are critical safety elements designed to isolate process equipment or stop flow during hazardous conditions.

Key features:

  • Fail-safe design: Fails to closed position (fail-closed)
  • Solenoid/actuator control: Energized to stay open, de-energized to close
  • Configurable stroke time (closure time)
  • Partial stroke testing capability
  • Emergency closure on ESD signal
  • Status feedback for monitoring systems
  • Suitable for SIL-rated safety instrumented functions

Design philosophy:

  • Normally open: Allows normal process flow
  • Spring-return actuator: Closes automatically on loss of power/signal
  • Fast acting: Closes within defined stroke time (typically 5-30 seconds)
  • Tight shutoff: Provides complete isolation when closed

Typical usage in ESD system:

// Create process stream
Stream feedStream = new Stream("Feed", thermoSystem);
feedStream.setFlowRate(10000.0, "kg/hr");
feedStream.setPressure(50.0, "bara");

// Create ESD inlet valve (normally open)
ESDValve esdValve = new ESDValve("ESD-XV-101", feedStream);
esdValve.setStrokeTime(10.0); // 10 seconds to close
esdValve.setCv(500.0); // Large Cv for minimal pressure drop when open

// Normal operation
esdValve.energize(); // Keep valve open
esdValve.run();

// Emergency shutdown
esdValve.deEnergize(); // Triggers closure

// In transient simulation loop
esdValve.runTransient(dt, UUID.randomUUID());
// Valve closes progressively over stroke time

Integration with ESD controller:

// ESD controller monitors process conditions
if (pressure > highPressureSetpoint || fireDetected || manualESDActivated) {
  esdValve.deEnergize(); // Initiate emergency closure
}
Version:
$Id: $Id
Author:
ESOL
See Also:
  • Field Details

    • serialVersionUID

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

      private boolean isEnergized
      Energization state of the valve solenoid/actuator.
    • strokeTime

      private double strokeTime
      Time required for valve to fully close (seconds).
    • timeElapsedSinceTrip

      private double timeElapsedSinceTrip
      Time elapsed since de-energization started (seconds).
    • openingAtTripStart

      private double openingAtTripStart
      Opening percentage when trip started (for linear closure calculation).
    • isClosing

      private boolean isClosing
      Indicates if valve is currently closing.
    • failSafePosition

      private double failSafePosition
      Fail-safe position (0.0 = closed, 100.0 = open). Default is fail-closed.
    • partialStrokeTestActive

      private boolean partialStrokeTestActive
      Indicates if partial stroke test is in progress.
    • partialStrokeTestPosition

      private double partialStrokeTestPosition
      Target position for partial stroke test (typically 80-90%).
    • hasTripCompleted

      private boolean hasTripCompleted
      Flag to track if valve has fully closed during current trip.
  • Constructor Details

    • ESDValve

      public ESDValve(String name)
      Constructor for ESDValve.
      Parameters:
      name - name of ESD valve
    • ESDValve

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

    • setStrokeTime

      public void setStrokeTime(double strokeTime)
      Sets the valve stroke time (closure time).
      Parameters:
      strokeTime - time in seconds for valve to close completely
    • getStrokeTime

      public double getStrokeTime()
      Gets the configured stroke time.
      Returns:
      stroke time in seconds
    • setFailSafePosition

      public void setFailSafePosition(double failSafePosition)
      Sets the fail-safe position (position valve moves to on loss of power).
      Parameters:
      failSafePosition - position as percentage (0.0 = closed, 100.0 = open)
    • getFailSafePosition

      public double getFailSafePosition()
      Gets the fail-safe position.
      Returns:
      fail-safe position as percentage
    • isEnergized

      public boolean isEnergized()
      Checks if valve is energized (solenoid/actuator powered).
      Returns:
      true if valve is energized
    • energize

      public void energize()
      Energizes the valve (allows it to open/maintain open position).

      In normal operation, ESD valves are energized to maintain the open position. This simulates the electrical/pneumatic signal that keeps the valve actuator in the open state.

    • deEnergize

      public void deEnergize()
      De-energizes the valve (initiates emergency closure).

      This simulates the ESD signal that removes power from the valve actuator, causing the spring-return mechanism to close the valve. This is the primary safety action during emergency shutdown.

    • trip

      public void trip()
      Trips the valve (same as de-energizing - forces closure).

      Convenience method that is semantically clearer for emergency shutdown scenarios.

    • reset

      public void reset()
      Resets the valve after emergency shutdown.

      After an ESD event, the valve must be manually reset by operations personnel. This simulates the reset process after the emergency condition has been resolved.

    • isClosing

      public boolean isClosing()
      Checks if valve is currently closing.
      Returns:
      true if valve is in the process of closing
    • hasTripCompleted

      public boolean hasTripCompleted()
      Checks if emergency closure has completed.
      Returns:
      true if valve has fully closed after de-energization
    • getTimeElapsedSinceTrip

      public double getTimeElapsedSinceTrip()
      Gets time elapsed since de-energization.
      Returns:
      time in seconds since valve started closing
    • startPartialStrokeTest

      public void startPartialStrokeTest(double targetPosition)
      Initiates a partial stroke test (PST).

      Partial stroke testing is a proof test method that verifies valve functionality without causing a full process shutdown. The valve closes to a specified position (e.g., 80%) and then reopens.

      This is important for SIL-rated valves to verify functionality between full proof test intervals, as required by IEC 61511.

      Parameters:
      targetPosition - target position for test (typically 80-90%)
    • completePartialStrokeTest

      public void completePartialStrokeTest()
      Completes the partial stroke test and returns valve to normal operation.
    • isPartialStrokeTestActive

      public boolean isPartialStrokeTestActive()
      Checks if partial stroke test is active.
      Returns:
      true if PST is in progress
    • runTransient

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

      If the valve has been de-energized, it will close progressively according to the configured stroke time until reaching the fail-safe position.

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

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