pybamm.BaseBatteryModel(options=None, name='Unnamed battery model')[source]¶Base model class with some default settings and required variables
options¶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.
- “cell geometry” : str, optional
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” : bool or str, optional
Whether to include the effects of convection in the model. Can be False (default), “differential” or “algebraic”. Must be ‘False’ for lithium-ion models.
- “current collector” : str, optional
Sets the current collector model to use. Can be “uniform” (default), “potential pair” or “potential pair quite conductive”.
- “dimensionality” : int, optional
Sets the dimension of the current collector problem. Can be 0 (default), 1 or 2.
- “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.
- “interfacial surface area” : str, optional
Sets the model for the interfacial surface area. Can be “constant” (default) or “varying”. Not currently implemented in any of the models.
- “particle” : str, optional
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, optional
Sets the model shape of the electrode particles. This is used to calculate the surface area per unit volume. Can be “spherical” (default) or “user”. 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 cracking” : str, optional
Sets the model to account for mechanical effects and particle cracking. Can be None, “no cracking”, “anode”, “cathode” or “both”. All options other than None account for the effects of swelling of electrode particles, cell thickness change, and stress-assisted diffusion. The options “anode”, “cathode” or “both” additionally account for crack propagation in the anode, cathode or both electrodes, respectively.
- “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” : bool
Whether to include porosity change due to SEI formation (default False)
- “side reactions” : list, optional
Contains a list of any side reactions to include. Default is []. If this list is not empty (i.e. side reactions are included in the model), then “surface form” cannot be ‘False’.
- “surface form” : bool or str, optional
Whether to use the surface formulation of the problem. Can be False (default), “differential” or “algebraic”.
- “thermal” : str, optional
Sets the thermal model to use. Can be “isothermal” (default), “lumped”, “x-lumped”, or “x-full”.
| Type: | dict |
|---|
**Extends| Type: | ** pybamm.BaseModel |
|---|
new_copy(build=True)[source]¶Create a copy of the model. Overwrites the functionality of
pybamm.BaseModel to make sure that the submodels are updated correctly
process_parameters_and_discretise(symbol, parameter_values, disc)[source]¶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.
| Parameters: |
|
|---|---|
| Returns: | Processed symbol |
| Return type: |