Evaluate Model

members

pyteck.eval_model.create_simulations(dataset, properties)[source]

Set up individual simulations for each ignition delay value.

Parameters
  • dataset

  • properties (pyked.chemked.ChemKED) – ChemKED object with full set of experimental properties

Returns

simulations – List of Simulation objects for each simulation

Return type

list

pyteck.eval_model.estimate_std_dev(indep_variable, dep_variable)[source]
Parameters
  • indep_variable (ndarray, list(float)) – Independent variable (e.g., temperature, pressure)

  • dep_variable (ndarray, list(float)) – Dependent variable (e.g., ignition delay)

Returns

standard_dev – Standard deviation of difference between data and best-fit line

Return type

float

pyteck.eval_model.evaluate_model(model_name, spec_keys_file, dataset_file, data_path='data', model_path='models', results_path='results', model_variant_file=None, num_threads=None, print_results=False, restart=False, skip_validation=False)[source]

Evaluates the ignition delay error of a model for a given dataset.

Parameters
  • model_name (str) – Chemical kinetic model filename

  • spec_keys_file (str) – Name of YAML file identifying important species

  • dataset_file (str) – Name of file with list of data files

  • data_path (str) – Local path for data files. Optional; default = ‘data’

  • model_path (str) – Local path for model file. Optional; default = ‘models’

  • results_path (str) – Local path for creating results files. Optional; default = ‘results’

  • model_variant_file (str) – Name of YAML file identifying ranges of conditions for variants of the kinetic model. Optional; default = None

  • num_threads (int) – Number of CPU threads to use for performing simulations in parallel. Optional; default = None, in which case the available number of cores minus one is used.

  • print_results (bool) – If True, print results of the model evaluation to screen.

  • restart (bool) – If True, process saved results. Mainly intended for testing/development.

  • skip_validation (bool) – If True, skips validation of ChemKED files.

Returns

output – Dictionary with all information about model evaluation results.

Return type

dict

pyteck.eval_model.get_changing_variable(cases)[source]

Identify variable changing across multiple cases.

Parameters

cases (list(pyked.chemked.DataPoint)) – List of DataPoint with experimental case data.

Returns

variable – List of floats representing changing experimental variable.

Return type

list(float)

pyteck.eval_model.min_deviation = 0.1

minimum allowable standard deviation for experimental data

Type

float

pyteck.eval_model.simulation_worker(sim_tuple)[source]

Worker for multiprocessing of simulation cases.

Parameters

sim_tuple (tuple) – Contains Simulation object and other parameters needed to setup and run case.

Returns

sim – Simulation case with calculated ignition delay.

Return type

Simulation