Material Components#

Material model and parameter

class ngapp.components.material.Constants#

Bases: object

Physical constants

class ngapp.components.material.QuantityInput(
ui_units: list[str] | str,
ui_value: str | None = None,
ui_label: str = '',
**kwargs,
)#

Bases: NumberInput

A float parameter with a unit

Parameters:
  • ui_units (list[str])

  • ui_value (str | None)

  • ui_label (str)

m_as(unit: str) float | None#

Converts the magnitute (float) in the given unit

Parameters:

unit (str)

Return type:

float | None

property quantity: Quantity | None#

The value of the parameter as quantity

to(unit: str) Quantity | None#

Converts the value to the given unit

Parameters:

unit (str)

Return type:

Quantity | None

property ui_label#

A text label that will “float” up above the input field, once the field gets focus

property unit#

The unit of the parameter