Replies: 2 comments 2 replies
-
Dear Ruihe,
Same for c_e_eval being the array of electrolyte concentration solutions. Put that into a convenience function and it should be just what you need. |
Beta Was this translation helpful? Give feedback.
1 reply
-
You can also do import pybamm
parameter_set = pybamm.ParameterValues("Marquis2019")
c_e = pybamm.linspace(0, 1000, 100)
D_e = parameter_set["Electrolyte diffusivity [m2.s-1]"]
pybamm.plot(c_e, D_e(c_e, 298.15)) to plot. And import pybamm
model = pybamm.lithium_ion.SPMe()
c_e = model.variables["Electrolyte concentration [mol.m-3]"]
T = model.variables["Cell temperature [K]"]
D_e = model.param.D_e_dimensional
model.variables["Electrolyte diffusivity [m2.s-1]"] = D_e(c_e, T)
sim = pybamm.Simulation(model)
sim.solve([0, 3600])
sim.plot(["Electrolyte diffusivity [m2.s-1]", "Terminal voltage [V]"]) to add the diffusivity as a variable. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Dear PyBaMM team,
I wonder are there any quick ways available to plot out what the parameter as a function defined in the PyBaMM parameter sets looks like for a given input (like c_e = np.linspace(0, 1000, 100))? Also is it possible to plot the in situ parameter, let's say, diffusivity, during the simulation? Currently I can only do this by copy paste the function from the input parameter set and manually call that function, which is not very convenient though.
Big thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions