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
Originally posted by agoshtasbi April 3, 2023
Hi folks,
It seems that the latest changes have caused some issues with specifying input parameters. The following code snippet (slightly modified from workshop notebooks) used to work in v23.2, but now produces the error below:
`
import pybamm
import numpy as np
model = pybamm.lithium_ion.DFN()
geometry = model.default_geometry
param = model.default_parameter_values
param.update({"Current function [A]": "[input]"})
param.update({"Negative electrode porosity": "[input]"})
Discussed in #2852
Originally posted by agoshtasbi April 3, 2023
Hi folks,
It seems that the latest changes have caused some issues with specifying input parameters. The following code snippet (slightly modified from workshop notebooks) used to work in v23.2, but now produces the error below:
`
import pybamm
import numpy as np
model = pybamm.lithium_ion.DFN()
geometry = model.default_geometry
param = model.default_parameter_values
param.update({"Current function [A]": "[input]"})
param.update({"Negative electrode porosity": "[input]"})
param.process_geometry(geometry)
param.process_model(model)
var = pybamm.standard_spatial_vars
var_pts = {var.x_n: 30, var.x_s: 30, var.x_p: 30, var.r_n: 10, var.r_p: 10}
mesh = pybamm.Mesh(geometry, model.default_submesh_types, var_pts)
disc = pybamm.Discretisation(mesh, model.default_spatial_methods)
disc.process_model(model)
t_eval = np.linspace(0, 3600, 100)
solver = pybamm.CasadiSolver(mode="safe", atol=1e-6, rtol=1e-3)
solution = solver.solve(
model, t_eval,
inputs={"Current function [A]": 0.15652, "Negative electrode porosity": 0.3},
calculate_sensitivities=False
)`
pybamm.expression_tree.exceptions.DomainError: Cannot concatenate child 'Column vector of length 30 * Negative electrode porosity' with empty domain
I couldn't find any trace of this in the change log so I'm not sure if the code needs to be changed for v23.3. Any help would be much appreciated.
Thanks!
The text was updated successfully, but these errors were encountered: