Class TwoPortEquipment
java.lang.Object
neqsim.util.NamedBaseClass
neqsim.process.SimulationBaseClass
neqsim.process.equipment.ProcessEquipmentBaseClass
neqsim.process.equipment.TwoPortEquipment
- All Implemented Interfaces:
Serializable, Runnable, ProcessEquipmentInterface, TwoPortInterface, SimulationInterface, NamedInterface
- Direct Known Subclasses:
Compressor, ExpanderOld, Filter, Flare, FlowRateAdjuster, FlowSetter, FuelCell, GasTurbine, GibbsReactor, GibbsReactorCO2, GORfitter, Heater, MoleFractionControllerUtil, MPFMfitter, NeqSimUnit, Orifice, Pipeline, Pump, ReBoiler, SimpleFlowLine, StreamSaturatorUtil, StreamTransition, SubseaWell, ThrottlingValve, TransientPipe, TubingPerformance, WellFlow
public abstract class TwoPortEquipment
extends ProcessEquipmentBaseClass
implements TwoPortInterface
Abstract class defining ProcessEquipment with one inlet and one outlet.
- Version:
- $Id: $Id
- Author:
- ASMF
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected StreamInterfaceprotected StreamInterfaceprivate static final longSerialization version UID.Fields inherited from class ProcessEquipmentBaseClass
conditionAnalysisMessage, energyStream, flowValveController, hasController, isSolved, properties, reportFields inherited from class SimulationBaseClass
calcIdentifier, calculateSteadyState, timeFields inherited from class NamedBaseClass
name -
Constructor Summary
ConstructorsConstructorDescriptionTwoPortEquipment(String name) Constructor for TwoPortEquipment.TwoPortEquipment(String name, StreamInterface stream) Constructor for TwoPortEquipment. -
Method Summary
Modifier and TypeMethodDescriptiondoubleGet inlet pressure of twoport.Get inlet Stream of twoport.doubleGet inlet temperature of twoport.doublegetMassBalance(String unit) getMassBalance.doubleGet outlet pressure of twoport.Get outlet Stream of twoport.doubleGet outlet temperature of twoport.voidsetInletPressure(double pressure) Set inlet pressure of twoport.voidsetInletStream(StreamInterface stream) Set inlet Stream of twoport.voidsetInletTemperature(double temperature) Set inlet temperature of twoport.voidsetOutletPressure(double pressure) Set outlet pressure of twoport.voidsetOutletStream(StreamInterface stream) Set outlet Stream of twoport.voidsetOutletTemperature(double temperature) Set outlet temperature of twoport.toJson()Serializes the Process Equipment along with its state to a JSON string.toJson(ReportConfig cfg) Serializes the Process Equipment with configurable level of detail.Validate the process equipment before execution.Methods inherited from class ProcessEquipmentBaseClass
copy, displayResult, equals, getConditionAnalysisMessage, getController, getEnergyStream, getEntropyProduction, getExergyChange, getMassBalance, getMechanicalDesign, getMinimumFlow, getPressure, getPressure, getProperty, getReport_json, getResultTable, getSpecification, getTemperature, getTemperature, getThermoSystem, hashCode, initMechanicalDesign, isActive, isActive, isSetEnergyStream, reportResults, run_step, runConditionAnalysis, setController, setEnergyStream, setEnergyStream, setFlowValveController, setMinimumFlow, setPressure, 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 class Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface NamedInterface
getName, getTagName, setName, setTagNameMethods inherited from interface ProcessEquipmentInterface
getCapacityDuty, getCapacityMax, getExergyChange, getFluid, getRestCapacity, needRecalculationMethods inherited from interface SimulationInterface
getCalculateSteadyState, getCalculationIdentifier, getTime, increaseTime, isRunInSteps, run, run, run_step, runTransient, runTransient, setCalculateSteadyState, setCalculationIdentifier, setRunInSteps, setTimeMethods inherited from interface TwoPortInterface
getInStream, getOutStream
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDSerialization version UID.- See Also:
-
inStream
-
outStream
-
-
Constructor Details
-
TwoPortEquipment
Constructor for TwoPortEquipment.- Parameters:
name- Name of TwoPortEquipment
-
TwoPortEquipment
Constructor for TwoPortEquipment.- Parameters:
name- Name of TwoPortEquipmentstream- Stream to set as inlet Stream. A clone of stream is set as outlet stream.
-
-
Method Details
-
getInletPressure
public double getInletPressure()Get inlet pressure of twoport.- Specified by:
getInletPressurein interfaceTwoPortInterface- Returns:
- inlet pressure of TwoPortEquipment in unit bara
-
getInletStream
Get inlet Stream of twoport.- Specified by:
getInletStreamin interfaceTwoPortInterface- Returns:
- inlet Stream of TwoPortEquipment
-
getInletTemperature
public double getInletTemperature()Get inlet temperature of twoport.- Specified by:
getInletTemperaturein interfaceTwoPortInterface- Returns:
- inlet temperature of TwoPortEquipment in unit kelvin
-
getOutletPressure
public double getOutletPressure()Get outlet pressure of twoport.- Specified by:
getOutletPressurein interfaceTwoPortInterface- Returns:
- outlet pressure of TwoPortEquipment in unit bara
-
getOutletStream
Get outlet Stream of twoport.- Specified by:
getOutletStreamin interfaceTwoPortInterface- Returns:
- outlet Stream of TwoPortEquipment
-
getOutletTemperature
public double getOutletTemperature()Get outlet temperature of twoport.- Specified by:
getOutletTemperaturein interfaceTwoPortInterface- Returns:
- outlet temperature of TwoPortEquipment in unit kelvin
-
setInletPressure
public void setInletPressure(double pressure) Set inlet pressure of twoport.- Specified by:
setInletPressurein interfaceTwoPortInterface- Parameters:
pressure- value to set in unit bara
-
setInletStream
Set inlet Stream of twoport.- Specified by:
setInletStreamin interfaceTwoPortInterface- Parameters:
stream- value to set
-
setInletTemperature
public void setInletTemperature(double temperature) Set inlet temperature of twoport.- Specified by:
setInletTemperaturein interfaceTwoPortInterface- Parameters:
temperature- value to set in unit kelvin
-
setOutletPressure
public void setOutletPressure(double pressure) Set outlet pressure of twoport.- Specified by:
setOutletPressurein interfaceTwoPortInterface- Parameters:
pressure- value to set in unit bara
-
setOutletStream
Set outlet Stream of twoport.- Specified by:
setOutletStreamin interfaceTwoPortInterface- Parameters:
stream- value to set
-
setOutletTemperature
public void setOutletTemperature(double temperature) Set outlet temperature of twoport.- Specified by:
setOutletTemperaturein interfaceTwoPortInterface- Parameters:
temperature- value to set in kelvin
-
getMassBalance
getMassBalance.
- Specified by:
getMassBalancein interfaceProcessEquipmentInterface- Overrides:
getMassBalancein classProcessEquipmentBaseClass- Parameters:
unit- aStringobject- Returns:
- a double
-
toJson
Serializes the Process Equipment along with its state to a JSON string.
- Specified by:
toJsonin interfaceProcessEquipmentInterface- Overrides:
toJsonin classProcessEquipmentBaseClass- Returns:
- json string.
-
toJson
Serializes the Process Equipment with configurable level of detail.- Specified by:
toJsonin interfaceProcessEquipmentInterface- Overrides:
toJsonin classProcessEquipmentBaseClass- Parameters:
cfg- report configuration- Returns:
- json string
-
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
Validates the two-port equipment setup before execution. Checks that:
- Equipment has a valid name
- Inlet stream is connected
- Outlet stream is initialized
- Specified by:
validateSetupin interfaceProcessEquipmentInterface- Returns:
- validation result with errors and warnings
-