Class SimpleTray
java.lang.Object
neqsim.util.NamedBaseClass
neqsim.process.SimulationBaseClass
neqsim.process.equipment.ProcessEquipmentBaseClass
neqsim.process.equipment.mixer.Mixer
neqsim.process.equipment.distillation.SimpleTray
- All Implemented Interfaces:
Serializable, Runnable, CapacityConstrainedEquipment, TrayInterface, MixerInterface, ProcessEquipmentInterface, ProcessElementInterface, SimulationInterface, NamedInterface
- Direct Known Subclasses:
Condenser, ReactiveTray, Reboiler, VLSolidTray
SimpleTray class.
- Version:
- $Id: $Id
- Author:
- ESOL
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate StreamInterfaceCached gas out stream, invalidated when run() is called.private StreamInterfaceCached liquid out stream, invalidated when run() is called.(package private) double(package private) static org.apache.logging.log4j.LoggerLogger object for class.private static final longSerialization version UID.private doubleprotected doubleTray operating pressure in bara.private booleanWhentrue, the tray uses reactive flash (Modified RAND, simultaneous chemical + phase equilibrium) instead of standard VLE flash.Fields inherited from class Mixer
mixedStream, streamsFields inherited from class ProcessEquipmentBaseClass
conditionAnalysisMessage, energyStream, hasController, isSolved, properties, reportFields inherited from class SimulationBaseClass
calcIdentifier, calculateSteadyState, timeFields inherited from class NamedBaseClass
name -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoublecalcMixStreamEnthalpy.doublecalcMixStreamEnthalpy0.doublegetFeedRate(String unit) getFeedRate.getGasOutStream.doublegetLiquidFlowRate(String unit) getLiquidFlowRate.getLiquidOutStream.doubleGetter for the fieldtemperature.doublegetVaporFlowRate(String unit) getVaporFlowRate.doubleguessTemperature.voidinit()init.voidInvalidate the cached gas and liquid output streams.booleanCheck whether this tray uses reactive flash.doublemassBalance.voidIn this method all thermodynamic and unit operations will be calculated in a steady state calculation.voidrun2()run2.voidsetCachedGasOutStream(StreamInterface stream) Set a pre-built gas out stream (e.g.voidSet a pre-built liquid out stream (e.g.voidsetHeatInput(double heatinp) setHeatInput.voidsetPressure(double pres) Setter for the fieldpressure.voidsetTemperature(double temperature) Setter for the fieldtemperature.voidsetUseReactiveFlash(boolean useReactiveFlash) Enable or disable reactive flash on this tray.voidTPflash()TPflash.Methods inherited from class Mixer
addCapacityConstraint, addStream, clearCapacityConstraints, displayResult, equals, getBottleneckConstraint, getCapacityConstraints, getDesignPressureDrop, getEntropyProduction, getInletStreams, getMassBalance, getMaxDesignVelocity, getMaxUtilization, getMechanicalDesign, getMixedSalinity, getNumberOfInputStreams, getOutletStream, getOutletStreams, getOutletTemperature, getOutTemperature, getStream, getThermoSystem, hashCode, initMechanicalDesign, isCapacityAnalysisEnabled, isCapacityExceeded, isDoMultiPhaseCheck, isHardLimitExceeded, isSetOutTemperature, isSetOutTemperature, mixStream, removeCapacityConstraint, removeInputStream, replaceStream, setCapacityAnalysisEnabled, setDesignPressureDrop, setMaxDesignVelocity, setMultiPhaseCheck, setOutletTemperature, setOutTemperature, toJson, toJson, validateSetupMethods inherited from class ProcessEquipmentBaseClass
addController, copy, getAvailableMargin, getAvailableMarginPercent, getConditionAnalysisMessage, getConstraintEvaluationReport, getController, getController, getControllers, getEffectiveCapacityFactor, getEnergyStream, getExergyChange, getFailureMode, getMassBalance, getMaxUtilizationPercent, getMinimumFlow, getPressure, getPressure, getProperty, getReferenceDesignation, getReport_json, getResultTable, getSpecification, getTemperature, getUtilizationSummary, initElectricalDesign, initializeDefaultConstraints, initInstrumentDesign, isActive, isActive, isFailed, isNearCapacityLimit, isSetEnergyStream, reportResults, restoreFromFailure, run_step, runConditionAnalysis, setController, setEnergyStream, setEnergyStream, setFailureMode, setFlowValveController, setMinimumFlow, setReferenceDesignation, setRegulatorOutSignal, setSpecification, simulateDegradedOperation, simulateTrip, solvedMethods inherited from class SimulationBaseClass
getCalculateSteadyState, getCalculationIdentifier, getTime, increaseTime, isRunInSteps, setCalculateSteadyState, setCalculationIdentifier, setRunInSteps, setTimeMethods inherited from class NamedBaseClass
getName, getTagNumber, setName, setTagNumberMethods inherited from class Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface CapacityConstrainedEquipment
disableAllConstraints, enableAllConstraints, getAvailableMargin, getAvailableMarginPercent, getMaxUtilizationPercent, getUtilizationSummary, isNearCapacityLimitMethods inherited from interface MixerInterface
getOutStreamMethods inherited from interface NamedInterface
getName, getTagName, getTagNumber, setName, setTagName, setTagNumberMethods inherited from interface ProcessEquipmentInterface
addCapacityConstraint, addController, displayResult, equals, getAvailableMargin, getAvailableMarginPercent, getBottleneckConstraint, getCapacityConstraints, getCapacityDuty, getCapacityMax, getConditionAnalysisMessage, getController, getController, getControllers, getElectricalDesign, getEntropyProduction, getEquipmentState, getExergyChange, getExergyChange, getExergyDestruction, getExergyDestruction, getFluid, getInletStreams, getInstrumentDesign, getMassBalance, getMassBalance, getMaxUtilization, getMaxUtilizationPercent, getMechanicalDesign, getOperatingEnvelopeViolation, getOutletFlowRate, getOutletPressure, getOutletStreams, getOutletTemperature, getPressure, getPressure, getReferenceDesignation, getReferenceDesignationString, getReport_json, getRestCapacity, getResultTable, getSimulationValidationErrors, getSpecification, getTemperature, getUtilizationSummary, hashCode, initElectricalDesign, initInstrumentDesign, initMechanicalDesign, isCapacityExceeded, isHardLimitExceeded, isNearCapacityLimit, isSimulationValid, isWithinOperatingEnvelope, needRecalculation, reportResults, runConditionAnalysis, setController, setReferenceDesignation, setRegulatorOutSignal, setSpecification, toJson, toJson, validateSetupMethods inherited from interface SimulationInterface
getCalculateSteadyState, getCalculationIdentifier, getTime, increaseTime, isRunInSteps, run, run_step, run_step, runTransient, runTransient, setCalculateSteadyState, setCalculationIdentifier, setRunInSteps, setTime, solvedMethods inherited from interface TrayInterface
addStream
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDSerialization version UID.- See Also:
-
logger
static org.apache.logging.log4j.Logger loggerLogger object for class. -
heatInput
double heatInput -
temperature
private double temperature -
trayPressure
protected double trayPressureTray operating pressure in bara. Negative means use stream pressure. -
useReactiveFlash
private boolean useReactiveFlashWhentrue, the tray uses reactive flash (Modified RAND, simultaneous chemical + phase equilibrium) instead of standard VLE flash. Set viaDistillationColumn.setReactive(boolean). -
cachedGasOutStream
Cached gas out stream, invalidated when run() is called. -
cachedLiquidOutStream
Cached liquid out stream, invalidated when run() is called.
-
-
Constructor Details
-
SimpleTray
-
-
Method Details
-
init
public void init()init.
-
setHeatInput
public void setHeatInput(double heatinp) setHeatInput.
- Specified by:
setHeatInputin interfaceTrayInterface- Parameters:
heatinp- a double
-
calcMixStreamEnthalpy0
public double calcMixStreamEnthalpy0()calcMixStreamEnthalpy0.
- Returns:
- a double
-
calcMixStreamEnthalpy
public double calcMixStreamEnthalpy()calcMixStreamEnthalpy.
- Overrides:
calcMixStreamEnthalpyin classMixer- Returns:
- a double
-
run2
public void run2()run2.
-
TPflash
public void TPflash()TPflash.
-
setUseReactiveFlash
public void setUseReactiveFlash(boolean useReactiveFlash) Enable or disable reactive flash on this tray.- Parameters:
useReactiveFlash-trueto use reactive (chemical + phase) equilibrium
-
isUseReactiveFlash
public boolean isUseReactiveFlash()Check whether this tray uses reactive flash.- Returns:
trueif reactive flash is enabled
-
run
In this method all thermodynamic and unit operations will be calculated in a steady state calculation.
- Specified by:
runin interfaceSimulationInterface- Overrides:
runin classMixer- Parameters:
id- UUID
-
invalidateOutStreamCache
public void invalidateOutStreamCache()Invalidate the cached gas and liquid output streams. Call this after modifying the tray's thermo system compositions externally (e.g. Murphree efficiency correction). -
setCachedGasOutStream
Set a pre-built gas out stream (e.g. Murphree-corrected) to be returned bygetGasOutStream()instead of the equilibrium result.- Parameters:
stream- the corrected gas stream
-
setCachedLiquidOutStream
Set a pre-built liquid out stream (e.g. Murphree-corrected) to be returned bygetLiquidOutStream()instead of the equilibrium result.- Parameters:
stream- the corrected liquid stream
-
getGasOutStream
-
getLiquidOutStream
-
getTemperature
public double getTemperature()Getter for the field
temperature.- Specified by:
getTemperaturein interfaceProcessEquipmentInterface- Overrides:
getTemperaturein classProcessEquipmentBaseClass- Returns:
- a double
-
setPressure
public void setPressure(double pres) Setter for the field
pressure.- Specified by:
setPressurein interfaceProcessEquipmentInterface- Overrides:
setPressurein classMixer- Parameters:
pres- a double
-
setTemperature
public void setTemperature(double temperature) Setter for the field
temperature.- Specified by:
setTemperaturein interfaceProcessEquipmentInterface- Overrides:
setTemperaturein classMixer- Parameters:
temperature- Temperature in Kelvin
-
guessTemperature
public double guessTemperature()guessTemperature.
- Overrides:
guessTemperaturein classMixer- Returns:
- a double
-
getVaporFlowRate
-
getLiquidFlowRate
-
getFeedRate
-
massBalance
public double massBalance()massBalance.
Calculates the mass balance by comparing the total mass input and output.- Returns:
- the difference between mass input and mass output
-