mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
added: StandardWellAssemble::asembleZFracEq
extracted from StandardWell::assembleWellEqWithoutIterationImpl
This commit is contained in:
@@ -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,...) \
|
#define INSTANCE(Dim,...) \
|
||||||
template class StandardWellAssemble<BlackOilFluidSystem<double,BlackOilDefaultIndexTraits>,__VA_ARGS__,double>; \
|
template class StandardWellAssemble<BlackOilFluidSystem<double,BlackOilDefaultIndexTraits>,__VA_ARGS__,double>; \
|
||||||
template void \
|
template void \
|
||||||
@@ -219,7 +232,13 @@ StandardWellAssemble<BlackOilFluidSystem<double,BlackOilDefaultIndexTraits>,__VA
|
|||||||
const int, \
|
const int, \
|
||||||
const int, \
|
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
|
// One phase
|
||||||
INSTANCE(4u, BlackOilOnePhaseIndices<0u,0u,0u,0u,false,false,0u,1u,0u>)
|
INSTANCE(4u, BlackOilOnePhaseIndices<0u,0u,0u,0u,false,false,0u,1u,0u>)
|
||||||
|
|||||||
@@ -79,6 +79,13 @@ public:
|
|||||||
const int numWellEq,
|
const int numWellEq,
|
||||||
StandardWellEquations<Scalar,Indices::numEq>& eqns) const;
|
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:
|
private:
|
||||||
const WellInterfaceFluidSystem<FluidSystem>& well_; //!< Reference to well
|
const WellInterfaceFluidSystem<FluidSystem>& well_; //!< Reference to well
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -500,9 +500,11 @@ namespace Opm
|
|||||||
}
|
}
|
||||||
|
|
||||||
if constexpr (has_zFraction) {
|
if constexpr (has_zFraction) {
|
||||||
for (int pvIdx = 0; pvIdx < this->numWellEq_; ++pvIdx) {
|
StandardWellAssemble<FluidSystem,Indices,Scalar>(*this).
|
||||||
this->linSys_.duneC_[0][cell_idx][pvIdx][Indices::contiZfracEqIdx] -= cq_s_zfrac_effective.derivative(pvIdx+Indices::numEq);
|
assembleZFracEq(cq_s_zfrac_effective,
|
||||||
}
|
cell_idx,
|
||||||
|
this->numWellEq_,
|
||||||
|
this->linSys_);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Update the connection
|
// Update the connection
|
||||||
|
|||||||
Reference in New Issue
Block a user