Computation of SOC in Pybamm #4462
alirahdarian
started this conversation in
General
Replies: 1 comment
-
Hey, I also ran into this issue. How did you end up defining it? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I would like to know how SOC is defined in Pybamm. I need to compute SOC at each time instant and track the SOC over time and I do not want to use culoumb counting. I want to use the SOC which is defined based on the concentrations. For example, in this code can you show me how i can compute the mentioned SOC at each time instant?
import pybamm
import numpy as np
import matplotlib.pyplot as plt
model = pybamm.lithium_ion.DFN()
dt=10
t_eval=t_eval=np.arange(0,106060,dt)
param1 = pybamm.ParameterValues("Prada2013")
Q_battery = param1["Nominal cell capacity [A.h]"] # in Ah
param1["Current function [A]"] = -0.23
SOC1_0 = 0
sim1 = pybamm.Simulation(model, parameter_values=param1)
solution1 = sim1.solve(t_eval, initial_soc=SOC1_0)
t1 = solution1["Time [s]"].entries
I1 = solution1["Current [A]"].entries
ocv1 = solution1["Battery open-circuit voltage [V]"].entries
DC1 = solution1["Discharge capacity [A.h]"].entries
V1 = solution1["Terminal voltage [V]"].entries
plt.figure(1)
plt.plot(t1, V1,label='V1')
plt.xlabel("time")
plt.ylabel("voltage")
plt.legend()
plt.show()
Beta Was this translation helpful? Give feedback.
All reactions