mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
added: MultisegmentWellAssemble::assembleAccumulationTerm
extracted from MultisegmentWell::assembleWellEqWithoutIteration
This commit is contained in:
parent
1952ca1e5c
commit
517dd49771
@ -210,6 +210,19 @@ assembleTrivialEq(const int seg,
|
||||
eqns.duneD_[seg][seg][SPres][WQTotal] = 1.;
|
||||
}
|
||||
|
||||
template<class FluidSystem, class Indices, class Scalar>
|
||||
void MultisegmentWellAssemble<FluidSystem,Indices,Scalar>::
|
||||
assembleAccumulationTerm(const int seg,
|
||||
const int comp_idx,
|
||||
const EvalWell& accumulation_term,
|
||||
Equations& eqns) const
|
||||
{
|
||||
eqns.resWell_[seg][comp_idx] += accumulation_term.value();
|
||||
for (int pv_idx = 0; pv_idx < numWellEq; ++pv_idx) {
|
||||
eqns.duneD_[seg][seg][comp_idx][pv_idx] += accumulation_term.derivative(pv_idx + Indices::numEq);
|
||||
}
|
||||
}
|
||||
|
||||
#define INSTANCE(...) \
|
||||
template class MultisegmentWellAssemble<BlackOilFluidSystem<double,BlackOilDefaultIndexTraits>,__VA_ARGS__,double>;
|
||||
|
||||
|
@ -103,6 +103,12 @@ public:
|
||||
const Scalar value,
|
||||
Equations& eqns) const;
|
||||
|
||||
//! \brief Assemble accumulation term.
|
||||
void assembleAccumulationTerm(const int seg,
|
||||
const int comp_idx,
|
||||
const EvalWell& accumulation_term,
|
||||
Equations& eqns1) const;
|
||||
|
||||
private:
|
||||
const WellInterfaceIndices<FluidSystem,Indices,Scalar>& well_; //!< Reference to well
|
||||
};
|
||||
|
@ -1563,11 +1563,8 @@ namespace Opm
|
||||
for (int comp_idx = 0; comp_idx < this->num_components_; ++comp_idx) {
|
||||
const EvalWell accumulation_term = regularization_factor * (segment_surface_volume * this->surfaceVolumeFraction(seg, comp_idx)
|
||||
- segment_fluid_initial_[seg][comp_idx]) / dt;
|
||||
|
||||
this->linSys_.resWell_[seg][comp_idx] += accumulation_term.value();
|
||||
for (int pv_idx = 0; pv_idx < numWellEq; ++pv_idx) {
|
||||
this->linSys_.duneD_[seg][seg][comp_idx][pv_idx] += accumulation_term.derivative(pv_idx + Indices::numEq);
|
||||
}
|
||||
MultisegmentWellAssemble<FluidSystem,Indices,Scalar>(*this).
|
||||
assembleAccumulationTerm(seg, comp_idx, accumulation_term, this->linSys_);
|
||||
}
|
||||
}
|
||||
// considering the contributions due to flowing out from the segment
|
||||
|
Loading…
Reference in New Issue
Block a user