Difference between revisions of "ConsistentUnits Command"
Line 4: | Line 4: | ||
== ConsistentUnits Command == | == ConsistentUnits Command == | ||
The <tt>ConsistentUnits</tt> command is currently not | The <tt>ConsistentUnits</tt> command is currently not supported for scripted input files. The problem is that the tools that create such files ([[NairnFEAMPM]] and [[NairnFEAMPMViz]]) enforce their own units that are currently incompatible with consistent units settings. This situation will change in the fuiture. | ||
Altthough visualization tools cannot create input files using consistent units, they can read (and correctly interpret) output from simulations generated from raw <tt>XML</tt> files that use consistent. The units are selected in tt>XML</tt> files using: | Altthough visualization tools cannot create input files using consistent units, they can read (and correctly interpret) output from simulations generated from raw <tt>XML</tt> files that use consistent. The units are selected in tt>XML</tt> files using: |
Revision as of 12:48, 2 June 2015
Introduction
NairnFEA and NairnMPM were initially developed using a specific set of units. The internal calculations were (for the most part) based on mm-g-seconds units (although there were some exceptions). The units for input of properties and output of results also usually followed this system, but not always. With the addition of the ConsistentUnits command (available since NairnFEA version 5, NairnMPM version 11, and OSParticulas version 2) all code can now be run in a new mode where input and output use consistent units and the user can specify any metric system of units.
ConsistentUnits Command
The ConsistentUnits command is currently not supported for scripted input files. The problem is that the tools that create such files (NairnFEAMPM and NairnFEAMPMViz) enforce their own units that are currently incompatible with consistent units settings. This situation will change in the fuiture.
Altthough visualization tools cannot create input files using consistent units, they can read (and correctly interpret) output from simulations generated from raw XML files that use consistent. The units are selected in tt>XML files using:
<ConsistentUnits length='(units)' mass='(units)' time='(units)/>
where the (units) settings determine metric units as follows:
- length can be km, m, dm cm, mm um (or microns), or nm
- mass can be kg, g, mg, or ug
- time can be s (or sec), ms (or msec), or us
Alternatively, if none of the length, mass, and time attributes are provided, the code will run with generic units for length (L), mass (M), and time (T). The default (if this command is not used) is to use "Legacy Units" (see below). If this command is used, you must specify all three attributes or specify none (to use generic units).
Table
The original system of units is called "Legacy Units" while the new method is called "Consistent Units." The Legacy units can still be used (to allow backward compatibility of old input files) and it corresponds to any input file that omits the ConsistentUnits in the main header. The units required when using "Legacy Units" and in and some common "Consistent Units" systems are in the following table (note that you can use an metric consistent units are are not limited to those listed in the table):
Unit | Legacy | Consistent | SI | mmgs | cgs |
---|---|---|---|---|---|
Length | mm | L | m | mm | cm |
Mass | g | M | kg | g | g |
Density | g/cm3 | M/L3 | kg/m3 | g/mm3 | g/cm3 |
Time | s | T | s | s | s |
Alt Time | ms | T | s | s | s |
Velocity | mm/s | L/T | m/s | mm/s | cm/s |
Alt Velocity | m/s | L/T | m/s | mm/s | cm/s |
Acceleration | mm/s2 | L/T2 | m/s2 | mm/s2 | cm/s2 |
Force | N | F = M-L/T2 | N | μN | dyne |
Pressure | MPa | P = F/L2 | Pa | Pa | Ba |
Alt Strain | % | none | none | none | none |
Energy | J | E = F-L | J | nJ | erg |
Energy Release | J/m2 | E/L2 | J/m2 | nJ/mm2 | erg/cm2 |
Stress Intensity | MPa-m0.5 | P-L0.5 | Pa-m0.5 | Pa-mm0.5 | Ba-cm0.5 |
Viscosity | cPoise | P-T | Pa-s | Pa-s | Poise |
Diffusion | mm2/s | L2/T | m2/s | mm2/s | cm2/s |
Solvent Flux | kg/(m2-s) | M/(L2-T) | kg/(m2-s) | g/(mm2s) | g/(cm2-s) |
Conductivity | W/(m-K) | E/(L-K-s) | W/(mm-K) | nW/(mm-K) | erg/(cm-K-s) |
Heat Capacity | J/(kg-K) | E/(M-K) | J/(kg-K) | nJ/(g-K) | erg/(g-K) |
Heat Flux | W/m2 | E/L2 | W/m2 | nW/mm2 | erg/cm2 |