2.25: TQCSU | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
TOC | Group 1 | TQGSU | TQINSC | Group 2 | A-Z | Group 1 |
Use TQCSU to change the default or selected system unit for a specified quantity.
FORTRAN: CALL TQCSU(OPTION,UNIT,NOERR)
C: tqcsu(option,unit,&noerr)
;
Pascal: tqcsu(option,unit,noerr)
;
Basic: Call tqcsu(option,unit,noerr)
Name | Type | Value set on call or returned |
OPTION | CHARACTER | Set to a string as shown in Table 7 |
UNIT | CHARACTER | Set to a string as shown in Table 7 |
NOERR | INTEGER | Returns an error number |
OPTION and UNIT are both character inputs identifying a quantity and a unit, respectively. The selected units remain as they are until changed again using TQCSU, or reset to their defaults using TQINI or TQREMC. The first unit mentioned within each group in Table 7 is the default unit for a quantity.
FORTRAN: | View plain source code |
C Change system units
PROGRAM CAF9 IMPLICIT NONE
INTEGER NOERR
C Initialise ChemApp CALL TQINI(NOERR)
C Change system units C Changing pressure unit to torr CALL TQCSU('Pressure ','torr ', NOERR)
C Changing volume unit to cubic feet CALL TQCSU('Volume ','ft3 ', NOERR)
C Changing temperature unit to Fahrenheit CALL TQCSU('Temperature ','F ', NOERR)
C Changing energy unit to Btu CALL TQCSU('Energy ','Btu ', NOERR)
C Changing amount unit to pound CALL TQCSU('Amount ','pound ', NOERR)
END
C: | View plain source code |
/* Program cac9 */ /* Change system units */
#include "cacint.h"
int main() { LI noerr;
/* Initialise ChemApp */ tqini(&noerr);
/* Change units */ /* Changing pressure unit to torr */ tqcsu("Pressure","torr", &noerr);
/* Changing volume unit to cubic feet */ tqcsu("Volume","ft3", &noerr);
/* Changing temperature unit to Fahrenheit */ tqcsu("Temperature","F", &noerr);
/* Changing energy unit to Btu */ tqcsu("Energy","Btu", &noerr);
/* Changing amount unit to pound */ tqcsu("Amount","pound", &noerr);
return 0;
}
Table 7: Units permitted in ChemApp (TQGSU and TQCSU)
Quantity | Unit | Comment |
Pressure | bar | P/bar |
atm | P/atm = P/bar/1.01325 |
|
Pa | P/Pa = P/bar/0.00001 |
|
kPa | P/kPa = P/bar/0.01 |
|
psi | P/psi = P/bar/0.06894757 |
|
torr | P/torr = P/bar x 1.01325/760 |
|
Volume | dm3 | V/dm3 |
cm3 | V/cm3 = V/dm3/0.001 |
|
m3 | V/m3 = V/dm3/1000 |
|
ft3 | V/ft3 = V/dm3/28.316846592 |
|
in3 | V/in3 = V/dm3/0.016387064 |
|
Temperature | K | T/K |
C | T/C = (T/K - 273.15) |
|
F | T/F = 1.8 x (T/K - 273.15)+32 |
|
Energy | J | E/J |
cal | E/cal = E/J/4.184 |
|
Btu | E/Btu = E/J/1055.06 |
|
kWh | E/kWh = E/J/3,600,000 |
|
Amount | mol | M/mol |
gram | M/gram |
|
kg | M/gram/1,000 |
|
tonne | M/gram/1,000,000 |
|
pound | M/gram/453.59237 |
ChemApp Programmer's Manual, Edition 3.6 | © GTT-Technologies, 2003 |