discovery

Validate Pybamm Model Config

Try to instantiate a pybamm/ionworks model with the given options.

Lightweight check that catches bad combinations of model name + options before a record is persisted. Builds the model in-process — same code path ModelService.get_pybamm_model_from_config uses at simulation time — and reports whether construction succeeded.

On failure the response carries the underlying exception's message verbatim (typically a pybamm OptionError / ValueError) so the caller can act on it.

The model is built and dropped; nothing is written to the database.

post/discovery/pybamm_models/validate

Request body

pybamm_modelstring required

Class name to instantiate, e.g. 'DFN', 'SPM', 'ECM'. Must be one of the names returned by GET /discovery/pybamm_models.

modulestring

PyBaMM submodule the class lives under ('lithium_ion' or 'lead_acid'). Ignored for ionworks-specific models.

optionsobject

Options dict to pass to the model constructor.

Response

Successful Response

object required

Changes