diff --git a/tests/unit/test_solvers/test_casadi_solver.py b/tests/unit/test_solvers/test_casadi_solver.py index 1d7e0f2649..68aa81b599 100644 --- a/tests/unit/test_solvers/test_casadi_solver.py +++ b/tests/unit/test_solvers/test_casadi_solver.py @@ -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")