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

Electrode height input doesn't work with DFN #835

Closed
TomTranter opened this issue Feb 18, 2020 · 1 comment · Fixed by #839
Closed

Electrode height input doesn't work with DFN #835

TomTranter opened this issue Feb 18, 2020 · 1 comment · Fixed by #839
Assignees
Labels
bug Something isn't working

Comments

@TomTranter
Copy link
Contributor

Describe the bug
I think inputs need to be passed to discretisation in order to intialise the DFN model

To Reproduce

import pybamm
import numpy as np
pybamm.set_logging_level('INFO')

e_height = 0.25

model = pybamm.lithium_ion.DFN()
geometry = model.default_geometry
param = model.default_parameter_values
param.update(
    {
        "Electrode height [m]": "[input]",
    }
)
param.process_model(model)
param.process_geometry(geometry)
inputs= {
        "Electrode height [m]": e_height,
        }
A_cc = param.process_symbol(pybamm.geometric_parameters.A_cc).evaluate(u=inputs)
var = pybamm.standard_spatial_vars
var_pts = {var.x_n: 5, var.x_s: 5, var.x_p: 5, var.r_n: 10, var.r_p: 10}
spatial_methods = model.default_spatial_methods

solver = model.default_solver
sim = pybamm.Simulation(
    model=model,
    geometry=geometry,
    parameter_values=param,
    var_pts=var_pts,
    spatial_methods=spatial_methods,
    solver=solver,
)
sim.solve(t_eval=np.linspace(0, 0.05, 100), inputs=inputs)
valentinsulzer added a commit that referenced this issue Feb 18, 2020
@valentinsulzer
Copy link
Member

Have pushed a hacky workaround for now. It only works with the scikits dae or casadi solver.

valentinsulzer added a commit that referenced this issue Feb 19, 2020
@valentinsulzer valentinsulzer self-assigned this Feb 19, 2020
@valentinsulzer valentinsulzer added the bug Something isn't working label Feb 19, 2020
@valentinsulzer valentinsulzer added this to To do in Version 2 - User workshop via automation Feb 19, 2020
@valentinsulzer valentinsulzer moved this from To do to In progress in Version 2 - User workshop Feb 19, 2020
valentinsulzer added a commit that referenced this issue Feb 19, 2020
valentinsulzer added a commit that referenced this issue Feb 19, 2020
valentinsulzer added a commit that referenced this issue Feb 19, 2020
Version 2 - User workshop automation moved this from In progress to Done Feb 19, 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
No open projects
Development

Successfully merging a pull request may close this issue.

2 participants