Class AmmoniaSynthesisReactor
java.lang.Object
neqsim.util.NamedBaseClass
neqsim.process.SimulationBaseClass
neqsim.process.equipment.ProcessEquipmentBaseClass
neqsim.process.equipment.TwoPortEquipment
neqsim.process.equipment.reactor.AmmoniaSynthesisReactor
- All Implemented Interfaces:
Serializable, Runnable, ProcessEquipmentInterface, TwoPortInterface, ProcessElementInterface, SimulationInterface, NamedInterface
Ammonia synthesis reactor modeling the Haber-Bosch process.
Simulates the catalytic synthesis of ammonia from nitrogen and hydrogen:
N2 + 3 H2 <-> 2 NH3 (delta H = -92.4 kJ/mol at 25 C)
The reactor models the equilibrium and kinetic-limited conversion of the Haber-Bosch process operating at 150-300 bar and 400-500 C over an iron or ruthenium catalyst.
Features
- Equilibrium conversion calculation using temperature and pressure
- Per-pass conversion factor (typically 10-20% due to kinetic limitations)
- Adiabatic or isothermal operation modes
- Heat of reaction tracking
- Excess hydrogen or nitrogen recycle support
Typical Operating Conditions
| Parameter | Range |
|---|---|
| Pressure | 150-300 bar |
| Temperature | 400-500 C |
| H2/N2 ratio | 3:1 (stoichiometric) |
| Per-pass conversion | 10-20% |
| Overall conversion (with recycle) | 95-98% |
| Catalyst | Magnetite (Fe3O4) or Ruthenium |
Usage Example
// Create synthesis gas feed (3:1 H2:N2)
SystemInterface synthGas = new SystemSrkEos(273.15 + 450.0, 200.0);
synthGas.addComponent("hydrogen", 0.75);
synthGas.addComponent("nitrogen", 0.25);
synthGas.setMixingRule("classic");
Stream feed = new Stream("Synth Gas Feed", synthGas);
feed.setFlowRate(1000.0, "kg/hr");
feed.run();
AmmoniaSynthesisReactor reactor = new AmmoniaSynthesisReactor("HB Reactor", feed);
reactor.setPerPassConversion(0.15);
reactor.run();
double nh3Production = reactor.getAmmoniaProductionRate("kg/hr");
- Version:
- 1.0
- Author:
- esol
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate doubleAmmonia production rate [mol/s].private static final doubleHeat of reaction for N2 + 3H2 -> 2NH3 [J/mol N2 reacted].private doubleHeat duty [W] (negative = exothermic heat released).private booleanIsothermal mode (true) or adiabatic (false).private static final org.apache.logging.log4j.LoggerLogger object for class.private static final doubleMolar mass of H2 [kg/mol].private static final doubleMolar mass of N2 [kg/mol].private static final doubleMolar mass of NH3 [kg/mol].private doubleN2 converted [mol/s].private doubleReactor outlet temperature [K] (set after run).private doublePer-pass conversion of nitrogen [0-1].private static final longSerialization version UID.private booleanWhether to use equilibrium conversion (true) or fixed per-pass (false).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
ConstructorsConstructorDescriptionConstructor for AmmoniaSynthesisReactor.AmmoniaSynthesisReactor(String name, StreamInterface inletStream) Constructor for AmmoniaSynthesisReactor with inlet stream. -
Method Summary
Modifier and TypeMethodDescriptionprivate doublecalculateEquilibriumConversion(double tempK, double pressureBar, double n2Moles, double h2Moles) Calculate equilibrium conversion using simplified Kp correlation.doubleGet ammonia production rate.doubleGet N2 conversion achieved.doubleGet heat duty [W].doublegetHeatDuty(String unit) Get heat duty in specified unit.Returns all inlet streams connected to this equipment.Returns all outlet streams produced by this equipment.doubleGet outlet temperature [K].doubleGet per-pass conversion.booleanCheck if reactor is in isothermal mode.voidIn this method all thermodynamic and unit operations will be calculated in a steady state calculation.voidsetIsothermal(boolean isothermal) Set isothermal operation mode.voidsetPerPassConversion(double conversion) Set per-pass conversion of nitrogen [0-1].voidsetUseEquilibriumConversion(boolean useEquilibrium) Set whether to use equilibrium conversion calculation.Methods inherited from class TwoPortEquipment
getInletPressure, getInletStream, getInletTemperature, getMassBalance, getOutletPressure, getOutletStream, setInletPressure, setInletStream, setInletTemperature, setOutletPressure, setOutletPressure, setOutletStream, setOutletTemperature, setOutletTemperature, toJson, 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. -
HEAT_OF_REACTION
private static final double HEAT_OF_REACTIONHeat of reaction for N2 + 3H2 -> 2NH3 [J/mol N2 reacted].- See Also:
-
MW_NH3
private static final double MW_NH3Molar mass of NH3 [kg/mol].- See Also:
-
MW_H2
private static final double MW_H2Molar mass of H2 [kg/mol].- See Also:
-
MW_N2
private static final double MW_N2Molar mass of N2 [kg/mol].- See Also:
-
perPassConversion
private double perPassConversionPer-pass conversion of nitrogen [0-1]. Typical 0.10 to 0.20. -
useEquilibriumConversion
private boolean useEquilibriumConversionWhether to use equilibrium conversion (true) or fixed per-pass (false). -
isothermal
private boolean isothermalIsothermal mode (true) or adiabatic (false). -
outletTemperature
private double outletTemperatureReactor outlet temperature [K] (set after run). -
heatDuty
private double heatDutyHeat duty [W] (negative = exothermic heat released). -
ammoniaProductionMolPerSec
private double ammoniaProductionMolPerSecAmmonia production rate [mol/s]. -
nitrogenConvertedMolPerSec
private double nitrogenConvertedMolPerSecN2 converted [mol/s].
-
-
Constructor Details
-
AmmoniaSynthesisReactor
Constructor for AmmoniaSynthesisReactor.- Parameters:
name- name of the reactor
-
AmmoniaSynthesisReactor
Constructor for AmmoniaSynthesisReactor with inlet stream.- Parameters:
name- name of the reactorinletStream- the synthesis gas feed stream
-
-
Method Details
-
run
In this method all thermodynamic and unit operations will be calculated in a steady state calculation.
- Parameters:
id- UUID
-
calculateEquilibriumConversion
private double calculateEquilibriumConversion(double tempK, double pressureBar, double n2Moles, double h2Moles) Calculate equilibrium conversion using simplified Kp correlation.Uses the Gillespie-Beattie correlation for the equilibrium constant: log10(Kp) = -2.691122 * log10(T) - 5.519265e-5 * T + 1.848863e-7 * T^2 + 2001.6 / T + 2.6899
- Parameters:
tempK- temperature [K]pressureBar- pressure [bar]n2Moles- moles of N2h2Moles- moles of H2- Returns:
- equilibrium conversion of N2 [0-1]
-
getAmmoniaProductionRate
Get ammonia production rate.- Parameters:
unit- "mol/s", "kg/hr", "tonne/day"- Returns:
- production rate in specified unit
-
getHeatDuty
public double getHeatDuty()Get heat duty [W].- Returns:
- heat duty (negative = exothermic)
-
getHeatDuty
Get heat duty in specified unit.- Parameters:
unit- "W", "kW", "MW"- Returns:
- heat duty in unit
-
getOutletTemperature
public double getOutletTemperature()Get outlet temperature [K].- Specified by:
getOutletTemperaturein interfaceTwoPortInterface- Overrides:
getOutletTemperaturein classTwoPortEquipment- Returns:
- outlet temperature [K]
-
getConversion
public double getConversion()Get N2 conversion achieved.- Returns:
- conversion [0-1]
-
setPerPassConversion
public void setPerPassConversion(double conversion) Set per-pass conversion of nitrogen [0-1].- Parameters:
conversion- per-pass conversion (typical 0.10-0.20)
-
getPerPassConversion
public double getPerPassConversion()Get per-pass conversion.- Returns:
- per-pass conversion [0-1]
-
setUseEquilibriumConversion
public void setUseEquilibriumConversion(boolean useEquilibrium) Set whether to use equilibrium conversion calculation.- Parameters:
useEquilibrium- true to use equilibrium, false for fixed per-pass
-
setIsothermal
public void setIsothermal(boolean isothermal) Set isothermal operation mode.- Parameters:
isothermal- true for isothermal, false for adiabatic
-
isIsothermal
public boolean isIsothermal()Check if reactor is in isothermal mode.- Returns:
- true if isothermal
-
getInletStreams
Returns all inlet streams connected to this equipment. Subclasses override to report their specific inlets. Used by graph builders, DEXPI export, and auto-instrumentation to discover topology withoutinstanceofchecks.- Specified by:
getInletStreamsin interfaceProcessEquipmentInterface- Overrides:
getInletStreamsin classTwoPortEquipment- Returns:
- unmodifiable list of inlet streams (empty by default)
-
getOutletStreams
Returns all outlet streams produced by this equipment. Subclasses override to report their specific outlets. Used by graph builders, DEXPI export, and auto-instrumentation to discover topology withoutinstanceofchecks.- Specified by:
getOutletStreamsin interfaceProcessEquipmentInterface- Overrides:
getOutletStreamsin classTwoPortEquipment- Returns:
- unmodifiable list of outlet streams (empty by default)
-