added: MultisegmentWellAssemble::assemblePerforationEq

extracted from MultisegmentWell::assembleWellEqWithoutIteration
This commit is contained in:
Arne Morten Kvarving
2022-11-18 12:09:43 +01:00
parent b1d1e47e28
commit 6011a42246
3 changed files with 35 additions and 17 deletions

View File

@@ -1626,23 +1626,8 @@ namespace Opm
this->connectionRates_[perf][comp_idx] = Base::restrictEval(cq_s_effective);
// subtract sum of phase fluxes in the well equations.
this->linSys_.resWell_[seg][comp_idx] += cq_s_effective.value();
// assemble the jacobians
for (int pv_idx = 0; pv_idx < numWellEq; ++pv_idx) {
// also need to consider the efficiency factor when manipulating the jacobians.
this->linSys_.duneC_[seg][cell_idx][pv_idx][comp_idx] -= cq_s_effective.derivative(pv_idx + Indices::numEq); // intput in transformed matrix
// the index name for the D should be eq_idx / pv_idx
this->linSys_.duneD_[seg][seg][comp_idx][pv_idx] += cq_s_effective.derivative(pv_idx + Indices::numEq);
}
for (int pv_idx = 0; pv_idx < Indices::numEq; ++pv_idx) {
// also need to consider the efficiency factor when manipulating the jacobians.
this->linSys_.duneB_[seg][cell_idx][comp_idx][pv_idx] += cq_s_effective.derivative(pv_idx);
}
MultisegmentWellAssemble<FluidSystem,Indices,Scalar>(*this).
assemblePerforationEq(seg, cell_idx, comp_idx, cq_s_effective, this->linSys_);
}
}