mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
added: MultisegmentWellAssemble::assembleTrivialEq
extracted from MultisegmentWellEval::assembleICDPressureEq
This commit is contained in:
parent
05a4ca85a7
commit
32dce644d3
@ -200,6 +200,16 @@ assemblePressureEq(const int seg,
|
||||
}
|
||||
}
|
||||
|
||||
template<class FluidSystem, class Indices, class Scalar>
|
||||
void MultisegmentWellAssemble<FluidSystem,Indices,Scalar>::
|
||||
assembleTrivialEq(const int seg,
|
||||
const Scalar value,
|
||||
Equations& eqns) const
|
||||
{
|
||||
eqns.resWell_[seg][SPres] = value;
|
||||
eqns.duneD_[seg][seg][SPres][WQTotal] = 1.;
|
||||
}
|
||||
|
||||
#define INSTANCE(...) \
|
||||
template class MultisegmentWellAssemble<BlackOilFluidSystem<double,BlackOilDefaultIndexTraits>,__VA_ARGS__,double>;
|
||||
|
||||
|
@ -98,6 +98,11 @@ public:
|
||||
bool wfrac = has_wfrac_variable,
|
||||
bool gfrac = has_gfrac_variable) const;
|
||||
|
||||
//! \brief Assembles a trivial equation.
|
||||
void assembleTrivialEq(const int seg,
|
||||
const Scalar value,
|
||||
Equations& eqns) const;
|
||||
|
||||
private:
|
||||
const WellInterfaceIndices<FluidSystem,Indices,Scalar>& well_; //!< Reference to well
|
||||
};
|
||||
|
@ -1404,8 +1404,8 @@ assembleICDPressureEq(const int seg,
|
||||
if (const auto& segment = this->segmentSet()[seg];
|
||||
(segment.segmentType() == Segment::SegmentType::VALVE) &&
|
||||
(segment.valve().status() == Opm::ICDStatus::SHUT) ) { // we use a zero rate equation to handle SHUT valve
|
||||
linSys_.resWell_[seg][SPres] = this->primary_variables_evaluation_[seg][WQTotal].value();
|
||||
linSys_.duneD_[seg][seg][SPres][WQTotal] = 1.;
|
||||
MultisegmentWellAssemble<FluidSystem,Indices,Scalar>(baseif_).
|
||||
assembleTrivialEq(seg, this->primary_variables_evaluation_[seg][WQTotal].value(), linSys_);
|
||||
|
||||
auto& ws = well_state.well(baseif_.indexOfWell());
|
||||
ws.segments.pressure_drop_friction[seg] = 0.;
|
||||
|
Loading…
Reference in New Issue
Block a user