mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-11-25 10:40:21 -06:00
cleaning up more things from StandardWellsDense
This commit is contained in:
parent
7e9eee4ee4
commit
358d4c2a00
@ -239,8 +239,8 @@ list (APPEND PUBLIC_HEADER_FILES
|
||||
opm/autodiff/WellHelpers.hpp
|
||||
opm/autodiff/StandardWells.hpp
|
||||
opm/autodiff/StandardWells_impl.hpp
|
||||
opm/autodiff/WellInterface.hpp
|
||||
opm/autodiff/StandardWell.cpp
|
||||
opm/autodiff/WellInterface.hpp
|
||||
opm/autodiff/StandardWell.cpp
|
||||
opm/autodiff/StandardWellsDense.hpp
|
||||
opm/autodiff/StandardWellsSolvent.hpp
|
||||
opm/autodiff/StandardWellsSolvent_impl.hpp
|
||||
|
@ -105,7 +105,6 @@ enum WellVariablePositions {
|
||||
typedef Dune::BCRSMatrix <MatrixBlockType> Mat;
|
||||
typedef Dune::BlockVector<VectorBlockType> BVector;
|
||||
|
||||
typedef DenseAd::Evaluation<Scalar, /*size=*/numEq + numWellEq> EvalWell;
|
||||
typedef DenseAd::Evaluation<Scalar, /*size=*/numEq> Eval;
|
||||
typedef Ewoms::BlackOilPolymerModule<TypeTag> PolymerModule;
|
||||
|
||||
@ -174,15 +173,10 @@ enum WellVariablePositions {
|
||||
// xw to update Well State
|
||||
void applySolutionWellState(const BVector& x, WellState& well_state) const;
|
||||
|
||||
int flowPhaseToEbosCompIdx( const int phaseIdx ) const;
|
||||
|
||||
int flowToEbosPvIdx( const int flowPv ) const;
|
||||
|
||||
int flowPhaseToEbosPhaseIdx( const int phaseIdx ) const;
|
||||
|
||||
std::vector<double>
|
||||
extractPerfData(const std::vector<double>& in) const;
|
||||
|
||||
int numPhases() const;
|
||||
|
||||
int numCells() const;
|
||||
@ -201,18 +195,8 @@ enum WellVariablePositions {
|
||||
/// return true if wells are available on this process
|
||||
bool localWellsActive() const;
|
||||
|
||||
/// Density of each well perforation
|
||||
const std::vector<double>& wellPerforationDensities() const;
|
||||
|
||||
/// Diff to bhp for each well perforation.
|
||||
const std::vector<double>& wellPerforationPressureDiffs() const;
|
||||
|
||||
EvalWell extendEval(const Eval& in) const;
|
||||
|
||||
void setWellVariables(const WellState& xw);
|
||||
|
||||
void print(const EvalWell& in) const;
|
||||
|
||||
void computeAccumWells();
|
||||
|
||||
SimulatorReport solveWellEq(Simulator& ebosSimulator,
|
||||
@ -307,21 +291,12 @@ enum WellVariablePositions {
|
||||
std::vector<double> well_perforation_efficiency_factors_;
|
||||
// the depth of the all the cell centers
|
||||
// for standard Wells, it the same with the perforation depth
|
||||
std::vector<double> cell_depths_;
|
||||
std::vector<double> pv_;
|
||||
|
||||
std::vector<double> well_perforation_densities_;
|
||||
std::vector<double> well_perforation_pressure_diffs_;
|
||||
|
||||
std::vector<double> wpolymer_;
|
||||
std::vector<double> wsolvent_;
|
||||
|
||||
std::vector<double> wells_rep_radius_;
|
||||
std::vector<double> wells_perf_length_;
|
||||
std::vector<double> wells_bore_diameter_;
|
||||
|
||||
std::vector<EvalWell> wellVariables_;
|
||||
|
||||
long int global_nc_;
|
||||
|
||||
mutable BVector scaleAddRes_;
|
||||
|
@ -57,7 +57,6 @@ namespace Opm {
|
||||
phase_usage_ = phase_usage_arg;
|
||||
active_ = active_arg;
|
||||
gravity_ = gravity_arg;
|
||||
cell_depths_ = extractPerfData(depth_arg);
|
||||
pv_ = pv_arg;
|
||||
|
||||
calculateEfficiencyFactors();
|
||||
@ -369,17 +368,6 @@ namespace Opm {
|
||||
return flowToEbos[ flowPv ];
|
||||
}
|
||||
|
||||
template<typename TypeTag>
|
||||
int
|
||||
StandardWellsDense<TypeTag>::
|
||||
flowPhaseToEbosCompIdx( const int phaseIdx ) const
|
||||
{
|
||||
const int phaseToComp[ 3 ] = { FluidSystem::waterCompIdx, FluidSystem::oilCompIdx, FluidSystem::gasCompIdx};
|
||||
if (phaseIdx > 2 )
|
||||
return phaseIdx;
|
||||
return phaseToComp[ phaseIdx ];
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@ -394,23 +382,6 @@ namespace Opm {
|
||||
return flowToEbos[ phaseIdx ];
|
||||
}
|
||||
|
||||
template<typename TypeTag>
|
||||
std::vector<double>
|
||||
StandardWellsDense<TypeTag>::
|
||||
extractPerfData(const std::vector<double>& in) const
|
||||
{
|
||||
const int nw = wells().number_of_wells;
|
||||
const int nperf = wells().well_connpos[nw];
|
||||
std::vector<double> out(nperf);
|
||||
for (int w = 0; w < nw; ++w) {
|
||||
for (int perf = wells().well_connpos[w] ; perf < wells().well_connpos[w+1]; ++perf) {
|
||||
const int well_idx = wells().well_cells[perf];
|
||||
out[perf] = in[well_idx];
|
||||
}
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@ -516,46 +487,6 @@ namespace Opm {
|
||||
|
||||
|
||||
|
||||
template<typename TypeTag>
|
||||
const std::vector<double>&
|
||||
StandardWellsDense<TypeTag>::
|
||||
wellPerforationDensities() const
|
||||
{
|
||||
return well_perforation_densities_;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template<typename TypeTag>
|
||||
const std::vector<double>&
|
||||
StandardWellsDense<TypeTag>::
|
||||
wellPerforationPressureDiffs() const
|
||||
{
|
||||
return well_perforation_pressure_diffs_;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template<typename TypeTag>
|
||||
typename StandardWellsDense<TypeTag>::EvalWell
|
||||
StandardWellsDense<TypeTag>::
|
||||
extendEval(const Eval& in) const {
|
||||
EvalWell out = 0.0;
|
||||
out.setValue(in.value());
|
||||
for(int eqIdx = 0; eqIdx < numEq;++eqIdx) {
|
||||
out.setDerivative(eqIdx, in.derivative(flowToEbosPvIdx(eqIdx)));
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template<typename TypeTag>
|
||||
void
|
||||
StandardWellsDense<TypeTag>::
|
||||
@ -570,21 +501,6 @@ namespace Opm {
|
||||
|
||||
|
||||
|
||||
template<typename TypeTag>
|
||||
void
|
||||
StandardWellsDense<TypeTag>::
|
||||
print(const EvalWell& in) const
|
||||
{
|
||||
std::cout << in.value() << std::endl;
|
||||
for (int i = 0; i < in.size; ++i) {
|
||||
std::cout << in.derivative(i) << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template<typename TypeTag>
|
||||
void
|
||||
StandardWellsDense<TypeTag>::
|
||||
@ -1029,17 +945,6 @@ namespace Opm {
|
||||
|
||||
|
||||
|
||||
template<typename TypeTag>
|
||||
const std::vector<double>&
|
||||
StandardWellsDense<TypeTag>::
|
||||
wellPerfEfficiencyFactors() const
|
||||
{
|
||||
return well_perforation_efficiency_factors_;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template<typename TypeTag>
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user