cideMOD.models.PXD.electrochemical.equations
Classes
- class cideMOD.models.PXD.electrochemical.equations.ElectrochemicalModelEquations[source]
Bases:
BaseCellModelEquations- ButlerVolmer_equation(alpha, F, R, T, eta)[source]
Implements the Butler-Volmer equation
- Parameters:
alpha (Constant or similar) – Charge transfer coefficient
F (Constant or similar) – Farady’s constant
R (Constant or similar) – Universal Gas constant
T (Constant or similar) – Absolute temperature
eta (dolfinx.fem.Function) – Activation overpotential
- Returns:
Right hand side
- Return type:
ufl.Operator
- build_weak_formulation(eq: ProblemEquations, var: ProblemVariables, cell: BatteryCell, mesher: BaseMesher, DT: TimeScheme, W: BlockFunctionSpace, problem) None[source]
This method builds the weak formulation of the electrochemical model.
- Parameters:
equations (ProblemEquations) – Object that contains the system of equations of the problem.
var (ProblemVariables) – Object that store the preprocessed problem variables.
cell (BatteryCell) – Object where cell parameters are preprocessed and stored.
mesher (BaseMesher) – Object that store the mesh information.
DT (TimeScheme) – Object that provide the temporal derivatives with the specified scheme.
W (BlockFunctionSpace) – Object that store the function space of each state variable.
problem (Problem) – Object that handles the battery cell simulation.
- build_weak_formulation_stationary(eq: ProblemEquations, var: ProblemVariables, cell: BatteryCell, mesher: BaseMesher, W: BlockFunctionSpace, problem)[source]
This method builds and adds the weak formulation of the electrochemical model that will be used to solve the stationary problem.
- Parameters:
equations (ProblemEquations) – Object that contains the system of equations of the stationary problem.
var (ProblemVariables) – Object that store the preprocessed problem variables.
cell (BatteryCell) – Object where cell parameters are preprocessed and stored.
mesher (BaseMesher) – Object that store the mesh information.
W (BlockFunctionSpace) – Object that store the function space of each state variable.
problem (Problem) – Object that handles the battery cell simulation.
- build_weak_formulation_transitory(eq: ProblemEquations, var: ProblemVariables, cell: BatteryCell, mesher: BaseMesher, W: BlockFunctionSpace, problem)[source]
This method builds and adds the weak formulation of the electrochemical model that will be used to solve the transitory problem.
- Parameters:
equations (ProblemEquations) – Object that contains the system of equations of the transitory problem.
var (ProblemVariables) – Object that store the preprocessed problem variables.
cell (BatteryCell) – Object where cell parameters are preprocessed and stored.
mesher (BaseMesher) – Object that store the mesh information.
W (BlockFunctionSpace) – Object that store the function space of each state variable.
problem (Problem) – Object that handles the battery cell simulation.
- c_e_equation(var, dx, DT, cell, component, scale_factor=1)[source]
Implements variational formulation for electrolyte concentration c_e
- Parameters:
cell (BatteryCell) – Object where cell parameters are preprocessed and stored.
var (ProblemVariables) –
Object that store the preprocessed problem variables. Requires:
c_e_0 : dolfinx.fem.Function - Electrode Potential last timestep
c_e : dolfinx.fem.Function - Electrode Potential
test : TestFunction - Electrode Potential Equation Test Function
j_Li : dolfinx.fem.Function - Intercalation reaction Flux
d (Measures) – Measure of the domain over the integral must integrate
DT (TimeScheme) – Instance of the TimeScheme class
cell –
Object where cell parameters are preprocessed and stored. Requires:
F : Constant or similar - Faraday Constant
electrolyte.t_p : Constant or similar - Transference number for the electrolyte
component (BaseCellComponent) –
Object where component parameters are preprocessed and stored. Contains:
D_e : Constant or similar - Effective Diffusivity of the electrolyte
eps_e : Constant or similar - Volume fraction occupied by the electrolyte in the domain
grad : dolfinx.fem.Function - python function that returns the UFL gradient of the argument
L : Constant - Thickness used to normalize the domain, by default None
- Returns:
Electrolyte Concentration Equation
- Return type:
Form
- explicit_update(problem) None[source]
This method updates some stuff after the implicit timestep is performed.
- Parameters:
problem (Problem) – Object that handles the battery cell simulation.
- get_solvers_info(solvers_info, problem) None[source]
This method get the solvers information that concerns the electrochemical model.
- Parameters:
solvers_info (dict) – Dictionary containing solvers information.
problem (Problem) – Object that handles the battery cell simulation.
- i_n_equation(k, c_e, c_s, c_s_max, alpha)[source]
Implements the interface for electrode potential phi_s
- Parameters:
lagrange_multiplier (dolfinx.fem.Function) – Lagrange multiplier on the interface between the elctrode and the cc associated to the continuity of the potential in the solid face
k (Constant or similar) – Kinetic constant of the active material
c_e (dolfinx.fem.Function) – Electrolyte concentration
c_s (dolfinx.fem.Function) – Electrode concentration
c_s_max (TestFunction) – Maximum Electrode concentration
alpha (Constant or similar) – Charge transfer coefficient
- Returns:
Regularisation of i_0
- Return type:
ufl.Operator
- j_Li_equation(var, dx, cell, material)[source]
Exchange between the electrolyte and the electrode by lithium intercalation
- Parameters:
var (ProblemVariables) – Object that store the preprocessed problem variables. Requires:
d (Measures) – Measure of the domain over the integral must integrate
cell (BatteryCell) – Object where cell parameters are preprocessed and stored.
material (BaseCellComponent) – Object where active material parameters are preprocessed and stored.
- Returns:
Butler-Volmer equation of the specified material
- Return type:
Form
- phi_e_equation(var, dx, component, scale_factor=1)[source]
Implements variational formulation equation for electrolyte potential phi_e
- Parameters:
var (ProblemVariables) –
Object that store the preprocessed problem variables. Contains:
phi_e : dolfinx.fem.Function - Electrolyte Potential
test.phi_e : TestFunction - Electrolyte Potential Equation Test Function
j_Li : dolfinx.fem.Function - Intercalation reaction Flux (Optional)
c_e : dolfinx.fem.Function - Electrolyte Concentration
dx (Measures) – Measure of the domain over the integral must integrate
component (BaseCellComponent) –
Object where component parameters are preprocessed and stored. Contains:
kappa : Constant or similar - Effective electric conductivity of the electrolyte
kappa_D : Constant or similar - Effective concentration induced conductivity (More or less)
grad : dolfinx.fem.Function - python function that returns the UFL gradient of the argument
L : Constant - Thickness used to normalize the domain, by default None
- Returns:
Electrolyte Potential Equation
- Return type:
Form
- phi_s_bc(var, cell, ds)[source]
Implements boundary conditions for electrode potential equation phi_s
- Parameters:
var (ProblemVariables) –
Object that store the preprocessed problem variables. Contains:
lm_app : Constant, Function or similar - Current applied to the boundary of the electrode
test : TestFunction - Electrode Potential Equation Test Function
cell (BatteryCell) – Object where cell parameters are preprocessed and stored.
ds (Measure) – Measure of the boundary domain over the integral must integrate
- Returns:
Electrode Potential boundary condition Equation
- Return type:
Form
- phi_s_continuity(var, dS_el, dS_cc)[source]
Implements the continuity equation for electrode potential phi_s
- Parameters:
phi_s_electrode (dolfinx.fem.Function) – Electrode Potential Equation
phi_s_cc (dolfinx.fem.Function) – Current Collector Potential Equation
lm_test (TestFunction) – Test Function
dS_el (Measure) – Measure of the boundary domain over the integral must integrate in the electrolyte
dS_cc (Measure) – Measure of the boundary domain over the integral must integrate in the cc
- Returns:
Potential Continuity Equation
- Return type:
Form
- phi_s_equation(var, d, cell, component)[source]
Implements variational formulation for electrode potential phi_s
- Parameters:
var (ProblemVariables) –
Object that store the preprocessed problem variables. Contains:
phi_s : dolfinx.fem.Function - Electrode Potential
j_Li : dolfinx.fem.Function - Intercalation reaction Flux
test : TestFunction - Electrode Potential Equation Test Function
lm_phi_s : dolfinx.fem.Function - Lagrange multiplier (Optional)
d (Measures) –
dx : Measure - Measure of the domain over the integral must integrate
dS : Measure - Measure of the boundary domain over the integral must integrate
cell (BatteryCell) – Object where cell parameters are preprocessed and stored.
component (BaseCellComponent) –
Object where component parameters are preprocessed and stored. Contains:
sigma : Constant or similar - Effective electric conductivity of the electrode material
grad : dolfinx.fem.Function - python function that returns the UFL gradient of the argument
L : Constant - Thickness used to normalize the domain, by default None
- Returns:
Electrode Potential Equation
- Return type:
Form
- phi_s_interface(lagrange_multiplier, dS, phi_s_test=None, phi_s_cc_test=None, scale_factor=1)[source]
Implements the interface for electrode potential phi_s
- Parameters:
lagrange_multiplier (dolfinx.fem.Function) – Lagrange multiplier on the interface between the elctrode and the cc associated to the continuity of the potential in the solid face
dS (Measure) – Measure of the boundary domain over the integral must integrate
phi_s_test (TestFunction) – Electrode Potential Equation Test Function
phi_s_cc_test (TestFunction) – Electrode Potential and cc Equation Test Function
- Returns:
Electrode Potential interface Equation
- Return type:
Form