Base class for experimental conditions under which to run the model. In general, a list of operating conditions should be passed in. Each operating condition should be of the form “Do this for this long” or “Do this until this happens”. For example, “Charge at 1 C for 1 hour”, or “Charge at 1 C until 4.2 V”, or “Charge at 1 C for 1 hour or until 4.2 V”. The instructions can be of the form “(Dis)charge at x A/C/W”, “Rest”, or “Hold at x V”. The running time should be a time in seconds, minutes or hours, e.g. “10 seconds”, “3 minutes” or “1 hour”. The stopping conditions should be a circuit state, e.g. “1 A”, “C/50” or “3 V”. The parameter drive_cycles is mandatory to run drive cycle. For example, “Run x”, then x must be the key of drive_cycles dictionary.
operating_conditions (list) – List of operating conditions
parameters (dict) – Dictionary of parameters to use for this experiment, replacing default parameters as appropriate
period (string, optional) – Period (1/frequency) at which to record outputs. Default is 1 minute. Can be overwritten by individual operating conditions.
termination (list, optional) – List of conditions under which to terminate the experiment. Default is None.
use_simulation_setup_type (str) – Whether to use the “new” (default) or “old” simulation set-up type. “new” is faster at simulating individual steps but has higher set-up overhead
drive_cycles (dict) – Dictionary of drive cycles to use for this experiment.
cccv_handling (str, optional) – How to handle CCCV. If “two-step” (default), then the experiment is run in
two steps (CC then CV). If “ode”, then the experiment is run in a single step
using an ODE for current: see
pybamm.external_circuit.CCCVFunctionControl
for details.
Convert a time in seconds, minutes or hours to a time in seconds
Convert operating conditions to the appropriate format
Convert a string to a tuple of the right format
cond (str) – String of appropriate form for example “Charge at x C for y hours”. x and y must be numbers, ‘C’ denotes the unit of the external circuit (can be A for current, C for C-rate, V for voltage or W for power), and ‘hours’ denotes the unit of time (can be second(s), minute(s) or hour(s))
drive_cycles (dict) – A map specifying the drive cycles