Skip to content

Commit

Permalink
Define parameter set first
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolaCourtier committed Aug 7, 2024
1 parent 499c80e commit 4b82c78
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions examples/scripts/functional_parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@
# that already exists in the model, for example an exchange current density.


# Parameter set and model definition
# Load default parameter set
parameter_set = pybop.ParameterSet.pybamm("Chen2020")
model = pybop.lithium_ion.SPM(parameter_set=parameter_set)


# Define a new function using new parameters
Expand Down Expand Up @@ -44,6 +43,11 @@ def positive_electrode_exchange_current_density(c_e, c_s_surf, c_s_max, T):
positive_electrode_exchange_current_density
)

# Model definition
model = pybop.lithium_ion.SPM(
parameter_set=parameter_set, options={"contact resistance": "true"}
)

# Fitting parameters
parameters = pybop.Parameters(
pybop.Parameter(
Expand Down

0 comments on commit 4b82c78

Please sign in to comment.