Dimensions#
- class ansys.units.dimensions.Dimensions(dimensions: dict[BaseDimensions, int | float] | None = None, copy_from: Dimensions | None = None)#
Bases:
object
A representation of an arbitrary number of dimensions, where each dimension is a pair consisting of a base dimension and exponent.
A dictionary of
BaseDimensions
and exponent is required for a non-dimensionless object.If any keys are duplicated in
copy_from
anddimensions
then the associated values fromdimensions
are used.- Parameters:
- dimensions
dict
,optional
Dictionary of {
BaseDimensions
: exponent, …}.- system
UnitSystem
,optional
The unit system for the dimensions.
- copy_from
Dimensions
,optional
A previous instance of Dimensions.
- dimensions
- exception ansys.units.dimensions.IncorrectDimensions#
Bases:
ValueError
Raised on initialization if a dimension is not of type
BaseDimensions
.