Particle Diffusivity¶
- class ionworkspipeline.calculations.DiffusivityFromPulse(electrode: str, data: dict[str, Any], direction: str = '', phase: str = '', options: dict[str, Any] | None = None)¶
A pipeline element that calculates the diffusion coefficient from pulse data by directly using the voltage data from the pulse, without the need for fitting a model. This method uses eqn 26 from Wang et al. [1] to calculate the diffusion coefficient. Advantages of this method are that it is simple and fast. Disadvantages are that the calculation relies on assumptions that may not be valid in all cases, and the results may be sensitive to noise in the data since we only use 4 data points to calculate the diffusion coefficient.
Parameters¶
- electrodestr
The electrode to calculate the diffusivity for (either “positive” or “negative”).
- datadict
A dictionary containing the pulse data. Should have columns “Current [A]”, “Voltage [V]” and “Step number”.
- directionstr, optional
Specifies lithiation or delithiation for hysteresis models. Default is an empty string.
- phasestr, optional
Specifies the phase (“primary” or “secondary”) for composite electrode models. Default is an empty string.
- optionsdict, optional
- Options for the calculation. The available options are:
- “step number”int
The step number to use for the calculation. If not provided, the first non-rest step is used.
- “dt_IR”float
The time to establish the IR drop, in seconds. If not provided, the IR drop is assumed to be established at the start of the pulse (first data point with that step number)
- “dt_pulse”float
The time at which to calculate the diffusion coefficient, in seconds. If not provided, the diffusion coefficient will be calculated at the end of the pulse.
Raises¶
- ValueError
If no rest step is found after the pulse.
References¶
Extends:
ionworkspipeline.calculations.calculation.Calculation
- class ionworkspipeline.calculations.DiffusivityDataInterpolant(electrode: str, data: DataFrame, direction: str = '', phase: str = '', options: dict[str, Any] | None = None)¶
A pipeline element that creates an interpolant for the diffusivity from an array of diffusivity data. This interpolant can be used to calculate the diffusivity at any point within the range of the data.
Parameters¶
- electrodestr
The electrode to create the interpolant for (either “positive” or “negative”).
- datapd.DataFrame
Diffusivity data with the following columns:
- “Stoichiometry”array
The stoichiometry values.
- “Diffusivity [m2.s-1]”array
The corresponding diffusivity values.
- directionstr, optional
Specifies lithiation or delithiation for hysteresis models. Default is an empty string.
- phasestr, optional
Specifies the phase (“primary” or “secondary”) for composite electrode models. Default is an empty string.
- optionsdict, optional
Options for the calculation. The available options are:
- “interpolator”str
The interpolator to use. Default is “linear”. For more options, see the documentation for pybamm.Interpolant
- “transformation”str
The transformation to apply to the data before creating the interpolant. Options are “none” (default) or “log” (interpolant is created in log10 space).
- “scale factor”bool
Whether to multiply the diffusivity by a scale factor. Default is False. If True, this leaves the following parameter to be defined (e.g. by fitting to data):
Negative/Positive particle diffusivity scale factor
Extends:
ionworkspipeline.calculations.calculation.Calculation
- class ionworkspipeline.calculations.DiffusivityFromMSMRData(electrode: str, data: DataFrame, direction: str = '', phase: str = '', options: dict[str, Any] | None = None)¶
Calculate the diffusivity from OCP data as
\[D = - \frac{F}{RT} D_{ref} x (1-x) \frac{dU}{dx}\]where \(D_{ref}\) is the reference diffusivity, \(x\) is the stoichiometry, \(U\) is the open-circuit potential, \(R\) is the gas constant, \(F\) is Faraday’s constant, and \(T\) is the temperature. This formula is derived from the transport equation in the MSMR model.
This calculation leaves the following parameter to be defined (e.g. by fitting to data):
Negative/Positive particle reference diffusivity [m2.s-1] ($D_{ref}$)
Parameters¶
- electrodestr
The electrode to calculate the diffusivity for (either “positive” or “negative”).
- datapd.DataFrame
- OCP data with the following columns:
“Stoichiometry” : array
“Voltage [V]” : array
- directionstr, optional
Specifies lithiation or delithiation for hysteresis models. Default is an empty string.
- phasestr, optional
Specifies the phase (“primary” or “secondary”) for composite electrode models. Default is an empty string.
- optionsdict, optional
Options for the calculation. The available options are:
- “interpolator”str
The interpolator to use. Default is “linear”. For more options, see the documentation for pybamm.Interpolant
Extends:
ionworkspipeline.calculations.calculation.Calculation
- class ionworkspipeline.calculations.ArrheniusDiffusivityFromMSMRData(electrode: str, data: DataFrame, direction: str = '', phase: str = '', options: dict[str, Any] | None = None)¶
Calculate the diffusivity from OCP data as
\[D = - \frac{F}{RT_{ref}} D_{ref} x (1-x) \frac{dU}{dx} \exp(E / R (1 / T_{ref} - 1 / T))\]where \(D_{ref}\) is the reference diffusivity, \(x\) is the stoichiometry, \(U\) is the open-circuit potential, \(R\) is the gas constant, \(F\) is Faraday’s constant, \(T\) is the temperature, \(T_{ref}\) is the reference temperature, and \(E\) is the activation energy. This formula is derived from the transport equation in the MSMR model.
This calculation leaves the following parameter to be defined (e.g. by fitting to data):
Negative/Positive particle reference diffusivity [m2.s-1] ($D_{ref}$)
Parameters¶
- electrodestr
The electrode to calculate the diffusivity for (either “positive” or “negative”).
- datapd.DataFrame
- OCP data with the following columns:
“Stoichiometry” : array
“Voltage [V]” : array
- directionstr, optional
Specifies lithiation or delithiation for hysteresis models. Default is an empty string.
- phasestr, optional
Specifies the phase (“primary” or “secondary”) for composite electrode models. Default is an empty string.
- optionsdict, optional
Options for the calculation. The available options are:
- “interpolator”str
The interpolator to use. Default is “linear”. For more options, see the documentation for pybamm.Interpolant
Extends:
ionworkspipeline.calculations.calculation.Calculation