OpenCAEPoro
0.2.0 Sep/22/2022
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 | 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 | 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 | InputCOM (ifstream &ifs) |
void | InputCOMPONENTS (ifstream &ifs, const string &keyword) |
void | InputLBCCOEF (ifstream &ifs) |
void | InputBIC (ifstream &ifs) |
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 | 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. | |
OCP_DBL | rsTemp |
Temperature for reservoir. | |
Rock | rock |
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. | |
bool | ScalePcow {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. | |
bool | blackOil {false} |
If ture, blackoil model will be used. | |
bool | comps {false} |
If true, compositional model will be used. | |
bool | oil {false} |
If true, oil phase could exist. | |
bool | gas {false} |
If true, gas phase could exist. | |
bool | water {false} |
If true, water phase could exist. | |
bool | disGas {false} |
If true, dissolve gas could exist in oil phase. | |
EoSparam | EoSp |
Initial component composition, used in compositional models. | |
USI | NTSFUN {1} |
Num of SAT regions. | |
USI | NTPVT {1} |
Num of PVT 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. | |
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. | |
vector< OCP_DBL > | EQUIL |
See ParamEQUIL. | |
USI | numPhase |
Number of phases. | |
USI | numCom |
Number of components(hydrocarbon components), used in Compositional Model when input. | |
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 136 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 697 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 740 of file ParamReservoir.cpp.
References TableSet::data, OCP_ABORT, and PBVD_T.
void ParamReservoir::CheckEQUIL | ( | ) | const |
Check if keyword EQUIL is given.
Check EQUIL keywords.
Definition at line 691 of file ParamReservoir.cpp.
void ParamReservoir::CheckGrid | ( | ) |
Check the size of properties of grids.
Check data dimension for potential problems.
Definition at line 667 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 656 of file ParamReservoir.cpp.
References CheckDenGra(), CheckEQUIL(), CheckGrid(), CheckPhase(), and CheckRegion().
void ParamReservoir::CheckPhase | ( | ) | const |
Check existence of disgas, it could only exist when both oil and gas exist.
TODO: Add Doxygen.
Definition at line 705 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 713 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 729 of file ParamReservoir.cpp.
References Type_A_r< T >::activity, Type_A_r< T >::data, numGrid, OCP_ABORT, PVTNUM, and SATNUM.
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 229 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 293 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 Type_A_r< T >::activity, coord, Type_A_r< T >::data, dimens, dx, dy, dz, Map_Str2Int(), Ni, ntg, numGrid, Dimens::nx, Dimens::ny, P, permX, permY, permZ, poro, PVTNUM, SATNUM, ScalePcow, Swat, 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 108 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, 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 163 of file ParamReservoir.cpp.
References Rock::Cr, Type_A_r< T >::data, density, gravity, InitTable(), Rock::Pref, rock, and rsTemp.
void ParamReservoir::InitTable | ( | ) |
Initialize the tables' name and num of colum.
Initialize tables.
Definition at line 183 of file ParamReservoir.cpp.
References TableSet::colNum, TableSet::name, PBVD_T, PVCO_T, PVDG_T, PVDO_T, PVTW_T, SGFN_T, SGOF_T, SOF3_T, SWFN_T, SWOF_T, and ZMFVD_T.
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 267 of file ParamReservoir.cpp.
References comps, EoSp, EoSparam::InitEoSparam(), EoSparam::numCom, numCom, and ReadLine().
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 391 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 558 of file ParamReservoir.cpp.
References Type_A_r< T >::activity, Type_A_r< T >::data, 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 280 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 312 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 581 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 536 of file ParamReservoir.cpp.
References Type_A_r< T >::activity, Type_A_r< T >::data, DealDefault(), gravity, OCP_ASSERT, and ReadLine().
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 360 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 513 of file ParamReservoir.cpp.
References EoSp, EoSparam::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 427 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 614 of file ParamReservoir.cpp.
References Type_A_r< T >::activity, ACTNUM, Type_A_r< T >::data, NTPVT, NTSFUN, numGrid, PVTNUM, ReadLine(), 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 497 of file ParamReservoir.cpp.
References Rock::Cr, Rock::Pref, ReadLine(), and rock.
void ParamReservoir::InputRTEMP | ( | ifstream & | ifs | ) |
Input the keyword: RTEMP. RTEMP gives the temperature of reservoir.
TODO: Add Doxygen.
Definition at line 300 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 601 of file ParamReservoir.cpp.
References NTPVT, NTSFUN, and ReadLine().
void ParamReservoir::InputTABLE | ( | ifstream & | ifs, |
const string & | tabName | ||
) |
Input PVTtable and SATtable such as SWOF, PVCO.
TODO: Add Doxygen.
Definition at line 460 of file ParamReservoir.cpp.
References TableSet::colNum, comps, TableSet::data, TableSet::DisplayTable(), FindPtr_T(), numCom, OCP_ABORT, and ReadLine().
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 248 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 210 of file ParamReservoir.cpp.
References dimens, Dimens::nx, and Dimens::ny.
Rock ParamReservoir::rock |
Contains the compressibility factor and reference pressure at initial porosity.
Definition at line 160 of file ParamReservoir.hpp.