mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Merge pull request #4840 from totto82/solvent_well_fix
Solvent well fix
This commit is contained in:
commit
467671b946
@ -255,8 +255,10 @@ updateNewton(const BVectorWell& dwells,
|
||||
|
||||
// for injectors, very typical one of the fractions will be one, and it is easy to get zero value
|
||||
// fractions. not sure what is the best way to handle it yet, so we just use 1.0 here
|
||||
// The relaxationFactorFractionProducer code does not take into account solvent
|
||||
// so we use 1.0 for cases with solvent.
|
||||
[[maybe_unused]] const double relaxation_factor_fractions =
|
||||
well_.isProducer() ? this->relaxationFactorFractionsProducer(dwells) : 1.0;
|
||||
(well_.isProducer() && !Indices::enableSolvent) ? this->relaxationFactorFractionsProducer(dwells) : 1.0;
|
||||
|
||||
// update the second and third well variable (The flux fractions)
|
||||
|
||||
|
@ -1372,6 +1372,14 @@ namespace Opm
|
||||
for(int p = 0; p < np; ++p) {
|
||||
well_flux[this->ebosCompIdxToFlowCompIdx(p)] += cq_s[p];
|
||||
}
|
||||
|
||||
// the solvent contribution is added to the gas potentials
|
||||
if constexpr (has_solvent) {
|
||||
const auto& pu = this->phaseUsage();
|
||||
assert(pu.phase_used[Gas]);
|
||||
const int gas_pos = pu.phase_pos[Gas];
|
||||
well_flux[gas_pos] += cq_s[Indices::contiSolventEqIdx];
|
||||
}
|
||||
}
|
||||
this->parallel_well_info_.communication().sum(well_flux.data(), well_flux.size());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user