Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SEI on cracks #2104

Merged
merged 42 commits into from
Jul 27, 2022
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
b27ae28
Partially completed first draft of SEI on cracks
Apr 27, 2022
23a0a6f
Second attempt at adding SEI on cracks
Apr 28, 2022
d17473a
Fixed some bugs in crack SEI model
May 12, 2022
e105d40
Ensure loss of lithium to SEI on cracks is always defined
May 18, 2022
e4d93d8
Replaced most references to 'SEI' and 'SEI on cracks' with self.reaction
Jun 14, 2022
e36602b
Changed L_n to n.L
Jun 15, 2022
ecfcdc4
Added NoMechanics subclass
Jun 20, 2022
fea7d4c
flake8
Jun 20, 2022
5b321a7
Added if statement to set roughness to 1 if not in variables
Jun 21, 2022
6bfddd1
Revert "Added if statement to set roughness to 1 if not in variables"
Jun 22, 2022
3fb424a
Merge branch 'develop' into SEIoncracks
Jun 22, 2022
775626f
Added cracking parameters to graphite_Chen2020_plating
Jun 22, 2022
0ad8afe
Added get_coupled_variables to NoSEI class
Jun 23, 2022
a21484d
Cracking model works but OKane2022 parameters do not
Jun 24, 2022
7ec5fc8
Added Arrhenius temperature dependence to all SEI growth models
Jun 29, 2022
274439d
Merge branch 'develop' of https://github.com/pybamm-team/PyBaMM into …
Jun 29, 2022
e106c1d
Added zero temperature dependence for all other SEI parameter sets
Jul 13, 2022
82d5800
Completed example notebook
Jul 15, 2022
17725e5
Updated with latest changes from upstream
Jul 15, 2022
3dc6375
Updated CHANGELOG
Jul 15, 2022
c78229a
flake8
Jul 18, 2022
6e7fbcf
Fixed get_coupled_variables in no_sei.py
Jul 19, 2022
0a93993
Changed base_lithium_ion_model to avoid running SEI on cracks for hal…
Jul 19, 2022
2ddb0c2
flake8
Jul 19, 2022
0080825
Fixed bug in equation for interstitial-diffusion limited SEI
Jul 20, 2022
c628f95
Fixed examples, added SEI on cracks porosity change, added tests
Jul 20, 2022
f23b3ba
flake8
Jul 20, 2022
5f0258e
Breaking change: particle mechanics now a compulsory submodel (none i…
Jul 21, 2022
7ee18d8
coverage
Jul 21, 2022
1d6319e
Fixed tests
Jul 21, 2022
ffdbb48
Merged latest changes from develop to fix conflict
Jul 22, 2022
f6b979f
Fixed test_OKane2022
Jul 22, 2022
5ae0a6c
flake8
Jul 22, 2022
63a9c79
Completed changes requested in review
Jul 26, 2022
21f0374
changelog
Jul 26, 2022
4153103
Modified tests to account for Chen2020_plating being deleted
Jul 26, 2022
9ad8b75
Modified more tests to account for Chen2020_plating being deleted
Jul 26, 2022
ebeffb1
Hard coded cracking activation energy (currently 0)
Jul 26, 2022
51d1c4f
Removed cracking activation energy from parameter csv files
Jul 27, 2022
851b44c
Deleted the correct parameter this time
Jul 27, 2022
2b77c81
Third time lucky?
Jul 27, 2022
5276a9b
Fixed conflict in changelog
Jul 27, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
106 changes: 106 additions & 0 deletions examples/notebooks/models/SEI-on-cracks.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"id": "eb5375ae",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\u001b[33mWARNING: You are using pip version 22.0.4; however, version 22.1.2 is available.\n",
"You should consider upgrading via the '/home/sokane/PyBaMM/env/bin/python3 -m pip install --upgrade pip' command.\u001b[0m\u001b[33m\n",
"\u001b[0mNote: you may need to restart the kernel to use updated packages.\n"
]
}
],
"source": [
"%pip install pybamm -q # install PyBaMM if it is not installed\n",
"import pybamm\n",
"import matplotlib.pyplot as plt\n",
"import numpy as np"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "05c30b49",
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"At t = 0.00698581, , mxstep steps taken before reaching tout.\n"
]
},
{
"ename": "SolverError",
"evalue": "Could not solve for summary variables, run `sim.solve(calc_esoh=False)` to skip this step",
"output_type": "error",
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mSolverError\u001b[0m Traceback (most recent call last)",
"File \u001b[0;32m~/PyBaMM/pybamm/solvers/solution.py:918\u001b[0m, in \u001b[0;36mget_cycle_summary_variables\u001b[0;34m(cycle_solution, esoh_sim)\u001b[0m\n\u001b[1;32m 917\u001b[0m \u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[0;32m--> 918\u001b[0m esoh_sol \u001b[38;5;241m=\u001b[39m \u001b[43mesoh_sim\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43msolve\u001b[49m\u001b[43m(\u001b[49m\u001b[43m[\u001b[49m\u001b[38;5;241;43m0\u001b[39;49m\u001b[43m]\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43minputs\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43minputs\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43msolver\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43msolver\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 919\u001b[0m \u001b[38;5;28;01mexcept\u001b[39;00m pybamm\u001b[38;5;241m.\u001b[39mSolverError: \u001b[38;5;66;03m# pragma: no cover\u001b[39;00m\n",
"File \u001b[0;32m~/PyBaMM/pybamm/simulation.py:710\u001b[0m, in \u001b[0;36mSimulation.solve\u001b[0;34m(self, t_eval, solver, check_model, save_at_cycles, calc_esoh, starting_solution, initial_soc, callbacks, **kwargs)\u001b[0m\n\u001b[1;32m 696\u001b[0m warnings\u001b[38;5;241m.\u001b[39mwarn(\n\u001b[1;32m 697\u001b[0m \u001b[38;5;124;03m\"\"\"\u001b[39;00m\n\u001b[1;32m 698\u001b[0m \u001b[38;5;124;03m The largest timestep in t_eval ({}) is larger than\u001b[39;00m\n\u001b[0;32m (...)\u001b[0m\n\u001b[1;32m 707\u001b[0m pybamm\u001b[38;5;241m.\u001b[39mSolverWarning,\n\u001b[1;32m 708\u001b[0m )\n\u001b[0;32m--> 710\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_solution \u001b[38;5;241m=\u001b[39m \u001b[43msolver\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43msolve\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mbuilt_model\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mt_eval\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mkwargs\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 712\u001b[0m \u001b[38;5;28;01melif\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39moperating_mode \u001b[38;5;241m==\u001b[39m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mwith experiment\u001b[39m\u001b[38;5;124m\"\u001b[39m:\n",
"File \u001b[0;32m~/PyBaMM/pybamm/solvers/base_solver.py:1083\u001b[0m, in \u001b[0;36mBaseSolver.solve\u001b[0;34m(self, model, t_eval, external_variables, inputs, initial_conditions, nproc, calculate_sensitivities)\u001b[0m\n\u001b[1;32m 1082\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m ninputs \u001b[38;5;241m==\u001b[39m \u001b[38;5;241m1\u001b[39m:\n\u001b[0;32m-> 1083\u001b[0m new_solution \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_integrate\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m 1084\u001b[0m \u001b[43m \u001b[49m\u001b[43mmodel\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 1085\u001b[0m \u001b[43m \u001b[49m\u001b[43mt_eval_dimensionless\u001b[49m\u001b[43m[\u001b[49m\u001b[43mstart_index\u001b[49m\u001b[43m:\u001b[49m\u001b[43mend_index\u001b[49m\u001b[43m]\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 1086\u001b[0m \u001b[43m \u001b[49m\u001b[43mext_and_inputs_list\u001b[49m\u001b[43m[\u001b[49m\u001b[38;5;241;43m0\u001b[39;49m\u001b[43m]\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 1087\u001b[0m \u001b[43m \u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 1088\u001b[0m new_solutions \u001b[38;5;241m=\u001b[39m [new_solution]\n",
"File \u001b[0;32m~/PyBaMM/pybamm/solvers/casadi_algebraic_solver.py:184\u001b[0m, in \u001b[0;36mCasadiAlgebraicSolver._integrate\u001b[0;34m(self, model, t_eval, inputs_dict)\u001b[0m\n\u001b[1;32m 183\u001b[0m \u001b[38;5;28;01melif\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m success:\n\u001b[0;32m--> 184\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m pybamm\u001b[38;5;241m.\u001b[39mSolverError(\n\u001b[1;32m 185\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mCould not find acceptable solution: \u001b[39m\u001b[38;5;132;01m{}\u001b[39;00m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;241m.\u001b[39mformat(message)\n\u001b[1;32m 186\u001b[0m )\n\u001b[1;32m 187\u001b[0m \u001b[38;5;28;01melif\u001b[39;00m \u001b[38;5;28many\u001b[39m(np\u001b[38;5;241m.\u001b[39misnan(fun)):\n",
"\u001b[0;31mSolverError\u001b[0m: Could not find acceptable solution: .../casadi/core/rootfinder.cpp:280: rootfinder process failed. Set 'error_on_fail' option to false to ignore this error.",
"\nDuring handling of the above exception, another exception occurred:\n",
"\u001b[0;31mSolverError\u001b[0m Traceback (most recent call last)",
"Input \u001b[0;32mIn [2]\u001b[0m, in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[1;32m 8\u001b[0m experiment \u001b[38;5;241m=\u001b[39m pybamm\u001b[38;5;241m.\u001b[39mExperiment([\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mDischarge at 1C until 3 V\u001b[39m\u001b[38;5;124m\"\u001b[39m])\n\u001b[1;32m 9\u001b[0m sim1 \u001b[38;5;241m=\u001b[39m pybamm\u001b[38;5;241m.\u001b[39mSimulation(model1, parameter_values\u001b[38;5;241m=\u001b[39mparameter_values, experiment\u001b[38;5;241m=\u001b[39mexperiment)\n\u001b[0;32m---> 10\u001b[0m sol1 \u001b[38;5;241m=\u001b[39m \u001b[43msim1\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43msolve\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 11\u001b[0m sim2 \u001b[38;5;241m=\u001b[39m pybamm\u001b[38;5;241m.\u001b[39mSimulation(model2, parameter_values\u001b[38;5;241m=\u001b[39mparameter_values, experiment\u001b[38;5;241m=\u001b[39mexperiment)\n\u001b[1;32m 12\u001b[0m sol2 \u001b[38;5;241m=\u001b[39m sim2\u001b[38;5;241m.\u001b[39msolve()\n",
"File \u001b[0;32m~/PyBaMM/pybamm/simulation.py:858\u001b[0m, in \u001b[0;36mSimulation.solve\u001b[0;34m(self, t_eval, solver, check_model, save_at_cycles, calc_esoh, starting_solution, initial_soc, callbacks, **kwargs)\u001b[0m\n\u001b[1;32m 856\u001b[0m \u001b[38;5;66;03m# At the final step of the inner loop we save the cycle\u001b[39;00m\n\u001b[1;32m 857\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28mlen\u001b[39m(steps) \u001b[38;5;241m>\u001b[39m \u001b[38;5;241m0\u001b[39m:\n\u001b[0;32m--> 858\u001b[0m cycle_sol \u001b[38;5;241m=\u001b[39m \u001b[43mpybamm\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mmake_cycle_solution\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m 859\u001b[0m \u001b[43m \u001b[49m\u001b[43msteps\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 860\u001b[0m \u001b[43m \u001b[49m\u001b[43mesoh_sim\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 861\u001b[0m \u001b[43m \u001b[49m\u001b[43msave_this_cycle\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43msave_this_cycle\u001b[49m\u001b[43m,\u001b[49m\n\u001b[1;32m 862\u001b[0m \u001b[43m \u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 863\u001b[0m cycle_solution, cycle_sum_vars, cycle_first_state \u001b[38;5;241m=\u001b[39m cycle_sol\n\u001b[1;32m 864\u001b[0m all_cycle_solutions\u001b[38;5;241m.\u001b[39mappend(cycle_solution)\n",
"File \u001b[0;32m~/PyBaMM/pybamm/solvers/solution.py:812\u001b[0m, in \u001b[0;36mmake_cycle_solution\u001b[0;34m(step_solutions, esoh_sim, save_this_cycle)\u001b[0m\n\u001b[1;32m 808\u001b[0m cycle_solution\u001b[38;5;241m.\u001b[39mset_up_time \u001b[38;5;241m=\u001b[39m sum_sols\u001b[38;5;241m.\u001b[39mset_up_time\n\u001b[1;32m 810\u001b[0m cycle_solution\u001b[38;5;241m.\u001b[39msteps \u001b[38;5;241m=\u001b[39m step_solutions\n\u001b[0;32m--> 812\u001b[0m cycle_summary_variables \u001b[38;5;241m=\u001b[39m \u001b[43mget_cycle_summary_variables\u001b[49m\u001b[43m(\u001b[49m\u001b[43mcycle_solution\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mesoh_sim\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 814\u001b[0m cycle_first_state \u001b[38;5;241m=\u001b[39m cycle_solution\u001b[38;5;241m.\u001b[39mfirst_state\n\u001b[1;32m 816\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m save_this_cycle:\n",
"File \u001b[0;32m~/PyBaMM/pybamm/solvers/solution.py:920\u001b[0m, in \u001b[0;36mget_cycle_summary_variables\u001b[0;34m(cycle_solution, esoh_sim)\u001b[0m\n\u001b[1;32m 918\u001b[0m esoh_sol \u001b[38;5;241m=\u001b[39m esoh_sim\u001b[38;5;241m.\u001b[39msolve([\u001b[38;5;241m0\u001b[39m], inputs\u001b[38;5;241m=\u001b[39minputs, solver\u001b[38;5;241m=\u001b[39msolver)\n\u001b[1;32m 919\u001b[0m \u001b[38;5;28;01mexcept\u001b[39;00m pybamm\u001b[38;5;241m.\u001b[39mSolverError: \u001b[38;5;66;03m# pragma: no cover\u001b[39;00m\n\u001b[0;32m--> 920\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m pybamm\u001b[38;5;241m.\u001b[39mSolverError(\n\u001b[1;32m 921\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mCould not solve for summary variables, run \u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[1;32m 922\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124m`sim.solve(calc_esoh=False)` to skip this step\u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[1;32m 923\u001b[0m )\n\u001b[1;32m 924\u001b[0m \u001b[38;5;28;01mfor\u001b[39;00m var \u001b[38;5;129;01min\u001b[39;00m esoh_sim\u001b[38;5;241m.\u001b[39mbuilt_model\u001b[38;5;241m.\u001b[39mvariables:\n\u001b[1;32m 925\u001b[0m cycle_summary_variables[var] \u001b[38;5;241m=\u001b[39m esoh_sol[var]\u001b[38;5;241m.\u001b[39mdata[\u001b[38;5;241m0\u001b[39m]\n",
"\u001b[0;31mSolverError\u001b[0m: Could not solve for summary variables, run `sim.solve(calc_esoh=False)` to skip this step"
]
}
],
"source": [
"parameter_values = pybamm.ParameterValues(\"Ai2020\")\n",
"model1 = pybamm.lithium_ion.DFN({\"SEI\": \"solvent-diffusion limited\"})\n",
"model2 = pybamm.lithium_ion.DFN({\n",
" \"particle mechanics\": \"swelling and cracking\",\n",
" \"SEI\": \"solvent-diffusion limited\",\n",
" \"SEI on cracks\": \"true\",\n",
"})\n",
"experiment = pybamm.Experiment([\"Discharge at 1C until 3 V\"])\n",
"sim1 = pybamm.Simulation(model1, parameter_values=parameter_values, experiment=experiment)\n",
"sol1 = sim1.solve()\n",
"sim2 = pybamm.Simulation(model2, parameter_values=parameter_values, experiment=experiment)\n",
"sol2 = sim2.solve()"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "c3884817",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.10"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
15 changes: 15 additions & 0 deletions pybamm/models/full_battery_models/base_battery_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,9 @@ class BatteryModelOptions(pybamm.FuzzyDict):
.. math::
\\eta_r = \\frac{F}{RT}
* (\\phi_s - \\phi_e - U - R_{sei} * L_{sei} * \\frac{I}{aL})
* "SEI on cracks" : str
Whether to include SEI growth on particle cracks, can be "false"
(default) or "true".
* "SEI porosity change" : str
Whether to include porosity change due to SEI formation, can be "false"
(default) or "true".
Expand Down Expand Up @@ -237,6 +240,7 @@ def __init__(self, extra_options):
"ec reaction limited",
],
"SEI film resistance": ["none", "distributed", "average"],
"SEI on cracks": ["false", "true"],
"SEI porosity change": ["false", "true"],
"stress-induced diffusion": ["false", "true"],
"surface form": ["false", "differential", "algebraic"],
Expand Down Expand Up @@ -332,6 +336,17 @@ def __init__(self, extra_options):
"current density as a state' must be 'true'"
)

if options["SEI on cracks"] == "true":
if options["particle mechanics"] != "swelling and cracking":
raise pybamm.OptionError(
"To model SEI on cracks, 'particle mechanics' must be set to "
"'swelling and cracking'."
)
elif options["working electrode"] == "positive":
raise NotImplementedError(
"SEI on cracks not yet implemented for lithium metal eleectrode."
)

# Options not yet compatible with particle-size distributions
if options["particle size"] == "distribution":
if options["lithium plating"] != "none":
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,13 @@ def set_degradation_variables(self):
# Different way of measuring LLI but should give same value
LLI_sei = self.variables["Loss of lithium to SEI [mol]"]
if self.half_cell:
LLI_sei_cracks = pybamm.Scalar(0)
LLI_pl = pybamm.Scalar(0)
else:
LLI_sei_cracks = self.variables["Loss of lithium to SEI on cracks [mol]"]
LLI_pl = self.variables["Loss of lithium to lithium plating [mol]"]

LLI_reactions = LLI_sei + LLI_pl
LLI_reactions = LLI_sei + LLI_sei_cracks + LLI_pl
self.variables.update(
{
"Total lithium lost to side reactions [mol]": LLI_reactions,
Expand Down Expand Up @@ -199,12 +201,26 @@ def set_sei_submodel(self):

if self.options["SEI"] == "none":
self.submodels["sei"] = pybamm.sei.NoSEI(self.param, self.options)
self.submodels["sei on cracks"] = pybamm.sei.NoSEI(
self.param, self.options, cracks=True
)
elif self.options["SEI"] == "constant":
self.submodels["sei"] = pybamm.sei.ConstantSEI(self.param, self.options)
self.submodels["sei on cracks"] = pybamm.sei.NoSEI(
self.param, self.options, cracks=True
)
else:
self.submodels["sei"] = pybamm.sei.SEIGrowth(
self.param, reaction_loc, self.options
self.param, reaction_loc, self.options, cracks=False
)
if self.options["SEI on cracks"] == "true":
self.submodels["sei on cracks"] = pybamm.sei.SEIGrowth(
self.param, reaction_loc, self.options, cracks=True
)
else:
self.submodels["sei on cracks"] = pybamm.sei.NoSEI(
self.param, self.options, cracks=True
)

def set_lithium_plating_submodel(self):
if self.options["lithium plating"] == "none":
Expand All @@ -228,7 +244,9 @@ def set_crack_submodel(self):
for domain in ["Negative", "Positive"]:
crack = getattr(self.options, domain.lower())["particle mechanics"]
if crack == "none":
pass
self.submodels[
domain.lower() + " particle mechanics"
] = pybamm.particle_mechanics.NoMechanics(self.param, domain)
elif crack == "swelling only":
self.submodels[
domain.lower() + " particle mechanics"
Expand Down
3 changes: 3 additions & 0 deletions pybamm/models/submodels/interface/base_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ def __init__(self, param, domain, reaction, options=None):
elif reaction == "SEI":
self.reaction_name = " SEI"
self.Reaction_icd = "SEI interfacial current density"
elif reaction == "SEI on cracks":
self.reaction_name = " SEI on cracks"
self.Reaction_icd = "SEI on cracks interfacial current density"
elif reaction == "lithium plating":
self.reaction_name = " lithium plating"
self.Reaction_icd = "Lithium plating interfacial current density"
Expand Down
Loading