Previous topic

Independent Variable

Next topic

Array

This Page

Scalar

class pybamm.Scalar(value, name=None, domain=[])[source]

A node in the expression tree representing a scalar value.

Extends: Symbol

Parameters
  • value (numeric) – the value returned by the node when evaluated

  • name (str, optional) – the name of the node. Defaulted to str(value) if not provided

  • domain (iterable of str, optional) – list of domains the parameter is valid over, defaults to empty list

create_copy()[source]

See pybamm.Symbol.new_copy().

is_constant()[source]

See pybamm.Symbol.is_constant().

set_id()[source]

See pybamm.Symbol.set_id().

to_equation()[source]

Returns the value returned by the node when evaluated.

property value

The value returned by the node when evaluated.