OpenCAEPoro  v0.5.0
A simulator for multicomponent porous media flow
Public Member Functions | Public Attributes | List of all members
ComponentParam Class Reference

ComponentParam contains information of components. More...

#include <ParamReservoir.hpp>

Public Member Functions

void Init ()
 Init Params.
 
void InputCOMPONENTS (ifstream &ifs, const string &keyword)
 Input the information of hydrocarbon components.
 
Type_A_r< vector< OCP_DBL > > * FindPtr01 (const string &varName)
 
void InputRefPR (ifstream &ifs, const string &keyword)
 input reference pressure, temperature
 
vector< OCP_DBL > * FindPtr02 (const string &varName)
 Find corresponding variable according to the name of variable.
 
void InputCNAMES (ifstream &ifs)
 Input the names of hydrocarbon components.
 
void InputLBCCOEF (ifstream &ifs)
 Input LBC coefficients for viscosity calculation.
 
void InputBIC (ifstream &ifs)
 Input the Binary interaction of components. More...
 
void InputVISCTAB (ifstream &ifs)
 Input VISCTAB.
 
void InputSSMSTA (ifstream &ifs)
 TODO: Add Doxygen.
 
void InputNRSTA (ifstream &ifs)
 TODO: Add Doxygen.
 
void InputSSMSP (ifstream &ifs)
 TODO: Add Doxygen.
 
void InputNRSP (ifstream &ifs)
 TODO: Add Doxygen.
 
void InputRR (ifstream &ifs)
 TODO: Add Doxygen.
 

Public Attributes

USI NTPVT {1}
 num of EoS region, constant now.
 
USI numCom {0}
 num of components, water is excluded.
 
USI numPhase {2}
 num of phase, water is excluded, constant now.
 
vector< string > Cname
 Name of hydrocarbon components.
 
Type_A_r< vector< OCP_DBL > > Tc
 Critical temperature of hydrocarbon components.
 
Type_A_r< vector< OCP_DBL > > Pc
 Critical pressure of hydrocarbon components.
 
Type_A_r< vector< OCP_DBL > > Vc
 Critical volume of hydrocarbon components.
 
Type_A_r< vector< OCP_DBL > > Zc
 Critical Z-factor of hydrocarbon components.
 
Type_A_r< vector< OCP_DBL > > MW
 Molecular Weight of hydrocarbon components.
 
Type_A_r< vector< OCP_DBL > > Acf
 Acentric factor of hydrocarbon components.
 
Type_A_r< vector< OCP_DBL > > OmegaA
 OMEGA_A of hydrocarbon components.
 
Type_A_r< vector< OCP_DBL > > OmegaB
 OMEGA_B of hydrocarbon components.
 
Type_A_r< vector< OCP_DBL > > Vshift
 Volume shift of hydrocarbon components.
 
Type_A_r< vector< OCP_DBL > > Parachor
 PARACHOR of hydrocarbon components.
 
Type_A_r< vector< OCP_DBL > > Vcvis
 Critical volume used for viscosity calculations only.
 
Type_A_r< vector< OCP_DBL > > Zcvis
 Critical Z-factor used for viscosity calculations only.
 
vector< OCP_DBLLBCcoef
 LBC coefficients for viscosity calculation.
 
vector< vector< OCP_DBL > > BIC
 Binary interaction.
 
Type_A_r< vector< OCP_DBL > > molden
 
Type_A_r< vector< OCP_DBL > > cp
 component compressibility, 1/psi
 
Type_A_r< vector< OCP_DBL > > ct1
 the first ifThermal expansion coefficient, 1/F
 
Type_A_r< vector< OCP_DBL > > ct2
 the second ifThermal expansion coefficient, 1/F
 
Type_A_r< vector< OCP_DBL > > cpt
 
Type_A_r< vector< OCP_DBL > > cpl1
 
Type_A_r< vector< OCP_DBL > > cpl2
 
Type_A_r< vector< OCP_DBL > > cpl3
 
Type_A_r< vector< OCP_DBL > > cpl4
 
Type_A_r< vector< OCP_DBL > > cpg1
 
Type_A_r< vector< OCP_DBL > > cpg2
 
Type_A_r< vector< OCP_DBL > > cpg3
 
Type_A_r< vector< OCP_DBL > > cpg4
 
Type_A_r< vector< OCP_DBL > > hvapr
 coefficients in the component gas enthalpy calculations, Btu/lbmol
 
Type_A_r< vector< OCP_DBL > > hvr
 coefficients in the vaporization enthalpy calculations
 
Type_A_r< vector< OCP_DBL > > ev
 coefficients in the vaporization enthalpy calculations
 
Type_A_r< vector< OCP_DBL > > avisc
 coefficients in water and oil viscosity correlation formulae
 
Type_A_r< vector< OCP_DBL > > bvisc
 coefficients in water and oil viscosity correlation formulae
 
Type_A_r< vector< OCP_DBL > > avg
 coefficients Ak in gas viscosity correlation formulae
 
Type_A_r< vector< OCP_DBL > > bvg
 
TableSet viscTab
 
vector< OCP_DBLPref
 reference pressure
 
vector< OCP_DBLTref
 reference temperature
 
OCP_BOOL miscible {OCP_FALSE}
 
vector< string > SSMparamSTA
 Params for Solving Phase Spliting with SSM.
 
vector< string > NRparamSTA
 Params for Solving Phase Spliting with NR.
 
vector< string > SSMparamSP
 Params for Solving Phase Spliting with SSM.
 
vector< string > NRparamSP
 Params for Solving Phase Spliting with NR.
 
vector< string > RRparam
 Params for Solving Rachford-Rice equations.
 

Detailed Description

ComponentParam contains information of components.

Definition at line 87 of file ParamReservoir.hpp.

Member Function Documentation

◆ FindPtr01()

Type_A_r< vector< OCP_DBL > > * ComponentParam::FindPtr01 ( const string &  varName)

Find corresponding variable according to the name of variable. It is used for the basic properties of hydrocarbon components such as TCRIT

Definition at line 941 of file ParamReservoir.cpp.

942 {
943  Type_A_r<vector<OCP_DBL>>* myPtr = nullptr;
944 
945  switch (Map_Str2Int(&varName[0], varName.size())) {
946  case Map_Str2Int("TCRIT", 5):
947  myPtr = &Tc;
948  break;
949 
950  case Map_Str2Int("PCRIT", 5):
951  myPtr = &Pc;
952  break;
953 
954  case Map_Str2Int("VCRIT", 5):
955  myPtr = &Vc;
956  break;
957 
958  case Map_Str2Int("ZCRIT", 5):
959  myPtr = &Zc;
960  break;
961 
962  case Map_Str2Int("MW", 2):
963  myPtr = &MW;
964  break;
965 
966  case Map_Str2Int("ACF", 3):
967  myPtr = &Acf;
968  break;
969 
970  case Map_Str2Int("OMEGAA", 6):
971  myPtr = &OmegaA;
972  break;
973 
974  case Map_Str2Int("OMEGAB", 6):
975  myPtr = &OmegaB;
976  break;
977 
978  case Map_Str2Int("SSHIFT", 6):
979  myPtr = &Vshift;
980  break;
981 
982  case Map_Str2Int("PARACHOR", 8):
983  myPtr = &Parachor;
984  break;
985 
986  case Map_Str2Int("VCRITVIS", 8):
987  myPtr = &Vcvis;
988  break;
989 
990  case Map_Str2Int("ZCRITVIS", 8):
991  myPtr = &Zcvis;
992  break;
993 
994  case Map_Str2Int("MOLDEN", 6):
995  myPtr = &molden;
996  break;
997 
998  case Map_Str2Int("CP", 2):
999  myPtr = &cp;
1000  break;
1001 
1002  case Map_Str2Int("CT1", 3):
1003  myPtr = &ct1;
1004  break;
1005 
1006  case Map_Str2Int("CT2", 3):
1007  myPtr = &ct2;
1008  break;
1009 
1010  case Map_Str2Int("CPT", 3):
1011  myPtr = &cpt;
1012  break;
1013 
1014  case Map_Str2Int("CPL1", 4):
1015  myPtr = &cpl1;
1016  break;
1017 
1018  case Map_Str2Int("CPL2", 4):
1019  myPtr = &cpl2;
1020  break;
1021 
1022  case Map_Str2Int("CPL3", 4):
1023  myPtr = &cpl3;
1024  break;
1025 
1026  case Map_Str2Int("CPL4", 4):
1027  myPtr = &cpl4;
1028  break;
1029 
1030  case Map_Str2Int("CPG1", 4):
1031  myPtr = &cpg1;
1032  break;
1033 
1034  case Map_Str2Int("CPG2", 4):
1035  myPtr = &cpg2;
1036  break;
1037 
1038  case Map_Str2Int("CPG3", 4):
1039  myPtr = &cpg3;
1040  break;
1041 
1042  case Map_Str2Int("CPG4", 4):
1043  myPtr = &cpg4;
1044  break;
1045 
1046  case Map_Str2Int("HVAPR", 5):
1047  myPtr = &hvapr;
1048  break;
1049 
1050  case Map_Str2Int("HVR", 3):
1051  myPtr = &hvr;
1052  break;
1053 
1054  case Map_Str2Int("EV", 2):
1055  myPtr = &ev;
1056  break;
1057 
1058  case Map_Str2Int("AVSIC", 5):
1059  myPtr = &avisc;
1060  break;
1061 
1062  case Map_Str2Int("BVSIC", 5):
1063  myPtr = &bvisc;
1064  break;
1065 
1066  case Map_Str2Int("AVG", 3):
1067  myPtr = &avg;
1068  break;
1069 
1070  case Map_Str2Int("BVG", 3):
1071  myPtr = &bvg;
1072  break;
1073  }
1074 
1075  return myPtr;
1076 }
constexpr long long Map_Str2Int(const char *mystr, const USI &len)
Definition: UtilInput.hpp:34
Type_A_r< vector< OCP_DBL > > cpg4
Type_A_r< vector< OCP_DBL > > cpl1
Type_A_r< vector< OCP_DBL > > Tc
Critical temperature of hydrocarbon components.
Type_A_r< vector< OCP_DBL > > Vcvis
Critical volume used for viscosity calculations only.
Type_A_r< vector< OCP_DBL > > ev
coefficients in the vaporization enthalpy calculations
Type_A_r< vector< OCP_DBL > > Zc
Critical Z-factor of hydrocarbon components.
Type_A_r< vector< OCP_DBL > > MW
Molecular Weight of hydrocarbon components.
Type_A_r< vector< OCP_DBL > > cpg2
Type_A_r< vector< OCP_DBL > > avisc
coefficients in water and oil viscosity correlation formulae
Type_A_r< vector< OCP_DBL > > bvisc
coefficients in water and oil viscosity correlation formulae
Type_A_r< vector< OCP_DBL > > bvg
Type_A_r< vector< OCP_DBL > > cpl3
Type_A_r< vector< OCP_DBL > > cpl4
Type_A_r< vector< OCP_DBL > > hvapr
coefficients in the component gas enthalpy calculations, Btu/lbmol
Type_A_r< vector< OCP_DBL > > ct1
the first ifThermal expansion coefficient, 1/F
Type_A_r< vector< OCP_DBL > > avg
coefficients Ak in gas viscosity correlation formulae
Type_A_r< vector< OCP_DBL > > cpt
Type_A_r< vector< OCP_DBL > > Acf
Acentric factor of hydrocarbon components.
Type_A_r< vector< OCP_DBL > > Vshift
Volume shift of hydrocarbon components.
Type_A_r< vector< OCP_DBL > > hvr
coefficients in the vaporization enthalpy calculations
Type_A_r< vector< OCP_DBL > > Zcvis
Critical Z-factor used for viscosity calculations only.
Type_A_r< vector< OCP_DBL > > OmegaB
OMEGA_B of hydrocarbon components.
Type_A_r< vector< OCP_DBL > > cpg1
Type_A_r< vector< OCP_DBL > > ct2
the second ifThermal expansion coefficient, 1/F
Type_A_r< vector< OCP_DBL > > Vc
Critical volume of hydrocarbon components.
Type_A_r< vector< OCP_DBL > > cpg3
Type_A_r< vector< OCP_DBL > > Pc
Critical pressure of hydrocarbon components.
Type_A_r< vector< OCP_DBL > > cpl2
Type_A_r< vector< OCP_DBL > > OmegaA
OMEGA_A of hydrocarbon components.
Type_A_r< vector< OCP_DBL > > cp
component compressibility, 1/psi
Type_A_r< vector< OCP_DBL > > molden
Type_A_r< vector< OCP_DBL > > Parachor
PARACHOR of hydrocarbon components.

References Acf, avg, avisc, bvg, bvisc, cp, cpg1, cpg2, cpg3, cpg4, cpl1, cpl2, cpl3, cpl4, cpt, ct1, ct2, ev, hvapr, hvr, Map_Str2Int(), molden, MW, OmegaA, OmegaB, Parachor, Pc, Tc, Vc, Vcvis, Vshift, Zc, and Zcvis.

◆ InputBIC()

void ComponentParam::InputBIC ( ifstream &  ifs)

Input the Binary interaction of components.

Input Binary Interaction Coefficients Matrix.

Definition at line 1213 of file ParamReservoir.cpp.

1214 {
1215  OCP_ASSERT((numCom > 0) && (NTPVT > 0), "numCom or NTPVT has not been set!");
1216 
1217  BIC.resize(NTPVT);
1218 
1219  vector<string> vbuf;
1220  USI nReg = 0;
1221  while (OCP_TRUE) {
1222  ReadLine(ifs, vbuf);
1223  if (vbuf[0] == "/") {
1224  nReg++;
1225  if (nReg >= NTPVT) break;
1226  continue;
1227  }
1228  for (auto& v : vbuf) {
1229  if (v != "/") {
1230  BIC[nReg].push_back(stod(v));
1231  cout << setw(10) << BIC[nReg].back();
1232  }
1233  }
1234  cout << endl;
1235  if (vbuf.back() == "/") {
1236  nReg++;
1237  if (nReg >= NTPVT) break;
1238  }
1239  }
1240 }
unsigned int USI
Generic unsigned integer.
Definition: OCPConst.hpp:23
#define OCP_ASSERT(cond, msg)
Assert condition and log user messages in DEBUG mode.
Definition: UtilError.hpp:58
OCP_BOOL ReadLine(ifstream &ifs, vector< string > &result)
Definition: UtilInput.cpp:14
USI numCom
num of components, water is excluded.
vector< vector< OCP_DBL > > BIC
Binary interaction.
USI NTPVT
num of EoS region, constant now.

References BIC, NTPVT, numCom, and OCP_ASSERT.

Member Data Documentation

◆ bvg

Type_A_r<vector<OCP_DBL> > ComponentParam::bvg

coefficients Bk in gas viscosity correlation formulae

Definition at line 176 of file ParamReservoir.hpp.

◆ cpg1

Type_A_r<vector<OCP_DBL> > ComponentParam::cpg1

coefficients in the component liquid enthalpy calculations, Btu/lbmol/F

Definition at line 155 of file ParamReservoir.hpp.

◆ cpg2

Type_A_r<vector<OCP_DBL> > ComponentParam::cpg2

coefficients in the component liquid enthalpy calculations, Btu/lbmol/F^2

Definition at line 157 of file ParamReservoir.hpp.

◆ cpg3

Type_A_r<vector<OCP_DBL> > ComponentParam::cpg3

coefficients in the component liquid enthalpy calculations, Btu/lbmol/F^3

Definition at line 159 of file ParamReservoir.hpp.

◆ cpg4

Type_A_r<vector<OCP_DBL> > ComponentParam::cpg4

coefficients in the component liquid enthalpy calculations, Btu/lbmol/F^4

Definition at line 161 of file ParamReservoir.hpp.

◆ cpl1

Type_A_r<vector<OCP_DBL> > ComponentParam::cpl1

coefficients in the component liquid enthalpy calculations, Btu/lbmol/F

Definition at line 147 of file ParamReservoir.hpp.

◆ cpl2

Type_A_r<vector<OCP_DBL> > ComponentParam::cpl2

coefficients in the component liquid enthalpy calculations, Btu/lbmol/F^2

Definition at line 149 of file ParamReservoir.hpp.

◆ cpl3

Type_A_r<vector<OCP_DBL> > ComponentParam::cpl3

coefficients in the component liquid enthalpy calculations, Btu/lbmol/F^3

Definition at line 151 of file ParamReservoir.hpp.

◆ cpl4

Type_A_r<vector<OCP_DBL> > ComponentParam::cpl4

coefficients in the component liquid enthalpy calculations, Btu/lbmol/F^4

Definition at line 153 of file ParamReservoir.hpp.

◆ cpt

Type_A_r<vector<OCP_DBL> > ComponentParam::cpt

the coefficient of density dependence on temperature and pressure, 1/psi-F

Definition at line 145 of file ParamReservoir.hpp.

◆ miscible

OCP_BOOL ComponentParam::miscible {OCP_FALSE}

Miscible treatment of hydrocarbons, used in compositional Model.

Definition at line 185 of file ParamReservoir.hpp.

◆ molden

Type_A_r<vector<OCP_DBL> > ComponentParam::molden

component molar density at reference temperature and reference pressure, lb/ft3

Definition at line 140 of file ParamReservoir.hpp.

◆ viscTab

TableSet ComponentParam::viscTab

viscosity-versus-temperature dependence, This table can specify the viscosity-versus-temperature-pressure dependence.

Definition at line 179 of file ParamReservoir.hpp.


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