mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
move updateWellStateFromPrimaryVariablesPolyMW to StandardWellPrimaryVariables
This commit is contained in:
parent
f964169914
commit
412e561cd8
@ -557,23 +557,6 @@ updateWellStateFromPrimaryVariables(WellState& well_state,
|
|||||||
well_state, deferred_logger);
|
well_state, deferred_logger);
|
||||||
}
|
}
|
||||||
|
|
||||||
template<class FluidSystem, class Indices, class Scalar>
|
|
||||||
void
|
|
||||||
StandardWellEval<FluidSystem,Indices,Scalar>::
|
|
||||||
updateWellStateFromPrimaryVariablesPolyMW(WellState& well_state) const
|
|
||||||
{
|
|
||||||
if (baseif_.isInjector()) {
|
|
||||||
auto& ws = well_state.well(baseif_.indexOfWell());
|
|
||||||
auto& perf_data = ws.perf_data;
|
|
||||||
auto& perf_water_velocity = perf_data.water_velocity;
|
|
||||||
auto& perf_skin_pressure = perf_data.skin_pressure;
|
|
||||||
for (int perf = 0; perf < baseif_.numPerfs(); ++perf) {
|
|
||||||
perf_water_velocity[perf] = primary_variables_.value_[Bhp + 1 + perf];
|
|
||||||
perf_skin_pressure[perf] = primary_variables_.value_[Bhp + 1 + baseif_.numPerfs() + perf];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
template<class FluidSystem, class Indices, class Scalar>
|
template<class FluidSystem, class Indices, class Scalar>
|
||||||
void
|
void
|
||||||
StandardWellEval<FluidSystem,Indices,Scalar>::
|
StandardWellEval<FluidSystem,Indices,Scalar>::
|
||||||
|
@ -134,8 +134,6 @@ protected:
|
|||||||
const double dFLimit,
|
const double dFLimit,
|
||||||
const double dBHPLimit) const;
|
const double dBHPLimit) const;
|
||||||
|
|
||||||
void updateWellStateFromPrimaryVariablesPolyMW(WellState& well_state) const;
|
|
||||||
|
|
||||||
mutable PrimaryVariables primary_variables_; //!< Primary variables for well
|
mutable PrimaryVariables primary_variables_; //!< Primary variables for well
|
||||||
|
|
||||||
// the saturations in the well bore under surface conditions at the beginning of the time step
|
// the saturations in the well bore under surface conditions at the beginning of the time step
|
||||||
|
@ -33,6 +33,7 @@
|
|||||||
#include <opm/models/blackoil/blackoiltwophaseindices.hh>
|
#include <opm/models/blackoil/blackoiltwophaseindices.hh>
|
||||||
|
|
||||||
#include <opm/simulators/wells/WellInterfaceIndices.hpp>
|
#include <opm/simulators/wells/WellInterfaceIndices.hpp>
|
||||||
|
#include <opm/simulators/wells/WellState.hpp>
|
||||||
|
|
||||||
namespace Opm {
|
namespace Opm {
|
||||||
|
|
||||||
@ -78,6 +79,22 @@ updatePolyMW(const BVectorWell& dwells)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template<class FluidSystem, class Indices, class Scalar>
|
||||||
|
void StandardWellPrimaryVariables<FluidSystem,Indices,Scalar>::
|
||||||
|
copyToWellStatePolyMW(WellState& well_state) const
|
||||||
|
{
|
||||||
|
if (well_.isInjector()) {
|
||||||
|
auto& ws = well_state.well(well_.indexOfWell());
|
||||||
|
auto& perf_data = ws.perf_data;
|
||||||
|
auto& perf_water_velocity = perf_data.water_velocity;
|
||||||
|
auto& perf_skin_pressure = perf_data.skin_pressure;
|
||||||
|
for (int perf = 0; perf < well_.numPerfs(); ++perf) {
|
||||||
|
perf_water_velocity[perf] = value_[Bhp + 1 + perf];
|
||||||
|
perf_skin_pressure[perf] = value_[Bhp + 1 + well_.numPerfs() + perf];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#define INSTANCE(...) \
|
#define INSTANCE(...) \
|
||||||
template class StandardWellPrimaryVariables<BlackOilFluidSystem<double,BlackOilDefaultIndexTraits>,__VA_ARGS__,double>;
|
template class StandardWellPrimaryVariables<BlackOilFluidSystem<double,BlackOilDefaultIndexTraits>,__VA_ARGS__,double>;
|
||||||
|
|
||||||
|
@ -33,6 +33,7 @@ namespace Opm
|
|||||||
{
|
{
|
||||||
|
|
||||||
template<class FluidSystem, class Indices, class Scalar> class WellInterfaceIndices;
|
template<class FluidSystem, class Indices, class Scalar> class WellInterfaceIndices;
|
||||||
|
class WellState;
|
||||||
|
|
||||||
//! \brief Class holding primary variables for StandardWell.
|
//! \brief Class holding primary variables for StandardWell.
|
||||||
template<class FluidSystem, class Indices, class Scalar>
|
template<class FluidSystem, class Indices, class Scalar>
|
||||||
@ -109,6 +110,9 @@ public:
|
|||||||
//! \brief Update polymer molecular weight values from solution vector.
|
//! \brief Update polymer molecular weight values from solution vector.
|
||||||
void updatePolyMW(const BVectorWell& dwells);
|
void updatePolyMW(const BVectorWell& dwells);
|
||||||
|
|
||||||
|
//! \brief Copy values to well state.
|
||||||
|
void copyToWellStatePolyMW(WellState& well_state) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
const WellInterfaceIndices<FluidSystem,Indices,Scalar>& well_; //!< Reference to well interface
|
const WellInterfaceIndices<FluidSystem,Indices,Scalar>& well_; //!< Reference to well interface
|
||||||
|
|
||||||
|
@ -995,7 +995,7 @@ namespace Opm
|
|||||||
|
|
||||||
// other primary variables related to polymer injectivity study
|
// other primary variables related to polymer injectivity study
|
||||||
if constexpr (Base::has_polymermw) {
|
if constexpr (Base::has_polymermw) {
|
||||||
this->updateWellStateFromPrimaryVariablesPolyMW(well_state);
|
this->primary_variables_.copyToWellStatePolyMW(well_state);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user