Gems3k  3.1
GEMS3K standalone solver for geochemical equilibria
 All Classes Files Functions Variables Enumerations Enumerator
Public Member Functions | Protected Member Functions | Protected Attributes
TSolMod Class Reference
Inheritance diagram for TSolMod:
TBerman TCGFcalc TCORKcalc TDavies TDebyeHueckel TEUNIQUAC TGuggenheim THelgeson TIdeal TKarpov TLimitingLaw TMargules TModOther TNRTL TPitzer TPR78calc TPRSVcalc TRedlichKister TRegular TShvarov TSIT TSRKcalc TSTPcalc TSubregular TVanLaar TWilson

List of all members.

Public Member Functions

 TSolMod (SolutionData *sd)
 Generic constructor.
 TSolMod (long int NSpecies, char Mod_Code, double T_k, double P_bar)
 Generic constructor for DComp/DCthermo.
virtual ~TSolMod ()
 Destructor.
virtual long int PureSpecies ()
virtual long int PTparam ()
virtual long int MixMod ()
virtual long int ExcessProp (double *Zex)
virtual long int IdealProp (double *Zid)
long int UpdatePT (double T_k, double P_bar)
 Set new system state.
bool testSizes (SolutionData *sd)
void GetPhaseName (const char *PhName)
 Getting phase name.
void Get_lnGamma (double *lngamma)

Protected Member Functions

void alloc_multisite ()
 allocates memory for multisite data
long int init_multisite ()
 returns 0 if Ok or this is not a multi-site model; returns j >=1 - end member index for which the total site multiplicity is different from that for the previous end member (this is an error)
void free_multisite ()
 frees memory for sublattice data
long int IdealMixing ()
 Functions for calculation of configurational term for multisite ideal mixing.
double ideal_conf_entropy ()
 configurational entropy
void return_sitefr ()
 site fractions
void retrieve_sitefr ()
 site fractions

Protected Attributes

char ModCode
 Code of the mixing model.
char MixCode
 Code for specific EoS mixing rules.
char * DC_Codes
 Class codes of end members (species) ->NComp.
char PhaseName [MAXPHASENAME+1]
 Phase name (for specific built-in models)
long int NComp
 Number of components in the solution phase.
long int NPar
 Number of non-zero interaction parameters.
long int NPcoef
 Number of coeffs per parameter (columns in the aIPc table)
long int MaxOrd
 max. parameter order (or number of columns in aIPx)
long int NP_DC
 Number of coeffs per one DC in the phase (columns in aDCc)
long int NSub
 number of sublattices nS
long int NMoi
 number of moieties nM
long int * aIPx
 Pointer to list of indexes of non-zero interaction parameters.
double R_CONST
 R constant.
double Tk
 Temperature, K.
double Pbar
 Pressure, bar.
double * aIPc
 Table of interaction parameter coefficients.
double * aIP
 Vector of interaction parameters corrected to T,P of interest.
double * aDCc
 End-member properties coefficients.
double * aGEX
 Reciprocal energies, Darken terms, pure fugacities of DC (corrected to TP)
double * aPparc
 Output partial pressures (activities, fugacities) -> NComp.
double ** aDC
 Table of corrected end member properties at T,P of interest !!!!!! Move to GC EOS subclass!
double * aMoiSN
 End member moiety- site multiplicity number tables -> NComp x NSub x NMoi.
double * aSitFR
 Table of sublattice site fractions for moieties -> NSub x NMoi.
double * x
 Pointer to mole fractions of end members (provided)
double * aVol
 molar volumes of species (end members)
double * phVOL
 phase volume, cm3/mol (now obsolete) !!!!!!!!!!!! Check usage!
double Gex
double Hex
double Sex
double CPex
double Vex
double Aex
double Uex
 molar excess properties of the phase
double Gid
double Hid
double Sid
double CPid
double Vid
double Aid
double Uid
 molar ideal mixing properties
double Gdq
double Hdq
double Sdq
double CPdq
double Vdq
double Adq
double Udq
 molar Darken quadratic terms
double Grs
double Hrs
double Srs
double CPrs
double Vrs
double Ars
double Urs
 molar residual functions (fluids)
double * lnGamConf
double * lnGamRecip
double * lnGamEx
 Work arrays for lnGamma components.
double * lnGamma
 Pointer to ln activity coefficients of end members (check that it is collected from three above arrays)
double ** y
 table of moiety site fractions [NSub][NMoi]
double *** mn
 array of end member moiety-site multiplicity numbers [NComp][NSub][NMoi]
double * mns
 array of total site multiplicities [NSub]
double ** fjs
 array of site activity coefficients [NComp][NSub]

Constructor & Destructor Documentation

Generic constructor.

generic constructor (new)

TSolMod::TSolMod ( long int  NSpecies,
char  Mod_Code,
double  T_k,
double  P_bar 
)

Generic constructor for DComp/DCthermo.

generic constructor (new) for calling from DComp/DCthermo calculations


Member Function Documentation

void TSolMod::GetPhaseName ( const char *  PhName)

Getting phase name.

gets phase name for specific built-in models (class TModOther)

long int TSolMod::IdealMixing ( ) [protected]

Functions for calculation of configurational term for multisite ideal mixing.

Calculation of configurational terms for the ideal mixing (c) DK, TW Nov.

2010 Based upon the formalism of Price (1985) Returns 0 if calculated o.k., or 1 if this is not a multi-site model

long int TSolMod::UpdatePT ( double  T_k,
double  P_bar 
)

Set new system state.

updates P and T in TSolMod if those have changed


The documentation for this class was generated from the following files: