Battery model
We use multimodel approach and the battery is made of sub-models also called components.
- class Battery(paramobj)
Bases:
Utilities.BaseModel
The battery model consists of
an Electrolyte model given in
Electrolyte
propertya Negative Electrode Model given in
NegativeElectrode
propertya Positive Electrode Model given in
PositiveElectrode
propertya Thermal model given in
ThermalModel
property
- Electrolyte
Electrolyte model, instance of
Electrolyte
- NegativeElectrode
Negative Electrode Model, instance of
Electrode
- PositiveElectrode
Positive Electrode Model, instance of
Electrode
- ThermalModel
Thermal model, instance of
ThermalComponent
- Control
Control Model
- SOC
State Of Charge
- initT
Initial temperature
- couplingTerms
Coupling terms
- cmin
mininum concentration used in capping
- couplingNames
flag that decide the model setup
- use_particle_diffusion
Some variables in some model are “static” meaning that they are not computed, they are set at the beginning of
- registerVarAndPropfuncNames(model)
Declaration of the Dynamical Variables and Function of the model (setup of varnameList and propertyFunctionList)
- setupThermalModel(model, paramobj)
Setup the thermal model
ThermalModel
. Here,paramobj
is instance ofThermalComponentInputParams
- setupElectrolyteModel(model)
Assign the electrolyte volume fractions in the different regions
- setupInitialState(model)
Setup the values of the primary variables at initial state
- addVariables(model, state)
Given a state where only the primary variables are defined, this functions add all the additional variables that are computed in the assembly process and have some physical interpretation.
To do so, we use getEquations function and sends dummy variable for state0, dt and drivingForces
- getEquations(model, state0, state, dt, drivingForces, varargin)
Assembly of the governing equation
- updateTemperature(model, state)
Dispatch the temperature in all the submodels
- updateElectrolyteCoupling(model, state)
Assemble the electrolyte coupling by adding the ion sources from the electrodes
- updateThermalOhmicSourceTerms(model, state)
Assemble the ohmic source term
state.jHeatOhmSource
, see Latz and Zausch [LZ16]
- updateThermalChemicalSourceTerms(model, state)
Assemble the thermal source term from transport
state.jHeatChemicalSource
, see Latz and Zausch [LZ16]
- updateThermalIrreversibleReactionSourceTerms(model, state)
not used in assembly, just as added variable (in addVariables method). Method updateThermalReactionSourceTerms is used in assembly
- updateThermalReversibleReactionSourceTerms(model, state)
not used in assembly, just as added variable (in addVariables method). Method updateThermalReactionSourceTerms is used in assembly
- updateThermalReactionSourceTerms(model, state)
Assemble the source term from chemical reaction
state.jHeatReactionSource
, see Latz and Zausch [LZ16]
- updateElectrodeCoupling(model, state)
Setup the electrode coupling by updating the potential and concentration of the electrolyte in the active component of the electrodes. There, those quantities are considered as input and used to compute the reaction rate.
- setupExternalCouplingNegativeElectrode(model, state)
Setup external electronic coupling of the negative electrode at the current collector
- setupExternalCouplingPositiveElectrode(model, state)
Setup external electronic coupling of the positive electrode at the current collector
- addStaticVariables(model, cleanState, state)
Variables that are no AD initiated (but should be “carried over”)