Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when solving a simulation with parameter values with inputs that affect the timescale #1217

Closed
TomTranter opened this issue Oct 29, 2020 · 0 comments · Fixed by #1218
Closed
Assignees
Labels
bug Something isn't working

Comments

@TomTranter
Copy link
Contributor

Describe the bug
Line 408 in simulation evaluates the model timescale without passing inputs and cannot find the electrode height in the example below. Quick fix to use the evaluated timescale on the solution object

To Reproduce

model = pybamm.lithium_ion.SPM()
# load parameter values and process model and geometry
param = model.default_parameter_values
param.update({"Electrode height [m]": "[input]"})
# solve model for 1 minute
t_eval = np.linspace(0, 60, 11)
inputs = {"Electrode height [m]": 0.2}
sim = pybamm.Simulation(model=model, parameter_values=param)
sim.solve(t_eval=t_eval, inputs=inputs)

Expected behaviour
model runs with no issues

@TomTranter TomTranter added the bug Something isn't working label Oct 29, 2020
@TomTranter TomTranter self-assigned this Oct 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant