MarcBerliner / PETLION.jl

High-performance simulations of the Porous Electrode Theory for Li-ion batteries
MIT License
65 stars 11 forks source link

How to simulate battery aging when electrodes are set to NMC? #99

Open steal-the-soul opened 1 year ago

steal-the-soul commented 1 year ago

Here is the code """ @time p = petlion( NMC; aging =:SEI, N_p = 10, # discretizations in the cathode N_s = 10, # discretizations in the separator N_n = 10, # discretizations in the anode N_r_p = 10, # discretizations in the solid cathode particles N_r_n = 10, # discretizations in the solid anode particles temperature = false, # temperature enabled or disabled jacobian = :AD, # :AD (automatic-differenation) for convenience or :symbolic for speed ) """ and here is result

""" KeyError: key :R_SEI not found

Stacktrace: [1] getindex(h::Dict{Symbol, Any}, key::Symbol) @ Base ./dict.jl:481 [2] build_η!(states::Dict{Symbol, Any}, p::PETLION.model_skeleton{false, :Fickian, :finite_difference, :SEI}) @ PETLION ~/.julia/packages/PETLION/hhQYr/src/physics_equations/auxiliary_states_and_coefficients.jl:197 [3] build_auxiliary_states!(states::Dict{Symbol, Any}, p::PETLION.model_skeleton{false, :Fickian, :finite_difference, :SEI}) @ PETLION ~/.julia/packages/PETLION/hhQYr/src/physics_equations/auxiliary_states_and_coefficients.jl:28 [4] residuals_PET!(residuals::Vector{Symbolics.Num}, t::Symbolics.Num, x::Vector{Symbolics.Num}, ẋ::Vector{Symbolics.Num}, p::PETLION.model_skeleton{false, :Fickian, :finite_difference, :SEI}) """

MarcBerliner commented 1 year ago

The NMC cell lacks the necessary parameters for the aging mode. To use SEI aging, these parameters need to be specified before creating the model.