Scalar

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

A node in the expression tree representing a scalar value.

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

  • **Extends (** Symbol) –

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.