Parameter Sets¶
- class ionworkspipeline.parameter_values.ParameterValues(values: dict[str, Any] | str | ParameterValues)¶
- apply_degradation_state(degradation_state, inplace=True, composite=None)¶
Apply a degradation state to the parameter values. Can account for loss of (cyclable) lithium inventory, loss of active material and resistance change via an additional ohmic resistance (the model option “contact resistance” must be “true” for PyBaMM models to include a contact resistance).
API inspired by aepybamm (About-Energy-OpenSource/AEPyBaMM).
Note: this is not valid for composite electrodes.
Parameters¶
- degradation_statedict
The degradation state to apply to the parameter values. Can have the following keys:
“LAM_ne [%]”: Loss of active material in negative electrode (%)
“LAM_pe [%]”: Loss of active material in positive electrode (%)
“LLI [%]”: Loss of lithium inventory (%)
“R0_addn [Ohm]”: Additional ohmic resistance (Ohm). This is achieved by adding to the contact resistance.
Each of these keys is optional, and if not provided, the default value of 0 will be used.
- inplacebool, optional
If True, update the parameter values in place. Otherwise, return a new parameter values object.
- composite: str, optional
Specifies a composite electrode. Can be “negative”, “positive”, “both”, or None. If None, the parameter values are assumed to be for a single-phase electrode. If specified, for the electrode specified, the LAM and LLI should have an additional parenthetical statement specifying the phase, such as LAM_ne (primary) [%].
- copy()¶
Returns a copy of the parameter values. Makes sure to copy the internal dictionary.
- scale_parameter(name, scale_factor=None, inplace=True)¶
Apply a scale factor to a parameter in the ParameterValues object. The updated parameter returns the original parameter value multiplied by the scale factor. If the parameter is a callable function, the updated parameter is returned as a function-like object, so that it can be used in expressions as a function of other parameters. If the parameter is not a callable function, the updated parameter is returned as a float or int equal to the original parameter value multiplied by the scale factor.
Parameters¶
- namestr
The name of the parameter to apply the scale factor to. Must be a key in parameter_values.
- scale_factorfloat, int, or pybamm.Parameter, optional
The scale factor to apply to the parameter. If None, adds a parameter with the name name + “ (scale factor)”.
- inplacebool, optional
If True, update the parameter values in place. Otherwise, return a new parameter values object.