HyperWorks Solvers

Units

Units

Previous topic Next topic No expanding text in this topic  

Units

Previous topic Next topic JavaScript is required for expanding text JavaScript is required for the print function  

Model Element


Class Name

Units

Description

Units defines the units for the model being defined.  It allows you to specify four types of units: Mass, Length, Time, and Force.  The last is obviously a function of the first three and can be automatically calculated for a consistent set of units.  However, many unit systems are not "consistent", so it may be necessary to specify a force unit also.

Attribute Summary        

Name

Property

Modifiable by command?

force

Enum (Force,   default="NEWTON")

 

length

Enum (Length,  default="METER")

 

mass

Enum (Mass,    default="KILOGRAM")

 

time

Enum (Time,    default="SECOND")

 

ucf  

Double (default=None)

 

 

*Force=["CENTINEWTON",    "DYNE",          "KILOGRAM_FORCE",   "KNEWTON",  

       "KPOUND_FORCE",   "MEGANEWTON",    "MICRONEWTON",      "MILLINEWTON",  

       "NANONEWTON",     "NEWTON",        "OUNCE_FORCE",      "POUND_FORCE",

       "POUNDAL"]

 

*Length=["ANGSTROM",      "CENTIMETER",    "FOOT",             "KILOMETER",  

        "INCH",          "METER",         "MICROINCH",        "MICROMETER",  

        "MILE",          "MILLIMETER",    "MILLS",            "NANOMETER","YARD"]

 

*Mass=["GRAM",            "KILOGRAM",      "KPOUND_MASS",      "MILLIGRAM",  

      "MICROGRAM",       "NANOGRAM",      "OUNCE_MASS",       "POUND_MASS",  

      "SLINCH",          "SLUG","TONNE",  "US_TON"]

 

*Time=["DAY",             "HOUR",          "MICROSECOND",      "MILLISECOND",    

      "MINUTE",          "NANOSECOND",    "SECOND"]

 

Usage

Units may be defined in 3 different ways.

#1: Explicit specification of mass, length, time and force units

Units (force=string, length=string, mass=string, time=string)

 

#2: Selecting a predefined set of units

Units (system=string)

 

#3: With a units consistency factor only

Units (UCF=double)


Attribute Description

Explicit specification of mass, length, time and force units

force_unit

String

Defines the units for force.  Select one from:

“Ounce_Force”
“Pound_Force”
“Kpound_Force”
“Dyne”
“Newton”
“Kilogram_Force”
“KNewton”
“CentiNewton”
“MilliNewton”
“MicroNewton”
“MegaNewton”
“Poundal”
“NanoNewton”

 

The force_unit attribute is mandatory.

mass_unit

String

Defines the units for mass.  Select one from:

“Gram”
“Milligram”
“Kilogram”
“Megagram”
“Pound_Mass”
“Slug”
“Ounce_Mass”
“Kpound_Mass”
“Tonne”
“Microgram”
“Nanogram”
“US_Ton”
“Slinch”

The mass_unit attribute is mandatory.

length_unit

String

Defines the units for length.  Select one from:

“Inch”
“Foot”
“Mile”
“Millimeter”
“Centimeter”
“Meter”
“Kilometer”
“Nanometer”
“Angstrom”
“Yard”
“MilliInch”
“MicroInch”
“Mils”
“Micrometer”

The mass_unit attribute is mandatory

time_unit

String

Defines the time units.  Select one from:

“Millisecond”
“Second”
“Minute”
“Hour”
“Microsecond”
“Nanosecond”
“Day”

The time_unit attribute is mandatory

Selecting a predefined set of units

system

String

MotionSolve knows about the following sets of units. You can select from one of the following

"CGS"
"FPS"
"IPS"
"MKS"
"NONE"

When "NONE" is specified, MotionSolve uses the "MKS" system.

The system attribute is mandatory when you want to use a predefined set of Units.


Specify a units consistency factor


ucf

 

In lieu of specifying the mass, length, and time units, you can alternatively specify a Units Consistency Factor, UCF.  This factor should ensure that for the set that's chosen, Newton’s second law, F=MA, can still be used.

UCF has a default value of 1.0, so that when neither the units nor the mass multiplication factor are defined, the software assumes that the model has been defined in some (unknown) set of consistent units.


Comments

1.UCF is defined to the quantity that enables Newton’s Second law to be valid for an inconsistent set of units. Thus the 2nd law may be written as:

F = m * a * UCF

Therefore, UCF = F / (m*a).

Let’s see how this works for the example below.

Mass is specified in grams
Length is specified in micrometers
Time is specified in milliseconds
Force is specified in Newtons

We see that UCF does not have any units. It is just a factor.

1.See Properties, for an explanation about what properties are, why they are used and how you can extend these.
2.For a more detailed explanation about Units, see the Comments in the XML syntax section

 

Example

1.Define the SI unit system.

si = Units (force="Newton", mass="Kilogram", length="Meter", time="Second")

2.Set the UCF for example in Comment 1.

myunits = Units (ucf=1000)

3.Define the following units system.
Mass in Kilograms
Length in yards
Time in days
Force in Newtons

weirdUnits = Units (force="Newton", mass="Kilogram", length="Yard", time="Day")

 

>>> weirdUnits.time

‘Day’


4.Define the model to be in the British units system.

BritishUnits = Units (system="FPS")