Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Managing Physical Units

  • In GDM, all physical quantities are wrapped in pint objects (https://pypi.org/project/Pint/).

  • Users import physical quantities when building new models or updating model parameters.

    • Units are validated for all physical quantities.

    • All quantities are imported from gdm.quantities.

Creating Quantities

800 kilovar

The to method can be used for unit conversion

800000.0 var

The quantitiy models can be used with list and numpy arrays

[400 200 100] kilovar
[400000.0 200000.0 100000.0] var

Validation Limitations

1 validation error for DistributionBus
rated_voltage
  Assertion failed, Unit must be compatible with volt [type=assertion_error, input_value=<Quantity(400, 'ampere')>, input_type=Voltage]
    For further information visit https://errors.pydantic.dev/2.10/v/assertion_error