armi.matProps.function module

Generic class for a function to be defined in a YAML.

class armi.matProps.function.Function(mat, prop)[source]

Bases: object

An base class for computing material Properties. The word “function” here is used in the mathematical sense, to describe a generic mathematical curve. The various Function types are read in from YAML, and interpreted at run time. The sub-classes of Function have specific requirements on the YAML format.

Constructor for base Function class.

Parameters:
  • mat (Material) – Material object with which this Function is associated

  • prop (Property) – Property that is represented by this Function

FUNCTION_NODES = {'equation', 'functions', 'reference temperature', 'tabulated data', 'type'}
material

A pointer back to the parent Material for this Function.

property

The Property this Function represents.

tableData

A TableFunction containing verification data for this specific function. Note that for actual TableFunction instances, the tableData property is NULL.

clear()[source]
static isTable()[source]

Returns True if a subclass of TableFunction, otherwise False.

getReferenceTemperature()[source]

Returns the reference temperature, in Celcius, if it is defined.

Returns:

Reference temperature, in Celcius

Return type:

float

getIndependentVariables()[source]

Returns the independent variables that are required for this function.

Returns:

list of independent variable strings

Return type:

list

getMinBound(var) float[source]

Returns the minimum bound for the requested variable.

Returns:

Minimum valid value

Return type:

float

getMaxBound(var) float[source]

Returns the minimum bound for the requested variable.

Returns:

Maximum valid value

Return type:

float

property references: list
calc(point: dict = None, **kwargs)[source]

Calculate the quantity of a specific Property.

The user must provide a “point” dictionary, or kwargs, but not both or neither.

Parameters:
  • point (dict) – dictionary of independent variable/value pairs

  • kwargs – dictionary of independent variable/value pairs, same purpose but to allow a nicer API.

Returns:

property evaluation

Return type:

float

inRange(point: dict) bool[source]

Determine if a point is within range of the function.

Parameters:

point (dict) – dictionary of independent variable/value pairs

Returns:

True if the point is in the valid range, False otherwise.

Return type:

bool