cideMOD.models.PXD.thermal.preprocessing

Classes

ThermalModelPreprocessing()

Base mixin class that contains the mandatory methods to be overrided related to the preprocessing of the model inputs.

class cideMOD.models.PXD.thermal.preprocessing.ThermalModelPreprocessing[source]

Bases: BasePXDModelPreprocessing

Base mixin class that contains the mandatory methods to be overrided related to the preprocessing of the model inputs.

initial_guess(f: BlockFunction, var: ProblemVariables, cell: BatteryCell, problem) None[source]

This method initializes the state variables based on the initial conditions and assuming that the simulation begins after a stationary state.

Parameters:
  • f (BlockFunction) – Block function that contain the state variables to be initialized.

  • var (ProblemVariables) – Object that store the preprocessed problem variables.

  • cell (BatteryCell) – Object where cell parameters are preprocessed and stored.

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

set_cell_parameters(cell: BatteryCell, problem) None[source]

This method preprocesses the cell parameters of the thermal model.

Parameters:
  • cell (BatteryCell) – Object where cell parameters are preprocessed and stored.

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

set_current_collector_parameters(cc: BaseCellComponent, problem) None[source]

This method preprocesses the current collector parameters of the thermal model.

Parameters:
  • cc (BaseCellComponent) – Object where current collector parameters are preprocessed and stored.

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

set_dependent_variables(var: ProblemVariables, cell: BatteryCell, DT: TimeScheme, problem)[source]

This method sets the dependent variables of the thermal model.

Parameters:
  • var (ProblemVariables) – Object that store the preprocessed problem variables.

  • cell (BatteryCell) – Object where cell parameters are preprocessed and stored.

  • DT (TimeScheme) – Object that provide the temporal derivatives with the specified scheme.

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

set_electrode_parameters(electrode: BaseCellComponent, problem) None[source]

This method preprocesses the electrode parameters of the thermal model.

Parameters:
  • electrode (BaseCellComponent) – Object where electrode parameters are preprocessed and stored.

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

set_electrolyte_parameters(electrolyte, problem) None[source]

This method preprocesses the electrolyte parameters of the thermal model.

Parameters:
  • electrolyte (BaseCellComponent) – Object where electrolyte parameters are preprocessed and stored.

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

set_problem_variables(var: ProblemVariables, DT: TimeScheme, problem) None[source]

This method sets the problem variables of the thermal model.

Parameters:
  • var (ProblemVariables) – Object that store the preprocessed problem variables.

  • DT (TimeScheme) – Object that provide the temporal derivatives with the specified scheme.

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

set_separator_parameters(separator, problem) None[source]

This method preprocesses the separator parameters of the thermal model.

Parameters:
  • separator (BaseCellComponent) – Object where separator parameters are preprocessed and stored.

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

set_state_variables(state_vars: list, mesher, V, V_vec, problem) None[source]

This method sets the state variables of the thermal model.

Parameters:
  • state_vars (List(Tuple(str, numpy.ndarray, dolfinx.fem.FunctionSpace))) – List of tuples, each one containing the name, the subdomain and the function space of the state variable.

  • mesher (BaseMesher) – Object that contains the mesh information.

  • V (dolfinx.fem.FunctionSpace) – Common FunctionSpace to be used for each model.

  • V_vec (dolfinx.fem.VectorFunctionSpace) – Common VectorFunctionSpace to be used for each model.

Examples

>>> res = mesher.get_restrictions()
>>> state_vars.append(('new_var', res.electrolyte, V.clone()))