mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
MultisegmentWell: move getQs to MultisegmentWellPrimaryVariables
This commit is contained in:
@@ -360,14 +360,6 @@ computeSegmentFluidProperties(const EvalWell& temperature,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename FluidSystem, typename Indices, typename Scalar>
|
|
||||||
typename MultisegmentWellEval<FluidSystem,Indices,Scalar>::EvalWell
|
|
||||||
MultisegmentWellEval<FluidSystem,Indices,Scalar>::
|
|
||||||
getQs(const int comp_idx) const
|
|
||||||
{
|
|
||||||
return primary_variables_.getSegmentRate(0, comp_idx);
|
|
||||||
}
|
|
||||||
|
|
||||||
template<typename FluidSystem, typename Indices, typename Scalar>
|
template<typename FluidSystem, typename Indices, typename Scalar>
|
||||||
typename MultisegmentWellEval<FluidSystem,Indices,Scalar>::EvalWell
|
typename MultisegmentWellEval<FluidSystem,Indices,Scalar>::EvalWell
|
||||||
MultisegmentWellEval<FluidSystem,Indices,Scalar>::
|
MultisegmentWellEval<FluidSystem,Indices,Scalar>::
|
||||||
|
|||||||
@@ -140,7 +140,6 @@ protected:
|
|||||||
|
|
||||||
EvalWell getFrictionPressureLoss(const int seg) const;
|
EvalWell getFrictionPressureLoss(const int seg) const;
|
||||||
EvalWell getHydroPressureLoss(const int seg) const;
|
EvalWell getHydroPressureLoss(const int seg) const;
|
||||||
EvalWell getQs(const int comp_idx) const;
|
|
||||||
EvalWell getSegmentWQTotal(const int seg) const;
|
EvalWell getSegmentWQTotal(const int seg) const;
|
||||||
EvalWell getSegmentSurfaceVolume(const EvalWell& temperature,
|
EvalWell getSegmentSurfaceVolume(const EvalWell& temperature,
|
||||||
const EvalWell& saltConcentration,
|
const EvalWell& saltConcentration,
|
||||||
|
|||||||
@@ -386,6 +386,14 @@ getSegmentRate(const int seg,
|
|||||||
return evaluation_[seg][WQTotal] * this->volumeFractionScaled(seg, comp_idx);
|
return evaluation_[seg][WQTotal] * this->volumeFractionScaled(seg, comp_idx);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template<class FluidSystem, class Indices, class Scalar>
|
||||||
|
typename MultisegmentWellPrimaryVariables<FluidSystem,Indices,Scalar>::EvalWell
|
||||||
|
MultisegmentWellPrimaryVariables<FluidSystem,Indices,Scalar>::
|
||||||
|
getQs(const int comp_idx) const
|
||||||
|
{
|
||||||
|
return this->getSegmentRate(0, comp_idx);
|
||||||
|
}
|
||||||
|
|
||||||
#define INSTANCE(...) \
|
#define INSTANCE(...) \
|
||||||
template class MultisegmentWellPrimaryVariables<BlackOilFluidSystem<double,BlackOilDefaultIndexTraits>,__VA_ARGS__,double>;
|
template class MultisegmentWellPrimaryVariables<BlackOilFluidSystem<double,BlackOilDefaultIndexTraits>,__VA_ARGS__,double>;
|
||||||
|
|
||||||
|
|||||||
@@ -119,6 +119,9 @@ public:
|
|||||||
EvalWell getSegmentRate(const int seg,
|
EvalWell getSegmentRate(const int seg,
|
||||||
const int comp_idx) const;
|
const int comp_idx) const;
|
||||||
|
|
||||||
|
//! \brief Returns scaled rate for a component.
|
||||||
|
EvalWell getQs(const int comp_idx) const;
|
||||||
|
|
||||||
// the values for the primary varibles
|
// the values for the primary varibles
|
||||||
// based on different solutioin strategies, the wells can have different primary variables
|
// based on different solutioin strategies, the wells can have different primary variables
|
||||||
std::vector<std::array<double, numWellEq> > value_;
|
std::vector<std::array<double, numWellEq> > value_;
|
||||||
|
|||||||
@@ -453,7 +453,7 @@ namespace Opm
|
|||||||
well_flux.clear();
|
well_flux.clear();
|
||||||
well_flux.resize(np, 0.0);
|
well_flux.resize(np, 0.0);
|
||||||
for (int compIdx = 0; compIdx < this->num_components_; ++compIdx) {
|
for (int compIdx = 0; compIdx < this->num_components_; ++compIdx) {
|
||||||
const EvalWell rate = well_copy.getQs(compIdx);
|
const EvalWell rate = well_copy.primary_variables_.getQs(compIdx);
|
||||||
well_flux[this->ebosCompIdxToFlowCompIdx(compIdx)] = rate.value();
|
well_flux[this->ebosCompIdxToFlowCompIdx(compIdx)] = rate.value();
|
||||||
}
|
}
|
||||||
debug_cost_counter_ += well_copy.debug_cost_counter_;
|
debug_cost_counter_ += well_copy.debug_cost_counter_;
|
||||||
@@ -1644,7 +1644,7 @@ namespace Opm
|
|||||||
if (seg == 0) { // top segment, pressure equation is the control equation
|
if (seg == 0) { // top segment, pressure equation is the control equation
|
||||||
const auto& summaryState = ebosSimulator.vanguard().summaryState();
|
const auto& summaryState = ebosSimulator.vanguard().summaryState();
|
||||||
const Schedule& schedule = ebosSimulator.vanguard().schedule();
|
const Schedule& schedule = ebosSimulator.vanguard().schedule();
|
||||||
std::function<EvalWell(const int)> gQ = [this](int a) { return this->getQs(a); };
|
std::function<EvalWell(const int)> gQ = [this](int a) { return this->primary_variables_.getQs(a); };
|
||||||
MultisegmentWellAssemble<FluidSystem,Indices,Scalar>(*this).
|
MultisegmentWellAssemble<FluidSystem,Indices,Scalar>(*this).
|
||||||
assembleControlEq(well_state,
|
assembleControlEq(well_state,
|
||||||
group_state,
|
group_state,
|
||||||
|
|||||||
Reference in New Issue
Block a user