variables

Convert Expression To Json

Convert a PyBaMM expression string to JSON-serialized format.

The expression can use:

  • CoupledVariable("Variable Name") for model variables
  • Parameter("Parameter Name") for model parameters
  • InputParameter("Input Name") for optimization inputs
  • Standard math operations (+, -, *, /, **)

Example expression: CoupledVariable("Voltage [V]") - Parameter("Target Voltage")

Parameters

request : ExpressionToJsonRequest Request body containing the expression string

Returns

ExpressionToJsonResponse Response with the JSON-serialized PyBaMM symbol

post/variables/convert-expression-to-json

Request body

expressionstring required

Response

Successful Response

valueobject required

Changes

No recorded changes to this endpoint across all 1 revision of this API.