reduce_model

Module for general model reduction class and function.

class pymars.reduce_model.ReducedModel(model: Solution, filename: str = '', error: float = 0.0, limbo_species: list = [])

Represents reduced model and associated metadata

error: float

Alias for field number 2

filename: str

Alias for field number 1

limbo_species: list

Alias for field number 3

model: Solution

Alias for field number 0

pymars.reduce_model.trim(initial_model_file, exclusion_list, new_model_file, phase_name='')

Function to eliminate species and corresponding reactions from model

Parameters:
  • initial_model_file (str) – Filename for initial model to be reduced

  • exclusion_list (list of str) – List of species names that will be removed

  • new_model_file (str) – Name of new reduced model file

  • phase_name (str, optional) – Optional name for phase to load from CTI file (e.g., ‘gas’).

Returns:

new_solution – Model with species and associated reactions eliminated

Return type:

ct.Solution