Skip to content
Discussion options

You must be logged in to vote

Here is an example

import pybamm
import numpy as np
import matplotlib.pyplot as plt

pybamm.set_logging_level("INFO")

# load model
options = {
    "current collector": "potential pair",
    "dimensionality": 2,  # 2D current collectors
    "thermal": "x-lumped",  # thermal model (ignores through-cell variation)
}
model = pybamm.lithium_ion.SPM(options)

# parameters can be updated here
param = model.default_parameter_values

# set mesh points
var = pybamm.standard_spatial_vars
var_pts = {
    var.x_n: 10,  # negative electrode
    var.x_s: 10,  # separator
    var.x_p: 10,  # positive electrode
    var.r_n: 10,  # negative particle
    var.r_p: 10,  # positive particle
    var.y: 10,  # …

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@YouHyin
Comment options

Answer selected by rtimms
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants