pybamm.
Simulation
(model, experiment=None, geometry=None, parameter_values=None, submesh_types=None, var_pts=None, spatial_methods=None, solver=None, output_variables=None, C_rate=None)[source]¶A Simulation class for easy building and running of PyBaMM simulations.
Parameters: |
|
---|
build
(check_model=True)[source]¶A method to build the model into a system of matrices and vectors suitable for performing numerical computations. If the model has already been built or solved then this function will have no effect. This method will automatically set the parameters if they have not already been set.
Parameters: | check_model (bool, optional) – If True, model checks are performed after discretisation (see
pybamm.Discretisation.process_model() ). Default is True. |
---|
build_for_experiment
(check_model=True)[source]¶Similar to Simulation.build()
, but for the case of simulating an
experiment, where there may be several models to build
plot
(output_variables=None, quick_plot_vars=None, **kwargs)[source]¶A method to quickly plot the outputs of the simulation. Creates a
pybamm.QuickPlot
object (with keyword arguments ‘kwargs’) and
then calls pybamm.QuickPlot.dynamic_plot()
.
Parameters: |
|
---|
set_up_experiment
(model, experiment)[source]¶Set up a simulation to run with an experiment. This creates a dictionary of inputs (current/voltage/power, running time, stopping condition) for each operating condition in the experiment. The model will then be solved by integrating the model successively with each group of inputs, one group at a time.
set_up_model_for_experiment_new
(model)[source]¶Set up self.model to be able to run the experiment (new version). In this version, a new model is created for each step.
This increases set-up time since several models to be processed, but reduces simulation time since the model formulation is efficient.
set_up_model_for_experiment_old
(model)[source]¶Set up self.model to be able to run the experiment (old version). In this version, a single model is created which can then be called with different inputs for current-control, voltage-control, or power-control.
This reduces set-up time since only one model needs to be processed, but increases simulation time since the model formulation is inefficient
solve
(t_eval=None, solver=None, check_model=True, save_at_cycles=None, starting_solution=None, **kwargs)[source]¶A method to solve the model. This method will automatically build and set the model parameters if not already done so.
Parameters: |
|
---|
specs
(geometry=None, parameter_values=None, submesh_types=None, var_pts=None, spatial_methods=None, solver=None, output_variables=None, C_rate=None)[source]¶Deprecated method for setting specs
step
(dt, solver=None, npts=2, save=True, starting_solution=None, **kwargs)[source]¶A method to step the model forward one timestep. This method will automatically build and set the model parameters if not already done so.
Parameters: |
|
---|