MON
This function retrieves a chemical’s motor octane number from reference or model datasets keyed by CAS number. If no method is specified, the underlying library selects an available source automatically and returns the corresponding MON value.
Motor octane number is an empirical fuel-quality index used to characterize resistance to engine knock under more severe operating conditions than the research octane test. The wrapper is a data lookup rather than a predictive calculation, so the result depends on the chosen source and on whether a record exists for the requested compound.
Excel Usage
=MON(CASRN, mon_method)
CASRN(str, required): CASRNmon_method(str, optional, default: null): A string for the method name to use.
Returns (float): Motor octane number.
Example 1: Ethanol MON
Inputs:
| CASRN |
|---|
| 64-17-5 |
Excel formula:
=MON("64-17-5")
Expected output:
89.7
Example 2: Methanol MON
Inputs:
| CASRN |
|---|
| 67-56-1 |
Excel formula:
=MON("67-56-1")
Expected output:
88.6
Example 3: Ethanol MON with explicit data source
Inputs:
| CASRN | mon_method |
|---|---|
| 64-17-5 | FLORIAN_LIMING |
Excel formula:
=MON("64-17-5", "FLORIAN_LIMING")
Expected output:
89.7
Python Code
Show Code
from chemicals.combustion import MON
def mon(CASRN, mon_method=None):
"""
This function handles the retrieval of a chemical's motor octane number (MON), using CASRN.
See: https://chemicals.readthedocs.io/chemicals.combustion.html
This example function is provided as-is without any representation of accuracy.
Args:
CASRN (str): CASRN
mon_method (str, optional): A string for the method name to use. Valid options: Florian Liming, Florian Liming ANN, CombustDB, CombustDB Predictions. Default is None.
Returns:
float: Motor octane number.
"""
try:
res = MON(CASRN, method=mon_method)
if res is None:
return "Error: Data not available"
return float(res)
except Exception as e:
return f"Error: {str(e)}"