Class PressureControlValve
- All Implemented Interfaces:
Serializable, Runnable, ProcessEquipmentInterface, TwoPortInterface, ValveInterface, SimulationInterface, NamedInterface
Pressure control valve (PCV) for automatic pressure regulation.
PressureControlValve automatically modulates its opening to maintain a downstream pressure setpoint. It extends ControlValve and adds pressure control logic with proportional control action.
Key features:
- Automatic pressure control
- Configurable pressure setpoint
- Proportional control action
- Configurable control gain
- Min/max opening limits
Control modes:
- DOWNSTREAM: Maintains downstream (outlet) pressure at setpoint (most common)
- UPSTREAM: Maintains upstream (inlet) pressure at setpoint (back-pressure control)
- DIFFERENTIAL: Maintains pressure difference across valve
Common applications:
- Gas pressure reduction stations
- Compressor anti-surge recycle control
- Separator pressure control
- Back-pressure control on vessels
- Steam pressure regulation
Example usage:
PressureControlValve pcv = new PressureControlValve("PCV-101", inletStream);
pcv.setPressureSetpoint(25.0); // Control to 25 bara downstream
pcv.setControlMode(PressureControlValve.ControlMode.DOWNSTREAM);
pcv.setControllerGain(5.0); // Proportional gain
pcv.setCv(300.0);
pcv.run();
System.out.println("Valve opening: " + pcv.getPercentValveOpening() + "%");
System.out.println("Process variable: " + pcv.getProcessVariable() + " bara");
- Version:
- 1.0
- Author:
- ESOL
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumControl mode enumeration. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanEnable/disable automatic control.private doubleControl error (setpoint - PV).private doubleProportional controller gain.private PressureControlValve.ControlModeControl mode.private doublePressure setpoint in bara.private doubleCurrent process variable (measured pressure) in bara.private static final longSerialization version UID.Fields inherited from class ThrottlingValve
isCalcPressure, logger, molarFlow, pressure, thermoSystem, valveMechanicalDesignFields inherited from class TwoPortEquipment
inStream, outStreamFields inherited from class ProcessEquipmentBaseClass
conditionAnalysisMessage, energyStream, hasController, isSolved, properties, reportFields inherited from class SimulationBaseClass
calcIdentifier, calculateSteadyState, timeFields inherited from class NamedBaseClass
name -
Constructor Summary
ConstructorsConstructorDescriptionPressureControlValve(String name) Constructor for PressureControlValve.PressureControlValve(String name, StreamInterface inStream) Constructor for PressureControlValve. -
Method Summary
Modifier and TypeMethodDescriptiondoubleGet the control error.doubleGet the controller gain.Get the control mode.doubleGet the pressure setpoint.doubleGet the current process variable (measured pressure).booleanCheck if valve is in automatic control mode.voidrun()voidsetAutoMode(boolean auto) Enable or disable automatic control mode.voidsetControllerGain(double gain) Set the controller gain.voidSet the control mode.voidsetPressureSetpoint(double setpoint) Set the pressure setpoint.toString()Methods inherited from class ThrottlingValve
calcKv, calculateMolarFlow, calculateOutletPressure, displayResult, getCapacityDuty, getCapacityMax, getCg, getClosingTravelTime, getCv, getCv, getDeltaPressure, getDeltaPressure, getEntropyProduction, getExergyChange, getFp, getInletPressure, getKv, getMechanicalDesign, getOpeningTravelTime, getOutletPressure, getPercentValveOpening, getResultTable, getTargetPercentValveOpening, getThermoSystem, getTravelModel, getTravelTime, getTravelTimeConstant, initMechanicalDesign, isAcceptNegativeDP, isAllowChoked, isAllowLaminar, isGasValve, isIsoThermal, isValveKvSet, needRecalculation, run, runController, runTransient, setAcceptNegativeDP, setAllowChoked, setAllowLaminar, setClosingTravelTime, setCv, setCv, setDeltaPressure, setFp, setGasValve, setIsCalcOutPressure, setIsoThermal, setKv, setMaximumValveOpening, setMinimumValveOpening, setOpeningTravelTime, setOutletPressure, setOutletPressure, setPercentValveOpening, setPressure, setPressure, setTargetPercentValveOpening, setTravelModel, setTravelTime, setTravelTimeConstant, setValveKvSet, toJson, toJsonMethods inherited from class TwoPortEquipment
getInletStream, getInletTemperature, getMassBalance, getOutletStream, getOutletTemperature, setInletPressure, setInletStream, setInletTemperature, setOutletStream, setOutletTemperature, validateSetupMethods inherited from class ProcessEquipmentBaseClass
copy, equals, getConditionAnalysisMessage, getController, getEnergyStream, getMassBalance, getMinimumFlow, getPressure, getPressure, getProperty, getReport_json, getSpecification, getTemperature, getTemperature, hashCode, isActive, isActive, isSetEnergyStream, reportResults, run_step, runConditionAnalysis, setController, setEnergyStream, setEnergyStream, setFlowValveController, setMinimumFlow, setRegulatorOutSignal, setSpecification, setTemperature, solvedMethods inherited from class SimulationBaseClass
getCalculateSteadyState, getCalculationIdentifier, getTime, increaseTime, isRunInSteps, setCalculateSteadyState, setCalculationIdentifier, setRunInSteps, setTimeMethods inherited from class NamedBaseClass
getName, getTagName, setName, setTagNameMethods inherited from interface NamedInterface
getName, getTagName, setName, setTagNameMethods inherited from interface ProcessEquipmentInterface
equals, getConditionAnalysisMessage, getController, getExergyChange, getFluid, getMassBalance, getMassBalance, getPressure, getPressure, getReport_json, getRestCapacity, getSpecification, getTemperature, getTemperature, hashCode, reportResults, runConditionAnalysis, setController, setRegulatorOutSignal, setSpecification, setTemperature, validateSetupMethods inherited from interface SimulationInterface
getCalculateSteadyState, getCalculationIdentifier, getTime, increaseTime, isRunInSteps, run_step, run_step, runTransient, setCalculateSteadyState, setCalculationIdentifier, setRunInSteps, setTime, solvedMethods inherited from interface TwoPortInterface
getInletStream, getInletTemperature, getInStream, getOutletStream, getOutletTemperature, getOutStream, setInletPressure, setInletStream, setInletTemperature, setOutletStream, setOutletTemperature
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDSerialization version UID.- See Also:
-
pressureSetpoint
private double pressureSetpointPressure setpoint in bara. -
controlMode
Control mode. -
controllerGain
private double controllerGainProportional controller gain. -
processVariable
private double processVariableCurrent process variable (measured pressure) in bara. -
controlError
private double controlErrorControl error (setpoint - PV). -
autoMode
private boolean autoModeEnable/disable automatic control.
-
-
Constructor Details
-
PressureControlValve
Constructor for PressureControlValve.- Parameters:
name- name of the pressure control valve
-
PressureControlValve
Constructor for PressureControlValve.- Parameters:
name- name of the pressure control valveinStream- inlet stream
-
-
Method Details
-
setPressureSetpoint
public void setPressureSetpoint(double setpoint) Set the pressure setpoint.- Parameters:
setpoint- pressure setpoint in bara
-
getPressureSetpoint
public double getPressureSetpoint()Get the pressure setpoint.- Returns:
- pressure setpoint in bara
-
setControlMode
Set the control mode.- Parameters:
mode- control mode (DOWNSTREAM, UPSTREAM, or DIFFERENTIAL)
-
getControlMode
Get the control mode.- Returns:
- current control mode
-
setControllerGain
public void setControllerGain(double gain) Set the controller gain.- Parameters:
gain- proportional gain (typical range: 1.0 to 10.0)
-
getControllerGain
public double getControllerGain()Get the controller gain.- Returns:
- controller gain
-
getProcessVariable
public double getProcessVariable()Get the current process variable (measured pressure).- Returns:
- process variable in bara
-
getControlError
public double getControlError()Get the control error.- Returns:
- control error (setpoint - PV) in bara
-
setAutoMode
public void setAutoMode(boolean auto) Enable or disable automatic control mode.- Parameters:
auto- true for automatic, false for manual
-
isAutoMode
public boolean isAutoMode()Check if valve is in automatic control mode.- Returns:
- true if automatic, false if manual
-
run
public void run()Override run method to implement pressure control logic.
-
toString
Returns a string representation specific to control valves.
Returns a string representation specific to pressure control valves.
- Overrides:
toStringin classControlValve
-