Class AdsorptionCycleController
java.lang.Object
neqsim.process.equipment.adsorber.AdsorptionCycleController
- All Implemented Interfaces:
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:
- Adsorption — feed gas passes through the bed at high pressure; target species are adsorbed.
- Blowdown — bed pressure is reduced to desorb the adsorbed species (PSA) or bed temperature is raised (TSA).
- Purge — clean gas sweeps the bed to remove remaining adsorbate.
- 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:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumEnumeration of the possible phases in an adsorption/desorption cycle.static classDefines a single phase within a cycle schedule. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanWhether the cycle loops automatically.private AdsorptionBedThe adsorption bed being controlled.private intTotal number of completed full cycles.private intIndex of the current step in the schedule.private static final org.apache.logging.log4j.LoggerLogger for this class.private final List<AdsorptionCycleController.PhaseStep> The cycle schedule: an ordered list of phase steps.private static final longSerialization version UID.private doubleTime elapsed within the current step (s).private booleanWhether to transition on breakthrough detection instead of time. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdd a custom phase step to the schedule.voidAdvance the cycle by a time step.private voidApply the current step's operating conditions to the bed.configurePSA(double adsorptionTime, double blowdownTime, double purgeTime, double repressTime, double lowPressure) Create a default PSA cycle schedule.configureTSA(double adsorptionTime, double heatingTime, double coolingTime, double desorptionTemperature) Create a default TSA cycle schedule.intGet the number of completed cycles.Get the current cycle phase.Get the schedule.doubleGet the time elapsed in the current step.voidreset()Reset the cycle controller to the first step.voidsetAutoLoop(boolean autoLoop) Set whether the cycle should loop automatically.voidsetTransitionOnBreakthrough(boolean transition) Set whether to transition out of adsorption phase on breakthrough detection.private voidTransition to the next step in the schedule.
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDSerialization version UID.- See Also:
-
logger
private static final org.apache.logging.log4j.Logger loggerLogger for this class. -
schedule
The cycle schedule: an ordered list of phase steps. -
currentStepIndex
private int currentStepIndexIndex of the current step in the schedule. -
timeInCurrentStep
private double timeInCurrentStepTime elapsed within the current step (s). -
completedCycles
private int completedCyclesTotal number of completed full cycles. -
autoLoop
private boolean autoLoopWhether the cycle loops automatically. -
transitionOnBreakthrough
private boolean transitionOnBreakthroughWhether to transition on breakthrough detection instead of time. -
bed
The adsorption bed being controlled.
-
-
Constructor Details
-
AdsorptionCycleController
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
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
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
-