Class StirredTankReactor
java.lang.Object
neqsim.util.NamedBaseClass
neqsim.process.SimulationBaseClass
neqsim.process.equipment.ProcessEquipmentBaseClass
neqsim.process.equipment.TwoPortEquipment
neqsim.process.equipment.reactor.StirredTankReactor
- All Implemented Interfaces:
Serializable, Runnable, ProcessEquipmentInterface, TwoPortInterface, ProcessElementInterface, SimulationInterface, NamedInterface
- Direct Known Subclasses:
EnzymeTreatment, Fermenter
Stirred tank reactor (CSTR) for bio-processing and chemical operations.
Models a continuous stirred-tank reactor (CSTR) or batch reactor with one or more stoichiometric reactions. The reactor applies each reaction in sequence to the feed, then performs a flash calculation at the specified outlet conditions.
Usage example:
StirredTankReactor cstr = new StirredTankReactor("Reactor", feedStream);
cstr.setReactorTemperature(273.15 + 37.0); // 37 C
cstr.setResidenceTime(24.0, "hr");
cstr.setVesselVolume(50.0); // m3
cstr.addReaction(ethanolFermentation);
cstr.run();
- Version:
- 1.0
- Author:
- NeqSim team
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate doubleAgitator power per unit volume in kW/m3.private doubleHeat duty calculated from energy balance in Watts.private booleanWhether to operate in isothermal mode (fix temperature).private static final org.apache.logging.log4j.LoggerLogger object for class.private doublePressure drop across reactor in bar.private List<StoichiometricReaction> Reactions to apply in this reactor.private doubleReactor pressure in bara.private doubleReactor temperature in Kelvin.private doubleResidence time in hours.private static final longSerialization version UID.private doubleVessel volume in m3.Fields 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
ConstructorsConstructorDescriptionStirredTankReactor(String name) Constructor for StirredTankReactor.StirredTankReactor(String name, StreamInterface inletStream) Constructor for StirredTankReactor with inlet stream. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddReaction(StoichiometricReaction reaction) Add a stoichiometric reaction to the reactor.voidClear all reactions.doubleGet total agitator power in kW.doubleGet the agitator power per unit volume.doubleGet the heat duty calculated from energy balance in Watts.doublegetHeatDuty(String unit) Get the heat duty in specified unit.doubleGet the pressure drop in bar.Get the list of reactions.doubleGet the reactor pressure in bara.doubleGet the reactor temperature in Kelvin.doubleGet residence time in hours.doubleGet the vessel volume in m3.booleanCheck if reactor is isothermal.voidIn this method all thermodynamic and unit operations will be calculated in a steady state calculation.voidsetAgitatorPowerPerVolume(double powerPerVolume) Set the agitator power per unit volume.voidsetIsothermal(boolean isothermal) Set whether reactor operates isothermally.voidsetPressureDrop(double dP) Set the pressure drop across the reactor.voidsetReactorPressure(double pressureBara) Set the reactor pressure in bara.voidsetReactorTemperature(double temperatureK) Set the reactor operating temperature in Kelvin.voidsetReactorTemperature(double temperature, String unit) Set the reactor operating temperature with unit.voidsetResidenceTime(double time, String unit) Set residence time.voidsetVesselVolume(double volumeM3) Set the vessel volume.toJson()Serializes the Process Equipment along with its state to a JSON string.toMap()Get a map representation of the reactor state.Methods inherited from class TwoPortEquipment
getInletPressure, getInletStream, getInletStreams, getInletTemperature, getMassBalance, getOutletPressure, getOutletStream, getOutletStreams, getOutletTemperature, setInletPressure, setInletStream, setInletTemperature, setOutletPressure, setOutletPressure, setOutletStream, setOutletTemperature, setOutletTemperature, toJson, validateSetupMethods inherited from class ProcessEquipmentBaseClass
addCapacityConstraint, addController, copy, displayResult, equals, getAvailableMargin, getAvailableMarginPercent, getBottleneckConstraint, getCapacityConstraints, getConditionAnalysisMessage, getConstraintEvaluationReport, getController, getController, getControllers, getEffectiveCapacityFactor, getEnergyStream, getEntropyProduction, getExergyChange, getFailureMode, getMassBalance, getMaxUtilization, getMaxUtilizationPercent, getMechanicalDesign, getMinimumFlow, getPressure, getPressure, getProperty, getReferenceDesignation, getReport_json, getResultTable, getSpecification, getTemperature, getTemperature, getThermoSystem, getUtilizationSummary, hashCode, initElectricalDesign, initializeDefaultConstraints, initInstrumentDesign, initMechanicalDesign, isActive, isActive, isCapacityAnalysisEnabled, isCapacityExceeded, isFailed, isHardLimitExceeded, isNearCapacityLimit, isSetEnergyStream, reportResults, restoreFromFailure, run_step, runConditionAnalysis, setCapacityAnalysisEnabled, setController, setEnergyStream, setEnergyStream, setFailureMode, setFlowValveController, setMinimumFlow, setPressure, setReferenceDesignation, setRegulatorOutSignal, setSpecification, setTemperature, 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 NamedInterface
getName, getTagName, getTagNumber, setName, setTagName, setTagNumberMethods inherited from interface ProcessEquipmentInterface
getCapacityDuty, getCapacityMax, getElectricalDesign, getEquipmentState, getExergyChange, getExergyDestruction, getExergyDestruction, getFluid, getInstrumentDesign, getOperatingEnvelopeViolation, getOutletFlowRate, getOutletPressure, getOutletTemperature, getReferenceDesignationString, getRestCapacity, getSimulationValidationErrors, isSimulationValid, isWithinOperatingEnvelope, needRecalculationMethods inherited from interface SimulationInterface
getCalculateSteadyState, getCalculationIdentifier, getTime, increaseTime, isRunInSteps, run, run_step, runTransient, runTransient, setCalculateSteadyState, setCalculationIdentifier, setRunInSteps, setTimeMethods inherited from interface TwoPortInterface
getInStream, getOutStream, setOutPressure, setOutPressure, setOutTemperature, setOutTemperature
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDSerialization version UID.- See Also:
-
logger
private static final org.apache.logging.log4j.Logger loggerLogger object for class. -
reactions
Reactions to apply in this reactor. -
reactorTemperature
private double reactorTemperatureReactor temperature in Kelvin. If NaN, uses feed temperature (isothermal to feed). -
reactorPressure
private double reactorPressureReactor pressure in bara. If NaN, uses feed pressure. -
vesselVolume
private double vesselVolumeVessel volume in m3. -
residenceTime
private double residenceTimeResidence time in hours. -
agitatorPowerPerVolume
private double agitatorPowerPerVolumeAgitator power per unit volume in kW/m3. -
pressureDrop
private double pressureDropPressure drop across reactor in bar. -
heatDuty
private double heatDutyHeat duty calculated from energy balance in Watts. -
isothermal
private boolean isothermalWhether to operate in isothermal mode (fix temperature).
-
-
Constructor Details
-
StirredTankReactor
Constructor for StirredTankReactor.- Parameters:
name- name of the reactor
-
StirredTankReactor
Constructor for StirredTankReactor with inlet stream.- Parameters:
name- name of the reactorinletStream- inlet feed stream
-
-
Method Details
-
addReaction
Add a stoichiometric reaction to the reactor.- Parameters:
reaction- aStoichiometricReactionto apply
-
getReactions
Get the list of reactions.- Returns:
- list of reactions
-
clearReactions
public void clearReactions()Clear all reactions. -
setReactorTemperature
public void setReactorTemperature(double temperatureK) Set the reactor operating temperature in Kelvin.- Parameters:
temperatureK- temperature in Kelvin
-
setReactorTemperature
Set the reactor operating temperature with unit.- Parameters:
temperature- temperature valueunit- temperature unit ("K", "C", "F")
-
getReactorTemperature
public double getReactorTemperature()Get the reactor temperature in Kelvin.- Returns:
- reactor temperature in K
-
setReactorPressure
public void setReactorPressure(double pressureBara) Set the reactor pressure in bara.- Parameters:
pressureBara- pressure in bara
-
getReactorPressure
public double getReactorPressure()Get the reactor pressure in bara.- Returns:
- reactor pressure in bara
-
setVesselVolume
public void setVesselVolume(double volumeM3) Set the vessel volume.- Parameters:
volumeM3- vessel volume in cubic meters
-
getVesselVolume
public double getVesselVolume()Get the vessel volume in m3.- Returns:
- vessel volume
-
setResidenceTime
Set residence time.- Parameters:
time- residence time valueunit- time unit ("hr", "min", "s")
-
getResidenceTime
public double getResidenceTime()Get residence time in hours.- Returns:
- residence time in hours
-
setAgitatorPowerPerVolume
public void setAgitatorPowerPerVolume(double powerPerVolume) Set the agitator power per unit volume.- Parameters:
powerPerVolume- agitator power in kW/m3
-
getAgitatorPowerPerVolume
public double getAgitatorPowerPerVolume()Get the agitator power per unit volume.- Returns:
- agitator power in kW/m3
-
getAgitatorPower
public double getAgitatorPower()Get total agitator power in kW.- Returns:
- total agitator power
-
setPressureDrop
public void setPressureDrop(double dP) Set the pressure drop across the reactor.- Parameters:
dP- pressure drop in bar
-
getPressureDrop
public double getPressureDrop()Get the pressure drop in bar.- Returns:
- pressure drop
-
getHeatDuty
public double getHeatDuty()Get the heat duty calculated from energy balance in Watts.- Returns:
- heat duty in W (positive = heat added, negative = removed)
-
getHeatDuty
Get the heat duty in specified unit.- Parameters:
unit- unit for heat duty ("W", "kW", "MW")- Returns:
- heat duty in specified unit
-
setIsothermal
public void setIsothermal(boolean isothermal) Set whether reactor operates isothermally.- Parameters:
isothermal- true for isothermal, false for adiabatic
-
isIsothermal
public boolean isIsothermal()Check if reactor is isothermal.- Returns:
- true if isothermal
-
run
In this method all thermodynamic and unit operations will be calculated in a steady state calculation.
- Parameters:
id- UUID
-
toJson
Serializes the Process Equipment along with its state to a JSON string.
- Specified by:
toJsonin interfaceProcessEquipmentInterface- Overrides:
toJsonin classTwoPortEquipment- Returns:
- json string.
-
toMap
-