User guide
Manage your API tokens and run simulations
Manage your API tokens and run battery simulations in your browser or with the DandeLiion Python Client.
1. Set up your account
- Create an account with your email address and a strong password.
- Accept the current Terms of Service and Privacy Notice when prompted.
- Open the verification email and follow its link.
- Open Tokens to see your shared allowance and token list.
If the verification message does not arrive, sign in and request another from the verification page.
2. Generate and store a token
- On the Tokens page, choose Generate token.
- Add a descriptive label such as Laptop, Jupyter notebook or CI runner.
- Choose an expiry date within the maximum lifetime allowed by your tier.
- Generate the token and copy it immediately to a password manager or secret store.
For command-line use, place the token in an environment variable instead of writing it into a script:
export DANDELIION_API_TOKEN="your-64-character-token"
Never commit a token to source control, paste it into logs, or share it in email or chat.
3. Manage, replace and deactivate tokens
The portal shows the full token only when you create it. After that, the dashboard displays just the first eight characters (the prefix), so you can identify a token without revealing the secret needed to use it. Each token also has a label, status, expiry, last use and successful-use count.
Create a separate labelled token for each device, notebook, application or collaborator. This makes it possible to replace one credential without disrupting everything else.
Replace a token safely
- Generate and securely store a new token.
- Update the Python Client, application or secret store that uses the old token.
- Run a test simulation with the replacement.
- Choose Deactivate beside the old token and confirm the action.
Deactivation immediately and permanently blocks new simulations with that token. Its metadata stays in the list for your usage history. The API still uses the original token to protect existing runs, so deactivation does not revoke API access to those runs. Deactivating an automatic simulator token does end its browser access through the portal. Deactivate a token immediately if its secret may have been exposed.
4. Understand your allowance
All tokens on your account draw from one shared simulation allowance. The dashboard shows the current allowance, uses consumed, uses remaining and the next renewal date.
- Each successful simulation validation consumes one use, even if the run later fails or is cancelled.
- If an API v2 submission was accepted but its response was lost, retrying identical input with the same token and idempotency key returns that run without consuming another use.
- Reusing that key with different input is rejected. If authorisation is uncertain, keep the request ID for support and do not retry with a new key.
- An expired, deactivated or unknown token does not consume a use.
- When the shared allowance is exhausted, none of your tokens can start another simulation until the allowance is renewed or adjusted.
5. Use the online simulator
The online simulator is a public beta. We can provide more tokens for testers; contact DandeLiion to request them or share feedback.
Set up a simulation
Sign in and choose a single-cell DFN or cylindrical pack model, then select a parameter set or upload a BPX file. Set the current or power input, initial conditions and simulation limits. Drive cycles and pack PAT patterns show a preview before submission. The portal prepares temporary simulator access automatically; each accepted run consumes one use from your shared allowance, including runs started with Extra resources. Viewing or downloading results uses no additional allowance.
BPX (Battery Parameter eXchange) is an open standard for sharing physics-based battery model parameters, including cell, electrode, electrolyte and separator properties. Read about the format on the official BPX website, or download a parameter file from the portal library.
Setup opens with a 4s4p pack and four sections per cell. Series cells, parallel cells and sections each accept 1–10. Colours in the geometry preview identify parallel blocks, which connect in series. Packs use Spatially resolved thermal modelling: each section has its own DFN model and lumped temperature. Single cells offer Isothermal or Lumped thermal. Review the selected parameters, temperatures and limits before submitting.
For thermal simulations, the Heating model choices are Simplified, Standard (BPX) and Energy-conserving. Simplified uses the Bernardi irreversible term (V − U) × I; Standard follows the BPX standard. Energy-conserving follows the DFN energy-conservation formulation of Richardson and Korotkin, Heat Generation and a Conservation Law for Chemical Energy in Lithium-ion Batteries (paper; open-access preprint).
Explore results
Switch between Current/Power and Voltage/SoC. SoC offers Bulk (the default) or Particle surface, using concentration averaged across the positive electrode and the submitted stoichiometry limits. Bulk averages particle interiors; Particle surface uses their surface concentrations. For packs, select a section in the 3D view to inspect its plots; separate pack plots show electrical outputs and mean section temperature.
Thermal runs show temperature and heat sources. Switch between Accumulated energy in W·h (the default) and Instantaneous heating in watts. Energy-conserving adds a seven-component Loss breakdown; its Combined view includes a purple dashed line for irreversible heating without particle mixing. Downloads retain the original heat sources in watts. Spatial plots use the saved time slider and a fixed vertical scale across the run. Electrode concentration is the particle-volume average; surface concentration describes the particle surface.
Completed (partial results) means the solver stopped early with usable samples. These can still be plotted and downloaded. Open Simulation log for details and updates while a run is active.
Download results
Choose Download results, JSON or CSV, and the fields to save. Time is always included; current, voltage and temperature start selected. Select all includes all available fields and retains the model Header in JSON. JSON adds available coordinates for selected spatial profiles; CSV expands profiles into columns. Both formats use up to eight significant digits.
Every saved step preserves the native samples. An export interval of 0.1, 1, 10, 30, 60 or 300 seconds linearly interpolates time-dependent values and includes the exact final saved sample. This does not change the simulation's Maximum time step.
For saved SoC plots, include X-averaged positive electrode concentration and X-averaged positive electrode surface concentration in JSON, or use Select all. New portal JSON files also carry the required SoC parameters, model information and available pack geometry.
Load saved results
Choose Load results on the Set up simulation, Tokens or loaded-results page. With JavaScript enabled, completed version-2 JSON bundles saved by the portal or Python Client 2.0.0 open locally in the current tab, without uploading files or using tokens. CSV, BPX input files and raw result JSON are not supported.
Only saved fields can be displayed. Missing fields or SoC parameters show No data; spatial plots need their saved coordinates, and the 3D pack view needs geometry. Older files must identify their model. Refreshing or leaving requires selecting the file again. In this viewer, Download results saves the original JSON unchanged.
The portal stores neither result files nor simulation history. Download what you need before leaving a live run: reopening it requires the same browser and a still-valid temporary simulator credential. Signing out removes that access; saved JSON files remain usable.
6. Use the DandeLiion Python Client
DandeLiion Python Client 2.0 lets you submit simulations to API v2, monitor runs and retrieve results. To follow this example, you need Python 3.10 through 3.13 with pip, a BPX parameter file for your cell and an active token with at least one shared use remaining. You can download an example BPX file below. Set DANDELIION_API_TOKEN as shown in section 2.
In your terminal, run one of the two installation commands. The first installs the standard client.
python -m pip install dandeliion-client
To include PyBaMM for experiment validation, run this terminal command instead.
python -m pip install "dandeliion-client[pybamm]"
In a Python script or notebook, run the example below using the same Python environment. Replace BPX_file.json with the path to your BPX file. The example reads your token from the environment and submits one simulation.
import os
import dandeliion.client as dandeliion
api_url = "https://api.dandeliion.com"
api_token = os.environ["DANDELIION_API_TOKEN"]
simulator = dandeliion.Simulator(api_url, api_token)
# A BPX filename, pathlib.Path, valid BPX dictionary or BPX object
params = "BPX_file.json"
experiment = dandeliion.Experiment(
[
(
"Discharge at 10 A for 100 seconds",
"Rest for 10 seconds",
"Charge at 6 A for 100 seconds",
)
],
period="1 second",
)
solution = dandeliion.solve(
simulator=simulator,
params=params,
experiment=experiment,
)
print("Status:", solution.status)
print("Final voltage [V]:", solution["Voltage [V]"][-1])
The client accepts optional extra_params for settings such as mesh resolution, initial state of charge, thermal modelling and time-series input. Comprehensive API and Python Client documentation, including advanced model inputs, drive cycles, cancellation, result downloads and structured errors, is available at api.dandeliion.com.
7. Monitor a simulation and use its results
By default, solve() waits for the simulation to finish. For a long-running simulation, start it in non-blocking mode and inspect its status or server log:
solution = dandeliion.solve(
simulator=simulator,
params=params,
experiment=experiment,
is_blocking=False,
)
print(solution.status)
# queued, running, cancel_requested, succeeded,
# failed, cancelled or timed_out
print(solution.log)
solution.join() # wait until the run reaches a terminal state
Request cancellation of a queued or running simulation when it is no longer needed. For an already-running AWS Lambda invocation, cancellation is logical: the provider may continue executing, and results are discarded.
status = solution.cancel()
print(status) # cancel_requested or cancelled
A solution behaves like a dictionary. List the available outputs or access an individual result by name:
print(sorted(solution.keys()))
time = solution["Time [s]"]
voltage = solution["Voltage [V]"]
temperature = solution["Temperature [K]"]
Save a solution as an atomic, versioned JSON bundle. Client 2.0 does not store the API token, API origin or reusable server URLs in that file. To reconnect an unfinished run after closing your program, restore the bundle with the API URL and token again:
solution.dump("solution.json")
restored_solution = dandeliion.Simulator.restore(
"solution.json",
api_url=api_url,
api_key=api_token,
)
Completed results are streamed into the bundle without loading the entire response into memory. They can be restored offline with dandeliion.Simulator.restore("solution.json"), without an API URL or token. Restored fields are loaded only when accessed; selected-field bundles contain only the fields saved.
When a simulation is rejected
- Token rejected
- Check that the environment variable contains the complete token and that the token is active, unexpired and owned by an active account with uses remaining.
- Run failed
- Print
solution.logand check the BPX data, experiment instructions and optional parameters. - Authorisation uncertain
- Do not submit again with a new key. Keep the authorisation request ID reported by the client and provide it to DandeLiion support so the token use can be reconciled.
- Service error
- Retry later rather than immediately replacing a valid token. A temporary API or validation-service problem may be responsible.
8. Download or delete your account data
At the bottom of the Tokens page, choose Download account data to export your profile, quota, token metadata and legal-acceptance records as JSON. Full token secrets are never included.
Choose Delete account to start permanent account deletion. After confirmation, all active tokens are deactivated, login is disabled and identifying profile data is anonymised. Download any account data you want to keep first.
9. Understand BPX and download example parameters
These are the BPX files offered by the online simulator's parameter library. Download a file to use with the Python Client or upload it through Parameters → Upload BPX file. Each download contains the original library JSON, including its title, description and scientific references. Downloads are available without signing in and use no simulation allowance.
The portal accepts DFN parameter files with a BPX JSON version up to 0.5 and a maximum size of 2 MiB. The BPX website provides the specification and parameter descriptions to help you understand the fields. Get the BPX specification and parameter descriptions.
About:Energy Gen1 — NMC811, 5 Ah, 21700
About:Energy Gen1 Demo 21700 NMC811|graphite 5 Ah cell physics-based parameterisation, v2.0 (March 2025). This is a fictitious cell used for technology demonstration. Some data are taken from literature: Nyman et al. 2008 (doi:10.1016/j.electacta.2008.04.023); Chen et al. 2020 (doi:10.1149/1945-7111/ab9050); O'Regan et al. 2022 (doi:10.1016/j.electacta.2022.140700).
About:Energy Gen1 demonstration parameterisation v2.0 (March 2025). About:Energy source. BSD 3-Clause licence.
About:Energy LFP — 2 Ah, 18650
LFP|graphite 2 Ah cylindrical 18650 cell. Parameterisation by About:Energy Limited (aboutenergy.io), December 2022, based on cell cycling data, and electrode data gathered after cell teardown. Electrolyte properties from Nyman et al. 2008 (doi:10.1016/j.electacta.2008.04.023). Negative electrode entropic coefficient data are from O'Regan et al. 2022 (doi:10.1016/j.electacta.2022.140700). Positive electrode entropic coefficient data are from Gerver and Meyers 2011 (doi:10.1149/1.3591799). Other thermal properties are estimated.
About:Energy BPX parameterisation. About:Energy source. CC BY-SA 4.0 licence.
About:Energy NMC111 — 12.5 Ah pouch
NMC111|graphite 12.5 Ah pouch cell. Parameterisation by About:Energy Limited (aboutenergy.io), December 2022, based on cell cycling data, and electrode data gathered after cell teardown. Electrolyte properties from Nyman et al. 2008 (doi:10.1016/j.electacta.2008.04.023). Negative electrode entropic coefficient data are from O'Regan et al. 2022 (doi:10.1016/j.electacta.2022.140700). Positive electrode entropic coefficient data are from Viswanathan et al. 2010 (doi:10.1016/j.jpowsour.2009.11.103). Other thermal properties are estimated.
About:Energy BPX parameterisation. About:Energy source. CC BY-SA 4.0 licence.
LG M50 — Chen2020, NMC811/graphite, 5 Ah
LG M50 NMC811/graphite 5 Ah cylindrical cell, from Chen et al. (2020). Converted from PyBaMM 26.8.0.0 Chen2020 for the DFN model; 100% SOC uses the 4.2 V equilibrium endpoint. PyBaMM source: BSD-3-Clause. DOI: 10.1149/1945-7111/ab9050.
Chen et al. (2020), doi:10.1149/1945-7111/ab9050. PyBaMM source. BSD 3-Clause licence.
LG M50 — Chen2020 and O'Regan2022, NMC/graphite, 5 Ah
LG M50 NMC/graphite 5 Ah cylindrical cell, combining Chen et al. (2020) and O'Regan et al. (2022). This parameterisation set extends the existing Chen2020 parameter set with the updated reference concentrations, kinetics, stoichiometric limits, entropic coefficients and transport activation energies. DOIs: 10.1149/1945-7111/ab9050; 10.1016/j.electacta.2022.140700.
This experimental hybrid applies fourteen scientific overrides from the DandeLiion 4s4p example to the Chen2020 base, covering reference concentrations, kinetics, stoichiometric limits, entropic coefficients and activation energies. It retains the base cell's full capacity, area and volume. The BSD 3-Clause licence covers the retained PyBaMM-derived base; the source example declares no additional licence for the overrides. Cite both Chen et al. and O'Regan et al. when using this set.
Chen et al. (2020), doi:10.1149/1945-7111/ab9050; O'Regan et al. (2022), doi:10.1016/j.electacta.2022.140700. Chen et al.; O'Regan et al. source. BSD 3-Clause (PyBaMM-derived base) licence.
Download LG M50 — Chen2020 and O'Regan2022, NMC/graphite, 5 Ah BPX JSON
Kokam — Marquis2019, LCO/graphite, 0.681 Ah
Kokam LCO/graphite pouch-cell parameterisation used by Marquis et al. (2019), with nominal model capacity 0.680616 Ah. Converted from PyBaMM 26.8.0.0 Marquis2019 for the DFN model, retaining its published functions and references. PyBaMM source: BSD-3-Clause. DOI: 10.1149/2.0341915jes.
Marquis et al. (2019), doi:10.1149/2.0341915jes. PyBaMM source. BSD 3-Clause licence.
Download Kokam — Marquis2019, LCO/graphite, 0.681 Ah BPX JSON
Mohtat2020 — NMC532/graphite pouch, 5 Ah
NMC532/graphite 5 Ah pouch-cell parameterisation from Mohtat et al. (2020). Converted from PyBaMM 26.8.0.0 Mohtat2020 for the DFN model, retaining its published functions and references. PyBaMM source: BSD-3-Clause. DOI: 10.1149/1945-7111/aba5d1.
Mohtat et al. (2020), doi:10.1149/1945-7111/aba5d1. PyBaMM source. BSD 3-Clause licence.