Skip to content

Commit

Permalink
pybamm-team#976 added test that shows the error
Browse files Browse the repository at this point in the history
  • Loading branch information
brosaplanella committed May 4, 2020
1 parent 8433b53 commit 59b60e8
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tests/unit/test_solvers/test_casadi_solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,24 @@ def test_dae_solver_algebraic_model(self):
):
solver.solve(model, t_eval)

def test_interpolant_extrapolate(self):
model = pybamm.lithium_ion.DFN()
param = pybamm.ParameterValues(chemistry=pybamm.parameter_sets.Chen2020)
experiment = pybamm.Experiment(
["Discharge at 1C until 2.5 V", "Rest for 2 hours",], period="5 seconds"
)

ci = param["Initial concentration in positive electrode [mol.m-3]"]
param["Initial concentration in positive electrode [mol.m-3]"] = 0.8 * ci

sim = pybamm.Simulation(
model,
parameter_values=param,
experiment=experiment,
solver=pybamm.CasadiSolver(mode="safe"),
)
sim.solve()


if __name__ == "__main__":
print("Add -v for more debug output")
Expand Down

0 comments on commit 59b60e8

Please sign in to comment.