ConsistentUnits Command

From OSUPDOCS
Jump to navigation Jump to search

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.

td>J/(kg-K)
UnitLegacySI (kgms)mmgsmmgmscgscmμgμs
Length (L)mmmx103=mmx103=mmx102=cmx102=cm
Mass (M)gkgx103=gx103=gx103=gx109=μg
Time (T)sssx103=mssx106=μs
Alt Timemsssx103=mssx106=μs
Density (M/L3) g/cm3kg/m3x10-6=g/mm3x10-6=g/mm3x10-3=g/cm3x103=μg/cm3
Velocity (L/T)mm/sm/sx103=mm/smm/msx102=cm/sx10-4=cm/μs
Alt Velocitym/sm/sx103=mm/smm/msx102=cm/sx10-4=cm/μs
Acceleration (L/T2)mm/s2m/s2x103=mm/s2x10-3=mm/ms2x102=cm/s2x10-10=cm/μs2
Force (F=M-L/T2)NNx106=μNNx105=dynex10-1=Mdyne
Pressure (P=F/L2=M/(L-T2))MPaPaPaMPax10=Ba=μbarx10-5=bar=MBa
Linear Momentum (M-L/T)N-sN-sx106=μN-sx103=N-msx105=dyne-sx105=dyne-s
Alt Strain%nonenonenonenonenone
Energy (E=F-L=M-L2/T2)JJx109=nJx103=mJx107=ergx101=Merg
Alt EnergyμJJx109=nJx103=mJx107=ergx101=Merg
Torque (F-L=M-L2/T2)JJx109=nJx103=mJx107=ergx101=Merg
Angular Momentum (M-L2/T)J-sJ-sx109=nJ-sx106=mJ-msx107=erg-sx107=erg-s
Energy Release (E/L2=M/T2=F/L)J/m2J/m2x103=mJ/m2x10-3=mJ/mm2=kJ/m2x103=erg/cm2=mJ/m2x10-3=Merg/cm2=kJ/m2
Stress Intensity (P-L0.5=M/(L0.5-T2))MPa-m0.5Pa-m0.5x31.623=Pa-mm0.5x31.623=MPa-mm0.5x102=Ba-cm0.5x10-4=bar-cm0.5
Viscosity (P-T=M/(L-T))cPoisePa-sPa-sx10-3=MPa-ms=cPoisex10=Poisex10=Poise
Diffusion (L2/T)mm2/sm2/sx106=mm2/sx103=mm2/msx104=cm2/sx10-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)x104=erg/(g-K)x10-8=Merg/(μg-K)
Heat Flux (E/(T-L2)=M/T3)W/m2W/m2x103=mW/m2x10-6=W/mm2x103=erg/(cm2-s)x10-9=Merg/(cm2-μs)
Heat of Fusion (E/M=L2/T2)J/kgJ/kgx106=μJ/kgJ/kgx104=erg/gx10-8=Merg/μg