Difference between revisions of "ConsistentUnits Command"
(25 intermediate revisions by the same user not shown) | |||
Line 26: | Line 26: | ||
== Legacy and Consistent Units == | == 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. | 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>i.e.</i>, input properties are scaled by ratio of mm-g-s column to Legacy column conversion factors). | ||
<table border="1" cellpadding="2" cellspacing="0" width="90%" align="center"> | <table border="1" cellpadding="2" cellspacing="0" width="90%" align="center"> | ||
<tr><th>Unit</th><th>Legacy</th><th>SI ( | <tr><th>Unit</th><th>Legacy</th><th>SI (kg-m-s)</th><th>mm-g-s</th><th>mm-g-ms</th><th>c-g-s</th><th>cm-μg-μs</th> | ||
</tr> | </tr> | ||
<tr><td>Length (L)</td><td>mm</td><td>m</td><td>x10<sup>3</sup>=mm</td><td>x10<sup>3</sup>=mm</td><td>x10<sup>2</sup>=cm</td><td>x10<sup>2</sup>=cm</td> | <tr><td>Length (L)</td><td>x10<sup>3</sup>=mm</td><td>m</td><td>x10<sup>3</sup>=mm</td><td>x10<sup>3</sup>=mm</td><td>x10<sup>2</sup>=cm</td><td>x10<sup>2</sup>=cm</td> | ||
</tr> | </tr> | ||
<tr><td>Mass (M)</td><td>g</td><td>kg</td><td>x10<sup>3</sup>=g</td><td>x10<sup>3</sup>=g</td><td>x10<sup>3</sup>=g</td><td>x10<sup>9</sup>=μg</td> | <tr><td>Mass (M)</td><td>x10<sup>3</sup>=g</td><td>kg</td><td>x10<sup>3</sup>=g</td><td>x10<sup>3</sup>=g</td><td>x10<sup>3</sup>=g</td><td>x10<sup>9</sup>=μg</td> | ||
</tr> | </tr> | ||
Line 42: | Line 42: | ||
</tr> | </tr> | ||
<tr><td>Alt Time</td><td>ms</td><td>s</td><td>s</td><td>x10<sup>3</sup>=ms</td><td>s</td><td>x10<sup>6</sup>=μs</td> | <tr><td>Alt Time</td><td>x10<sup>3</sup>=ms</td><td>s</td><td>s</td><td>x10<sup>3</sup>=ms</td><td>s</td><td>x10<sup>6</sup>=μs</td> | ||
</tr> | </tr> | ||
<tr><td>Density (M/L<sup>3</sup>) </td><td>g/cm<sup>3</sup></td><td>kg/m<sup>3</sup></td><td>x10<sup>-6</sup>=g/mm<sup>3</sup></td><td>x10<sup>-6</sup>=g/mm<sup>3</sup></td><td>x10<sup>-3</sup>=g/cm<sup>3</sup></td><td>x10<sup>3</sup>=μg/cm<sup>3</sup></td> | <tr><td>Density (M/L<sup>3</sup>) </td><td>x10<sup>-3</sup>=g/cm<sup>3</sup></td><td>kg/m<sup>3</sup></td><td>x10<sup>-6</sup>=g/mm<sup>3</sup></td><td>x10<sup>-6</sup>=g/mm<sup>3</sup></td><td>x10<sup>-3</sup>=g/cm<sup>3</sup></td><td>x10<sup>3</sup>=μg/cm<sup>3</sup></td> | ||
</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> | ||
Line 54: | Line 54: | ||
</tr> | </tr> | ||
<tr><td>Acceleration (L/T<sup>2</sup>)</td><td>mm/s<sup>2</sup></td><td>m/s<sup>2</sup></td><td>x10<sup>3</sup>=mm/s<sup>2</sup></td><td>x10<sup>-3</sup>=mm/ms<sup>2</sup></td><td>x10<sup>2</sup>=cm/s<sup>2</sup></td><td>x10<sup>-10</sup>=cm/μs<sup>2</sup></td> | <tr><td>Acceleration (L/T<sup>2</sup>)</td><td>x10<sup>3</sup>=mm/s<sup>2</sup></td><td>m/s<sup>2</sup></td><td>x10<sup>3</sup>=mm/s<sup>2</sup></td><td>x10<sup>-3</sup>=mm/ms<sup>2</sup></td><td>x10<sup>2</sup>=cm/s<sup>2</sup></td><td>x10<sup>-10</sup>=cm/μs<sup>2</sup></td> | ||
</tr> | </tr> | ||
Line 60: | Line 60: | ||
</tr> | </tr> | ||
<tr><td>Pressure (P=F/L<sup>2</sup>=M/(L-T<sup>2</sup>))</td><td>MPa</td><td>Pa</td><td>Pa</td><td>MPa</td><td>x10=Ba=μbar</td><td>x10<sup>-5</sup>=bar=MBa</td> | <tr><td>Pressure (P=F/L<sup>2</sup>=M/(L-T<sup>2</sup>))</td><td>x10<sup>-6</sup>=MPa</td><td>Pa</td><td>Pa</td><td>x10<sup>-6</sup>=MPa</td><td>x10=Ba=μbar</td><td>x10<sup>-5</sup>=bar=MBa</td> | ||
</tr> | </tr> | ||
Line 66: | Line 66: | ||
</tr> | </tr> | ||
<tr><td>Alt Strain</td><td>%</td><td>none</td><td>none</td><td>none</td><td>none</td><td>none</td> | <tr><td>Alt Strain</td><td>x10<sup>2</sup>=%</td><td>none</td><td>none</td><td>none</td><td>none</td><td>none</td> | ||
</tr> | </tr> | ||
Line 72: | Line 72: | ||
</tr> | </tr> | ||
<tr><td>Alt Energy</td><td>μJ</td><td>J</td><td>x10<sup>9</sup>=nJ</td><td>x10<sup>3</sup>=mJ</td><td>x10<sup>7</sup>=erg</td><td>x10<sup>1</sup>=Merg</td> | <tr><td>Alt Energy</td><td>x10<sup>6</sup>=μJ</td><td>J</td><td>x10<sup>9</sup>=nJ</td><td>x10<sup>3</sup>=mJ</td><td>x10<sup>7</sup>=erg</td><td>x10<sup>1</sup>=Merg</td> | ||
</tr> | </tr> | ||
Line 84: | Line 84: | ||
</tr> | </tr> | ||
<tr><td>Stress Intensity (P-L<sup>0.5</sup>=M/(L<sup>0.5</sup>-T<sup>2</sup>))</td><td>MPa-m<sup>0.5</sup></td><td>Pa-m<sup>0.5</sup></td><td>x31.623=Pa-mm<sup>0.5</sup></td><td>x31.623=MPa-mm<sup>0.5</sup></td><td>x10<sup>2</sup>=Ba-cm<sup>0.5</sup></td><td>x10<sup>-4</sup>=bar-cm<sup>0.5</sup></td> | <tr><td>Stress Intensity (P-L<sup>0.5</sup>=M/(L<sup>0.5</sup>-T<sup>2</sup>))</td><td>x10<sup>-6</sup>=MPa-m<sup>0.5</sup></td><td>Pa-m<sup>0.5</sup></td><td>x31.623=Pa-mm<sup>0.5</sup></td><td>x31.623=MPa-mm<sup>0.5</sup></td><td>x10<sup>2</sup>=Ba-cm<sup>0.5</sup></td><td>x10<sup>-4</sup>=bar-cm<sup>0.5</sup></td> | ||
</tr> | </tr> | ||
<tr><td>Viscosity (P-T=M/(L-T))</td><td>cPoise</td><td>Pa-s</td><td>Pa-s</td><td>x10<sup>-3</sup>=MPa-ms | <tr><td>Viscosity (P-T=M/(L-T))</td><td>x10<sup>3</sup>=cPoise</td><td>Pa-s</td><td>Pa-s</td><td>x10<sup>-3</sup>=MPa-ms</td><td>x10=Poise</td><td>x10=Poise</td> | ||
</tr> | </tr> | ||
<tr><td>Diffusion (L<sup>2</sup>/T)</td><td>mm<sup>2</sup>/s</td><td>m<sup>2</sup>/s</td><td>x10<sup>6</sup>=mm<sup>2</sup>/s</td><td>x10<sup>4</sup>=cm<sup>2</sup>/s</td><td>x10<sup>-2</sup>=cm<sup>2</sup>/μs</td> | <tr><td>Diffusion (L<sup>2</sup>/T)</td><td>x10<sup>6</sup>=mm<sup>2</sup>/s</td><td>m<sup>2</sup>/s</td><td>x10<sup>6</sup>=mm<sup>2</sup>/s</td><td>x10<sup>3</sup>=mm<sup>2</sup>/ms</td><td>x10<sup>4</sup>=cm<sup>2</sup>/s</td><td>x10<sup>-2</sup>=cm<sup>2</sup>/μs</td> | ||
</tr> | </tr> | ||
<tr><td>Solvent Flux (M/(L<sup>2</sup>-T))</td><td>kg/(m<sup>2</sup>-s)</td><td>kg/(m<sup>2</sup>-s)</td><td>x10<sup>-3</sup>=g/(mm<sup>2</sup>-s)</td><td>x10<sup>-1</sup>=g/(cm<sup>2</sup>-s)</td><td>x10<sup>-1</sup>=g/(cm<sup>2</sup>-s)</td> | <tr><td>Solvent Flux (M/(L<sup>2</sup>-T))</td><td>kg/(m<sup>2</sup>-s)</td><td>kg/(m<sup>2</sup>-s)</td><td>x10<sup>-3</sup>=g/(mm<sup>2</sup>-s)</td><td>x10<sup>-6</sup>=g/(mm<sup>2</sup>-ms)</td><td>x10<sup>-1</sup>=g/(cm<sup>2</sup>-s)</td><td>x10<sup>-1</sup>=g/(cm<sup>2</sup>-s)</td> | ||
</tr> | </tr> | ||
<tr><td> | <tr><td>Power (E/T=M-L<sup>2</sup>/T<sup>3</sup>)</td><td>W</td><td>W</td><td>x10<sup>9</sup>=nW</td><td>W</td><td>x10<sup>7</sup>=erg/sec</td><td>x10<sup>-5</sup>=Merg/μs</td> | ||
</tr> | </tr> | ||
<tr><td> | <tr><td>Conductivity (E/(L-K-T)=M-L/(T<sup>3</sup>-K))</td><td>W/(m-K)</td><td>W/(m-K)</td><td>x10<sup>6</sup>=μW/(m-K)</td><td>x10<sup>-3</sup>=W/(mm-K)</td><td>x10<sup>5</sup>=erg/(cm-K-s)</td><td>x10<sup>-7</sup>=Merg/(cm-K-μs)</td> | ||
</tr> | </tr> | ||
<tr><td>Heat | <tr><td>Heat Capacity (E/(M-K)=L<sup>2</sup>/(T<sup>2</sup>-K))</td><td>J/(kg-K)</td><td>J/(kg-K)</td><td>x10<sup>6</sup>=μJ/(kg-K)</td><td>J/(kg-K)</td><td>x10<sup>4</sup>=erg/(g-K)</td><td>x10<sup>-8</sup>=Merg/(μg-K)</td> | ||
</tr> | </tr> | ||
<tr><td>Heat of Fusion (E/M=L<sup>2</sup>/T<sup>2</sup>)</td><td>J/kg</td><td>J/kg</td><td>x10<sup>6</sup>=μJ/kg</td><td>x10<sup>4</sup>=erg/g</td><td>x10<sup>-8</sup>=Merg/μg</td> | <tr><td>Heat Flux (E/(T-L<sup>2</sup>)=M/T<sup>3</sup>)</td><td>W/m<sup>2</sup></td><td>W/m<sup>2</sup></td><td>x10<sup>3</sup>=mW/m<sup>2</sup></td><td>x10<sup>-6</sup>=W/mm<sup>2</sup></td><td>x10<sup>3</sup>=erg/(cm<sup>2</sup>-s)</td><td>x10<sup>-9</sup>=Merg/(cm<sup>2</sup>-μs)</td> | ||
</tr> | |||
<tr><td>Heat of Fusion (E/M=L<sup>2</sup>/T<sup>2</sup>)</td><td>J/kg</td><td>J/kg</td><td>x10<sup>6</sup>=μJ/kg</td><td>J/kg</td><td>x10<sup>4</sup>=erg/g</td><td>x10<sup>-8</sup>=Merg/μg</td> | |||
</tr> | </tr> | ||
</table> | </table> |
Latest revision as of 11:59, 11 August 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) | x103=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)) | x10-6=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 | x102=% | none | none | none | none | none |
Energy (E=F-L=M-L2/T2) | J | J | x109=nJ | x103=mJ | x107=erg | x101=Merg |
Alt Energy | x106=μ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)) | x10-6=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)) | x103=cPoise | Pa-s | Pa-s | x10-3=MPa-ms | x10=Poise | x10=Poise |
Diffusion (L2/T) | x106=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) |
Power (E/T=M-L2/T3) | W | W | x109=nW | W | x107=erg/sec | x10-5=Merg/μ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 |