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
File F:\ananconda2\lib\site-packages\pybamm\parameters\parameter_values.py:81, in ParameterValues.init(self, values, chemistry)
78 self.update(values, check_already_exists=False)
79 else:
80 # Check if values is a named parameter set
---> 81 if isinstance(values, str) and values in pybamm.parameter_sets:
82 values = pybamm.parameter_sets[values]
83 values.pop("chemistry")
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
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,I have the following two questions, Could you help me?
question one:
I don't know how to solve this error?
Code:
import pybamm
model=pybamm.lithium_ion.DFN()
sim=pybamm.Simulation(model)
sim.solve([0,3600])
sim.plot()
Error:
TypeError Traceback (most recent call last)
Input In [1], in <cell line: 3>()
1 import pybamm
2 model=pybamm.lithium_ion.DFN()
----> 3 sim=pybamm.Simulation(model)
4 sim.solve([0,3600])
5 sim.plot()
File F:\ananconda2\lib\site-packages\pybamm\simulation.py:72, in Simulation.init(self, model, experiment, geometry, parameter_values, submesh_types, var_pts, spatial_methods, solver, output_variables, C_rate)
59 def init(
60 self,
61 model,
(...)
70 C_rate=None,
71 ):
---> 72 self.parameter_values = parameter_values or model.default_parameter_values
74 if isinstance(model, pybamm.lithium_ion.BasicDFNHalfCell):
75 if experiment is not None:
File F:\ananconda2\lib\site-packages\pybamm\models\full_battery_models\lithium_ion\base_lithium_ion_model.py:83, in BaseModel.default_parameter_values(self)
76 @Property
77 def default_parameter_values(self):
78 if self.options.whole_cell_domains == [
79 "negative electrode",
80 "separator",
81 "positive electrode",
82 ]:
---> 83 return pybamm.ParameterValues("Marquis2019")
84 else:
85 return pybamm.ParameterValues("Xu2019")
File F:\ananconda2\lib\site-packages\pybamm\parameters\parameter_values.py:81, in ParameterValues.init(self, values, chemistry)
78 self.update(values, check_already_exists=False)
79 else:
80 # Check if values is a named parameter set
---> 81 if isinstance(values, str) and values in pybamm.parameter_sets:
82 values = pybamm.parameter_sets[values]
83 values.pop("chemistry")
File F:\ananconda2\lib_collections_abc.py:769, in Mapping.contains(self, key)
767 def contains(self, key):
768 try:
--> 769 self[key]
770 except KeyError:
771 return False
File F:\ananconda2\lib\site-packages\pybamm\parameters\parameter_sets.py:51, in ParameterSets.getitem(self, key)
50 def getitem(self, key) -> dict:
---> 51 return self.load_entry_point(key)()
TypeError: 'EntryPoint' object is not callable
question two:
If a variable is related to time and location, I want to know how to save the data of this variable at a certain location over time?
Beta Was this translation helpful? Give feedback.
All reactions