Difference between revisions of "ConsistentUnits Command"
Line 48: | Line 48: | ||
</tr> | </tr> | ||
<tr><td>Velocity (L/T)</td><td>mm/s</td><td>m/s</td><td>x10<sup>3</sup>=mm/s</td><td>mm/ms</td><td>x10<sup>2</sup>=cm/s</td><td>x10<sup>-4</sup>=cm/μs</td> | <tr><td>Velocity (L/T)</td><td>x10<sup>3</sup>=mm/s</td><td>m/s</td><td>x10<sup>3</sup>=mm/s</td><td>mm/ms</td><td>x10<sup>2</sup>=cm/s</td><td>x10<sup>-4</sup>=cm/μs</td> | ||
</tr> | </tr> | ||
Revision as of 20:18, 2 January 2023
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. The old mode (which is still available) is called "Legacy Units" while the new mode is called "Consistent Units."
ConsistentUnits Command
If an input file has no ConsistentUnits command, the input file is assumed be using "Legacy" units. To convert to using any set of consistent, metric units, the file should add one ConsistentUnits command. In scripted files, the command is:
ConsistentUnits <(length),(mass),(time)>
and this command must be used before the Analysis Command. In XML files, the units are selected in the Header element using:
<ConsistentUnits length='(length)' mass='(mass)' time='(time)/>
where the the parameters in scripted command (and attributes in XML command) are:
- (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
In scripted files, you must provide all three parameters or none, where providing none will assume SI units of "m", "kg", and "s". If attributes are missing in XML files, they will be labeled as generic units of "L" for length, "M" for mass, and "T" for time.
When running with consistent units, you must make sure all other input commands and material properties are entered using the chosen units. When visualizing results in this system (i.e., using NairnFEAMPM and NairnFEAMPMViz), the visualization tools will read the units mode and display results in valid units (some options in those tools let you change the units used to display results). If you are visualizing results with third-party tools, the output results will be in the same consistent units used for input commands. A problems with using generic units (L, M, and T) is the output files have no documentation of units assumed for the calculations.
Legacy and Consistent Units
The following table lists possible units needed for entering parameters. The first column gives the name and its definition in terms of length (L), mass (M), time (T), and degrees Kelvin (K). The second column lists how to enter those terms in "Legacy" units mode. The third column lists SI or kg-m-s units. The remaining columns give consistent units for various units modes (you are not limited to these modes). To get a property in selected units mode, multiply SI-units property by factor in column for that mode. The "Alt" units entries only differ from their normal units when using "Legacy" mode. When inputting properties in "Legacy" units, all values are converted to the mm-g-s system for internal calculations (i.e., input properties are scaled by ratio of mm-g-s column to Legacy column conversion factors).
Unit | Legacy | SI (kg-m-s) | mm-g-s | mm-g-ms | c-g-s | cm-μg-μs |
---|---|---|---|---|---|---|
Length (L) | x103=mm | m | x103=mm | x103=mm | x102=cm | x102=cm |
Mass (M) | x103=g | kg | x103=g | x103=g | x103=g | x109=μg |
Time (T) | s | s | s | x103=ms | s | x106=μs |
Alt Time | x103=ms | s | s | x103=ms | s | x106=μs |
Density (M/L3) | x10-3=g/cm3 | kg/m3 | x10-6=g/mm3 | x10-6=g/mm3 | x10-3=g/cm3 | x103=μg/cm3 |
Velocity (L/T) | x103=mm/s | m/s | x103=mm/s | mm/ms | x102=cm/s | x10-4=cm/μs |
Alt Velocity | m/s | m/s | x103=mm/s | mm/ms | x102=cm/s | x10-4=cm/μs |
Acceleration (L/T2) | mm/s2 | m/s2 | x103=mm/s2 | x10-3=mm/ms2 | x102=cm/s2 | x10-10=cm/μs2 |
Force (F=M-L/T2) | N | N | x106=μN | N | x105=dyne | x10-1=Mdyne |
Pressure (P=F/L2=M/(L-T2)) | MPa | Pa | Pa | x10-6=MPa | x10=Ba=μbar | x10-5=bar=MBa |
Linear Momentum (M-L/T) | N-s | N-s | x106=μN-s | x103=N-ms | x105=dyne-s | x105=dyne-s |
Alt Strain | % | none | none | none | none | none |
Energy (E=F-L=M-L2/T2) | J | J | x109=nJ | x103=mJ | x107=erg | x101=Merg |
Alt Energy | μJ | J | x109=nJ | x103=mJ | x107=erg | x101=Merg |
Torque (F-L=M-L2/T2) | J | J | x109=nJ | x103=mJ | x107=erg | x101=Merg |
Angular Momentum (M-L2/T) | J-s | J-s | x109=nJ-s | x106=mJ-ms | x107=erg-s | x107=erg-s |
Energy Release (E/L2=M/T2=F/L) | J/m2 | J/m2 | x103=mJ/m2 | x10-3=mJ/mm2=kJ/m2 | x103=erg/cm2=mJ/m2 | x10-3=Merg/cm2=kJ/m2 |
Stress Intensity (P-L0.5=M/(L0.5-T2)) | MPa-m0.5 | Pa-m0.5 | x31.623=Pa-mm0.5 | x31.623=MPa-mm0.5 | x102=Ba-cm0.5 | x10-4=bar-cm0.5 |
Viscosity (P-T=M/(L-T)) | cPoise | Pa-s | Pa-s | x10-3=MPa-ms | x10=Poise | x10=Poise |
Diffusion (L2/T) | mm2/s | m2/s | x106=mm2/s | x103=mm2/ms | x104=cm2/s | x10-2=cm2/μs |
Solvent Flux (M/(L2-T)) | kg/(m2-s) | kg/(m2-s) | x10-3=g/(mm2-s) | x10-6=g/(mm2-ms) | x10-1=g/(cm2-s) | x10-1=g/(cm2-s) |
Conductivity (E/(L-K-T)=M-L/(T3-K)) | W/(m-K) | W/(m-K) | x106=μW/(m-K) | x10-3=W/(mm-K) | x105=erg/(cm-K-s) | x10-7=Merg/(cm-K-μs) |
Heat Capacity (E/(M-K)=L2/(T2-K)) | J/(kg-K) | J/(kg-K) | x106=μJ/(kg-K) | J/(kg-K) | x104=erg/(g-K) | x10-8=Merg/(μg-K) |
Heat Flux (E/(T-L2)=M/T3) | W/m2 | W/m2 | x103=mW/m2 | x10-6=W/mm2 | x103=erg/(cm2-s) | x10-9=Merg/(cm2-μs) |
Heat of Fusion (E/M=L2/T2) | J/kg | J/kg | x106=μJ/kg | J/kg | x104=erg/g | x10-8=Merg/μg |