addressing the first part of comments form PR#1680

there should be no functional change.
This commit is contained in:
Kai Bao 2018-12-13 13:29:59 +01:00
parent 1ddcfcb679
commit c4254240e2
6 changed files with 39 additions and 34 deletions

View File

@ -775,7 +775,7 @@ namespace Opm {
assert(has_polymer_);
B_avg[contiPolymerMWEqIdx] += 1.0 / fs.invB(FluidSystem::waterPhaseIdx).value();
// the residual of the polymer molecular equatinon is scaled down by a 100, since molecular weight
// the residual of the polymer molecular equation is scaled down by a 100, since molecular weight
// can be much bigger than 1, and this equation shares the same tolerance with other mass balance equations
// TODO: there should be a more general way to determine the scaling-down coefficient
const auto R2 = ebosResid[cell_idx][contiPolymerMWEqIdx] / 100.;

View File

@ -146,7 +146,8 @@ static inline K invertMatrix (const FieldMatrix<K,4,4> &matrix, FieldMatrix<K,4,
matrix[2][0] * matrix[0][1] * matrix[1][2] -
matrix[2][0] * matrix[0][2] * matrix[1][1];
K det = matrix[0][0] * inverse[0][0] + matrix[0][1] * inverse[1][0] + matrix[0][2] * inverse[2][0] + matrix[0][3] * inverse[3][0];
K det = matrix[0][0] * inverse[0][0] + matrix[0][1] * inverse[1][0] +
matrix[0][2] * inverse[2][0] + matrix[0][3] * inverse[3][0];
// return identity for singular or nearly singular matrices.
if (std::abs(det) < 1e-40) {

View File

@ -1911,7 +1911,7 @@ namespace Opm
template<typename TypeTag>
void
MultisegmentWell<TypeTag>::
updateWaterThroughput(const double dt, WellState &well_state) const
updateWaterThroughput(const double dt OPM_UNUSED, WellState& well_state OPM_UNUSED) const
{
}

View File

@ -89,8 +89,8 @@ namespace Opm
// TODO: we should have indices for the well equations and well primary variables separately
static const int Bhp = numStaticWellEq - numWellControlEq;
// total number of the welll equations and primary variables
// for StandardWell, there is no extra well equations will be used
// total number of the well equations and primary variables
// for StandardWell, no extra well equations will be used.
static const int numWellEq = numStaticWellEq;
using typename Base::Scalar;
@ -312,8 +312,10 @@ namespace Opm
const std::vector<EvalWell>& mob,
const EvalWell& bhp,
const int perf,
const bool allow_cf, std::vector<EvalWell>& cq_s,
double& perf_dis_gas_rate, double& perf_vap_oil_rate) const;
const bool allow_cf,
std::vector<EvalWell>& cq_s,
double& perf_dis_gas_rate,
double& perf_vap_oil_rate) const;
// TODO: maybe we should provide a light version of computePerfRate, which does not include the
// calculation of the derivatives

View File

@ -94,7 +94,7 @@ namespace Opm
// TODO: we should have indices for the well equations and well primary variables separately
static const int Bhp = numStaticWellEq - numWellControlEq;
// total number of the welll equations and primary variables
// total number of the well equations and primary variables
// there might be extra equations be used, numWellEq will be updated during the initialization
int numWellEq = numStaticWellEq;
@ -317,8 +317,10 @@ namespace Opm
const std::vector<EvalWell>& mob,
const EvalWell& bhp,
const int perf,
const bool allow_cf, std::vector<EvalWell>& cq_s,
double& perf_dis_gas_rate, double& perf_vap_oil_rate) const;
const bool allow_cf,
std::vector<EvalWell>& cq_s,
double& perf_dis_gas_rate,
double& perf_vap_oil_rate) const;
// TODO: maybe we should provide a light version of computePerfRate, which does not include the
// calculation of the derivatives

View File

@ -357,7 +357,7 @@ namespace Opm
const EvalWell cqt_i = - Tw * (total_mob_dense * drawdown);
// surface volume fraction of fluids within wellbore
std::vector<EvalWell> cmix_s(num_components_, EvalWell{numWellEq + numEq});
std::vector<EvalWell> cmix_s(num_components_, 0.);
for (int componentIdx = 0; componentIdx < num_components_; ++componentIdx) {
cmix_s[componentIdx] = wellSurfaceVolumeFraction(componentIdx);
}
@ -2807,7 +2807,7 @@ namespace Opm
template<typename TypeTag>
void
StandardWell<TypeTag>::
updateWaterThroughput(const double dt, WellState &well_state) const
updateWaterThroughput(const double dt OPM_UNUSED, WellState& well_state OPM_UNUSED) const
{
}
}