Class PressureControlLogic

java.lang.Object
neqsim.process.logic.control.PressureControlLogic
All Implemented Interfaces:
ProcessLogic

public class PressureControlLogic extends Object implements ProcessLogic
Process logic for automatic pressure control via valve throttling.

This logic automatically adjusts a control valve opening when activated, typically in response to high pressure alarms. The valve adjustment helps reduce system pressure before safety systems (HIPPS, ESD) need to activate.

Typical usage pattern:

ControlValve inletValve = (ControlValve) system.getUnit("Inlet Valve");
PressureControlLogic throttleLogic =
    new PressureControlLogic("Pressure HIHI Auto-Throttle", inletValve, 50.0, system);

// Activate automatically on HIHI alarm
alarmManager
    .registerActionHandler(AlarmActionHandler.activateLogicOnHIHI("PT-101", throttleLogic));
Version:
1.0
Author:
ESOL
  • Field Details

    • name

      private final String name
    • controlValve

      private final ControlValve controlValve
    • targetOpening

      private final double targetOpening
    • system

      private final ProcessSystem system
    • runSystemAfterChange

      private final boolean runSystemAfterChange
    • state

      private LogicState state
    • actions

      private final List<LogicAction> actions
  • Constructor Details

    • PressureControlLogic

      public PressureControlLogic(String name, ControlValve controlValve, double targetOpening, ProcessSystem system)
      Creates pressure control logic with system run.
      Parameters:
      name - the logic name
      controlValve - the valve to throttle
      targetOpening - the target valve opening percentage (0-100)
      system - the process system to run after valve change
    • PressureControlLogic

      public PressureControlLogic(String name, ControlValve controlValve, double targetOpening)
      Creates pressure control logic without automatic system run.
      Parameters:
      name - the logic name
      controlValve - the valve to throttle
      targetOpening - the target valve opening percentage (0-100)
  • Method Details

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

      public boolean reset()
      Description copied from interface: ProcessLogic
      Resets the logic sequence to its initial state.

      This prepares the logic for a fresh execution. Reset may require certain permissive conditions to be met.

      Specified by:
      reset in interface ProcessLogic
      Returns:
      true if reset was successful, false if permissives not met
    • execute

      public void execute(double timeStep)
      Description copied from interface: ProcessLogic
      Executes one time step of the logic sequence.

      This method should be called repeatedly in transient simulations to advance the logic through its steps.

      Specified by:
      execute in interface ProcessLogic
      Parameters:
      timeStep - time increment in seconds
    • 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
    • getControlValve

      public ControlValve getControlValve()
      Gets the control valve being manipulated.
      Returns:
      the control valve
    • getTargetOpening

      public double getTargetOpening()
      Gets the target valve opening percentage.
      Returns:
      target opening (0-100%)
    • toString

      public String toString()
      Overrides:
      toString in class Object