mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
correcting the size of seg_comp_initial_ based on num_comp
for standards wells, all the three equations are mass balance equatiions, it is safe to use numWellEq. for MS wells, there is one extra pressure equation, it should be the number of mass balance equations. If we do not put the polymer equation inside the well equations, we will face dilemma soon.
This commit is contained in:
parent
282d678622
commit
dd9ad42a28
@ -33,7 +33,7 @@ namespace Opm
|
||||
, segment_inlets_(numberOfSegments())
|
||||
, perforation_cell_pressure_diffs_(number_of_perforations_, 0.0)
|
||||
, segment_perforation_depth_diffs_(number_of_perforations_)
|
||||
, segment_comp_initial_(numberOfSegments(), std::vector<double>(numWellEq, 0.0))
|
||||
, segment_comp_initial_(numberOfSegments(), std::vector<double>(numComponents(), 0.0))
|
||||
, segment_densities_(numberOfSegments(), 0.0)
|
||||
, segment_depth_diffs_(numberOfSegments(), 0.0)
|
||||
{
|
||||
@ -762,8 +762,10 @@ namespace Opm
|
||||
computeInitialComposition()
|
||||
{
|
||||
for (int seg = 0; seg < numberOfSegments(); ++seg) {
|
||||
for (int eq_idx = 0; eq_idx < numWellEq; ++eq_idx) {
|
||||
segment_comp_initial_[seg][eq_idx] = surfaceVolumeFraction(seg, eq_idx).value();
|
||||
// TODO: probably it should be numWellEq -1 more accurately,
|
||||
// while by meaning it should be num_comp
|
||||
for (int comp_idx = 0; comp_idx < numComponents(); ++comp_idx) {
|
||||
segment_comp_initial_[seg][comp_idx] = surfaceVolumeFraction(seg, comp_idx).value();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -316,7 +316,7 @@ namespace Opm
|
||||
StandardWell<TypeTag>::
|
||||
wellVolumeFraction(const int compIdx) const
|
||||
{
|
||||
const auto pu = phaseUsage();
|
||||
const auto& pu = phaseUsage();
|
||||
if (active()[Water] && compIdx == pu.phase_pos[Water]) {
|
||||
return primary_variables_evaluation_[WFrac];
|
||||
}
|
||||
@ -1525,6 +1525,8 @@ namespace Opm
|
||||
StandardWell<TypeTag>::
|
||||
computeAccumWell()
|
||||
{
|
||||
// TODO: it should be num_comp, while it also bring problem for
|
||||
// the polymer case.
|
||||
for (int eq_idx = 0; eq_idx < numWellEq; ++eq_idx) {
|
||||
F0_[eq_idx] = wellSurfaceVolumeFraction(eq_idx).value();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user