Ionworks
← All posts

Product

Dec 4, 2026

PyBaMM degradation sweeps, now on Ionworks compute

The ionworks.pybamm beta runs your PyBaMM scripts on Ionworks compute. Fifty 1000-cycle ageing runs finish in 11 minutes with under 300 MB on your laptop, and every run is saved in Ionworks Studio.

A PyBaMM degradation sweep where the only change is the import line, import ionworks.pybamm as pybamm: fifty 1000-cycle SPM ageing runs over SEI and loss-of-active-material rates, in 11 minutes with 280 MB on your laptop

Today we're opening the beta of ionworks.pybamm: PyBaMM that solves on Ionworks compute instead of your laptop. You change one line:

import ionworks.pybamm as pybamm

Everything after it is the PyBaMM you already write. Same models, same parameter sets, same experiments, same solution object. The difference is where sim.solve() runs, how many solves you can run at once, and what happens to each result afterwards.

Where that matters most is degradation. Fifty 1000-cycle ageing runs finish in 11 minutes on Ionworks, and your laptop holds under 300 MB while they do. Run one at a time on a laptop, the same sweep takes 26 to 79 minutes, depending on the laptop.

ionworks.pybamm beta
Join with a work or university email. We send your sign-up link, and new accounts start with $10 of free compute.

Why we built it

We started PyBaMM in 2018. It passed 770,000 downloads this year by mid-October, and most of those users run it the same way: one Python process, one machine, results saved wherever the script happened to save them.

That works until the question gets bigger than the laptop, and ageing studies get there first. Each run solves hundreds or thousands of cycles. A useful sweep needs dozens of runs across SEI growth rates, plating and loss of active material. Each run can hold gigabytes of RAM while it solves, so running several at once runs out of memory before it runs out of cores. At that point people write their own multiprocessing code, borrow a cluster, or leave the machine running overnight.

The second problem is quieter. Six months later, nobody can say which parameter set or solver settings produced the plot in the design review. ionworks.pybamm fixes both without asking you to learn a new tool.

How it works

Here is a standard PyBaMM script. The only change is the import.

import ionworks.pybamm as pybamm

model = pybamm.lithium_ion.DFN()
parameter_values = pybamm.ParameterValues("Chen2020")
experiment = pybamm.Experiment(
    [
        "Discharge at 1C until 2.5 V",
        "Rest for 1 hour",
        "Charge at C/2 until 4.2 V",
        "Hold at 4.2 V until C/50",
    ]
)

sim = pybamm.Simulation(model, parameter_values=parameter_values, experiment=experiment)
solution = sim.solve(initial_soc=1)  # runs on Ionworks compute

voltage = solution["Voltage [V]"].entries

When you call solve(), the client sends your Simulation to Ionworks as data: the model, parameter values, experiment, mesh and solver settings. The server runs that same pybamm.Simulation and sends back a solution you index exactly as before. We didn't write a translation layer, so there is no second model to drift away from the one you defined.

The first solve opens a browser to sign in or create an account. After that, scripts just run. Set IONWORKS_PYBAMM_LOCAL=1 to send the same script back to your local PyBaMM, which is handy for debugging or running offline.

initial_soc is optional, and takes a fraction or a voltage such as "4.0 V", as in PyBaMM. A remote solve needs the same PyBaMM release Ionworks runs (26.11 today; any patch of it works). If yours differs, the error names the release to install instead of returning something subtly different. We run PyBaMM's own test suite against ionworks.pybamm on every release.

Degradation sweeps, off your laptop

Mark the parameters you want to vary as inputs, then pass solve() a list of input sets instead of one. Each input set runs as its own simulation, in parallel, and comes back as a list of solutions in the same order.

import numpy as np
import ionworks.pybamm as pybamm

model = pybamm.lithium_ion.SPM(
    {
        "SEI": "solvent-diffusion limited",
        "SEI porosity change": "true",
        "lithium plating": "partially reversible",
        "lithium plating porosity change": "true",
        "particle mechanics": "swelling only",
        "loss of active material": "stress-driven",
    }
)
parameter_values = pybamm.ParameterValues("OKane2022")
sei = "SEI solvent diffusivity [m2.s-1]"
lam = "Negative electrode LAM constant proportional term [s-1]"
parameter_values[sei] = "[input]"
parameter_values[lam] = "[input]"

cycle = (
    "Discharge at 1C until 2.5 V",
    "Rest for 5 minutes",
    "Charge at 0.3C until 4.2 V",
    "Hold at 4.2 V until C/100",
    "Rest for 5 minutes",
)
sim = pybamm.Simulation(
    model,
    parameter_values=parameter_values,
    experiment=pybamm.Experiment([cycle] * 1000),
)

designs = [
    {sei: d, lam: k}
    for d in np.geomspace(2.5e-22, 2.5e-20, 10)
    for k in np.geomspace(2.8e-7, 2.8e-5, 5)
]
solutions = sim.solve(initial_soc=1, inputs=designs)

capacity_retention = [
    s.summary_variables["Capacity [A.h]"][-1]
    / s.summary_variables["Capacity [A.h]"][0]
    for s in solutions
]

We ran that sweep, fifty designs of 1000 cycles each, on Ionworks and on two laptops: a fast one (Apple M4 Max, 36 GB of RAM) and an ordinary one (Dell Inspiron 15, Intel Core i5-1235U, 8 GB). Both laptops ran PyBaMM 26.11 and, to compare like with like, kept only the outputs Ionworks stores: voltage, current, power, temperature, and what the summary variables need.

50 runs × 1000 cyclesTimeLaptop memory
ionworks.pybamm, all 50 at once11 min280 MB
Laptop, 4 to 8 runs at a time11–21 min10–15 GB
Laptop, one run at a time26–79 min2.7–3.8 GB

Each laptop range runs from the M4 Max to the 8 GB laptop.

Bar chart of peak laptop memory for the 50-run, 1000-cycle sweep, against each laptop's RAM. ionworks.pybamm: 280 MB. M4 Max with 36 GB: 3.8 GB one run at a time, 15 GB eight at a time. 8 GB laptop with 7.7 GB usable: 2.7 GB one at a time, and 10 GB four at a time, more than it has

Memory is what holds a laptop back. Each run holds 2.7 to 3.8 GB while it solves, so running them side by side adds up quickly. The M4 Max can run eight at once and match the 11 minutes, as long as it has 15 GB to spare and nothing else to do. The 8 GB laptop can't fit four, so it runs them one after another, for 79 minutes.

The bigger difference is how each side scales. On Ionworks, a sweep takes about as long as its slowest run, however many runs you send. On a laptop, every run you add adds time. At 200 runs, Ionworks still took about 11 minutes. The M4 Max needs 39, and the 8 GB laptop over five hours.

Line chart of sweep time against the number of 1000-cycle runs. Ionworks stays flat at about 11 minutes up to 200 runs. At 200 runs, the M4 Max takes 39 minutes eight at a time and 104 minutes one at a time; the 8 GB laptop takes 316 minutes one at a time, and four at a time would take 81 minutes but doesn't fit in its memory

The laptop lines scale the per-run times we measured: 31 seconds per run on the M4 Max and 95 seconds on the 8 GB laptop, one at a time, and 94 seconds per batch of eight on the M4 Max. The dotted line, the 8 GB laptop running four at a time at 97 seconds per batch, is there for reference; it needs more memory than the laptop has. The Ionworks points are measured end to end: 50 runs on production, 200 on our staging environment.

The sweep used about 3.4 compute-hours, or $5. Each simulation holds $0.025 of your credit while it runs, and an account runs up to 200 at once, or one per $0.025 of the credit left after what its running simulations have used, if that is fewer. A new account's $10 runs this sweep all at once. A larger batch goes out in groups of that size, each once the group before it finishes. If your credit runs out while simulations are running, they are all cancelled and charged for the time they ran.

What comes back is the design space. Here is the 200-run version of the same sweep, 20 SEI diffusivities by 10 LAM rates, with each cell's capacity after 1000 cycles. The LAM rate sets the fade; at the highest LAM rates the cell doesn't make it to 1000 cycles at all.

Heatmap of capacity retention after 1000 cycles over SEI solvent diffusivity and LAM rate constant for 200 SPM ageing runs: retention falls from 98% to about 64% as the LAM rate rises, and runs at the three highest LAM rates stop early, between cycles 251 and 961

pybamm.BatchStudy works the same way when you want to compare models, parameter sets or C-rates: it submits every run at once.

Every run is on the record

Each solve also lands in Ionworks Studio as a simulation, with the model, parameter values, experiment and solver settings that produced it. You don't have to do anything extra: each solve prints a link to its run, and an identical run in the same project is reused instead of solved again.

That means you can:

  • find last month's run by browsing, not by digging through results_final_v3.pkl
  • send a colleague a link instead of a script and a list of package versions
  • compare two runs side by side and see exactly which settings differ
  • keep a script's runs together in a study with pybamm.configure(study="ageing sweep")
  • point an AI agent at the same records through the Ionworks API and MCP server

For a single small solve, your laptop will always be faster than a round trip to the cloud, so run those locally with IONWORKS_PYBAMM_LOCAL=1. Ionworks earns its keep on sweeps and long ageing runs, and on keeping a record of what you ran.

If anything behaves differently from local PyBaMM, that's a bug. Please open an issue with the script, or email it to [email protected].

Pricing, and what this means for PyBaMM

You pay for the compute you use: $1.50 per compute-hour, billed against prepaid credits. There are no seats and no tiers. Beta accounts start with $10 of free credit, about 6.7 compute-hours, and adding a card adds another $10. See pricing for the details.

PyBaMM itself doesn't change. It stays open source under the same license, and local PyBaMM runs exactly as it does today. Ionworks maintains PyBaMM, and work for this release goes upstream where it belongs: while we built it, import pybamm got about six times faster, in PyBaMM 26.11.

Try it

pip install ionworks
ionworks.pybamm beta
Join with a work or university email. We send your sign-up link, and new accounts start with $10 of free compute.

Once you've signed up, change your import and run any script you already have. The getting-started guide walks through a first solve, a sweep and finding your runs in Studio.

We want to hear where it breaks and what you'd run if compute weren't the limit. Reply to this post, find us in the PyBaMM community channels, or email [email protected].

Continue reading

New posts by email