Bases: object
a general class to define a physical unit and convert from this unit to an appropriate SI unit.
Unit object have a dual purpose: Firstly physical units can be combined through ,/ and * to form new physical units or to add prefixes such as Milli to m to form mm=Milli*m. Moreover, a given floating point number x (or any other arithmetic object) can be converted from the physical unit to the SI system, eg. 10*mm to create the value for 10mm which is the float number 0.01 in the SI system. In addition, a value in the SI unit can be converted back to the given unit, eg. to express 0.01m in physical units of mm use 0.01/mm which will return 10.
Returns the long name of the physical unit
Returns: | name of the physical unit |
---|---|
Return type: | str |
Returns the name of the physical unit
Returns: | name of the physical unit |
---|---|
Return type: | str |
Sets the long name of the physical unit
Parameters: | name (str) – new long name of the physical unit |
---|
Sets the name of the physical unit
Parameters: | name (str) – new name of the physical unit |
---|
Bases: esys.escript.unitsSI.Unit
Returns the long name of the physical unit
Returns: | name of the physical unit |
---|---|
Return type: | str |
Returns the name of the physical unit
Returns: | name of the physical unit |
---|---|
Return type: | str |
Sets the long name of the physical unit
Parameters: | name (str) – new long name of the physical unit |
---|
Sets the name of the physical unit
Parameters: | name (str) – new name of the physical unit |
---|
Bases: esys.escript.unitsSI.Unit
Returns the long name of the physical unit
Returns: | name of the physical unit |
---|---|
Return type: | str |
Returns the name of the physical unit
Returns: | name of the physical unit |
---|---|
Return type: | str |
Sets the long name of the physical unit
Parameters: | name (str) – new long name of the physical unit |
---|
Sets the name of the physical unit
Parameters: | name (str) – new name of the physical unit |
---|
Bases: esys.escript.unitsSI.Unit
Returns the long name of the physical unit
Returns: | name of the physical unit |
---|---|
Return type: | str |
Returns the name of the physical unit
Returns: | name of the physical unit |
---|---|
Return type: | str |
Sets the long name of the physical unit
Parameters: | name (str) – new long name of the physical unit |
---|
Sets the name of the physical unit
Parameters: | name (str) – new name of the physical unit |
---|