Skip to main content
Docs

Search guides and API endpoints, for example “Idempotency-Key” or “submit job”.

    Tools · Fluids & Thermodynamics

    Mechanism Reduction

    Shrink a detailed kinetic mechanism to a skeletal one that still matches ignition delay and flame speed within your error limit.

    Updated October 1, 2026

    On this page

    Prices, workflows, and method papersOpen in the app

    Detailed kinetic mechanisms (for example from RMG Mechanism Generator) can have hundreds of species and thousands of reactions, too many to simulate quickly. Mechanism Reduction removes species and reactions that don't matter for the conditions you care about, keeping ignition delay and laminar flame speed within the error you allow. It uses pyMARS and Cantera, on CPU.

    How it works

    1. You give the parent mechanism, the conditions to preserve, and an error limit.
    2. pyMARS runs a graph-based reduction: DRGEP (the default), DRG, or PFA. Each ranks species by how much they affect the target species, and removes the least important while the error stays under error_limit_pct.
    3. Optionally, sensitivity_analysis (greedy or initial) then tries removing more species one at a time, checking the error after each.

    Targets: autoignition delay at up to 20 conditions (ignition_conditions) and laminar flame speed at up to 5 (flame_conditions); at least one condition is required. Each condition gives temperature (K), pressure (Pa), and either an equivalence ratio with fuel and oxidizer or an explicit reactant mixture.

    Inputs

    • The parent mechanism: built-in gri30 or h2o2 (mechanism_id), or your own as Cantera YAML or a single CHEMKIN file with thermodynamic data, uploaded or from an artifact. Up to 1,000 species.
    • target_species (up to 10) that drive the reduction, typically fuel and oxidizer, and retained_species (up to 100) to always keep, such as diluents.

    Outputs

    FileContents
    mechanism/primary.yamlThe reduced mechanism, ready for Cantera
    errors.csvIgnition delay (s) and flame speed (m/s) for the parent and reduced mechanisms at every condition, and the error
    removed.csvEvery species and reaction removed
    pymars_input.yamlThe exact pyMARS input, to reproduce the run yourself
    summary.jsonMethod, limits, species and reaction counts, and the worst condition

    Generate mechanisms with RMG Mechanism Generator, and simulate the reduced one in Cantera.

    Run it from the API

    Submit with Submit a job and the job_type below. Price it first with Estimate job reservation cost: submitting reserves that amount from your wallet, and the charge settles at the actual runtime.

    Mechanism Reduction mechanism-reduce

    Job type
    mechanism-reduce
    Hardware
    cpu (default)
    Typical runtime
    30 min on CPU

    Payload

    Provide exactly one of: mechanism, mechanism_id.

    Payload fields
    FieldTypeDescription
    mechanismfile_object
    mechanism.namestring

    Limits: min length 1

    mechanism.filenamestring

    Limits: min length 1

    mechanism.content_b64string

    Limits: min length 1

    mechanism.contentany
    mechanism.bytesany
    mechanism_idstring

    One of: "gri30", "h2o2"

    phase_namestring

    Limits: min length 1

    methodstring

    Default: "DRGEP"One of: "DRG", "DRGEP", "PFA"

    error_limit_pctnumber

    Default: 10Limits: > 0, ≤ 50

    target_species[]requiredstring[]

    Limits: min items 1, max items 10

    retained_species[]string[]

    Limits: max items 100

    sensitivity_analysisboolean

    Default: false

    sensitivity_typestring

    One of: "initial", "greedy"

    upper_thresholdnumber

    Limits: > 0, < 1

    ignition_conditions[]ignition_condition[]

    Limits: max items 20

    ignition_conditions.kindrequiredstring

    One of: "constant_volume", "constant_pressure"

    ignition_conditions.temperature_krequirednumber

    Limits: > 0, ≤ 5000

    ignition_conditions.pressure_parequirednumber

    Limits: > 0

    ignition_conditions.equivalence_rationumber

    Limits: > 0

    ignition_conditions.fuelcomposition
    ignition_conditions.oxidizercomposition
    ignition_conditions.reactantscomposition
    ignition_conditions.end_time_snumber

    Limits: > 0, ≤ 10

    ignition_conditions.max_stepsinteger

    Limits: ≥ 1, ≤ 1000000

    flame_conditions[]flame_condition[]

    Limits: max items 5

    flame_conditions.temperature_krequirednumber

    Limits: > 0, ≤ 5000

    flame_conditions.pressure_parequirednumber

    Limits: > 0

    flame_conditions.equivalence_rationumber

    Limits: > 0

    flame_conditions.fuelcomposition
    flame_conditions.oxidizercomposition
    flame_conditions.reactantscomposition
    flame_conditions.width_mnumber

    Limits: > 0, ≤ 1

    File fields take {"name": "x.pdb", "content_b64": "…"} or a stored artifact, {"$artifact": {"id": "art-…", "port": "…"}}. Files are up to 25 MiB each.

    Example

    from cognichem_client import CogniChem
    
    client = CogniChem.from_env()  # reads COGNICHEM_API_KEY
    payload = {
        "mechanism_id": "gri30",
        "method": "DRGEP",
        "error_limit_pct": 10,
        "target_species": ["CH4", "O2"],
        "retained_species": ["N2"],
        "sensitivity_analysis": False,
        "ignition_conditions": [
            {
                "kind": "constant_volume",
                "temperature_k": 1000,
                "pressure_pa": 101325,
                "equivalence_ratio": 1,
                "fuel": {"CH4": 1},
                "oxidizer": {"O2": 1, "N2": 3.76},
            },
            {
                "kind": "constant_pressure",
                "temperature_k": 1200,
                "pressure_pa": 2026500,
                "equivalence_ratio": 0.5,
                "fuel": {"CH4": 1},
                "oxidizer": {"O2": 1, "N2": 3.76},
            },
        ],
        "flame_conditions": [
            {
                "temperature_k": 300,
                "pressure_pa": 101325,
                "equivalence_ratio": 1,
                "fuel": {"CH4": 1},
                "oxidizer": {"O2": 1, "N2": 3.76},
            },
        ],
    }
    
    estimate = client.jobs.estimate(job_type="mechanism-reduce", payload=payload, resource="cpu")
    print(f"Reserves ${estimate.cost:.2f}")
    
    job = client.jobs.submit(
        job_name="my-mechanism-reduce-run",
        job_type="mechanism-reduce",
        payload=payload,
        resource="cpu",
    )
    status = client.jobs.wait(job.process_id)
    if status.status == "completed":
        client.jobs.result(job.process_id, save_path=".")

    Sample data from the job catalog; long values are shortened here. Each job_name must be unique among your jobs.

    Workflow inputs

    • Kinetic mechanism · optionalYAML, CHEMKIN

    Workflow outputs

    • ArchiveZIP
    • TableCSV
    • Kinetic mechanismYAML
    • TableCSV