Too much runtime for a DFN + Thermal model simulation #4296
-
Hello everyone, Can anyone give me an idea of how long it will take to run DFN + Thermal model simulation? Here are more details of the setup! I left the simulation running for a day and it's still going on. I noticed on this link that the airspeed velocity is very low for this simulation. I don't understand why it is taking so much time for me! Chemistry: NCA_Kim2011 I am running this simulation on a desktop with the following specs: Below is the minimal working example: import pybamm
import os
import pandas as pd
from pybamm.expression_tree.functions import exp
os.chdir(pybamm.__path__[0]+'/..')
import numpy as np
import timeit
from scipy import interpolate
experiment = pybamm.Experiment(
[
(
"Discharge at C/20 for 24 hours or until 3 V",
)
]
)
options = {"dimensionality": 2, "thermal": "x-lumped"}
model = pybamm.lithium_ion.DFN(options=options)
parameter_values = pybamm.ParameterValues("NCA_Kim2011")
solver = pybamm.CasadiSolver(mode="safe",dt_max=10)
sim = pybamm.Simulation(model,parameter_values=parameter_values, solver=solver,experiment=experiment)
sim.solve() |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 20 replies
-
Hi @abhishek-appana, I tried running the code but also did not get a solution within 15 minutes or so. We are actively working on improving the solvers in PyBaMM. Can you try using the solver = pybamm.IDAKLUSolver()
sim = pybamm.Simulation(model,parameter_values=parameter_values, solver=solver,experiment=experiment)
sim.solve() With the new solver, I got an answer in 2 minutes and 15 seconds on my machine. |
Beta Was this translation helpful? Give feedback.
-
Hi @abhishek-appana I am install a new env and try to install IDAKLU according the guide https://docs.pybamm.org/en/stable/source/user_guide/installation/install-from-source.html. But I meet some issues, I can clone the GitHub repository successfully but I cant run this :sudo apt install python3.X python3.X-dev libopenblas-dev gcc gfortran graphviz cmake pandoc I cant use nox if I skip this. could you please give me some suggestion? I am a starter on linux too. |
Beta Was this translation helpful? Give feedback.
Hi @abhishek-appana, I tried running the code but also did not get a solution within 15 minutes or so.
We are actively working on improving the solvers in PyBaMM. Can you try using the
develop
branch of PyBaMM and switching toIDAKLUSolver
, i.e.With the new solver, I got an answer in 2 minutes and 15 seconds on my machine.