Class HIPPSLogic

java.lang.Object
neqsim.process.logic.hipps.HIPPSLogic
All Implemented Interfaces:
ProcessLogic

public class HIPPSLogic extends Object implements ProcessLogic
High Integrity Pressure Protection System (HIPPS) Logic.

HIPPS is a Safety Instrumented System (SIS) designed to prevent overpressure in process equipment by rapidly closing isolation valves when pressure exceeds a safe limit. HIPPS acts as the first line of defense before pressure relief devices or Emergency Shutdown (ESD) systems are activated.

Key features of HIPPS:

  • Rapid valve closure (typically <2 seconds)
  • High reliability (SIL 2 or SIL 3 per IEC 61508/61511)
  • Redundant pressure sensors with voting logic
  • Prevents pressure relief valve (PSV) activation
  • Avoids flaring/venting to atmosphere
  • Lower operating costs than continuous PSV operation

HIPPS typically operates at ~95% of maximum allowable operating pressure (MAOP), while ESD operates at ~98% MAOP as a backup.

Example usage:

// Create HIPPS with 2oo3 voting for high reliability
HIPPSLogic hipps = new HIPPSLogic("HIPPS-101", VotingLogic.TWO_OUT_OF_THREE);

// Add pressure transmitters
hipps.addPressureSensor(
    new Detector("PT-101A", DetectorType.PRESSURE, AlarmLevel.HIGH_HIGH, 95.0, "bara"));
hipps.addPressureSensor(
    new Detector("PT-101B", DetectorType.PRESSURE, AlarmLevel.HIGH_HIGH, 95.0, "bara"));
hipps.addPressureSensor(
    new Detector("PT-101C", DetectorType.PRESSURE, AlarmLevel.HIGH_HIGH, 95.0, "bara"));

// Link isolation valve
hipps.setIsolationValve(isolationValve);

// Optionally link to ESD for escalation
hipps.linkToEscalationLogic(esdLogic, 5.0); // Escalate to ESD after 5 seconds

// In simulation loop:
hipps.update(pressure1, pressure2, pressure3);
if (hipps.isTripped()) {
  // HIPPS has activated
}
Version:
1.0
Author:
ESOL
  • Field Details

    • name

      private final String name
    • votingLogic

      private final VotingLogic votingLogic
    • pressureSensors

      private final List<Detector> pressureSensors
    • isolationValve

      private ThrottlingValve isolationValve
    • escalationLogic

      private ProcessLogic escalationLogic
    • escalationDelay

      private double escalationDelay
    • state

      private LogicState state
    • isTripped

      private boolean isTripped
    • isOverridden

      private boolean isOverridden
    • tripTime

      private double tripTime
    • timeSinceTrip

      private double timeSinceTrip
    • escalated

      private boolean escalated
    • valveClosureTime

      private double valveClosureTime
    • maxBypassedSensors

      private int maxBypassedSensors
  • Constructor Details

    • HIPPSLogic

      public HIPPSLogic(String name, VotingLogic votingLogic)
      Creates a HIPPS logic instance.
      Parameters:
      name - HIPPS name/tag (e.g., "HIPPS-101")
      votingLogic - voting pattern for pressure sensors (typically 2oo3 for SIL 3)
  • Method Details

    • addPressureSensor

      public void addPressureSensor(Detector sensor)
      Adds a pressure sensor to the HIPPS voting group.
      Parameters:
      sensor - pressure detector/transmitter
      Throws:
      IllegalStateException - if too many sensors added
    • setIsolationValve

      public void setIsolationValve(ThrottlingValve valve)
      Sets the isolation valve that HIPPS will close on trip.
      Parameters:
      valve - isolation valve (typically full-bore ball valve)
    • linkToEscalationLogic

      public void linkToEscalationLogic(ProcessLogic escalationLogic, double delay)
      Links HIPPS to an escalation logic (typically ESD) that activates if HIPPS fails to control pressure.
      Parameters:
      escalationLogic - ESD or other backup logic
      delay - time in seconds before escalating
    • setValveClosureTime

      public void setValveClosureTime(double closureTime)
      Sets the target valve closure time.
      Parameters:
      closureTime - time in seconds (typically 1-2 seconds for HIPPS)
    • update

      public void update(double... pressureValues)
      Updates all pressure sensors and evaluates voting logic.
      Parameters:
      pressureValues - array of pressure values from each sensor
      Throws:
      IllegalArgumentException - if array size doesn't match sensor count
    • evaluateVoting

      private void evaluateVoting()
      Evaluates voting logic and determines if HIPPS should trip.
    • execute

      public void execute(double timeStep)
      Executes HIPPS logic over a time step, including escalation if needed.
      Specified by:
      execute in interface ProcessLogic
      Parameters:
      timeStep - time step in seconds
    • setOverride

      public void setOverride(boolean override)
      Manually overrides HIPPS (inhibits trip function).
      Parameters:
      override - true to override
    • reset

      public boolean reset()
      Resets HIPPS after trip conditions have cleared.
      Specified by:
      reset in interface ProcessLogic
      Returns:
      true if reset successful
    • getPressureSensor

      public Detector getPressureSensor(int index)
      Gets a specific pressure sensor.
      Parameters:
      index - sensor index
      Returns:
      pressure sensor
    • isTripped

      public boolean isTripped()
      Checks if HIPPS has tripped.
      Returns:
      true if tripped
    • hasEscalated

      public boolean hasEscalated()
      Checks if HIPPS has escalated to ESD.
      Returns:
      true if escalated
    • getTimeSinceTrip

      public double getTimeSinceTrip()
      Gets time since trip.
      Returns:
      time in seconds
    • getName

      public String getName()
      Description copied from interface: ProcessLogic
      Gets the name of this logic sequence.
      Specified by:
      getName in interface ProcessLogic
      Returns:
      logic name
    • getState

      public LogicState getState()
      Description copied from interface: ProcessLogic
      Gets the current state of the logic.
      Specified by:
      getState in interface ProcessLogic
      Returns:
      current logic state
    • activate

      public void activate()
      Description copied from interface: ProcessLogic
      Activates the logic sequence, starting execution.

      If the logic is already active, this may restart it or have no effect depending on implementation.

      Specified by:
      activate in interface ProcessLogic
    • deactivate

      public void deactivate()
      Description copied from interface: ProcessLogic
      Deactivates the logic sequence, pausing or stopping execution.

      The logic remains in its current state and can be reactivated later.

      Specified by:
      deactivate in interface ProcessLogic
    • isActive

      public boolean isActive()
      Description copied from interface: ProcessLogic
      Checks if the logic is currently active (running).
      Specified by:
      isActive in interface ProcessLogic
      Returns:
      true if logic is active
    • isComplete

      public boolean isComplete()
      Description copied from interface: ProcessLogic
      Checks if the logic sequence has completed successfully.
      Specified by:
      isComplete in interface ProcessLogic
      Returns:
      true if logic has completed all steps
    • getTargetEquipment

      public List<ProcessEquipmentInterface> getTargetEquipment()
      Description copied from interface: ProcessLogic
      Gets the list of equipment targeted by this logic.
      Specified by:
      getTargetEquipment in interface ProcessLogic
      Returns:
      list of target equipment
    • getStatusDescription

      public String getStatusDescription()
      Description copied from interface: ProcessLogic
      Gets a description of the current status.
      Specified by:
      getStatusDescription in interface ProcessLogic
      Returns:
      status description
    • toString

      public String toString()
      Overrides:
      toString in class Object