Error while I try to run an experiment from a csv file current (A) #3109
alihassan90
started this conversation in
General
Replies: 1 comment
-
See https://github.com/pybamm-team/PyBaMM/blob/develop/examples/scripts/experiment_drive_cycle.py for the new syntax |
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.
-
I get this error when i try to run a simple experiemnts from a csv file.
ValueError: drive_cycles should now be passed as an experiment step object, e.g.
pybamm.step.current(drive_cycle)
My code looks like
drive_cycle=pd.read_csv("US06.csv",comment='#',header=None).to_numpy()
current_interpolant = pybamm.Interpolant(drive_cycle[:, 0], drive_cycle[:, 1], pybamm.t)
parameter_values["Current function [A]"] = current_interpolant
=============================================================================
experiment=pybamm.Experiment(
[
("Charge at 1A until 4.0 V",
"Rest for 60 minutes",
"Run US06_A (A)",
)
],
drive_cycles={
"US06_A":drive_cycle,
},
)
Beta Was this translation helpful? Give feedback.
All reactions