Class AmmoniaSynthesisReactor

All Implemented Interfaces:
Serializable, Runnable, ProcessEquipmentInterface, TwoPortInterface, ProcessElementInterface, SimulationInterface, NamedInterface

public class AmmoniaSynthesisReactor extends TwoPortEquipment
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

Typical Haber-Bosch operating conditions
ParameterRange
Pressure150-300 bar
Temperature400-500 C
H2/N2 ratio3:1 (stoichiometric)
Per-pass conversion10-20%
Overall conversion (with recycle)95-98%
CatalystMagnetite (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 Details

    • serialVersionUID

      private static final long serialVersionUID
      Serialization version UID.
      See Also:
    • logger

      private static final org.apache.logging.log4j.Logger logger
      Logger object for class.
    • HEAT_OF_REACTION

      private static final double HEAT_OF_REACTION
      Heat of reaction for N2 + 3H2 -> 2NH3 [J/mol N2 reacted].
      See Also:
    • MW_NH3

      private static final double MW_NH3
      Molar mass of NH3 [kg/mol].
      See Also:
    • MW_H2

      private static final double MW_H2
      Molar mass of H2 [kg/mol].
      See Also:
    • MW_N2

      private static final double MW_N2
      Molar mass of N2 [kg/mol].
      See Also:
    • perPassConversion

      private double perPassConversion
      Per-pass conversion of nitrogen [0-1]. Typical 0.10 to 0.20.
    • useEquilibriumConversion

      private boolean useEquilibriumConversion
      Whether to use equilibrium conversion (true) or fixed per-pass (false).
    • isothermal

      private boolean isothermal
      Isothermal mode (true) or adiabatic (false).
    • outletTemperature

      private double outletTemperature
      Reactor outlet temperature [K] (set after run).
    • heatDuty

      private double heatDuty
      Heat duty [W] (negative = exothermic heat released).
    • ammoniaProductionMolPerSec

      private double ammoniaProductionMolPerSec
      Ammonia production rate [mol/s].
    • nitrogenConvertedMolPerSec

      private double nitrogenConvertedMolPerSec
      N2 converted [mol/s].
  • Constructor Details

    • AmmoniaSynthesisReactor

      public AmmoniaSynthesisReactor(String name)
      Constructor for AmmoniaSynthesisReactor.
      Parameters:
      name - name of the reactor
    • AmmoniaSynthesisReactor

      public AmmoniaSynthesisReactor(String name, StreamInterface inletStream)
      Constructor for AmmoniaSynthesisReactor with inlet stream.
      Parameters:
      name - name of the reactor
      inletStream - the synthesis gas feed stream
  • Method Details

    • run

      public void run(UUID id)

      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 N2
      h2Moles - moles of H2
      Returns:
      equilibrium conversion of N2 [0-1]
    • getAmmoniaProductionRate

      public double getAmmoniaProductionRate(String unit)
      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

      public double getHeatDuty(String unit)
      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:
      getOutletTemperature in interface TwoPortInterface
      Overrides:
      getOutletTemperature in class TwoPortEquipment
      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

      public List<StreamInterface> 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 without instanceof checks.
      Specified by:
      getInletStreams in interface ProcessEquipmentInterface
      Overrides:
      getInletStreams in class TwoPortEquipment
      Returns:
      unmodifiable list of inlet streams (empty by default)
    • getOutletStreams

      public List<StreamInterface> 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 without instanceof checks.
      Specified by:
      getOutletStreams in interface ProcessEquipmentInterface
      Overrides:
      getOutletStreams in class TwoPortEquipment
      Returns:
      unmodifiable list of outlet streams (empty by default)