TQGMA, TQGMB and TQGMC
Fortran |
TQGMA(INDEXP, TP, YF, VAL, IWSG, IWSE) TQGMB(INDEXP, TP, VAL, IWSG, IWSE) TQGMC(INDEXP, VAL, IWSG, IWSE) |
|
---|---|---|
C-interface |
tq_gma(TC_INT indexp,TC_FLOAT* tp,TC_FLOAT* yf,TC_FLOAT* val,TC_INT* iwsg,TC_INT* iwse);tq_gmb(TC_INT indexp,TC_FLOAT* tp,TC_FLOAT* val,TC_INT* iwsg,TC_INT* iwse); tq_gmc(TC_INT indexp,TC_FLOAT* val,TC_INT* iwsg,TC_INT* iwse); |
|
Full name: |
Get Gibbs Energy – Method A, B, and C. |
|
Purpose: |
Getting Gibbs energy of a phase if temperature, pressure, and site fractions are given as arguments or by other subroutines shown. |
|
Comments: |
The returned value is in J/mole of formula unit. Remember this subroutine requires no action of setting condition and calculating equilibrium. It is for getting the Gibbs energy of a single phase with given temperature, pressure and atomic arrangements no matter if the phase is stable, metastable, or unstable in competition with other phases. The application program should take care of the phase stability or phase equilibrium if it is of interest. |
|
Arguments |
||
Name |
Type |
Value set on call or returned |
INDEXP |
Integer |
Set to a phase index. |
TP |
Double precision array |
Set to temperature and pressure values. |
YF |
Double precision array |
Set to site fraction values in the index order of phase constituent. |
VAL |
Double precision |
Return Gibbs energy value. |
IWSG |
Integer array |
Workspace |
IWSE |
Integer array |
Workspace |

Note the following conventions to distinguish between the programming languages.
- Routines starting with TQXXX, for example, TQGDAT, are in the Fortran interface
- Routines starting with tq_xxxx, for example tq_gdat, are in the C-interface.
- In Fortran, all routines are subroutines and do not return any values except where explicitly declared as functions.
- All the C procedures are declared as void and do not return any values except where explicitly otherwise declared.
An example of how to read the subroutine definitions.