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

[Bug]: Error if variable bounds contain an InputParameter #2793

Closed
rtimms opened this issue Mar 20, 2023 · 0 comments · Fixed by #2795
Closed

[Bug]: Error if variable bounds contain an InputParameter #2793

rtimms opened this issue Mar 20, 2023 · 0 comments · Fixed by #2795
Assignees
Labels
bug Something isn't working

Comments

@rtimms
Copy link
Contributor

rtimms commented Mar 20, 2023

Now that we switched to using dimensional variables, if you have an InputParameter in the bounds of a variable you can't discretise it. We should skip the bounds in this case IMO, otherwise, you would need to re-discretize each time you changed the input.

Code to reproduce this:

import pybamm
model = pybamm.lithium_ion.SPM()
param = pybamm.ParameterValues("Chen2020")
param["Maximum concentration in positive electrode [mol.m-3]"] = "[input]"
sim = pybamm.Simulation(model, parameter_values=param)
sim.solve([0, 3600], inputs = {"Maximum concentration in positive electrode [mol.m-3]": 65000})
@rtimms rtimms added the bug Something isn't working label Mar 20, 2023
@rtimms rtimms self-assigned this Mar 21, 2023
rtimms added a commit that referenced this issue Mar 21, 2023
rtimms added a commit that referenced this issue Mar 21, 2023
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