simulation¶
Autoignition simulation module
-
class
pymars.simulation.
Simulation
(idx, properties, model, phase_name='', path='')¶ Class for ignition delay simulations
- Parameters
idx (int) – Identifer index for case
properties (InputIgnition) – Object with initial conditions for simulation
model (str) – Filename for Cantera-format model to be used
phase_name (str, optional) – Optional name for phase to load from CTI file (e.g., ‘gas’).
path (str, optional) – Path for location of output files
-
calculate_ignition
()¶ Run simulation case set up
setup_case
, just for ignition delay.
-
clean
()¶ Delete HDF5 file with full integration data.
-
process_results
(skip_data=False)¶ Process integration results to sample data
- Parameters
skip_data (bool) – Flag to skip sampling thermochemical data
- Returns
Ignition delay, or ignition delay and sampled data
- Return type
tuple of float, numpy.ndarray or float
-
run_case
(stop_at_ignition=False, restart=False)¶ Run simulation case set up
setup_case
.If no end time is specified for the integration, the function integrates to steady state (or a maximum of 10,000 steps, by default). This is done by checking whether the system state changes below a certain threshold, with the residual computed using feature checking. This is blatantly stolen from Cantera’s
cantera.ReactorNet.advance_to_steady_state()
method.
-
setup_case
()¶ Initialize simulation case.