Class MethaneNumberCalculator
- All Implemented Interfaces:
Serializable
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:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumCalculation method enumeration. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final org.apache.logging.log4j.LoggerLogger object.private MethaneNumberCalculator.MethodActive calculation method.private static final longSerialization version UID. -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.Constructor with method selection. -
Method Summary
Modifier and TypeMethodDescriptiondoubleCalculate methane number from gas mole fractions.calculateAll(Map<String, Double> composition) Calculate methane number for a complete analysis, returning all three methods.private doublecalculateEN16726(Map<String, Double> composition) Calculate methane number using EN 16726 method.private doublecalculateMWM(Map<String, Double> composition) Calculate methane number using MWM method.private doublecalculateSimplified(Map<String, Double> composition) Calculate methane number using simplified linear correlation.Get the active calculation method.private doublegetMolFraction(Map<String, Double> composition, String componentName) Get the mole fraction of a component (0.0 if not present).private doublegetMolPercent(Map<String, Double> composition, String componentName) Get the mole percent of a component (0.0 if not present).booleanmeetsSpecification(Map<String, Double> composition, double minMN) Check if MN meets a minimum specification.voidSet the calculation method.
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDSerialization version UID.- See Also:
-
logger
private static final org.apache.logging.log4j.Logger loggerLogger object. -
method
Active calculation method.
-
-
Constructor Details
-
MethaneNumberCalculator
public MethaneNumberCalculator()Default constructor. -
MethaneNumberCalculator
Constructor with method selection.- Parameters:
method- calculation method
-
-
Method Details
-
calculate
-
calculateEN16726
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
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
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
-
meetsSpecification
-
getMolFraction
-
getMolPercent
-
getMethod
Get the active calculation method.- Returns:
- calculation method
-
setMethod
Set the calculation method.- Parameters:
method- calculation method
-