Class AdsorptionCycleController

java.lang.Object
neqsim.process.equipment.adsorber.AdsorptionCycleController
All Implemented Interfaces:
Serializable

public class AdsorptionCycleController extends Object implements Serializable
Controller for adsorption/desorption cycle scheduling.

Manages the sequence of cycle phases for pressure-swing adsorption (PSA), temperature-swing adsorption (TSA), and vacuum-swing adsorption (VSA) processes. Provides automatic phase transitions based on time or breakthrough detection.

A typical PSA cycle consists of:

  1. Adsorption — feed gas passes through the bed at high pressure; target species are adsorbed.
  2. Blowdown — bed pressure is reduced to desorb the adsorbed species (PSA) or bed temperature is raised (TSA).
  3. Purge — clean gas sweeps the bed to remove remaining adsorbate.
  4. Re-pressurisation — bed pressure is brought back to adsorption pressure.

Multi-bed configurations can be coordinated by assigning a separate controller to each bed and staggering their phase schedules.

Version:
1.0
Author:
Even Solbraa
See Also:
  • Field Details

    • serialVersionUID

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

      private static final org.apache.logging.log4j.Logger logger
      Logger for this class.
    • schedule

      private final List<AdsorptionCycleController.PhaseStep> schedule
      The cycle schedule: an ordered list of phase steps.
    • currentStepIndex

      private int currentStepIndex
      Index of the current step in the schedule.
    • timeInCurrentStep

      private double timeInCurrentStep
      Time elapsed within the current step (s).
    • completedCycles

      private int completedCycles
      Total number of completed full cycles.
    • autoLoop

      private boolean autoLoop
      Whether the cycle loops automatically.
    • transitionOnBreakthrough

      private boolean transitionOnBreakthrough
      Whether to transition on breakthrough detection instead of time.
    • bed

      private transient AdsorptionBed bed
      The adsorption bed being controlled.
  • Constructor Details

    • AdsorptionCycleController

      public AdsorptionCycleController(AdsorptionBed bed)
      Create a cycle controller.
      Parameters:
      bed - the adsorption bed to control
  • Method Details

    • configurePSA

      public AdsorptionCycleController configurePSA(double adsorptionTime, double blowdownTime, double purgeTime, double repressTime, double lowPressure)
      Create a default PSA cycle schedule.
      Parameters:
      adsorptionTime - adsorption phase duration (s)
      blowdownTime - blowdown duration (s)
      purgeTime - purge duration (s)
      repressTime - re-pressurisation duration (s)
      lowPressure - blowdown target pressure (bara)
      Returns:
      this controller for chaining
    • configureTSA

      public AdsorptionCycleController configureTSA(double adsorptionTime, double heatingTime, double coolingTime, double desorptionTemperature)
      Create a default TSA cycle schedule.
      Parameters:
      adsorptionTime - adsorption phase duration (s)
      heatingTime - heating/desorption duration (s)
      coolingTime - cooling duration (s)
      desorptionTemperature - regeneration temperature (K)
      Returns:
      this controller for chaining
    • addStep

      Add a custom phase step to the schedule.
      Parameters:
      step - the phase step
      Returns:
      this controller for chaining
    • advance

      public void advance(double dt, UUID id)
      Advance the cycle by a time step. Checks whether the current step has elapsed and transitions to the next phase if needed. Applies the current phase's operating conditions to the bed.
      Parameters:
      dt - time step size (seconds)
      id - calculation identifier
    • transitionToNextStep

      private void transitionToNextStep()
      Transition to the next step in the schedule.
    • applyStepConditions

      private void applyStepConditions()
      Apply the current step's operating conditions to the bed.
    • getCurrentPhase

      public AdsorptionCycleController.CyclePhase getCurrentPhase()
      Get the current cycle phase.
      Returns:
      the current cycle phase
    • getCompletedCycles

      public int getCompletedCycles()
      Get the number of completed cycles.
      Returns:
      completed cycle count
    • getTimeInCurrentStep

      public double getTimeInCurrentStep()
      Get the time elapsed in the current step.
      Returns:
      time in seconds
    • setAutoLoop

      public void setAutoLoop(boolean autoLoop)
      Set whether the cycle should loop automatically.
      Parameters:
      autoLoop - true to auto-loop
    • setTransitionOnBreakthrough

      public void setTransitionOnBreakthrough(boolean transition)
      Set whether to transition out of adsorption phase on breakthrough detection.
      Parameters:
      transition - true to enable
    • reset

      public void reset()
      Reset the cycle controller to the first step.
    • getSchedule

      Get the schedule.
      Returns:
      list of phase steps