You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I’m reaching out with a quick question about something I observed while working with the OKane2022 parameter set. Specifically, I noticed a difference in the smoothness of the voltage response between OKane2022 and Ai2020 when aging mechanisms are activated.
Here’s a brief summary of what I found:
Ai2020 Parameter Set
When aging mechanisms like solvent-diffusion limited SEI are enabled, the voltage response is smooth and continuous throughout the experiment.
OKane2022 Parameter Set
With the same aging mechanisms, I see some irregularities in the voltage response, particularly during transitions and rest periods.
My Questions:
Could these irregularities in OKane2022 be related to specific parameter values or their interactions with aging mechanisms?
Is there a recommended approach or adjustment I can make to improve the smoothness of the voltage response while using the OKane2022 parameter set?
Thank you so much for your time and for all the amazing work you’ve done. I’d be very grateful for any guidance or insights you could share!
Here is my code:
import pybamm
import os
import pandas as pd
import matplotlib.pyplot as plt
def run_experiment_defaults():
"""
Run a PyBaMM experiment and output corresponding time, current, and voltage.
"""
try:
# Set up the first model and parameters
model1 = pybamm.lithium_ion.DFN({
"calculate discharge energy": "true"
})
param1 = pybamm.ParameterValues("Ai2020")
pybamm.set_logging_level("NOTICE")
var_pts1 = {
"x_n": 10, "x_s": 10, "x_p": 10, "r_n": 16, "r_p": 16
}
param1["Ambient temperature [K]"] = 298.15 # Fixed at 25°C
# Define the experimental protocol
experiment = pybamm.Experiment(
[
(
"Discharge at 0.8A for 0.4 seconds",
"Charge at 1A for 0.3 seconds",
"Charge at 0.8A for 0.3 seconds",
"Discharge at 1A for 0.2 seconds",
"Charge at 1A for 0.4 seconds",
"Discharge at 1A for 2.0 seconds",
"Discharge at 1A for 0.4 seconds",
"Charge at 0.7A for 6.3 seconds",
"Discharge at 0.7A for 3.4 seconds",
"Discharge at 0.7A for 5.7 seconds",
"Charge at 1A for 0.4 seconds",
"Discharge at 1A for 0.5 seconds",
"Charge at 1A for 6.7 seconds",
"Discharge at 1A for 0.2 seconds",
"Discharge at 0.6A for 8.7 seconds",
"Discharge at 0.6A for 0.4 seconds",
"Charge at 0.6A for 7.0 seconds",
"Charge at 0.6A for 0.3 seconds",
"Discharge at 1A for 0.2 seconds",
"Discharge at 1A for 0.1 seconds",
"Rest for 1.1 seconds",
"Discharge at 5A for 30 seconds",
"Discharge at 10A for 15 seconds",
"Rest for 10 seconds"
)
],
period="0.1 seconds",
termination="1V"
)
# Create simulation object for Model 1
simulation1 = pybamm.Simulation(model1, experiment=experiment, parameter_values=param1, var_pts=var_pts1)
print("Starting simulation for Model 1...")
solution1 = simulation1.solve()
time1 = solution1["Time [s]"].entries
voltage1 = solution1["Terminal voltage [V]"].entries
# Set up the second model and parameters
model2 = pybamm.lithium_ion.DFN({
# "thermal": "lumped",
# "dimensionality": 0,
# "cell geometry": "arbitrary",
"SEI": "solvent-diffusion limited",
"SEI porosity change": "true",
"particle mechanics": ("swelling and cracking", "swelling and cracking"),
"SEI on cracks": "true",
"loss of active material": "stress-driven",
# "lithium plating": "partially reversible",
"lithium plating porosity change": "true",
"calculate discharge energy": "true"
})
param2 = pybamm.ParameterValues("Ai2020")
var_pts2 = {"x_n": 10, "x_s": 10, "x_p": 10, "r_n": 16, "r_p": 16}
param2["Ambient temperature [K]"] = 298.15 # Fixed at 25°C
# Create simulation object for Model 2
simulation2 = pybamm.Simulation(model2, experiment=experiment, parameter_values=param2, var_pts=var_pts2)
print("Starting simulation for Model 2...")
solution2 = simulation2.solve()
time2 = solution2["Time [s]"].entries
voltage2 = solution2["Terminal voltage [V]"].entries
# Plot results
plt.figure(figsize=(10, 6))
plt.plot(time1, voltage1, label="Model 1 (without aging)")
plt.plot(time2, voltage2, label="Model 2 (with aging)", linestyle="--")
plt.xlabel("Time (s)")
plt.ylabel("Voltage (V)")
plt.title("Voltage vs Time for Two Models")
plt.grid(True)
plt.legend()
plt.tight_layout()
plt.show()
except Exception as e:
print(f"An error occurred: {e}")
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
hi everyone,
I’m reaching out with a quick question about something I observed while working with the OKane2022 parameter set. Specifically, I noticed a difference in the smoothness of the voltage response between OKane2022 and Ai2020 when aging mechanisms are activated.
Here’s a brief summary of what I found:
Ai2020 Parameter Set
When aging mechanisms like solvent-diffusion limited SEI are enabled, the voltage response is smooth and continuous throughout the experiment.
OKane2022 Parameter Set
With the same aging mechanisms, I see some irregularities in the voltage response, particularly during transitions and rest periods.
My Questions:
Could these irregularities in OKane2022 be related to specific parameter values or their interactions with aging mechanisms?
Is there a recommended approach or adjustment I can make to improve the smoothness of the voltage response while using the OKane2022 parameter set?
Thank you so much for your time and for all the amazing work you’ve done. I’d be very grateful for any guidance or insights you could share!
Here is my code:
import pybamm
import os
import pandas as pd
import matplotlib.pyplot as plt
def run_experiment_defaults():
"""
Run a PyBaMM experiment and output corresponding time, current, and voltage.
"""
try:
# Set up the first model and parameters
model1 = pybamm.lithium_ion.DFN({
"calculate discharge energy": "true"
})
if name == "main":
run_experiment_defaults()
Beta Was this translation helpful? Give feedback.
All reactions