OpenCAEPoro
v0.5.0
A simulator for multicomponent porous media flow
|
#include <ParamReservoir.hpp>
Public Member Functions | |
vector< OCP_DBL > * | FindPtr (const string &varName) |
Find pointer to the specified variable. More... | |
TableSet * | FindPtr_T (const string &varName) |
Find pointer to the specified table. More... | |
void | Init () |
Initialize the default value in reservoir, such as temperature, density, table. More... | |
void | InitTable () |
Initialize the tables' name and num of colum. More... | |
template<typename T > | |
void | setVal (vector< T > &obj, const T &val, const vector< USI > &index) |
It's used in InputEQUALS, assigning values in batches. More... | |
template<typename T > | |
void | CopyVal (vector< T > &obj, const vector< T > &src, const vector< USI > &index) |
It's used in InputCOPY, copying the value of one variable to another. More... | |
void | MultiplyVal (vector< OCP_DBL > &obj, const OCP_DBL &val, const vector< USI > &index) |
TODO: Add Doxygen. More... | |
void | InputCOMPS (ifstream &ifs) |
TODO: Add Doxygen. More... | |
void | InputDIMENS (ifstream &ifs) |
TODO: Add Doxygen. More... | |
void | DisplayDIMENS () |
Display the dimens, it's used to chech input. More... | |
void | InputRTEMP (ifstream &ifs) |
Input the keyword: RTEMP. RTEMP gives the temperature of reservoir. More... | |
void | InputEQUALS (ifstream &ifs) |
TODO: Add Doxygen. More... | |
void | InputGRID (ifstream &ifs, string &keyword) |
TODO: Add Doxygen. More... | |
void | InputCOPY (ifstream &ifs) |
Input the keyword: COPY. COPY could copy the value of one variable to another. More... | |
void | InputMULTIPLY (ifstream &ifs) |
TODO: Add Doxygen. More... | |
void | InputTABLE (ifstream &ifs, const string &tabName) |
Input PVTtable and SATtable such as SWOF, PVCO. More... | |
void | InputROCK (ifstream &ifs) |
Read data from the ROCK keyword. More... | |
void | InputROCKT (ifstream &ifs) |
Input Rock information for ifThermal model. More... | |
void | InputHLOSS (ifstream &ifs) |
Input heat loss property for overburden rock and underburden rock. | |
void | InputMISCSTR (ifstream &ifs) |
Input the Miscibility information. More... | |
void | InputGRAVITY (ifstream &ifs) |
Input the reference gravity of oil, water, and air in standard condition. More... | |
void | InputDENSITY (ifstream &ifs) |
Input the reference density of oil, water, and air in standard condition. More... | |
void | InputTHCON (ifstream &ifs, const string &keyword) |
Input the phase ifThermal conductivity. More... | |
void | InputEQUIL (ifstream &ifs) |
EQUIL contains initial information of reservoir; see ParamEQUIL. More... | |
void | InputTABDIMS (ifstream &ifs) |
TABDIMS contains the num of saturation region and PVT region. More... | |
void | InputRegion (ifstream &ifs, const string &keyword) |
Input the keyword: SATNUM and PVTNUM. More... | |
void | InputCNAMES (ifstream &ifs) |
void | InputCOMPONENTS (ifstream &ifs, const string &keyword) |
void | InputLBCCOEF (ifstream &ifs) |
void | InputBIC (ifstream &ifs) |
void | InputVISCTAB (ifstream &ifs) |
void | InputRefPR (ifstream &ifs, const string &keyword) |
void | InputSSMSTA (ifstream &ifs) |
void | InputNRSTA (ifstream &ifs) |
void | InputSSMSP (ifstream &ifs) |
void | InputNRSP (ifstream &ifs) |
void | InputRR (ifstream &ifs) |
void | CheckParam () |
Check the reservoir param from input file. More... | |
void | CheckGrid () |
Check the size of properties of grids. More... | |
void | CheckRock () |
Check Rock. More... | |
void | CheckEQUIL () const |
Check if keyword EQUIL is given. More... | |
void | CheckDenGra () const |
Check if density and gravity are both input, only one of them is needed. More... | |
void | CheckPhase () const |
Check existence of disgas, it could only exist when both oil and gas exist. More... | |
void | CheckPhaseTab () const |
Check existence of PVTtable and SATtable. More... | |
void | CheckRegion () const |
Check if each grid is assigned to an area or all defaulted. More... | |
void | CheckEqlRegion () const |
(Todo) Initialization of equilibration of only one region is realized. More... | |
Public Attributes | |
Dimens | dimens |
Dimension of grid: the number of grids along x,y,z direction. | |
OCP_USI | numGrid |
Num of grids. | |
vector< OCP_DBL > | tops |
Depth of the top surface of the uppermost grids. | |
vector< OCP_DBL > | dx |
Size along the x - direction for each grid. | |
vector< OCP_DBL > | dy |
Size along the y - direction for each grid. | |
vector< OCP_DBL > | dz |
Size along the z - direction for each grid. | |
vector< OCP_DBL > | coord |
TODO: Add Doxygen. | |
vector< OCP_DBL > | zcorn |
TODO: Add Doxygen. | |
vector< OCP_DBL > | ntg |
Net to gross for each grid. | |
vector< OCP_DBL > | poro |
Porosity for each grid. | |
vector< OCP_DBL > | permX |
Permeability along the x - direction for each grid. | |
vector< OCP_DBL > | permY |
Permeability along the y-direction for each grid. | |
vector< OCP_DBL > | permZ |
Permeability along the z-direction for each grid. | |
vector< OCP_DBL > | thconr |
Rock ifThermal conductivity. | |
OCP_DBL | rsTemp |
Temperature for reservoir. | |
vector< RockParam > | rockSet |
a set of rock | |
HLoss | hLoss |
Heat loss property. | |
Miscstr | miscstr |
reference Miscibility surface tension | |
vector< OCP_DBL > | P |
Initial pressure of components in each grid. | |
vector< OCP_DBL > | Ni |
Initial moles of components in each grid. | |
vector< OCP_DBL > | Swat |
Initial water saturation in each grid. | |
OCP_BOOL | ScalePcow {OCP_FALSE} |
whether Pcow should be scaled. | |
Type_A_r< OCP_DBL > | density |
Density of oil, water, gas in standard conditions. | |
Type_A_r< OCP_DBL > | gravity |
Gravity of oil, water, gas in standard conditions. | |
OCP_DBL | thcono {24} |
oil ifThermal conductivity | |
OCP_DBL | thcong {24} |
gas ifThermal conductivity | |
OCP_DBL | thconw {24} |
water ifThermal conductivity | |
OCP_BOOL | blackOil {OCP_FALSE} |
If ture, blackoil model will be used. | |
OCP_BOOL | comps {OCP_FALSE} |
If OCP_TRUE, compositional model will be used. | |
OCP_BOOL | thermal {OCP_FALSE} |
If OCP_TRUE, ifThermal model will be used. | |
OCP_BOOL | oil {OCP_FALSE} |
If OCP_TRUE, oil phase could exist. | |
OCP_BOOL | gas {OCP_FALSE} |
If OCP_TRUE, gas phase could exist. | |
OCP_BOOL | water {OCP_FALSE} |
If OCP_TRUE, water phase could exist. | |
OCP_BOOL | disGas {OCP_FALSE} |
If OCP_TRUE, dissolve gas could exist in oil phase. | |
ComponentParam | comsParam |
information for components | |
USI | NTSFUN {1} |
Num of SAT regions. | |
USI | NTPVT {1} |
Num of PVT regions. | |
USI | NTROOC {1} |
Num of Rock regions. | |
Type_A_r< OCP_DBL > | SATNUM |
Records the index of SAT region for each grid. | |
Type_A_r< OCP_DBL > | PVTNUM |
Records the index of PVT region for each grid. | |
Type_A_r< OCP_DBL > | ACTNUM |
Records the index of Active region for each grid. | |
Type_A_r< OCP_DBL > | ROCKNUM |
Records the index of ROCK region for each grid. | |
TableSet | SWFN_T |
Table set of SWFN. | |
TableSet | SWOF_T |
Table set of SWOF. | |
TableSet | SGFN_T |
Table set of SGFN. | |
TableSet | SGOF_T |
Table set of SGOF. | |
TableSet | SOF3_T |
Table set of SOF3. | |
TableSet | PBVD_T |
Table set of PBVD. | |
TableSet | ZMFVD_T |
Table set of ZMFVD. | |
TableSet | TEMPVD_T |
Table set of TEMPVD. | |
vector< OCP_DBL > | EQUIL |
See ParamEQUIL. | |
USI | numPhase |
Number of phases. | |
USI | numCom |
TableSet | PVCO_T |
Table set of PVCO. | |
TableSet | PVDO_T |
Table set of PVDO. | |
TableSet | PVDG_T |
Table set of PVDG. | |
TableSet | PVTW_T |
Table set of PVTW. | |
ParamReservoir is an internal structure used to stores the information of reservoir(except wells) from input files. It is an intermediate interface and independent of the main simulator. After all file inputting finishs, the params in it will pass to corresponding modules.
Definition at line 209 of file ParamReservoir.hpp.
void ParamReservoir::CheckDenGra | ( | ) | const |
Check if density and gravity are both input, only one of them is needed.
TODO: Add Doxygen.
Definition at line 852 of file ParamReservoir.cpp.
References Type_A_r< T >::activity, density, gravity, and OCP_ABORT.
void ParamReservoir::CheckEqlRegion | ( | ) | const |
(Todo) Initialization of equilibration of only one region is realized.
TODO: Add Doxygen.
Definition at line 901 of file ParamReservoir.cpp.
References TableSet::data, OCP_ABORT, and PBVD_T.
void ParamReservoir::CheckEQUIL | ( | ) | const |
Check if keyword EQUIL is given.
Check EQUIL keyword.
Definition at line 846 of file ParamReservoir.cpp.
void ParamReservoir::CheckGrid | ( | ) |
Check the size of properties of grids.
Check data dimension for potential problems.
Definition at line 813 of file ParamReservoir.cpp.
References coord, dimens, dx, dy, dz, ntg, numGrid, Dimens::nx, Dimens::ny, OCP_ABORT, permX, permY, permZ, poro, tops, and zcorn.
void ParamReservoir::CheckParam | ( | ) |
Check the reservoir param from input file.
Check consistency of input parameters.
Definition at line 802 of file ParamReservoir.cpp.
References CheckDenGra(), CheckEQUIL(), CheckGrid(), CheckPhase(), CheckRegion(), and CheckRock().
void ParamReservoir::CheckPhase | ( | ) | const |
Check existence of disgas, it could only exist when both oil and gas exist.
TODO: Add Doxygen.
Definition at line 860 of file ParamReservoir.cpp.
void ParamReservoir::CheckPhaseTab | ( | ) | const |
Check existence of PVTtable and SATtable.
Check tables: Different tables will be used under different conditions.
Definition at line 868 of file ParamReservoir.cpp.
References blackOil, comps, TableSet::data, disGas, gas, OCP_ABORT, oil, PVCO_T, PVDG_T, PVDO_T, PVTW_T, SGOF_T, SWOF_T, and water.
void ParamReservoir::CheckRegion | ( | ) | const |
Check if each grid is assigned to an area or all defaulted.
TODO: Add Doxygen.
Definition at line 884 of file ParamReservoir.cpp.
References Type_A_r< T >::activity, ACTNUM, Type_A_r< T >::data, numGrid, OCP_ABORT, PVTNUM, ROCKNUM, and SATNUM.
void ParamReservoir::CheckRock | ( | ) |
void ParamReservoir::CopyVal | ( | vector< T > & | obj, |
const vector< T > & | src, | ||
const vector< USI > & | index | ||
) |
It's used in InputCOPY, copying the value of one variable to another.
TODO: Add Doxygen.
Definition at line 243 of file ParamReservoir.cpp.
References dimens, Dimens::nx, and Dimens::ny.
void ParamReservoir::DisplayDIMENS | ( | ) |
Display the dimens, it's used to chech input.
TODO: Add Doxygen.
Definition at line 310 of file ParamReservoir.cpp.
References dimens, Dimens::nx, Dimens::ny, and Dimens::nz.
vector< OCP_DBL > * ParamReservoir::FindPtr | ( | const string & | varName | ) |
Find pointer to the specified variable.
Find corresponding variable according to the name of variable. It is used for the basic properties of reservoir such as DX.
Definition at line 15 of file ParamReservoir.cpp.
References coord, dimens, dx, dy, dz, Map_Str2Int(), Ni, ntg, numGrid, Dimens::nx, Dimens::ny, P, permX, permY, permZ, poro, Swat, thconr, tops, and zcorn.
TableSet * ParamReservoir::FindPtr_T | ( | const string & | varName | ) |
Find pointer to the specified table.
Find corresponding variable according to the name of variable. It is used for the scope of the table.
Definition at line 119 of file ParamReservoir.cpp.
References Map_Str2Int(), PBVD_T, PVCO_T, PVDG_T, PVDO_T, PVTW_T, SGFN_T, SGOF_T, SOF3_T, SWFN_T, SWOF_T, TEMPVD_T, and ZMFVD_T.
void ParamReservoir::Init | ( | ) |
Initialize the default value in reservoir, such as temperature, density, table.
Initialize tables and other reservoir parameters.
Definition at line 177 of file ParamReservoir.cpp.
References Type_A_r< T >::data, density, gravity, InitTable(), and rsTemp.
void ParamReservoir::InitTable | ( | ) |
void ParamReservoir::InputCOMPS | ( | ifstream & | ifs | ) |
TODO: Add Doxygen.
Input the keyword: COMPS. COMPS is used in compositional model, which gives the num of components.
Definition at line 283 of file ParamReservoir.cpp.
References comps.
void ParamReservoir::InputCOPY | ( | ifstream & | ifs | ) |
Input the keyword: COPY. COPY could copy the value of one variable to another.
TODO: Add Doxygen.
Definition at line 410 of file ParamReservoir.cpp.
References CopyVal(), DealDefault(), dimens, FindPtr(), Dimens::nx, Dimens::ny, Dimens::nz, OCP_ABORT, and ReadLine().
void ParamReservoir::InputDENSITY | ( | ifstream & | ifs | ) |
Input the reference density of oil, water, and air in standard condition.
Read data from the DENSITY keyword.
Definition at line 677 of file ParamReservoir.cpp.
References Type_A_r< T >::activity, DealDefault(), density, OCP_ASSERT, and ReadLine().
void ParamReservoir::InputDIMENS | ( | ifstream & | ifs | ) |
TODO: Add Doxygen.
Input the keyword: DIMENS. DIMENS contain the dimension of grids of reservoir. It gives the num of grids along the x,y,z direction.
Definition at line 297 of file ParamReservoir.cpp.
References dimens, DisplayDIMENS(), numGrid, Dimens::nx, Dimens::ny, Dimens::nz, and ReadLine().
void ParamReservoir::InputEQUALS | ( | ifstream & | ifs | ) |
TODO: Add Doxygen.
Input the keyword: EQUALS. EQUALS contains many keywords about grids which has special input format. These keywords contains DX, TOPS, PORO and so on. You can assign values to them in batches
Definition at line 330 of file ParamReservoir.cpp.
References DealDefault(), dimens, FindPtr(), numGrid, Dimens::nx, Dimens::ny, Dimens::nz, OCP_ABORT, ReadLine(), and setVal().
void ParamReservoir::InputEQUIL | ( | ifstream & | ifs | ) |
EQUIL contains initial information of reservoir; see ParamEQUIL.
Read data from the EQUIL keyword.
Definition at line 718 of file ParamReservoir.cpp.
References DealDefault(), EQUIL, and ReadLine().
void ParamReservoir::InputGRAVITY | ( | ifstream & | ifs | ) |
Input the reference gravity of oil, water, and air in standard condition.
Read data from the GRAVITY keyword.
Definition at line 655 of file ParamReservoir.cpp.
References Type_A_r< T >::activity, and gravity.
void ParamReservoir::InputGRID | ( | ifstream & | ifs, |
string & | keyword | ||
) |
TODO: Add Doxygen.
Input the keyword about grids, actually, it's a supplement for EQUALS. It supplies another way to input the params in EQUALS.
Definition at line 381 of file ParamReservoir.cpp.
References FindPtr(), OCP_ABORT, and ReadLine().
void ParamReservoir::InputMISCSTR | ( | ifstream & | ifs | ) |
Input the Miscibility information.
Read data from the MISCSTR keyword.
Definition at line 632 of file ParamReservoir.cpp.
References comsParam, ComponentParam::miscible, miscstr, OCP_WARNING, and ReadLine().
void ParamReservoir::InputMULTIPLY | ( | ifstream & | ifs | ) |
TODO: Add Doxygen.
Input the keyword: MULTIPLY. MULTIIPLY could multiply the value of a certain range of a variable by a coefficient.
Definition at line 450 of file ParamReservoir.cpp.
References DealDefault(), dimens, FindPtr(), MultiplyVal(), Dimens::nx, Dimens::ny, Dimens::nz, OCP_ABORT, and ReadLine().
void ParamReservoir::InputRegion | ( | ifstream & | ifs, |
const string & | keyword | ||
) |
Input the keyword: SATNUM and PVTNUM.
Region information like SATNUM to decide which grid belongs to which saturation region, so corresponding saturation table will be used.
Definition at line 761 of file ParamReservoir.cpp.
References Type_A_r< T >::activity, ACTNUM, NTPVT, NTSFUN, PVTNUM, ROCKNUM, and SATNUM.
void ParamReservoir::InputROCK | ( | ifstream & | ifs | ) |
Read data from the ROCK keyword.
Input the keyword: ROCK. ROCK contains the compressibility factor and reference pressure at initial porosity.
Definition at line 520 of file ParamReservoir.cpp.
References RockParam::cp1, RockParam::cp2, RockParam::Pref, ReadLine(), rockSet, and RockParam::type.
void ParamReservoir::InputROCKT | ( | ifstream & | ifs | ) |
Input Rock information for ifThermal model.
Read data from the ROCK keyword.
Definition at line 551 of file ParamReservoir.cpp.
References RockParam::ConstRock, RockParam::cp1, RockParam::cpt, RockParam::ct, RockParam::Pref, ReadLine(), RockParam::Tref, and RockParam::type.
void ParamReservoir::InputRTEMP | ( | ifstream & | ifs | ) |
Input the keyword: RTEMP. RTEMP gives the temperature of reservoir.
TODO: Add Doxygen.
Definition at line 319 of file ParamReservoir.cpp.
References ReadLine(), and rsTemp.
void ParamReservoir::InputTABDIMS | ( | ifstream & | ifs | ) |
TABDIMS contains the num of saturation region and PVT region.
Read data from the TABDIMS keyword.
Definition at line 739 of file ParamReservoir.cpp.
References NTPVT, NTROOC, NTSFUN, OCP_ABORT, and ReadLine().
void ParamReservoir::InputTABLE | ( | ifstream & | ifs, |
const string & | tabName | ||
) |
Input PVTtable and SATtable such as SWOF, PVCO.
TODO: Add Doxygen.
Definition at line 483 of file ParamReservoir.cpp.
References TableSet::colNum, comps, TableSet::data, TableSet::DisplayTable(), FindPtr_T(), numCom, OCP_ABORT, and ReadLine().
void ParamReservoir::InputTHCON | ( | ifstream & | ifs, |
const string & | keyword | ||
) |
Input the phase ifThermal conductivity.
Read data from the THCONO, THCONG, THCONW.
Definition at line 700 of file ParamReservoir.cpp.
References ReadLine(), thcong, thcono, and thconw.
void ParamReservoir::MultiplyVal | ( | vector< OCP_DBL > & | obj, |
const OCP_DBL & | val, | ||
const vector< USI > & | index | ||
) |
TODO: Add Doxygen.
It's used in InputMULTIPLY, multipling the value of a certain range of a variable by a coefficient.
Definition at line 263 of file ParamReservoir.cpp.
References dimens, Dimens::nx, and Dimens::ny.
void ParamReservoir::setVal | ( | vector< T > & | obj, |
const T & | val, | ||
const vector< USI > & | index | ||
) |
It's used in InputEQUALS, assigning values in batches.
TODO: Add Doxygen.
Definition at line 224 of file ParamReservoir.cpp.
References dimens, Dimens::nx, and Dimens::ny.
USI ParamReservoir::numCom |
Number of components(hydrocarbon components), used in Compositional Model when input
Definition at line 285 of file ParamReservoir.hpp.