uclchem.tests#

Module Contents#

Functions#

test_ode_conservation([element_list])

Test whether the ODEs conserve elements. Useful to run each time you change network.

uclchem.tests.test_ode_conservation(element_list=['H', 'N', 'C', 'O'])[source]#

Test whether the ODEs conserve elements. Useful to run each time you change network. Integrator errors may still cause elements not to be conserved but they cannot be conserved if the ODEs are not correct.

Parameters:

element_list (list, optional) – A list of elements for which to check the conservation. Defaults to [“H”, “N”, “C”, “O”].

Returns:

A dictionary of the elements in element list with values representing the total rate of change of each element.

Return type:

dict