mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-12-25 16:51:00 -06:00
added: StandardWellAssemble::asembleZFracEq
extracted from StandardWell::assembleWellEqWithoutIterationImpl
This commit is contained in:
parent
f720cc6dde
commit
5bbf205619
@ -188,6 +188,19 @@ assemblePerforationEq(const EvalWell& cq_s_effective,
|
||||
}
|
||||
}
|
||||
|
||||
template<class FluidSystem, class Indices, class Scalar>
|
||||
template<class EvalWell>
|
||||
void StandardWellAssemble<FluidSystem,Indices,Scalar>::
|
||||
assembleZFracEq(const EvalWell& cq_s_zfrac_effective,
|
||||
const int cell_idx,
|
||||
const int numWellEq,
|
||||
StandardWellEquations<Scalar,Indices::numEq>& eqns) const
|
||||
{
|
||||
for (int pvIdx = 0; pvIdx < numWellEq; ++pvIdx) {
|
||||
eqns.duneC_[0][cell_idx][pvIdx][Indices::contiZfracEqIdx] -= cq_s_zfrac_effective.derivative(pvIdx+Indices::numEq);
|
||||
}
|
||||
}
|
||||
|
||||
#define INSTANCE(Dim,...) \
|
||||
template class StandardWellAssemble<BlackOilFluidSystem<double,BlackOilDefaultIndexTraits>,__VA_ARGS__,double>; \
|
||||
template void \
|
||||
@ -219,7 +232,13 @@ StandardWellAssemble<BlackOilFluidSystem<double,BlackOilDefaultIndexTraits>,__VA
|
||||
const int, \
|
||||
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>:: \
|
||||
assembleZFracEq(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>)
|
||||
|
@ -79,6 +79,13 @@ public:
|
||||
const int numWellEq,
|
||||
StandardWellEquations<Scalar,Indices::numEq>& eqns) const;
|
||||
|
||||
//! \brief Assemble equation for Z fraction.
|
||||
template<class EvalWell>
|
||||
void assembleZFracEq(const EvalWell& cq_s_zfrac_effective,
|
||||
const int cell_idx,
|
||||
const int numWellEq,
|
||||
StandardWellEquations<Scalar,Indices::numEq>& eqns) const;
|
||||
|
||||
private:
|
||||
const WellInterfaceFluidSystem<FluidSystem>& well_; //!< Reference to well
|
||||
};
|
||||
|
@ -500,9 +500,11 @@ namespace Opm
|
||||
}
|
||||
|
||||
if constexpr (has_zFraction) {
|
||||
for (int pvIdx = 0; pvIdx < this->numWellEq_; ++pvIdx) {
|
||||
this->linSys_.duneC_[0][cell_idx][pvIdx][Indices::contiZfracEqIdx] -= cq_s_zfrac_effective.derivative(pvIdx+Indices::numEq);
|
||||
}
|
||||
StandardWellAssemble<FluidSystem,Indices,Scalar>(*this).
|
||||
assembleZFracEq(cq_s_zfrac_effective,
|
||||
cell_idx,
|
||||
this->numWellEq_,
|
||||
this->linSys_);
|
||||
}
|
||||
}
|
||||
// Update the connection
|
||||
|
Loading…
Reference in New Issue
Block a user