#-----------------------------------------------------------------------
# CPA and Nucleation model Configuration file for hydrate calculations
#
# Created: 21.01.2011
#
# Defines 4 fluid phases: gas, 2 liquids, and water, plus
# solid ice, hydrate1 and hydrate2.
#-----------------------------------------------------------------------
remove all;

# Pure component data are taken from the Infodata data bank
puredata Infodata;

# Binary interaction data to be estimated with the Infochem "infobips" and
# "oilandgas" method unless entered by the user into bipset ASSOCBIP.
bipdata OILANDGAS INFOBIPS;

# Define the characterisation type:
chardata INFOCHAR TBSOEREIDE;

# remove all currently defined models and bip sets
remove models;remove bipsets;

# Define the CPA model as the thermodynamic model MASSOC
# To set BIPs use the default BIPSET identifier ASSOCBIP
# another bip set for the LGST model
bipset LGSTBIP 1 constant ;
bipset ASSOCBIP 1 CONSTANT;
bipset ASSOCBIP-2 1 CONSTANT;
model MASSOC ASSOC PSAT ASSOCBIP ASSOCBIP-2;

# Define the super-TRAPP model for viscosity: 
model MSTRAPVISC SPVISC LFIT;

# Define the super-TRAPP method as the thermal conductivity
model MSTRAPP SPTHCOND;

# Define the LGST method as the surface tension model 
model MLGSTMASSOC LGST MASSOC LGSTBIP;

# Define the freezeout model as the model for ice, "water" defines that
# this is the component to which the freezeout model will be applied.
model MICEMASSOC FREEZEOUT 007732-18-5 MASSOC;

# Define the two hydrate models for Hydrate I and Hydrate II.
# MASSOC is used to get the properties of pure liquid water.
model MHYD1MASSOC HYDRATE I MASSOC;
model MHYD2MASSOC HYDRATE II MASSOC;

# Define nucleation models for solid phases
model MNUCL1MHYD1MASSOC BPNUC MHYD1MASSOC;
model MNUCL2MHYD2MASSOC BPNUC MHYD2MASSOC;
model MNUCLIMICEMASSOC BPNUC MICEMASSOC;

# Remove all current PDs
remove pd;

# define the phase descriptor named 'Gas' for the gas phase
# (Gas uses the MASSOC model for the thermodynamic properties, the MSTRAPVISC
# model for the viscosity, the MSTRAPP model for the thermal conductivity)
pd GAS gas MASSOC MASSOC MASSOC MSTRAPVISC MSTRAPP MLGSTMASSOC;

# Define the phase descriptor 'Liquid1' for the 1st hydrocarbon liquid phase.
# (Liquid1 uses the MASSOC model for the thermodynamic properties, the MSTRAPVISC
# model for the viscosity, the MSTRAPP model for the thermal conductivity
# and the MLGSTMASSOC model for the surface tension).
pd LIQUID1 liquid MASSOC MASSOC MASSOC MSTRAPVISC MSTRAPP MLGSTMASSOC;

# Define the phase descriptor 'Liquid2' for the 2nd hydrocarbon liquid phase
pd LIQUID2 liquid MASSOC MASSOC MASSOC MSTRAPVISC MSTRAPP MLGSTMASSOC;

# Define the phase descriptor 'Water' for the aqueous liquid phase
pd WATER liquid MASSOC MASSOC MASSOC MSTRAPVISC MSTRAPP MLGSTMASSOC;

# Define the phase descriptor for the solid (ice) phase.
pd ICE condensed MICEMASSOC * * * * * MNUCLIMICEMASSOC;

# Define the phase descriptors for the two hydrate phases.
pd HYDRATE1 hydrate MHYD1MASSOC * * * * * MNUCL1MHYD1MASSOC;
pd HYDRATE2 hydrate MHYD2MASSOC * * * * * MNUCL2MHYD2MASSOC;

# Define water as the key component for aqueous phase and not water
# as the key for hydrocarbon liquid phases
key LIQUID1 not 007732-18-5;
key LIQUID2 not 007732-18-5;
key WATER 007732-18-5;
