Class MethaneNumberCalculator

java.lang.Object
neqsim.process.equipment.lng.MethaneNumberCalculator
All Implemented Interfaces:
Serializable

public class MethaneNumberCalculator extends Object implements Serializable
Methane Number calculator based on EN 16726 and MWM methods.

The Methane Number (MN) is a measure of the knock resistance of gaseous fuels, analogous to the octane number for liquid fuels. MN = 100 for pure methane and MN = 0 for pure hydrogen on the reference scale.

This class implements three calculation methods:

  • EN 16726 (GRI/GERG): The European standard method using empirical correlations from the Gas Research Institute, as standardized in EN 16726:2015. This is the method required by most LNG sales contracts and terminal specifications.
  • MWM: The Caterpillar/MWM method widely used by engine manufacturers (Waertsilae, MAN). Uses a different coefficient set.
  • Simplified linear: Quick approximation for screening purposes.

The EN 16726 method computes knocking propensity from composition, taking into account that heavier hydrocarbons reduce MN while inerts (N2, CO2) increase it:

MN = a0 + a1*H2 + a2*CO + a3*CH4 + a4*C2H6 + a5*C3H8 + a6*C4H10 + a7*C5H12 + a8*CO2 + a9*N2
   + quadratic and interaction terms
Version:
1.0
Author:
NeqSim
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.
    • method

      Active calculation method.
  • Constructor Details

    • MethaneNumberCalculator

      public MethaneNumberCalculator()
      Default constructor.
    • MethaneNumberCalculator

      public MethaneNumberCalculator(MethaneNumberCalculator.Method method)
      Constructor with method selection.
      Parameters:
      method - calculation method
  • Method Details

    • calculate

      public double calculate(Map<String,Double> composition)
      Calculate methane number from gas mole fractions.
      Parameters:
      composition - map of component name to mole fraction (must sum to ~1.0)
      Returns:
      methane number (0-100 scale)
    • calculateEN16726

      private double calculateEN16726(Map<String,Double> composition)
      Calculate methane number using EN 16726 method.

      The EN 16726 (GRI/GERG) method uses a multivariate polynomial regression fitted to engine test data. The correlation includes linear, quadratic, and cross terms for the main combustible and inert components.

      Reference: EN 16726:2015 "Gas infrastructure - Quality of gas - Group H", Annex E (informative): "Calculation of methane number".

      Parameters:
      composition - mole fractions keyed by component name
      Returns:
      methane number
    • calculateMWM

      private double calculateMWM(Map<String,Double> composition)
      Calculate methane number using MWM method.

      The MWM method (Motorenwerke Mannheim, now Caterpillar Energy Solutions) is widely used by gas engine manufacturers. It uses a different set of coefficients and typically gives slightly lower MN values than EN 16726 for rich LNG compositions.

      Parameters:
      composition - mole fractions keyed by component name
      Returns:
      methane number
    • calculateSimplified

      private double calculateSimplified(Map<String,Double> composition)
      Calculate methane number using simplified linear correlation.

      Quick screening method: MN = 137.78 * xC1 - 29.948 * xC2 - 18.193 * xC3 - 167.06 * xN2. Applicable only for lean LNG (C3 < 5%, no C4+).

      Parameters:
      composition - mole fractions keyed by component name
      Returns:
      methane number
    • calculateAll

      public Map<String,Double> calculateAll(Map<String,Double> composition)
      Calculate methane number for a complete analysis, returning all three methods.
      Parameters:
      composition - mole fractions keyed by component name
      Returns:
      map with keys "EN16726", "MWM", "Simplified"
    • meetsSpecification

      public boolean meetsSpecification(Map<String,Double> composition, double minMN)
      Check if MN meets a minimum specification.
      Parameters:
      composition - mole fractions
      minMN - minimum required methane number
      Returns:
      true if MN meets specification
    • getMolFraction

      private double getMolFraction(Map<String,Double> composition, String componentName)
      Get the mole fraction of a component (0.0 if not present).
      Parameters:
      composition - composition map
      componentName - component name
      Returns:
      mole fraction (0.0-1.0)
    • getMolPercent

      private double getMolPercent(Map<String,Double> composition, String componentName)
      Get the mole percent of a component (0.0 if not present).
      Parameters:
      composition - composition map (mole fractions)
      componentName - component name
      Returns:
      mole percent (0.0-100.0)
    • getMethod

      public MethaneNumberCalculator.Method getMethod()
      Get the active calculation method.
      Returns:
      calculation method
    • setMethod

      public void setMethod(MethaneNumberCalculator.Method method)
      Set the calculation method.
      Parameters:
      method - calculation method