Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
GNU Units
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Examples == The examples that follow show results from GNU ''units'' version 2.10. === Interactive mode === <!-- GNU units version 2.10, Windows XP SP3 --> <pre> Currency exchange rates from www.timegenie.com on 2014-03-28 2729 units, 92 prefixes, 77 nonlinear units You have: 10 furlongs You want: miles * 1.25 / 0.8 You have: 1 gallon + 3 pints You want: quarts * 5.5 / 0.18181818 You have: sqrt(meter) ^ Unit not a root You have: sqrt(acre) You want: ft * 208.71033 / 0.0047913298 You have: 21 btu + 6500 ft lbf You want: btu * 29.352939 / 0.034068139 You have: _ You want: J * 30968.99 / 3.2290366e-005 You have: 3.277 hr You want: time 3 hr + 16 min + 37.2 sec You have: 1|2 inch You want: cm * 1.27 / 0.78740157 </pre> The underscore ('_') is used to indicate the result of the last successful unit conversion. === On the command line (non-interactive) === <!-- GNU units version 2.10, Windows XP SP3, cmd.exe --> <syntaxhighlight lang="doscon"> C:\>units "ten furlongs per fortnight" "kilometers per hour" * 0.0059871429 / 167.02458 </syntaxhighlight> <!-- GNU units version 2.10, Windows XP SP3, PTC MKS C shell --> <syntaxhighlight lang="console"> % units cup ounces conformability error 0.00023658824 m^3 0.028349523 kg </syntaxhighlight> === Complex units expressions === One form of the [[Darcy–Weisbach equation]] for [[fluid flow]] is : <math>\Delta P = \frac {8} {\pi^2} \rho fL \frac {Q^2} {d^5} \,,</math> where Δ''P'' is the pressure drop, ''ρ'' is the mass density, ''f'' is the (dimensionless) friction factor, ''L'' is the length of the pipe, ''Q'' is the volumetric flow rate, and ''d'' is the pipe diameter. It might be desirable to have the equation in the form : <math>\Delta P = A_1 \,\rho fL \frac {Q^2} {d^5}</math> that would accept typical US units; the constant ''A''<sub>1</sub> could be determined manually using the [[Units conversion by factor-label|unit-factor method]], but it could be determined more quickly and easily using ''units'':<ref>GNU units version 2.10, Windows XP SP3, PTC MKS Korn shell</ref> <syntaxhighlight lang="console"> $ units "(8/pi^2)(lbm/ft^3)ft(ft^3/s)^2(1/in^5)" psi * 43.533969 / 0.022970568 </syntaxhighlight> Crane Technical Paper No. 410,<ref> {{Cite book|title=''Technical Paper No. 410,'' Flow of Fluids through Valves, Fittings, and Pipe|publisher=Crane Co|location=New York|year=1985|url=http://www.flowoffluids.com/publications/crane-tp-410.aspx}} </ref> Eq. 3-5, gives the multiplicative value as 43.5.
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
GNU Units
(section)
Add topic