mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-01-13 01:41:55 -06:00
added: StandardWellAssemble::assembleSourceEq
extracted from StandardWell::assembleWellEqWithoutIterationImpl
This commit is contained in:
parent
5bbf205619
commit
68bc90b3be
@ -188,6 +188,20 @@ assemblePerforationEq(const EvalWell& cq_s_effective,
|
||||
}
|
||||
}
|
||||
|
||||
template<class FluidSystem, class Indices, class Scalar>
|
||||
template<class EvalWell>
|
||||
void StandardWellAssemble<FluidSystem,Indices,Scalar>::
|
||||
assembleSourceEq(const EvalWell& resWell_loc,
|
||||
const int componentIdx,
|
||||
const int numWellEq,
|
||||
StandardWellEquations<Scalar,Indices::numEq>& eqns) const
|
||||
{
|
||||
for (int pvIdx = 0; pvIdx < numWellEq; ++pvIdx) {
|
||||
eqns.duneD_[0][0][componentIdx][pvIdx] += resWell_loc.derivative(pvIdx+Indices::numEq);
|
||||
}
|
||||
eqns.resWell_[0][componentIdx] += resWell_loc.value();
|
||||
}
|
||||
|
||||
template<class FluidSystem, class Indices, class Scalar>
|
||||
template<class EvalWell>
|
||||
void StandardWellAssemble<FluidSystem,Indices,Scalar>::
|
||||
@ -238,7 +252,13 @@ StandardWellAssemble<BlackOilFluidSystem<double,BlackOilDefaultIndexTraits>,__VA
|
||||
assembleZFracEq(const DenseAd::Evaluation<double,-1,Dim>&, \
|
||||
const int, \
|
||||
const int, \
|
||||
StandardWellEquations<double,__VA_ARGS__::numEq>&) const;
|
||||
StandardWellEquations<double,__VA_ARGS__::numEq>&) const; \
|
||||
template void \
|
||||
StandardWellAssemble<BlackOilFluidSystem<double,BlackOilDefaultIndexTraits>,__VA_ARGS__,double>:: \
|
||||
assembleSourceEq(const DenseAd::Evaluation<double,-1,Dim>&, \
|
||||
const int, \
|
||||
const int, \
|
||||
StandardWellEquations<double,__VA_ARGS__::numEq>&) const;
|
||||
|
||||
// One phase
|
||||
INSTANCE(4u, BlackOilOnePhaseIndices<0u,0u,0u,0u,false,false,0u,1u,0u>)
|
||||
|
@ -86,6 +86,14 @@ public:
|
||||
const int numWellEq,
|
||||
StandardWellEquations<Scalar,Indices::numEq>& eqns) const;
|
||||
|
||||
//! \brief Assemble a source term.
|
||||
template<class EvalWell>
|
||||
void assembleSourceEq(const EvalWell& resWell_loc,
|
||||
const int componentIdx,
|
||||
const int numWellEq,
|
||||
StandardWellEquations<Scalar,Indices::numEq>& eqns) const;
|
||||
|
||||
|
||||
private:
|
||||
const WellInterfaceFluidSystem<FluidSystem>& well_; //!< Reference to well
|
||||
};
|
||||
|
@ -532,10 +532,11 @@ namespace Opm
|
||||
resWell_loc += (this->wellSurfaceVolumeFraction(componentIdx) - this->F0_[componentIdx]) * volume / dt;
|
||||
}
|
||||
resWell_loc -= this->getQs(componentIdx) * this->well_efficiency_factor_;
|
||||
for (int pvIdx = 0; pvIdx < this->numWellEq_; ++pvIdx) {
|
||||
this->linSys_.duneD_[0][0][componentIdx][pvIdx] += resWell_loc.derivative(pvIdx+Indices::numEq);
|
||||
}
|
||||
this->linSys_.resWell_[0][componentIdx] += resWell_loc.value();
|
||||
StandardWellAssemble<FluidSystem,Indices,Scalar>(*this).
|
||||
assembleSourceEq(resWell_loc,
|
||||
componentIdx,
|
||||
this->numWellEq_,
|
||||
this->linSys_);
|
||||
}
|
||||
|
||||
const auto& summaryState = ebosSimulator.vanguard().summaryState();
|
||||
|
Loading…
Reference in New Issue
Block a user