38 if (cfl > 1) dt /= (cfl + 1);
55 int status = myLS.
Solve();
100 cout <<
"CFL is too big" << endl;
110 cout <<
"Negative Ni occurs\n";
169 cout <<
"CFL is too big" << endl;
179 cout <<
"Negative Ni occurs\n";
201 rs.allWells.
CaldG(rs.bulk);
263 int status = myLS.
Solve();
296 cout <<
"Cut time step size and repeat! current dt = " << fixed << setprecision(3) << dt <<
" days\n";
335 if (ctrl.printLevel > 1) {
338 vector<OCP_INT> totalPhaseNum(3, 0);
339 vector<OCP_INT> ltotalPhaseNum(3, 0);
341 if (rs.bulk.NRphaseNum[n] == 0) ltotalPhaseNum[0]++;
342 if (rs.bulk.NRphaseNum[n] == 1) ltotalPhaseNum[1]++;
343 if (rs.bulk.NRphaseNum[n] == 2) ltotalPhaseNum[2]++;
344 if (rs.bulk.phaseNum[n] == 0) totalPhaseNum[0]++;
345 if (rs.bulk.phaseNum[n] == 1) totalPhaseNum[1]++;
346 if (rs.bulk.phaseNum[n] == 2) totalPhaseNum[2]++;
348 cout << to_string(totalPhaseNum[0]) +
" (" + to_string((totalPhaseNum[0] - ltotalPhaseNum[0]) * 100.0 / rs.
GetBulkNum())
349 +
"%) " << to_string(totalPhaseNum[1]) +
" (" + to_string((totalPhaseNum[1] - ltotalPhaseNum[1]) * 100.0 / rs.
GetBulkNum())
350 +
"%) " << to_string(totalPhaseNum[2]) +
" (" + to_string((totalPhaseNum[2] - ltotalPhaseNum[2]) * 100.0 / rs.
GetBulkNum())
358 if (rs.bulk.eV[n] < ctrl.ctrlNR.
NRtol)
360 if (rs.bulk.eN[n] < ctrl.ctrlNR.
NRtol)
363 cout <<
"eVnum : " << setprecision(ceil(log(rs.
GetBulkNum()) / log(10))) << fixed << setw(10) << (1 - eVnum * 1.0 / rs.
GetBulkNum()) * 100.0 <<
"% eNnum : "
364 << setw(10) << (1 - eNnum * 1.0 / rs.
GetBulkNum()) * 100.0 <<
"%" << endl;
367 const USI sp = rs.grid.GetNumDigitIJK();
368 USI tmpI, tmpJ, tmpK;
371 rs.grid.
GetIJKBulk(tmpI, tmpJ, tmpK, rs.bulk.index_maxNRdSSP);
372 tmps = GetIJKformat(to_string(tmpI), to_string(tmpJ), to_string(tmpK), sp);
373 cout <<
"### NR : " + to_string(ctrl.iterNR) +
" Res: " << setprecision(2) << scientific <<
resFIM.maxRelRes0_v << setw(12)
374 <<
resFIM.maxRelRes_v << setw(12) <<
resFIM.maxRelRes_mol << setw(11) <<
resFIM.maxWellRelRes_mol
375 << setw(20) << NRdPmax << setw(11) << NRdNmax << setw(11) << NRdSmax
376 << setw(40) << sqrt(rs.bulk.NRdSSP) / rs.bulk.numBulk << setw(12) << rs.bulk.maxNRdSSP <<
" "
377 << rs.bulk.phaseNum[rs.bulk.index_maxNRdSSP] <<
" " << rs.bulk.NRphaseNum[rs.bulk.index_maxNRdSSP] <<
" "
378 << tmps <<
" " << rs.bulk.ePEC[rs.bulk.index_maxNRdSSP] << endl << endl;
382 tmps = GetIJKformat(to_string(tmpI), to_string(tmpJ), to_string(tmpK), sp);
383 cout <<
"S: " << tmps << setw(12) << rs.bulk.eV[dSn] << setw(12) << rs.bulk.eN[dSn]
384 << setw(12) << rs.bulk.ePEC[dSn] << setw(5) << rs.bulk.phaseNum[dSn] << setw(5) << rs.bulk.NRphaseNum[dSn] << setw(12) << rs.bulk.dPNR[dSn]
385 << setw(8) <<
" |" << setw(12) << rs.bulk.S[dSn * 3] << setw(12) << rs.bulk.dSNR[dSn * 3] << setw(12) << rs.bulk.dSNRP[dSn * 3]
386 << setw(12) << rs.bulk.S[dSn * 3 + 1] << setw(12) << rs.bulk.dSNR[dSn * 3 + 1] << setw(12) << rs.bulk.dSNRP[dSn * 3 + 1] << endl;
389 tmps = GetIJKformat(to_string(tmpI), to_string(tmpJ), to_string(tmpK), sp);
390 cout <<
"V: " << tmps << setw(12) << rs.bulk.eV[
resFIM.maxId_v] << setw(12) << rs.bulk.eN[
resFIM.maxId_v]
391 << setw(12) << rs.bulk.ePEC[
resFIM.maxId_v] << setw(5) << rs.bulk.phaseNum[
resFIM.maxId_v] << setw(5) << rs.bulk.NRphaseNum[
resFIM.maxId_v] << setw(12) << rs.bulk.dPNR[
resFIM.maxId_v]
392 << setw(8) <<
" |" << setw(12) << rs.bulk.S[
resFIM.maxId_v * 3] << setw(12) << rs.bulk.dSNR[
resFIM.maxId_v * 3] << setw(12) << rs.bulk.dSNRP[
resFIM.maxId_v * 3]
393 << setw(12) << rs.bulk.S[
resFIM.maxId_v * 3 + 1] << setw(12) << rs.bulk.dSNR[
resFIM.maxId_v * 3 + 1] << setw(12) << rs.bulk.dSNRP[
resFIM.maxId_v * 3 + 1] << endl;
396 tmps = GetIJKformat(to_string(tmpI), to_string(tmpJ), to_string(tmpK), sp);
397 cout <<
"N: " << tmps << setw(12) << rs.bulk.eV[
resFIM.maxId_mol] << setw(12) << rs.bulk.eN[
resFIM.maxId_mol]
398 << setw(12) << rs.bulk.ePEC[
resFIM.maxId_mol] << setw(5) << rs.bulk.phaseNum[
resFIM.maxId_mol] << setw(5) << rs.bulk.NRphaseNum[
resFIM.maxId_mol] << setw(12) << rs.bulk.dPNR[
resFIM.maxId_mol]
399 << setw(8) <<
" |" << setw(12) << rs.bulk.S[
resFIM.maxId_mol * 3] << setw(12) << rs.bulk.dSNR[
resFIM.maxId_mol * 3] << setw(12) << rs.bulk.dSNRP[
resFIM.maxId_mol * 3]
400 << setw(12) << rs.bulk.S[
resFIM.maxId_mol * 3 + 1] << setw(12) << rs.bulk.dSNR[
resFIM.maxId_mol * 3 + 1] << setw(12) << rs.bulk.dSNRP[
resFIM.maxId_mol * 3 + 1] << endl;
409 if (ctrl.iterNR > ctrl.ctrlNR.
maxNRiter) {
410 ctrl.current_dt *= ctrl.ctrlTime.
cutFacNR;
415 cout <<
"### WARNING: NR not fully converged! Cut time step size and repeat! current dt = "
416 << fixed << setprecision(3) << ctrl.current_dt <<
" days\n";
423 &&
resFIM.maxWellRelRes_mol <= ctrl.ctrlNR.
NRtol) ||
424 (fabs(NRdPmax) <= ctrl.ctrlNR.
NRdPmin && fabs(NRdSmax) <= ctrl.ctrlNR.
NRdSmin)) {
429 cout <<
">> Switch well constraint: Case " << flagCheck << endl;
435 ctrl.current_dt *= ctrl.ctrlTime.
cutFacNR;
440 cout <<
"-----" << endl;
443 ctrl.current_dt /= 1;
448 cout <<
"-----" << endl;
464 ctrl.CalNextTstepFIM(rs);
483 rs.AssembleMatFIM_n(myLS, dt);
498 int status = myLS.
Solve();
532 cout <<
"Cut time stepsize and repeat!\n";
537 rs.CalFlashDerivFIM_n();
594 rs.bulk.ShowFIMBulk(
false);
613 int status = myLS.
Solve();
645 cout <<
"Cut time stepsize and repeat!\n";
669 cout <<
"### DEBUG: Residuals = " << setprecision(3) << scientific <<
resFIM.maxRelRes0_v <<
" "
670 <<
resFIM.maxRelRes_v <<
" " <<
resFIM.maxRelRes_mol <<
" " << NRdPmax
671 <<
" " << NRdSmax << endl;
677 if (ctrl.iterNR > ctrl.ctrlNR.
maxNRiter) {
678 ctrl.current_dt *= ctrl.ctrlTime.
cutFacNR;
683 cout <<
"### WARNING: NR not fully converged! Cut time step size and repeat!\n";
690 &&
resFIM.maxWellRelRes_mol <= ctrl.ctrlNR.
NRtol) ||
691 (NRdPmax <= ctrl.ctrlNR.
NRdPmin && NRdSmax <= ctrl.ctrlNR.
NRdSmin)) {
696 cout <<
">> Switch well constraint: Case " << flagCheck << endl;
702 ctrl.current_dt *= ctrl.ctrlTime.
cutFacNR;
750 resFIM.res.resize(num);
764 rs.SetupFIMBulkBoundAIMs();
766 rs.bulk.ShowFIMBulk();
770 resFIM.maxRelRes0_v = resFIM.maxRelRes_v;
777 rs.bulk.UpdateLastStepAIM();
796 int status = myLS.
Solve();
827 resFIM.maxRelRes0_v = resFIM.maxRelRes_v;
828 cout <<
"Cut time stepsize and repeat! -- 01\n";
853 cout <<
"### DEBUG: Residuals = " << setprecision(3) << scientific << resFIM.maxRelRes0_v <<
" "
854 << resFIM.maxRelRes_v <<
" " << resFIM.maxRelRes_mol <<
" " << NRdSmax
855 <<
" " << NRdPmax << endl;
858 if (ctrl.iterNR > ctrl.ctrlNR.
maxNRiter) {
859 ctrl.current_dt *= ctrl.ctrlTime.
cutFacNR;
862 resFIM.maxRelRes0_v = resFIM.maxRelRes_v;
864 cout <<
"### WARNING: NR not fully converged! Cut time stepsize and repeat!\n";
868 if (resFIM.maxRelRes_v <= resFIM.maxRelRes0_v * ctrl.ctrlNR.
NRtol ||
869 resFIM.maxRelRes_v <= ctrl.ctrlNR.
NRtol ||
870 resFIM.maxRelRes_mol <= ctrl.ctrlNR.
NRtol ||
871 (NRdPmax <= ctrl.ctrlNR.
NRdPmin && NRdSmax <= ctrl.ctrlNR.
NRdSmin)) {
876 cout <<
">> Switch well constraint: Case " << flagCheck << endl;
882 ctrl.current_dt *= ctrl.ctrlTime.
cutFacNR;
885 resFIM.maxRelRes0_v = resFIM.maxRelRes_v;
889 ctrl.current_dt /= 1;
892 resFIM.maxRelRes0_v = resFIM.maxRelRes_v;
903 ctrl.current_dt *= ctrl.ctrlTime.
cutFacNR;
906 resFIM.maxRelRes0_v = resFIM.maxRelRes_v;
907 cout <<
"Cut time stepsize and repeat!\n";
914 rs.SetupFIMBulkBoundAIMs();
916 rs.bulk.ShowFIMBulk();
920 resFIM.maxRelRes0_v = resFIM.maxRelRes_v;
927 rs.bulk.UpdateLastStepAIM();
935 cout <<
"Cut time stepsize and repeat! -- 02\n";
938 OCP_DBL cfl = rs.CalCFLAIM(ctrl.current_dt);
940 cout <<
"CFL is too big" << endl;
941 ctrl.current_dt /= 2;
980 resFIM.res.resize(num);
990 if (cfl > 1) dt /= (cfl + 1);
1009 cout <<
"Negative Ni occurs\n";
1031 resFIM.maxRelRes0_v = resFIM.maxRelRes_v;
1043 int status = myAuxLS.
Solve();
1052 cout <<
"Negative Ni occurs\n";
1075 if (resFIM.maxRelRes_v <= resFIM.maxRelRes0_v * ctrl.ctrlNR.
NRtol ||
1076 resFIM.maxRelRes_v <= ctrl.ctrlNR.
NRtol ||
1077 resFIM.maxRelRes_mol <= ctrl.ctrlNR.
NRtol ||
1078 (NRdPmax <= ctrl.ctrlNR.
NRdPmin && NRdSmax <= ctrl.ctrlNR.
NRdSmin)) {
1081 if (ctrl.iterNR > ctrl.ctrlNR.
maxNRiter) {
1082 ctrl.current_dt *= ctrl.ctrlTime.
cutFacNR;
1084 cout <<
"Local FIM Failed!" << endl;
1091 switch (flagCheck) {
const USI VECTORFASP
Use vector linear solver in Fasp.
unsigned int USI
Generic unsigned integer.
double OCP_DBL
Double precision.
unsigned int OCP_USI
Long unsigned integer.
const USI SCALARFASP
Use scalar linear solver in Fasp.
Declaration of solution methods for fluid part in OpenCAEPoro.
void CalFlux(const Bulk &myBulk)
Calculate volume flow rate and moles flow rate of each perforation.
void CalTrans(const Bulk &myBulk)
Calculate Transmissibility of Wells.
void CaldG(const Bulk &myBulk)
Calculate dG.
void CalProdWeight(const Bulk &myBulk)
Calculate Prodweight.
void MassConserveIMPEC(Bulk &myBulk, const OCP_DBL &dt) const
Update mole composition of each bulk according to mass conservation for IMPEC.
void OutFIMNi()
FIMNi -> Ni in FIM Bulk.
void ResetNi()
Reset Ni to the ones of the last time step.
void FlashDerivAIM(const bool &IfAIMs)
Perform flash calculation with Ni and calculate derivatives.
void InFIMNi()
Ni in FIM Bulk -> FIMNi.
OCP_DBL NRtol
Maximum non-linear convergence error.
OCP_DBL NRdSmin
Minimum Saturation change in a Newton iteration.
OCP_DBL NRdPmax
Maximum Pressure change in a Newton iteration.
USI maxNRiter
Maximum number of Newton iterations in a timestep.
OCP_DBL NRdSmax
Maximum Saturation change in a Newton iteration.
OCP_DBL NRdPmin
Minimum Pressure change in a Newton iteration.
OCP_DBL cutFacNR
Factor by which timestep is cut after convergence failure.
Get elapsed wall-time in millisecond.
__inline__ double Stop() const
Stop the timer and return duration from start() in ms.
__inline__ void Start()
Start the timer.
void GetIJKBulk(USI &i, USI &j, USI &k, const OCP_USI &n) const
Return the 3D coordinate for object grid with bulk(active grids) index.
Linear solvers for discrete systems.
void OutputLinearSystem(const string &fileA, const string &fileb) const
Output the mat and rhs to fileA and fileb. // TODO: output to some obj?
USI GetNumIters()
Return the Max Iters.
void AssembleMatLinearSolver()
Assemble Mat for Linear Solver.
void ClearData()
Clear the internal matrix data for scalar-value problems.
OCP_INT Solve()
Solve the Linear System.
void AssembleRhs(const vector< OCP_DBL > &rhs)
Assign Rhs — used for FIM now.
void CheckEquation() const
Check whether NAN or INF occurs in equations, used in debug mode.
vector< OCP_DBL > & GetSolution()
Return the solution.
void SetupLinearSolver(const USI &i, const string &dir, const string &file)
Setup LinearSolver.
void OutputSolution(const string &filename) const
Output the solution to a disk file name.
void CheckSolution() const
Check whether NAN or INF occurs in solutions, used in debug mode.
All control parameters except for well controlers.
void CalNextTstepIMPEC(const Reservoir &reservoir)
Calculate the next time step according to max change of some variables.
OCP_DBL & GetCurDt()
Return current dt.
string GetWorkDir() const
Return work dir name.
void UpdateIterNR()
Update the number of Newton iterations.
void UpdateIters()
Update the number of iterations.
void ResetIterNRLS()
Reset the number of iterations.
string GetLsFile() const
Return linear solver file name.
void UpdateIterLS(const USI &num)
Update the number of linear iterations.
void UpdateTimeLS(const OCP_DBL &t)
Update time used for linear solver.
bool UpdateProperty(Reservoir &rs, OCPControl &ctrl)
Update properties of fluids.
void InitReservoir(Reservoir &rs) const
Init.
void SolveLinearSystem(LinearSystem &myLS, Reservoir &rs, OCPControl &ctrl)
Solve the linear system.
void Prepare(Reservoir &rs, OCP_DBL &dt)
Prepare for Assembling matrix.
bool FinishNR(Reservoir &rs, OCPControl &ctrl)
Finish a Newton-Raphson iteration.
void AssembleMat(LinearSystem &myLS, const Reservoir &rs, const OCP_DBL &dt) const
Assemble Matrix.
void Setup(Reservoir &rs, LinearSystem &myLS, const OCPControl &ctrl)
Setup AIMc.
void AssembleMat(LinearSystem &myLS, const Reservoir &rs, const OCP_DBL &dt)
Assemble Matrix.
void Setup(Reservoir &rs, LinearSystem &myLS, const OCPControl &ctrl)
Setup AIMs.
void SolveLinearSystem(LinearSystem &myLS, Reservoir &rs, OCPControl &ctrl)
Solve the linear system.
void Prepare(Reservoir &rs, OCP_DBL &dt)
Prepare for Assembling matrix.
void FinishStep(Reservoir &rs, OCPControl &ctrl)
Finish a time step.
bool UpdateProperty(Reservoir &rs, OCPControl &ctrl)
Update properties of fluids.
bool FinishNR(Reservoir &rs, OCPControl &ctrl)
Finish a Newton-Raphson iteration.
void Prepare(Reservoir &rs, OCP_DBL &dt)
Prepare for Assembling matrix.
bool UpdateProperty(Reservoir &rs, OCPControl &ctrl, LinearSystem &myAuxLS)
Update properties of fluids.
void Setup(Reservoir &rs, LinearSystem &myLS, LinearSystem &myAuxLS, const OCPControl &ctrl)
Setup AIMt.
void AssembleMat(LinearSystem &myLS, const Reservoir &rs, const OCP_DBL &dt) const
Assemble Matrix.
void Prepare(Reservoir &rs, OCP_DBL &dt)
Prepare for Assembling matrix.
void SolveLinearSystem(LinearSystem &myLS, Reservoir &rs, OCPControl &ctrl) const
Solve the linear system.
void Setup(Reservoir &rs, LinearSystem &myLS, const OCPControl &ctrl)
Setup FIM.
void FinishStep(Reservoir &rs, OCPControl &ctrl) const
Finish a time step.
ResFIM resFIM
Resiual for FIM.
bool UpdateProperty(Reservoir &rs, OCPControl &ctrl)
Update properties of fluids.
void InitReservoir(Reservoir &rs) const
Init.
bool FinishNR(Reservoir &rs, OCPControl &ctrl)
Finish a Newton-Raphson iteration.
void SolveLinearSystem(LinearSystem &myLS, Reservoir &rs, OCPControl &ctrl) const
Solve the linear system.
bool UpdateProperty(Reservoir &rs, OCPControl &ctrl)
Update properties of fluids.
void InitReservoir(Reservoir &rs) const
Init.
void AssembleMat(LinearSystem &myLS, const Reservoir &rs, const OCP_DBL &dt) const
Assemble Matrix.
void InitReservoir(Reservoir &rs) const
Init.
void Setup(Reservoir &rs, LinearSystem &myLS, const OCPControl &ctrl)
Setup IMPEC.
void SolveLinearSystem(LinearSystem &myLS, Reservoir &rs, OCPControl &ctrl)
Solve the linear system.
void Prepare(Reservoir &rs, OCP_DBL &dt)
Prepare for Assembling matrix.
bool UpdateProperty(Reservoir &rs, OCPControl &ctrl)
Update properties of fluids.
bool FinishNR(const Reservoir &rs)
Determine if NR iteration finishes.
bool CheckVe(const OCP_DBL &Vlim) const
Check error between Fluids and Pores.
void AllocateMatIMPEC(LinearSystem &myLS) const
Allocate Maxmimum memory for internal Matirx for IMPEC.
void InitFIM()
Initialize the properties of Reservoir for FIM.
void AssembleMatAIMs(LinearSystem &myLS, vector< OCP_DBL > &res, const OCP_DBL &dt) const
Assemble Matrix for AIMs.
void AssembleMatFIM(LinearSystem &myLS, const OCP_DBL &dt) const
Assemble Matrix for FIM.
void AllocateAuxAIMt()
Allocate memory for auxiliary variables used for AIMt.
void UpdateLastStepFIM()
Update value of last step for FIM.
void AllocateAuxFIM()
Allocate memory for auxiliary variables used for FIM.
void ResetVal01IMPEC()
Reset Capillary Pressure, Flux for IMPEC.
void CalKrPc()
Calculate Relative Permeability and Capillary for each Bulk.
void UpdateLastStepAIM()
Update value of last step for IMPEC.
void CalFlashIMPEC()
Calculate Flash For IMPEC.
void MassConseveIMPEC(const OCP_DBL &dt)
Calculate Ni according to Flux.
void GetSolutionFIM(const vector< OCP_DBL > &u, const OCP_DBL &dPmax, const OCP_DBL &dSmax)
void CalFlashDerivAIM(const bool &IfAIMs)
Calculate Flash for local FIM, some derivatives are needed.
OCP_DBL GetNRdSmax(OCP_USI &index)
Return NRdSmax.
void GetSolutionIMPEC(const vector< OCP_DBL > &u)
Return the Solution to Reservoir Pressure for IMPEC.
bool CheckNi()
Check if abnormal Pressure occurs.
OCP_DBL GetNRdSmaxP()
Return NRdSmaxP.
void CalVpore()
Calculate pore of Bulks.
void PrepareWell()
Calculate Well Properties at the beginning of each time step.
void AllocateAuxIMPEC()
Allocate memory for auxiliary variables used for IMPEC.
void InitIMPEC()
Initialize the properties of Reservoir for IMPEC.
OCP_USI GetMaxFIMBulk() const
Return MaxNUMFIMBulk.
USI GetWellNum() const
Return the num of Well.
void CalKrPcDerivAIM(const bool &IfAIMs)
Calculate Relative Permeability and Capillary and some derivatives for each Bulk.
void GetSolutionAIMt(const vector< OCP_DBL > &u, const OCP_DBL &dPmax, const OCP_DBL &dSmax)
void UpdateLastStepIMPEC()
Update value of last step for IMPEC.
OCP_DBL GetNRdPmax()
Return NRdPmax.
void CalMaxChange()
Calculate Maximum Change of some reference variables for IMPEC.
void AllocateMatFIM(LinearSystem &myLS) const
Allocate Maxmimum memory for internal Matirx for FIM.
OCP_INT CheckP(const bool &bulkCheck=true, const bool &wellCheck=true)
Check if abnormal Pressure occurs.
void AssembleMatAIMc(LinearSystem &myLS, const OCP_DBL &dt) const
Assemble Matrix for AIMc.
void ResetFIM(const bool &flag)
Reset FIM.
USI GetComNum() const
Return the num of Components.
void CalFlashDerivAIMc()
Calculate Flash for local FIM, some derivatives are needed.
void CalConnFluxIMPEC()
Calculate flux between bulks.
void CalWellTrans()
Calculate Trans of Wells.
void AllocateMatAIMt(LinearSystem &myLS) const
Allocate Maxmimum memory for internal Matirx for local FIM.
void AllocateAuxAIMc()
Allocate memory for auxiliary variables used for FIM.
void AssembleMatAIMt(LinearSystem &myLS, const OCP_DBL &dt) const
Assemble Matrix for AIMt -— local FIM here.
void SetupFIMBulk(const bool &NRflag=false)
Setup FIMBulk.
void AllocateAuxAIMs()
Allocate memory for auxiliary variables used for AIMs.
void CalIPRT(const OCP_DBL &dt)
Calculate num of Injection, Production.
OCP_DBL CalCFL(const OCP_DBL &dt)
Calcluate the CFL number, including bulks and wells for IMPEC.
OCP_DBL GetNRdNmax()
Return NRdNmax.
void ResetVal02IMPEC()
Reset Capillary Pressure, Moles of Componnets, Flux for IMPEC.
void CalKrPcDerivAIMc()
Calculate Relative Permeability and Capillary and some derivatives for each Bulk.
void CalKrPcDerivFIM()
Calculate Relative Permeability and Capillary and some derivatives for each Bulk.
void CalFlashDerivFIM()
Calculate Flash for FIM, some derivatives are needed.
void CalFLuxIMPEC()
Calculate flux between bulks, bulks and wells.
OCP_USI GetBulkNum() const
Return the num of Bulk.
void CalResAIMs(ResFIM &resFIM, const OCP_DBL &dt)
Calculate the Resiual for AIMs, it's also RHS of Linear System.
void CalResAIMc(ResFIM &resFIM, const OCP_DBL &dt)
Calculate the Resiual for FIM, it's also RHS of Linear System.
void CalWellFlux()
Calculate Flux between Bulk and Wells.
void CalResFIM(ResFIM &resFIM, const OCP_DBL &dt)
Calculate the Resiual for FIM, it's also RHS of Linear System.
void CalResAIMt(ResFIM &resFIM, const OCP_DBL &dt)
Calculate the Resiual for local FIM, it's also RHS of Linear System.