rizer.kin.check_charge_balance#

Functions#

check_charge_balance(→ bool)

Check the charge balance of a mechanism.

Module Contents#

rizer.kin.check_charge_balance.check_charge_balance(mechanism: pathlib.Path, verbose: int = 0) bool#

Check the charge balance of a mechanism.

Cantera 3.1 does not check correctly the charge balance of equations. For instance, “e- + O+ => O+” is valid but should not be. See Cantera/cantera#1910.

Parameters:
  • mechanism (Path) – Path to the mechanism file.

  • verbose (int, optional) – Verbosity level, by default 0. - 0: no output, - 1: print reactions with an imbalance of electrons, - 2: print reactions that are balanced in terms of electrons.

Returns:

True if the charge balance is ok, False otherwise.

Return type:

bool