Previous topic

Symbol

Next topic

Variable

This Page

Parameter

class pybamm.Parameter(name, domain=[])[source]

A node in the expression tree representing a parameter

This node will be replaced by a Scalar node by :class`.Parameter`

Parameters:
  • name (str) – name of the node
  • domain (iterable of str, optional) – list of domains the parameter is valid over, defaults to empty list
evaluate_for_shape()[source]

Returns the scalar ‘NaN’ to represent the shape of a parameter. See pybamm.Symbol.evaluate_for_shape()

new_copy()[source]

See pybamm.Symbol.new_copy().

class pybamm.FunctionParameter(name, *children, diff_variable=None)[source]

A node in the expression tree representing a function parameter

This node will be replaced by a pybamm.Function node if a callable function is passed to the parameter values, and otherwise (in some rarer cases, such as constant current) a pybamm.Scalar node.

Parameters:
  • name (str) – name of the node
  • child (Symbol) – child node
  • diff_variable (pybamm.Symbol, optional) – if diff_variable is specified, the FunctionParameter node will be replaced by a pybamm.Function and then differentiated with respect to diff_variable. Default is None.
diff(variable)[source]

See pybamm.Symbol.diff().

evaluate_for_shape()[source]

Returns the sum of the evaluated children See pybamm.Symbol.evaluate_for_shape()

get_children_domains(children_list)[source]

Obtains the unique domain of the children. If the children have different domains then raise an error

new_copy()[source]

See pybamm.Symbol.new_copy().

set_id()[source]

See pybamm.Symbol.set_id()