Oasys.THIS.Units class

Constants

Units.ACCELERATION

Acceleration units

Units.AREA

Area units

Units.CHARGE

Charge units

Units.CONDUCTIVITY

Conductivity units

Units.CURRENT

Current units

Units.DENSITY

Density units

Units.DISPLACEMENT

Displacement units

Units.ELECTRIC_FIELD_VECTOR

Electric Field Vector units

Units.ENERGY

Energy units

Units.ENERGY_DENSITY

Energy Density units

Units.FLOW_RATE

Flow Rate units

Units.FLUX

Thermal Flux units

Units.FORCE

Force units

Units.FORCE_WIDTH

Force per unit width units

Units.FREQUENCY

Frequency units

Units.HEAT_TRANSFER_COEFF

Heat Transfer coefficient units

Units.INDUCTANCE

Inductance units

Units.INERTIA

Inertia units

Units.LENGTH

Length units

Units.MAGNETIC_FLUX_VECTOR

Magnetic Flux Vector units

Units.MASS

MAss units

Units.MASS_FLOW

Mass Flow rate units

Units.MOMENT

Moment units

Units.MOMENTUM

Momentum units

Units.MOMENT_WIDTH

Moment per unit width units

Units.NONE

No units

Units.POWER

Power units

Units.PRESSURE

Pressure units

Units.Q_CRITERION

Q Criterion units

Units.RESISTANCE

Resistance units

Units.ROTATION

Rotation units

Units.ROTATIONAL_ACCELERATION

Rotational Acceleration units

Units.ROTATIONAL_VELOCITY

Rotational Velocity units

Units.STRAIN

Strain units

Units.STRESS

Stress units

Units.TEMPERATURE

Temperature units

Units.THERMAL_DIFFUSIVITY

Thermal Diffusivity units

Units.TIME

Time units

Units.UNKNOWN

Unknown units

Units.VECTOR_POTENTIAL

Vector Potential units

Units.VELOCITY

Velocity units

Units.VISCOSITY

Viscosity units

Units.VOLTAGE

Voltage units

Units.VOLUME

Volume units

Units.VORTICITY

Vorticity units

Units.WORK

Work units

Static methods

classmethod Units.USER(mass, time, length, angle, temperature, current=Oasys.gRPC.defaultArg)

Setup a user defined UNIT

Parameters:
  • mass (float) – Power for mass dimensions

  • time (float) – Power for time dimensions

  • length (float) – Power for length dimensions

  • angle (float) – Power for angle dimensions

  • temperature (float) – Power for temperature dimensions

  • current (float) – Optional. Power for current dimensions

Returns:

integer

Return type:

int

Example

To set the y-axis unit of curve l to (m/s)^2:

y_unit = Oasys.THIS.Units.USER(0.0,2.0,-2.0,0.0,0.0,0.0)

Instance methods

Units.GetDisplayUnits()

Returns the Display units

Returns:

String indicating the display unit system

Return type:

str

Example

To get the display units

units = Oasys.THIS.Units.GetDisplayUnits()
Units.SetDisplayUnits(unit_system)

Sets the display units to the units provided by the user

Parameters:

unit_system (String) – The unit system you want to set the display units to

Returns:

True if the Display units are set successfully else False

Return type:

bool

Example

To set the display units to “U2”

Oasys.THIS.Units.SetDisplayUnits("U2")