Class PyrolysisReactor

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

public class PyrolysisReactor extends ProcessEquipmentBaseClass
Pyrolysis reactor for thermal decomposition of biomass in the absence of oxygen.

Models slow, fast, and flash pyrolysis by combining empirical product-distribution correlations with constrained Gibbs equilibrium for the vapour phase. The reactor accepts a BiomassCharacterization feedstock and produces three product streams:

  • Pyrolysis gas — non-condensable gases (CO, CO2, H2, CH4)
  • Bio-oil — condensable vapours modelled as a surrogate liquid stream
  • Biochar — solid residue (fixed carbon + ash)

Pyrolysis Modes

Pyrolysis mode characteristics
Mode Temperature Heating Rate Residence Time Main Product
SLOW 300-500 C low minutes-hours Biochar
FAST 400-600 C high seconds Bio-oil
FLASH 450-650 C very high milliseconds Bio-oil/Gas

Product distribution is set by empirical yield fractions that the user can override. Default yields are estimated from published correlations based on pyrolysis mode and biomass volatile matter content.

Version:
1.0
Author:
Even Solbraa
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 instance.
    • biomass

      private BiomassCharacterization biomass
      The biomass feedstock characterization.
    • biomassFeedRateKgPerHr

      private double biomassFeedRateKgPerHr
      Biomass feed rate in kg/hr (dry basis).
    • pyrolysisMode

      private PyrolysisReactor.PyrolysisMode pyrolysisMode
      Pyrolysis mode.
    • pyrolysisTemperature

      private double pyrolysisTemperature
      Pyrolysis temperature in Kelvin.
    • reactorPressure

      private double reactorPressure
      Reactor pressure in bara.
    • heatingRate

      private double heatingRate
      Heating rate in K/s (informational, affects default product yields).
    • vapourResidenceTime

      private double vapourResidenceTime
      Vapour residence time in seconds.
    • charYield

      private double charYield
      Char yield fraction (0-1). Overrides automatic estimate if set.
    • bioOilYield

      private double bioOilYield
      Bio-oil yield fraction (0-1). Overrides automatic estimate if set.
    • gasYield

      private double gasYield
      Gas yield fraction (0-1). Overrides automatic estimate if set.
    • userYieldsSet

      private boolean userYieldsSet
      Whether user-supplied yields should be used.
    • gibbsReactor

      private transient GibbsReactor gibbsReactor
      Internal Gibbs reactor for vapour-phase equilibrium.
    • gasOutStream

      private StreamInterface gasOutStream
      Product gas outlet stream (non-condensable gases).
    • bioOilOutStream

      private StreamInterface bioOilOutStream
      Bio-oil outlet stream (condensable vapours).
    • biocharOutStream

      private StreamInterface biocharOutStream
      Biochar outlet stream (solid residue).
    • actualCharYield

      private double actualCharYield
      Actual char yield used in last simulation (0-1).
    • actualBioOilYield

      private double actualBioOilYield
      Actual bio-oil yield used in last simulation (0-1).
    • actualGasYield

      private double actualGasYield
      Actual gas yield used in last simulation (0-1).
    • bioOilHHV

      private double bioOilHHV
      Bio-oil HHV in MJ/kg.
    • biocharHHV

      private double biocharHHV
      Biochar HHV in MJ/kg.
    • gasLHVMjPerNm3

      private double gasLHVMjPerNm3
      Gas LHV in MJ/Nm3.
    • energyYield

      private double energyYield
      Energy yield as fraction of feed energy in products.
    • hasRun

      private boolean hasRun
      Whether the reactor has been run.
    • MW_C

      private static final double MW_C
      See Also:
    • MW_H

      private static final double MW_H
      See Also:
    • MW_O

      private static final double MW_O
      See Also:
    • MW_N

      private static final double MW_N
      See Also:
    • MW_S

      private static final double MW_S
      See Also:
  • Constructor Details

    • PyrolysisReactor

      public PyrolysisReactor(String name)
      Creates a pyrolysis reactor with the given name.
      Parameters:
      name - equipment name
  • Method Details

    • setBiomass

      public void setBiomass(BiomassCharacterization biomass, double feedRateKgPerHr)
      Sets the biomass feedstock and feed rate.
      Parameters:
      biomass - biomass characterization
      feedRateKgPerHr - dry biomass feed rate in kg/hr
    • setPyrolysisMode

      public void setPyrolysisMode(PyrolysisReactor.PyrolysisMode mode)
      Sets the pyrolysis mode.
      Parameters:
      mode - the pyrolysis mode
    • getPyrolysisMode

      public PyrolysisReactor.PyrolysisMode getPyrolysisMode()
      Gets the pyrolysis mode.
      Returns:
      pyrolysis mode
    • setPyrolysisTemperature

      public void setPyrolysisTemperature(double temperatureK)
      Sets the pyrolysis temperature in Kelvin.
      Parameters:
      temperatureK - temperature in Kelvin
    • setPyrolysisTemperature

      public void setPyrolysisTemperature(double temperature, String unit)
      Sets the pyrolysis temperature with unit specification.
      Parameters:
      temperature - temperature value
      unit - unit string ("K", "C", "F")
    • getPyrolysisTemperature

      public double getPyrolysisTemperature()
      Gets the pyrolysis temperature in Kelvin.
      Returns:
      pyrolysis temperature in K
    • setReactorPressure

      public void setReactorPressure(double pressureBara)
      Sets the reactor pressure in bara.
      Parameters:
      pressureBara - reactor pressure
    • getReactorPressure

      public double getReactorPressure()
      Gets the reactor pressure in bara.
      Returns:
      reactor pressure
    • setHeatingRate

      public void setHeatingRate(double heatingRateKPerS)
      Sets the heating rate in K/s.
      Parameters:
      heatingRateKPerS - heating rate
    • getHeatingRate

      public double getHeatingRate()
      Gets the heating rate in K/s.
      Returns:
      heating rate
    • setVapourResidenceTime

      public void setVapourResidenceTime(double seconds)
      Sets the vapour residence time in seconds.
      Parameters:
      seconds - vapour residence time
    • getVapourResidenceTime

      public double getVapourResidenceTime()
      Gets the vapour residence time in seconds.
      Returns:
      vapour residence time in seconds
    • setProductYields

      public void setProductYields(double charYieldFrac, double bioOilYieldFrac, double gasYieldFrac)
      Sets product yield fractions manually. All three must sum to approximately 1.0.
      Parameters:
      charYieldFrac - char yield fraction (0-1)
      bioOilYieldFrac - bio-oil yield fraction (0-1)
      gasYieldFrac - gas yield fraction (0-1)
    • getGasOutStream

      public StreamInterface getGasOutStream()
      Returns the gas outlet stream.
      Returns:
      gas outlet stream, or null if not yet run
    • getBioOilOutStream

      public StreamInterface getBioOilOutStream()
      Returns the bio-oil outlet stream.
      Returns:
      bio-oil outlet stream, or null if not yet run
    • getBiocharOutStream

      public StreamInterface getBiocharOutStream()
      Returns the biochar outlet stream.
      Returns:
      biochar outlet stream, or null if not yet run
    • getActualCharYield

      public double getActualCharYield()
      Returns the actual char yield from the last run.
      Returns:
      char yield fraction (0-1)
    • getActualBioOilYield

      public double getActualBioOilYield()
      Returns the actual bio-oil yield from the last run.
      Returns:
      bio-oil yield fraction (0-1)
    • getActualGasYield

      public double getActualGasYield()
      Returns the actual gas yield from the last run.
      Returns:
      gas yield fraction (0-1)
    • getBioOilHHV

      public double getBioOilHHV()
      Returns the bio-oil HHV in MJ/kg.
      Returns:
      bio-oil HHV
    • getBiocharHHV

      public double getBiocharHHV()
      Returns the biochar HHV in MJ/kg.
      Returns:
      biochar HHV
    • getGasLHVMjPerNm3

      public double getGasLHVMjPerNm3()
      Returns the gas LHV in MJ/Nm3.
      Returns:
      gas LHV
    • getEnergyYield

      public double getEnergyYield()
      Returns the energy yield as the fraction of feed energy recovered in all products.
      Returns:
      energy yield (0-1)
    • 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.
      Returns:
      unmodifiable list of outlet streams (empty by default)
    • 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.
      Returns:
      unmodifiable list of inlet streams (empty by default)
    • run

      public void run(UUID id)
      Runs the pyrolysis reactor simulation.
      Parameters:
      id - UUID for this run
    • estimateProductYields

      private void estimateProductYields()
      Estimates product yields based on pyrolysis mode and biomass properties when user values are not set.

      Default correlations are derived from published literature averages:

      • Slow: char ~ 35%, oil ~ 30%, gas ~ 35%
      • Fast: char ~ 15-20%, oil ~ 50-65%, gas ~ 15-25%
      • Flash: char ~ 10-15%, oil ~ 55-70%, gas ~ 15-25%

      Temperature adjustments: higher temperature shifts yield from char toward gas.

    • calculatePerformanceMetrics

      private void calculatePerformanceMetrics()
      Calculates performance metrics after simulation.
    • getMoleFraction

      private double getMoleFraction(SystemInterface system, String componentName)
      Returns the mole fraction of a component in a system, or 0 if not present.
      Parameters:
      system - the thermo system
      componentName - the component name
      Returns:
      mole fraction
    • ensureComponent

      private void ensureComponent(SystemInterface fluid, String componentName)
      Ensures a component exists in the fluid at a trace amount.
      Parameters:
      fluid - the system interface
      componentName - the component name
    • getResults

      public Map<String,Object> getResults()
      Returns a map of key results from the pyrolysis simulation.
      Returns:
      map of result name to value
    • toJson

      public String toJson()
      Returns a JSON string with the pyrolysis results.
      Specified by:
      toJson in interface ProcessEquipmentInterface
      Overrides:
      toJson in class ProcessEquipmentBaseClass
      Returns:
      JSON results string
    • toString

      public String toString()
      Overrides:
      toString in class Object