TQGPD
Fortran |
TQGPD (INDEXP, NSUB, NSCON, SITES, YFRAC, EXTRA, IWSG, IWSE) |
|
---|---|---|
C-interface |
tq_gpd(TC_INT indexp,TC_INT* nsub,TC_INT* nscon,TC_FLOAT* sites,TC_FLOAT* yfrac,TC_FLOAT* extra,TC_INT* iwsg,TC_INT* iwse); |
|
Full name: |
Get Phase Data. |
|
Purpose: |
The application program can get data for the constituents of a phase. |
|
Comments: |
With this subroutine the application program can determine the structure of the phase and the fraction of the constituents and other things. Note that YFRAC is constituent fraction, not mole fractions.A substitutional phase has NSUB equal to 1, which is identical to no sublattice. That is true for the gas phase too. The maximum number of sublattices are 10. The constituents of a phase are numbered sequentially from 1 for the first constituent on the first sublattice, to NPCON (See TQGNPC) for the last constituent on the last sublattice. NSCON (L) is the number of constituents on sublattice L. The sum of NSCON over all sublattices is equal to NPCON. Note that constituents that are DORMANT and SUSPENDED still are counted in NPCON and NSCON. They also have a fraction in YFRAC (which must be zero of course). EXTRA may contain extra information about the phase, total mass for example. These are yet to be defined. |
|
Arguments |
||
Name |
Type |
Value set on call or returned |
INDEXP |
Integer |
Set to a phase index |
NSUB |
Integer |
Return the number of sublattices. |
NSCON |
Integer array |
Return the number of constituents on each sublattice. |
SITES |
Double precision array |
Return the number of sites on each sublattice. |
YFRAC |
Double precision array |
Return the fractions of the constituents. |
EXTRA |
Double precision array |
Return some special values (see Comments) |
IWSG |
Integer array |
Workspace |
IWSE |
Integer array |
Workspace |

To list the constituent names and fractions by sublattices. It is assumed that there are max 10 sublattices and max 500 constituents on all sublattices altogether.
DIMENSION NSCON(10),SITES(10),YFRAC(500),EXTRA(5)
CHARACTER NAME*24
LOGICAL TQGSPC
...
CALL TQGPN(INDEXP,NAME,IWSG,IWSE)
CALL TQGPD(INDEXP,NSUB,NSCON, SITES,YFRAC,EXTRA, &IWSG,IWSE)
KK=0
WRITE(*,190)NAME,NSUB
190 FORMAT(' The phase ',A,' has ',I2,' sublattices')
DO 300 LS=1,NSUB
WRITE(*,191)LS,SITES(LS),NSCON(LS)
191 FORMAT('On sublattice ',I2,' there are ',F8.4,&' sites and',I3,' constituents')
DO 200 LC=1,NSCON(LS)
KK=KK+1
CALL TQGPCN(INDEXP,KK,NAME,IWSG,IWSE)
WRITE(*,192)NAME,YFRAC(KK)
192 FORMAT('Constituent ',A,' has fraction',&1P1E15.8)
200 CONTINUE
300 CONTINUE

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.