engcalc Code
Status: Beta
Brought to you by:
jrbrtsn
engcalc is a command line driven calculator program which can perform
dimensional analysis, and manage physical units for you. The name of the
executable program is clc for historical reasons, and which is an acronym for
"command line calculator". clc is integrated with the GNU readline and
history libraries, and provides TAB key completion for many items.
When run interactively, clc displays a command prompt, "clc>", indicating it
is ready to process typed input. All inputs fall into two categories; backslash
commands, which begin with a '\', or math expressions, possibly with symbol
assignment. Here is a simple session:
clc>
OUTPUT: Units System= mks, Mode= decimal, Format String= %Lg
AtWt = 4.0026 gram/mole
Wt = 4.44822 N
V = 0.0378541 m^3
T = 305.372 K
n = Wt/G/AtWt = 113.175 mole
P = n * R * T / V = 7.59103e+06 pa
clc> \do for Wt= 1 kgf. to 3 kgf. in 10 print n,P
Wt (N) | n (mole) | P (pa) |
---------|----------|-------------|
9.80665 | 249.508 | 1.67354e+07 |
11.9859 | 304.954 | 2.04543e+07 |
14.1652 | 360.401 | 2.41733e+07 |
16.3444 | 415.847 | 2.78923e+07 |
18.5237 | 471.293 | 3.16112e+07 |
20.7029 | 526.739 | 3.53302e+07 |
22.8822 | 582.186 | 3.90492e+07 |
25.0614 | 637.632 | 4.27681e+07 |
27.2407 | 693.078 | 4.64871e+07 |
29.42 | 748.524 | 5.02061e+07 |