Class Splitter
java.lang.Object
neqsim.util.NamedBaseClass
neqsim.process.SimulationBaseClass
neqsim.process.equipment.ProcessEquipmentBaseClass
neqsim.process.equipment.splitter.Splitter
- All Implemented Interfaces:
Serializable, Runnable, ProcessEquipmentInterface, SplitterInterface, SimulationInterface, NamedInterface
Splitter class.
- Version:
- $Id: $Id
- Author:
- Even Solbraa
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) double[](package private) String(package private) SystemInterface(package private) StreamInterfaceprotected double[]protected doubleprotected doubleprotected double(package private) SystemInterface(package private) static org.apache.logging.log4j.LoggerLogger object for class.protected double[]private static final longSerialization version UID.(package private) double[]protected int(package private) StreamInterface[](package private) SystemInterface(package private) SystemInterface(package private) SystemInterfaceFields inherited from class ProcessEquipmentBaseClass
conditionAnalysisMessage, energyStream, hasController, isSolved, properties, reportFields inherited from class SimulationBaseClass
calcIdentifier, calculateSteadyState, timeFields inherited from class NamedBaseClass
name -
Constructor Summary
ConstructorsConstructorDescriptionConstructor for Splitter.Splitter(String name, StreamInterface inStream) Constructor for Splitter.Splitter(String name, StreamInterface inletStream, int number_of_splits) Constructor for Splitter. -
Method Summary
Modifier and TypeMethodDescriptionvoidcalcSplitFactors.voiddisplayResult.Getter for the fieldinletStream.doublegetMassBalance(String unit) getMassBalance.doublegetSplitFactor(int i) Getter for the fieldsplitFactor.double[]getSplitFactors.intgetSplitNumber.getSplitStream(int i) getSplitStream.booleanCheck if process equipment needs recalculating.voidIn this method all thermodynamic and unit operations will be calculated in a steady state calculation.voidrunTransient(double dt, UUID id) runTransientvoidsetFlowRates(double[] flowRates, String flowUnit) setFlowRates.voidsetInletStream(StreamInterface inletStream) setInletStream.voidsetSplitFactors(double[] splitFact) setSplitFactors.voidsetSplitNumber(int number_of_splits) setSplitNumber.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, 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
equals, getCapacityDuty, getCapacityMax, getConditionAnalysisMessage, getController, getEntropyProduction, getExergyChange, getExergyChange, getFluid, getMassBalance, getMechanicalDesign, getPressure, getPressure, getReport_json, getRestCapacity, getResultTable, getSpecification, getTemperature, getTemperature, getThermoSystem, hashCode, initMechanicalDesign, reportResults, runConditionAnalysis, setController, setPressure, setRegulatorOutSignal, setSpecification, setTemperatureMethods inherited from interface SimulationInterface
getCalculateSteadyState, getCalculationIdentifier, getTime, increaseTime, isRunInSteps, run, run_step, run_step, runTransient, setCalculateSteadyState, setCalculationIdentifier, setRunInSteps, setTime, solved
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDSerialization version UID.- See Also:
-
logger
static org.apache.logging.log4j.Logger loggerLogger object for class. -
thermoSystem
SystemInterface thermoSystem -
gasSystem
SystemInterface gasSystem -
waterSystem
SystemInterface waterSystem -
liquidSystem
SystemInterface liquidSystem -
thermoSystemCloned
SystemInterface thermoSystemCloned -
inletStream
StreamInterface inletStream -
splitStream
StreamInterface[] splitStream -
splitNumber
protected int splitNumber -
splitFactor
double[] splitFactor -
flowRates
double[] flowRates -
flowUnit
String flowUnit -
oldSplitFactor
protected double[] oldSplitFactor -
lastTemperature
protected double lastTemperature -
lastPressure
protected double lastPressure -
lastFlowRate
protected double lastFlowRate -
lastComposition
protected double[] lastComposition
-
-
Constructor Details
-
Splitter
-
Splitter
Constructor for Splitter.- Parameters:
name- name of splitterinStream- input stream
-
Splitter
Constructor for Splitter.
- Parameters:
name- aStringobjectinletStream- aStreamInterfaceobjectnumber_of_splits- an int
-
-
Method Details
-
getInletStream
Getter for the field
inletStream.- Returns:
- a
StreamInterfaceobject
-
setSplitNumber
public void setSplitNumber(int number_of_splits) setSplitNumber.
- Specified by:
setSplitNumberin interfaceSplitterInterface- Parameters:
number_of_splits- a int
-
setSplitFactors
public void setSplitFactors(double[] splitFact) setSplitFactors.
- Parameters:
splitFact- an array of type double
-
setFlowRates
-
calcSplitFactors
public void calcSplitFactors()calcSplitFactors.
-
setInletStream
setInletStream.
- Specified by:
setInletStreamin interfaceSplitterInterface- Parameters:
inletStream- aStreamInterfaceobject
-
getSplitStream
getSplitStream.
- Specified by:
getSplitStreamin interfaceSplitterInterface- Parameters:
i- a int- Returns:
- a
Streamobject
-
needRecalculation
public boolean needRecalculation()Check if process equipment needs recalculating.
- Specified by:
needRecalculationin interfaceProcessEquipmentInterface- Returns:
- true or false
-
run
In this method all thermodynamic and unit operations will be calculated in a steady state calculation.
- Specified by:
runin interfaceSimulationInterface- Parameters:
id- UUID
-
runTransient
runTransient
This method calculates thermodynamic and unit operations using difference equations if available and calculateSteadyState is true. Use setCalculateSteadyState to set the parameter. Sets calc identifier UUID.- Specified by:
runTransientin interfaceSimulationInterface- Parameters:
dt- Delta time [s]id- Calculation identifier
-
getSplitFactor
public double getSplitFactor(int i) Getter for the field
splitFactor.- Parameters:
i- a int- Returns:
- a double
-
getSplitFactors
public double[] getSplitFactors()getSplitFactors.
- Returns:
- an array of type double
-
getSplitNumber
public int getSplitNumber()getSplitNumber.
- Returns:
- number of split outlets
-
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
-
displayResult
public void displayResult()displayResult.
- Specified by:
displayResultin interfaceProcessEquipmentInterface- Overrides:
displayResultin classProcessEquipmentBaseClass
-
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 splitter setup before execution. Checks that:
- Equipment has a valid name
- Inlet stream is connected
- Split factors are valid (sum to 1.0, all non-negative)
- At least one split outlet is defined
- Specified by:
validateSetupin interfaceProcessEquipmentInterface- Returns:
- validation result with errors and warnings
-