mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-01-14 04:01: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 FluidSystem, class Indices, class Scalar>
|
||||||
template<class EvalWell>
|
template<class EvalWell>
|
||||||
void StandardWellAssemble<FluidSystem,Indices,Scalar>::
|
void StandardWellAssemble<FluidSystem,Indices,Scalar>::
|
||||||
@ -236,6 +250,12 @@ StandardWellAssemble<BlackOilFluidSystem<double,BlackOilDefaultIndexTraits>,__VA
|
|||||||
template void \
|
template void \
|
||||||
StandardWellAssemble<BlackOilFluidSystem<double,BlackOilDefaultIndexTraits>,__VA_ARGS__,double>:: \
|
StandardWellAssemble<BlackOilFluidSystem<double,BlackOilDefaultIndexTraits>,__VA_ARGS__,double>:: \
|
||||||
assembleZFracEq(const DenseAd::Evaluation<double,-1,Dim>&, \
|
assembleZFracEq(const DenseAd::Evaluation<double,-1,Dim>&, \
|
||||||
|
const int, \
|
||||||
|
const int, \
|
||||||
|
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, \
|
||||||
const int, \
|
const int, \
|
||||||
StandardWellEquations<double,__VA_ARGS__::numEq>&) const;
|
StandardWellEquations<double,__VA_ARGS__::numEq>&) const;
|
||||||
|
@ -86,6 +86,14 @@ public:
|
|||||||
const int numWellEq,
|
const int numWellEq,
|
||||||
StandardWellEquations<Scalar,Indices::numEq>& eqns) const;
|
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:
|
private:
|
||||||
const WellInterfaceFluidSystem<FluidSystem>& well_; //!< Reference to well
|
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->wellSurfaceVolumeFraction(componentIdx) - this->F0_[componentIdx]) * volume / dt;
|
||||||
}
|
}
|
||||||
resWell_loc -= this->getQs(componentIdx) * this->well_efficiency_factor_;
|
resWell_loc -= this->getQs(componentIdx) * this->well_efficiency_factor_;
|
||||||
for (int pvIdx = 0; pvIdx < this->numWellEq_; ++pvIdx) {
|
StandardWellAssemble<FluidSystem,Indices,Scalar>(*this).
|
||||||
this->linSys_.duneD_[0][0][componentIdx][pvIdx] += resWell_loc.derivative(pvIdx+Indices::numEq);
|
assembleSourceEq(resWell_loc,
|
||||||
}
|
componentIdx,
|
||||||
this->linSys_.resWell_[0][componentIdx] += resWell_loc.value();
|
this->numWellEq_,
|
||||||
|
this->linSys_);
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto& summaryState = ebosSimulator.vanguard().summaryState();
|
const auto& summaryState = ebosSimulator.vanguard().summaryState();
|
||||||
|
Loading…
Reference in New Issue
Block a user