TQGMDX

Fortran

TQGMDX(IP, NE, NCNV, NC, IWORK, WORK, YF, VARR, GM, DGDX, XF, IWSG, IWSE)

C-interface

tq_gmdx(TC_INT indexp,TC_INT ne,TC_INT ncnv,TC_INT nc,TC_INT* iwork, TC_FLOAT* work,TC_FLOAT* yf,TC_FLOAT* varr,TC_FLOAT* gm,TC_FLOAT* dgdx,TC_FLOAT* xf,TC_INT* iwsg,TC_INT* iwse);

Full name:

Get Gibbs energy and its partial derivative w.r.t. X-fraction.

Purpose:

Converting Gibbs energy and its 1st partial derivatives with respect to site fractions (VARR obtained by calling TQGMDY) to that w.r.t mole fractions for a phase.

Comments:

Uses the phase constitution properties obtained by TQGPHP as input. Note VARR obtained by calling TQGMDY is in unit of J/mole of formula unit. GM and DGDX in the present subroutine is in unit of J/mole of atoms.

For the use of this subroutine together with TQGPHP and TQX2Y, see Example 10.

Arguments

Name

Type

Value set on call or returned

IP

Integer

Set to a phase index.

NE

Integer

Set to number of components

NCNV

Integer

Set to number of constituents without counting vacancies

NC

Integer

Set to number of constituents

IWORK

Integer array

Set to values needed in X to Y conversion

WORK

Double precision array

Set to values needed in X to Y conversion

YF

Double precision array

Set to site fractions

VARR

Double precision array

Set to Gibbs energy and its first derivative with respect to site fractions

GM

Double precision

Return Gibbs energy

DGDX

Double precision array

Return Gibbs energy and its first derivative with respect to mole fractions

XF

Double precision array

Return mole fractions

IWSG

Integer array

Workspace

IWSE

Integer array

Workspace