Base model class with some default settings and required variables
Extends: pybamm.BaseModel
Process parameters and discretise a symbol using supplied parameter values and discretisation. Note: care should be taken if using spatial operators on dimensional symbols. Operators in pybamm are written in non-dimensional form, so may need to be scaled by the appropriate length scale. It is recommended to use this method on non-dimensional symbols.
symbol (pybamm.Symbol) – Symbol to be processed
parameter_values (pybamm.ParameterValues) – The parameter values to use during processing
disc (pybamm.Discretisation) – The discrisation to use
Processed symbol
Set variables that quantify degradation. This function is overriden by the base battery models
A dictionary of options to be passed to the model. The options that can be set are listed below. Note that not all of the options are compatible with each other and with all of the models implemented in PyBaMM. Each option is optional and takes a default value if not provided. In general, the option provided must be a string, but there are some cases where a 2-tuple of strings can be provided instead to indicate a different option for the negative and positive electrodes.
- “cell geometry”str
Sets the geometry of the cell. Can be “pouch” (default) or “arbitrary”. The arbitrary geometry option solves a 1D electrochemical model with prescribed cell volume and cross-sectional area, and (if thermal effects are included) solves a lumped thermal model with prescribed surface area for cooling.
- “convection”str
Whether to include the effects of convection in the model. Can be “none” (default), “uniform transverse” or “full transverse”. Must be “none” for lithium-ion models.
- “current collector”str
Sets the current collector model to use. Can be “uniform” (default), “potential pair” or “potential pair quite conductive”.
- “dimensionality”int
Sets the dimension of the current collector problem. Can be 0 (default), 1 or 2.
- “electrolyte conductivity”str
Can be “default” (default), “full”, “leading order”, “composite” or “integrated”.
- “external submodels”list
A list of the submodels that you would like to supply an external variable for instead of solving in PyBaMM. The entries of the lists are strings that correspond to the submodel names in the keys of self.submodels.
- “hydrolysis”str
Whether to include hydrolysis in the model. Only implemented for lead-acid models. Can be “false” (default) or “true”. If “true”, then “surface form” cannot be ‘false’.
- “lithium plating”str, optional
Sets the model for lithium plating. Can be “none” (default), “reversible” or “irreversible”.
- “loss of active material”str
Sets the model for loss of active material. Can be “none” (default), “stress-driven”, or “reaction-driven”. A 2-tuple can be provided for different behaviour in negative and positive electrodes.
- “operating mode”str
Sets the operating mode for the model. Can be “current” (default), “voltage” or “power”. Alternatively, the operating mode can be controlled with an arbitrary function by passing the function directly as the option. In this case the function must define the residual of an algebraic equation. The applied current will be solved for such that the algebraic constraint is satisfied.
- “particle”str
Sets the submodel to use to describe behaviour within the particle. Can be “Fickian diffusion” (default), “uniform profile”, “quadratic profile”, or “quartic profile”.
- “particle shape”str
Sets the model shape of the electrode particles. This is used to calculate the surface area to volume ratio. Can be “spherical” (default), “user” or “no particles”. For the “user” option the surface area per unit volume can be passed as a parameter, and is therefore not necessarily consistent with the particle shape.
- “particle size”str
Sets the model to include a single active particle size or a distribution of sizes at any macroscale location. Can be “single” (default) or “distribution”. Option applies to both electrodes.
- “particle mechanics”str
Sets the model to account for mechanical effects such as particle swelling and cracking. Can be “none” (default), “swelling only”, or “swelling and cracking”. A 2-tuple can be provided for different behaviour in negative and positive electrodes.
- “SEI”str
Set the SEI submodel to be used. Options are:
“none”:
pybamm.sei.NoSEI(no SEI growth)“constant”:
pybamm.sei.Constant(constant SEI thickness)“reaction limited”:
pybamm.sei.ReactionLimited“solvent-diffusion limited”:
pybamm.sei.SolventDiffusionLimited“electron-migration limited”:
pybamm.sei.ElectronMigrationLimited“interstitial-diffusion limited”:
pybamm.sei.InterstitialDiffusionLimited“ec reaction limited”:
pybamm.sei.EcReactionLimited
- “SEI film resistance”str
Set the submodel for additional term in the overpotential due to SEI. The default value is “none” if the “SEI” option is “none”, and “distributed” otherwise. This is because the “distributed” model is more complex than the model with no additional resistance, which adds unnecessary complexity if there is no SEI in the first place
- “none”: no additional resistance
\[\eta_r = \frac{F}{RT} * (\phi_s - \phi_e - U)\]
- “distributed”: properly included additional resistance term
\[\eta_r = \frac{F}{RT} * (\phi_s - \phi_e - U - R_{sei} * L_{sei} * j)\]
- “average”: constant additional resistance term (approximation to the true model). This model can give similar results to the “distributed” case without needing to make j an algebraic state
\[\eta_r = \frac{F}{RT} * (\phi_s - \phi_e - U - R_{sei} * L_{sei} * \frac{I}{aL})\]
- “SEI porosity change”str
Whether to include porosity change due to SEI formation, can be “false” (default) or “true”.
- “surface form”str
Whether to use the surface formulation of the problem. Can be “false” (default), “differential” or “algebraic”.
- “thermal”str
Sets the thermal model to use. Can be “isothermal” (default), “lumped”, “x-lumped”, or “x-full”.
- “total interfacial current density as a state”str
Whether to make a state for the total interfacial current density and solve an algebraic equation for it. Default is “false”, unless “SEI film resistance” is distributed in which case it is automatically set to “true”.
- “working electrode”: str
Which electrode(s) intercalates and which is counter. If “both” (default), the model is a standard battery. Otherwise can be “negative” or “positive” to indicate a half-cell model.
** dict