cideMOD.models.base.base_models.equations

Classes

BaseCellModelEquations()

Base mixin class that contains the mandatory methods to be overrided related to the implementation of the model equations

class cideMOD.models.base.base_models.equations.BaseCellModelEquations[source]

Bases: ABC

Base mixin class that contains the mandatory methods to be overrided related to the implementation of the model equations

abstract build_weak_formulation(equations: ProblemEquations, var: ProblemVariables, cell: BatteryCell, mesher: BaseMesher, DT: TimeScheme, W: BlockFunctionSpace, problem) None[source]

This method builds the weak formulation of this specific 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(equations: ProblemEquations, var: ProblemVariables, cell: BatteryCell, mesher: BaseMesher, W: BlockFunctionSpace, problem) None[source]

This method builds the weak formulation of this specific 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(equations: ProblemEquations, var: ProblemVariables, cell: BatteryCell, mesher: BaseMesher, W: BlockFunctionSpace, problem) None[source]

This method builds the weak formulation of this specific 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.

explicit_update(problem) None[source]

This method updates this specific explicit model (if so) once the implicit timestep is performed.

Parameters:

problem (Problem) – Object that handles the battery cell simulation.

abstract get_solvers_info(solvers_info, problem) None[source]

This method get the solvers information that concerns this specific model.

Parameters:
  • solvers_info (dict) – Dictionary containing solvers information.

  • problem (Problem) – Object that handles the battery cell simulation.

Examples

To add new state variables:

>>> state_vars = ['var1', 'var2', 'var3']
>>> solvers_info['solver']['state_variables'].extend(state_vars)

To change the solver options:

>>> options = {...}
>>> solvers_info['solver_stationary']['options'].update(options)