Interface ProcessEquipmentInterface
- All Superinterfaces:
NamedInterface, Runnable, Serializable, SimulationInterface
- All Known Subinterfaces:
AbsorberInterface, CompressorInterface, DistillationInterface, ExpanderInterface, MixerInterface, ModuleInterface, MultiStreamHeatExchangerInterface, PumpInterface, SplitterInterface, StreamInterface, TrayInterface, ValveInterface
- All Known Implementing Classes:
AdiabaticPipe, AdiabaticTwoPhasePipe, Adjuster, AdsorptionDehydrationlModule, AirCooler, BatteryStorage, BlowdownValve, Calculator, CharCoalFilter, CheckValve, CO2Electrolyzer, CO2RemovalModule, ComponentSplitter, Compressor, Condenser, ControlValve, Cooler, DexpiProcessUnit, DexpiProcessUnit, DexpiStream, DexpiStream, DistillationColumn, DPCUModule, Ejector, Electrolyzer, EquilibriumStream, ESDValve, ESPPump, Expander, ExpanderOld, Filter, Flare, FlareStack, FlexiblePipe, FlowRateAdjuster, FlowSetter, FuelCell, FuelGasSystem, FurnaceBurner, GasScrubber, GasScrubberSimple, GasTurbine, GibbsReactor, GibbsReactorCO2, GlycolDehydrationlModule, GORfitter, H2SScavenger, Heater, HeatExchanger, HIPPSValve, Hydrocyclone, Hydrocyclone, IncompressiblePipeFlow, IronIonSaturationStream, LevelControlValve, LoopedPipeNetwork, Manifold, MEGReclaimerModule, MembraneSeparator, Mixer, MixerGasProcessingModule, MoleFractionControllerUtil, MPFMfitter, MultiphasePipe, MultiStreamHeatExchanger, MultiStreamHeatExchanger2, NeqGasScrubber, NeqHeater, NeqSimUnit, NeqStream, OnePhasePipeLine, Orifice, PipeBeggsAndBrills, PipeFlowNetwork, Pipeline, PLEM, PLET, PressureControlValve, PressureDrop, ProcessEquipmentBaseClass, ProcessModuleBaseClass, ProducedWaterTreatmentTrain, PropaneCoolingModule, PSDValve, Pump, Reboiler, ReBoiler, Recycle, ReservoirCVDsim, ReservoirDiffLibsim, ReservoirTPsim, Riser, RuptureDisk, SafetyReliefValve, SafetyValve, ScalePotentialCheckStream, SeparationTrainModule, SeparationTrainModuleSimple, Separator, SetPoint, Setter, SimpleAbsorber, SimpleAdsorber, SimpleFlowLine, SimpleReservoir, SimpleTEGAbsorber, SimpleTPoutPipeline, SimpleTray, SolarPanel, Splitter, StaticMixer, StaticNeqMixer, StaticPhaseMixer, SteamHeater, Stream, StreamSaturatorUtil, StreamTransition, SubseaBooster, SubseaJumper, SubseaManifold, SubseaTree, SubseaWell, Tank, ThreePhaseSeparator, ThrottlingValve, TopsidePiping, TransientPipe, TubingPerformance, TubingPerformance, TurboExpanderCompressor, TwoFluidPipe, TwoPhasePipeLine, TwoPhaseSeparator, TwoPortEquipment, Umbilical, UtilityAirSystem, VesselDepressurization, VirtualStream, VLSolidTray, WaterCooler, WaterHammerPipe, WaterStripperColumn, WellFlow, WellFlowlineNetwork, WellFluidModule, WellSystem, WindTurbine
ProcessEquipmentInterface interface.
- Version:
- $Id: $Id
- Author:
- Even Solbraa
-
Method Summary
Modifier and TypeMethodDescriptionvoiddisplayResult.booleandefault doublegetCapacityDuty.default doublegetCapacityMax.getConditionAnalysisMessage.getController.default doublegetEntropyProduction(String unit) getEntropyProduction.default doublegetExergyChange(String unit) getExergyChange.doublegetExergyChange(String unit, double surroundingTemperature) Get exergy change production of the process equipment.default SystemInterfacegetFluid()getFluid.doublegetMassBalance in kg/sec.default doublegetMassBalance(String unit) getMassBalance.Get amechanicalDesignfor the equipment.default StringGets the reason why equipment is outside its operating envelope.doubleGetter for the fieldpressure.doublegetPressure(String unit) Getter for the fieldpressureconverted to specified unit.getReport_json.default doublegetRestCapacity.String[][]getResultTable.Gets validation errors for the current simulation state.getSpecification.doubleGetter for the fieldtemperature.doublegetTemperature(String unit) Getter for the fieldtemperatureconverted to specified unit.getThermoSystem.inthashCode()default voidInitialize ainitMechanicalDesignfor the equipment.default booleanChecks if the current simulation result is physically valid.default booleanChecks if the equipment is operating within its valid operating envelope.default booleanCheck if process equipment needs recalculating.String[][]reportResults.voidrunConditionAnalysis(ProcessEquipmentInterface refExchanger) runConditionAnalysis.voidsetController(ControllerDeviceInterface controller) setController.voidsetPressure(double pressure) Setter for the fieldpressure.voidsetRegulatorOutSignal(double signal) setRegulatorOutSignal.voidsetSpecification(String specification) setSpecification.voidsetTemperature(double temperature) Setter for the fieldtemperature.toJson()Serializes the Process Equipment along with its state to a JSON string.default StringtoJson(ReportConfig cfg) Serializes the Process Equipment with configurable level of detail.default ValidationResultValidate the process equipment before execution.Methods inherited from interface NamedInterface
getName, getTagName, setName, setTagNameMethods inherited from interface SimulationInterface
getCalculateSteadyState, getCalculationIdentifier, getTime, increaseTime, isRunInSteps, run, run, run_step, run_step, runTransient, runTransient, setCalculateSteadyState, setCalculationIdentifier, setRunInSteps, setTime, solved
-
Method Details
-
reportResults
-
initMechanicalDesign
default void initMechanicalDesign()Initialize a
initMechanicalDesignfor the equipment. -
getMechanicalDesign
MechanicalDesign getMechanicalDesign()Get a
mechanicalDesignfor the equipment.- Returns:
- a
MechanicalDesignobject
-
needRecalculation
default boolean needRecalculation()Check if process equipment needs recalculating.
- Returns:
- true or false
-
getSpecification
-
setSpecification
-
displayResult
void displayResult()displayResult.
-
setRegulatorOutSignal
void setRegulatorOutSignal(double signal) setRegulatorOutSignal.
- Parameters:
signal- a double
-
setController
setController.
- Parameters:
controller- aControllerDeviceInterfaceobject
-
getController
ControllerDeviceInterface getController()getController.
- Returns:
- a
ControllerDeviceInterfaceobject
-
getFluid
-
getThermoSystem
-
getMassBalance
double getMassBalance()getMassBalance in kg/sec.
- Returns:
- The mass balance of the process equipment in kg/sec.
-
getPressure
double getPressure()Getter for the field
pressure.- Returns:
- Pressure in bara
-
getPressure
-
getTemperature
-
getTemperature
double getTemperature()Getter for the field
temperature.- Returns:
- a double
-
setPressure
void setPressure(double pressure) Setter for the field
pressure.- Parameters:
pressure- a double
-
setTemperature
void setTemperature(double temperature) Setter for the field
temperature.- Parameters:
temperature- Temperature in Kelvin
-
runConditionAnalysis
runConditionAnalysis.
- Parameters:
refExchanger- aProcessEquipmentInterfaceobject
-
getConditionAnalysisMessage
-
getExergyChange
Get exergy change production of the process equipment.- Parameters:
unit- Supported units are J and kJsurroundingTemperature- The surrounding temperature in Kelvin- Returns:
- change in exergy in specified unit
-
getResultTable
-
equals
-
hashCode
-
toJson
String toJson()Serializes the Process Equipment along with its state to a JSON string.
- Returns:
- json string.
-
toJson
Serializes the Process Equipment with configurable level of detail.- Parameters:
cfg- report configuration- Returns:
- json string
-
getReport_json
String getReport_json()getReport_json.
Return results of simulation in json format- Specified by:
getReport_jsonin interfaceSimulationInterface- Returns:
- a String
-
getEntropyProduction
-
getMassBalance
-
getExergyChange
-
getCapacityDuty
default double getCapacityDuty()getCapacityDuty.
- Returns:
- a double
-
getCapacityMax
default double getCapacityMax()getCapacityMax.
- Returns:
- a double
-
getRestCapacity
default double getRestCapacity()getRestCapacity.
- Returns:
- a double
-
validateSetup
Validate the process equipment before execution.Checks for common setup errors:
- Equipment has a valid name
- Input streams connected
- Operating parameters in valid ranges
- Returns:
- validation result with errors and warnings
-
isSimulationValid
default boolean isSimulationValid()Checks if the current simulation result is physically valid.Returns false if calculated values are outside physically possible ranges. This method should be overridden by specific equipment types to perform equipment-specific validation. For example:
- Compressor: power must be positive, head must be positive
- Heat exchanger: duty direction must match temperature change
- Separator: phase fractions must sum to 1.0
- Returns:
- true if simulation results are physically valid, false otherwise
-
getSimulationValidationErrors
Gets validation errors for the current simulation state.Returns a list of human-readable error messages describing why the simulation result is invalid. Returns an empty list if the simulation is valid.
- Returns:
- list of validation error messages, empty if valid
-
isWithinOperatingEnvelope
default boolean isWithinOperatingEnvelope()Checks if the equipment is operating within its valid operating envelope.This is different from capacity utilization - it checks whether the equipment can physically operate at the current conditions, not whether it's operating efficiently. For example:
- Compressor: checks if between surge and stonewall
- Pump: checks if above minimum flow (no cavitation)
- Heat exchanger: checks if approach temperature is positive
- Returns:
- true if operating within valid envelope
-
getOperatingEnvelopeViolation
Gets the reason why equipment is outside its operating envelope.- Returns:
- description of envelope violation, or null if within envelope
-