Skip to content

Commit

Permalink
Merge pull request #176 from pybamm-team/fix_electrode_SoH
Browse files Browse the repository at this point in the history
Update ElectrodeSOH syntax to use solver
  • Loading branch information
TomTranter authored Jul 29, 2022
2 parents 398e5b5 + 0853698 commit 22b9118
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions liionpack/sim_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,8 @@ def get_initial_stoichiometries(initial_soc, parameter_values):
if np.any(initial_soc < 0) or np.any(initial_soc > 1):
raise ValueError("Initial SOC should be between 0 and 1")

model = pybamm.lithium_ion.ElectrodeSOH()

param = pybamm.LithiumIonParameters()
sim = pybamm.Simulation(model, parameter_values=parameter_values)
esoh_solver = pybamm.lithium_ion.ElectrodeSOHSolver(parameter_values, param)

V_min = parameter_values.evaluate(param.voltage_low_cut_dimensional)
V_max = parameter_values.evaluate(param.voltage_high_cut_dimensional)
Expand All @@ -46,8 +44,7 @@ def get_initial_stoichiometries(initial_soc, parameter_values):
return None, None

# Solve the model and check outputs
sol = sim.solve(
[0],
sol = esoh_solver.solve(
inputs={
"V_min": V_min,
"V_max": V_max,
Expand Down

0 comments on commit 22b9118

Please sign in to comment.