some small cleaning up for Aquifer models

there should be no functional change.
This commit is contained in:
Kai Bao
2019-11-14 22:53:39 +01:00
parent eea833ced2
commit 0c6adbbba0
3 changed files with 6 additions and 8 deletions

View File

@@ -63,6 +63,8 @@ namespace Opm
// Variables constants
const AquiferCT::AQUCT_data aquct_data_;
Scalar beta_; // Influx constant
// TODO: it is possible it should be a AD variable
Scalar mu_w_; // water viscosity
// This function is used to initialize and calculate the alpha_i for each grid connection to the aquifer
inline void initializeConnections(const Aquancon::AquanconOutput& connection)
@@ -184,7 +186,7 @@ namespace Opm
* aquct_data_.C_t
* aquct_data_.r_o * aquct_data_.r_o;
// We calculate the time constant
Base::Tc_ = Base::mu_w_ * aquct_data_.phi_aq
Base::Tc_ = mu_w_ * aquct_data_.phi_aq
* aquct_data_.C_t
* aquct_data_.r_o * aquct_data_.r_o
/ ( aquct_data_.k_a * aquct_data_.c1 );
@@ -220,11 +222,12 @@ namespace Opm
temperature_aq = fs_aquifer.temperature(0);
pa0_mean = Base::pa0_;
Eval mu_w_aquifer = FluidSystem::waterPvt().viscosity(pvttableIdx, temperature_aq, pa0_mean);
Base::mu_w_ = mu_w_aquifer.value();
mu_w_ = mu_w_aquifer.value();
}
// This function is for calculating the aquifer properties from equilibrium state with the reservoir
// TODO: this function can be moved to the Inteface class, since it is the same for both Aquifer models
inline Scalar calculateReservoirEquilibrium()
{
// Since the global_indices are the reservoir index, we just need to extract the fluidstate at those indices

View File

@@ -149,7 +149,7 @@ namespace Opm
inline Eval dpai(int idx)
{
const Eval dp = aquifer_pressure_ - Base::pressure_current_.at(idx)
+ Base::rhow_.at(idx) * Base::gravity_()*(Base::cell_depth_.at(idx) - aqufetp_data_.d0);
+ Base::rhow_[idx] * Base::gravity_()*(Base::cell_depth_[idx] - aqufetp_data_.d0);
return dp;
}
@@ -175,7 +175,6 @@ namespace Opm
inline void calculateAquiferCondition()
{
const int pvttableIdx = aqufetp_data_.pvttableID - 1;
Base::rhow_.resize(Base::cell_idx_.size(),0.);
if (!aqufetp_data_.p0)
{

View File

@@ -202,8 +202,6 @@ namespace Opm
std::vector<Eval> rhow_;
std::vector<Scalar> alphai_;
// TODO: Fetkovich does not use mu_w_, it should be moved to CT class
Scalar mu_w_; //water viscosity
Scalar Tc_; // Time constant
Scalar pa0_; // initial aquifer pressure
@@ -211,8 +209,6 @@ namespace Opm
virtual void initializeConnections(const Aquancon::AquanconOutput& connection) =0;
// virtual Scalar dpai(int idx) = 0;
virtual void calculateInflowRate(int idx, const Simulator& simulator) = 0;
virtual void calculateAquiferCondition() = 0;