Previous topic

Variable

Next topic

Scalar

This Page

Independent Variable

class pybamm.IndependentVariable(name, domain=None, auxiliary_domains=None)[source]

A node in the expression tree representing an independent variable.

Used for expressing functions depending on a spatial variable or time

Parameters
  • name (str) – name of the node

  • domain (iterable of str) – list of domains that this variable is valid over

  • *Extends

to_equation()[source]

Convert the node and its subtree into a SymPy equation.

class pybamm.Time[source]

A node in the expression tree representing time.

Extends: Symbol

create_copy()[source]

See pybamm.Symbol.new_copy().

to_equation()[source]

Convert the node and its subtree into a SymPy equation.

class pybamm.SpatialVariable(name, domain=None, auxiliary_domains=None, coord_sys=None)[source]

A node in the expression tree representing a spatial variable.

Parameters
  • name (str) – name of the node (e.g. “x”, “y”, “z”, “r”, “x_n”, “x_s”, “x_p”, “r_n”, “r_p”)

  • domain (iterable of str) – list of domains that this variable is valid over (e.g. “cartesian”, “spherical polar”)

  • *Extends

create_copy()[source]

See pybamm.Symbol.new_copy().

pybamm.t = the independent variable time

A node in the expression tree representing time.

Extends: Symbol