Quantity#

class ansys.mechanical.stubs.v261.Ansys.Core.Units.Quantity(value: float, unit: str)#

Bases: object

Quantity class.

Overview#

Parse

Parse method.

TryParse

TryParse method.

__add__

op_Addition method.

__eq__

op_Equality method.

__ge__

op_GreaterThanOrEqual method.

__gt__

op_GreaterThan method.

__le__

op_LessThanOrEqual method.

__lt__

op_LessThan method.

__mod__

op_Modulus method.

__mul__

op_Multiply method.

__ne__

op_Inequality method.

__neg__

op_UnaryNegation method.

__pos__

op_UnaryPlus method.

__rtruediv__

__rtruediv__ method.

__sub__

op_Subtraction method.

__truediv__

op_Division method.

Abs

Abs method.

CompareTo

CompareTo method.

ConvertToComputationalUnit

ConvertToComputationalUnit method.

ConvertToComputationalUnitForUnitSystem

ConvertToComputationalUnitForUnitSystem method.

ConvertToUnitSystem

ConvertToUnitSystem method.

ConvertToUserUnit

ConvertToUserUnit method.

ConvertUnit

ConvertUnit method.

Equals

Equals method.

GetConvertedValue

GetConvertedValue method.

GetHashCode

GetHashCode method.

GetType

GetType method.

Pow

Pow method.

Round

Round method.

Sqrt

Sqrt method.

ToString

ToString method.

HasUnit

HasUnit property.

Unit

Unit property.

Value

Value property.

__pow__

__pow__ method.

__repr__

__repr__ method.

Property detail#

property Quantity.HasUnit: bool | None#

HasUnit property.

property Quantity.Unit: str | None#

Unit property.

property Quantity.Value: float | None#

Value property.

Method detail#

Quantity.Abs() Ansys.Core.Units.Quantity#

Abs method.

Quantity.CompareTo(quantityB: Ansys.Core.Units.Quantity) int#

CompareTo method.

Quantity.ConvertToComputationalUnit(useBasicUnits: bool) Ansys.Core.Units.Quantity#

ConvertToComputationalUnit method.

Quantity.ConvertToComputationalUnitForUnitSystem(quantityName: str, unitSystem: str, useBasicUnits: bool) Ansys.Core.Units.Quantity#

ConvertToComputationalUnitForUnitSystem method.

Quantity.ConvertToUnitSystem(unitSystem: str, quantityName: str) Ansys.Core.Units.Quantity#

ConvertToUnitSystem method.

Quantity.ConvertToUserUnit(quantityName: str) Ansys.Core.Units.Quantity#

ConvertToUserUnit method.

Quantity.ConvertUnit(newUnit: str) Ansys.Core.Units.Quantity#

ConvertUnit method.

Quantity.Equals(value: Ansys.Core.Units.Quantity) bool#

Equals method.

Quantity.GetConvertedValue(unit: str) float#

GetConvertedValue method.

Quantity.GetHashCode() int#

GetHashCode method.

Quantity.GetType() type#

GetType method.

classmethod Quantity.Parse(valueUnitString: str) Ansys.Core.Units.Quantity#

Parse method.

Quantity.Pow(exponent: float) Ansys.Core.Units.Quantity#

Pow method.

Quantity.Round(fractionalDigits: int, rounding: float | None) Ansys.Core.Units.Quantity#

Round method.

Quantity.Sqrt() Ansys.Core.Units.Quantity#

Sqrt method.

Quantity.ToString() str#

ToString method.

classmethod Quantity.TryParse(valueStringQuantity: str, result: Ansys.Core.Units.Quantity) bool#

TryParse method.

classmethod Quantity.__add__(quantityA: Ansys.Core.Units.Quantity, quantityB: Ansys.Core.Units.Quantity) Ansys.Core.Units.Quantity#

op_Addition method.

classmethod Quantity.__eq__(other: float, quantity: Ansys.Core.Units.Quantity) bool#

op_Equality method.

classmethod Quantity.__ge__(quantity: Ansys.Core.Units.Quantity, other: float) bool#

op_GreaterThanOrEqual method.

classmethod Quantity.__gt__(quantity: Ansys.Core.Units.Quantity, other: float) bool#

op_GreaterThan method.

classmethod Quantity.__le__(other: float, quantity: Ansys.Core.Units.Quantity) bool#

op_LessThanOrEqual method.

classmethod Quantity.__lt__(other: float, quantity: Ansys.Core.Units.Quantity) bool#

op_LessThan method.

classmethod Quantity.__mod__(quantityLeft: Ansys.Core.Units.Quantity, quantityRight: Ansys.Core.Units.Quantity) Ansys.Core.Units.Quantity#

op_Modulus method.

classmethod Quantity.__mul__(quantityA: Ansys.Core.Units.Quantity, quantityB: Ansys.Core.Units.Quantity) Ansys.Core.Units.Quantity#

op_Multiply method.

classmethod Quantity.__ne__(other: float, quantity: Ansys.Core.Units.Quantity) bool#

op_Inequality method.

classmethod Quantity.__neg__(quantityA: Ansys.Core.Units.Quantity) Ansys.Core.Units.Quantity#

op_UnaryNegation method.

classmethod Quantity.__pos__(quantityA: Ansys.Core.Units.Quantity) Ansys.Core.Units.Quantity#

op_UnaryPlus method.

Quantity.__pow__(exponent: Any) Any#

__pow__ method.

Quantity.__repr__() Any#

__repr__ method.

classmethod Quantity.__rtruediv__(a: Any, b: Ansys.Core.Units.Quantity) Ansys.Core.Units.Quantity#

__rtruediv__ method.

classmethod Quantity.__sub__(left: float, right: Ansys.Core.Units.Quantity) Ansys.Core.Units.Quantity#

op_Subtraction method.

classmethod Quantity.__truediv__(quantityA: Ansys.Core.Units.Quantity, quantityB: Ansys.Core.Units.Quantity) Ansys.Core.Units.Quantity#

op_Division method.