mirror of
https://github.com/OPM/opm-simulators.git
synced 2026-09-05 04:40:19 -05:00
Delete obsolete include directives and functions.
Also make other minor adjustments, in particular moving the function getCubeDim() from WellsManagerDetail to WellHelpers.hpp.
This commit is contained in:
@@ -37,8 +37,6 @@
|
|||||||
#include <opm/parser/eclipse/EclipseState/Schedule/Well/WellTestState.hpp>
|
#include <opm/parser/eclipse/EclipseState/Schedule/Well/WellTestState.hpp>
|
||||||
#include <opm/parser/eclipse/EclipseState/Schedule/Group/GuideRate.hpp>
|
#include <opm/parser/eclipse/EclipseState/Schedule/Group/GuideRate.hpp>
|
||||||
|
|
||||||
#include <opm/core/wells.h>
|
|
||||||
#include <opm/core/wells/WellCollection.hpp>
|
|
||||||
#include <opm/simulators/timestepping/SimulatorReport.hpp>
|
#include <opm/simulators/timestepping/SimulatorReport.hpp>
|
||||||
#include <opm/simulators/wells/PerforationData.hpp>
|
#include <opm/simulators/wells/PerforationData.hpp>
|
||||||
#include <opm/simulators/wells/VFPInjProperties.hpp>
|
#include <opm/simulators/wells/VFPInjProperties.hpp>
|
||||||
|
|||||||
@@ -22,6 +22,7 @@
|
|||||||
|
|
||||||
#include <opm/simulators/utils/DeferredLoggingErrorHelpers.hpp>
|
#include <opm/simulators/utils/DeferredLoggingErrorHelpers.hpp>
|
||||||
#include <opm/simulators/wells/SimFIBODetails.hpp>
|
#include <opm/simulators/wells/SimFIBODetails.hpp>
|
||||||
|
#include <opm/core/props/phaseUsageFromDeck.hpp>
|
||||||
|
|
||||||
namespace Opm {
|
namespace Opm {
|
||||||
template<typename TypeTag>
|
template<typename TypeTag>
|
||||||
|
|||||||
@@ -28,8 +28,6 @@
|
|||||||
#include <opm/parser/eclipse/EclipseState/Schedule/Events.hpp>
|
#include <opm/parser/eclipse/EclipseState/Schedule/Events.hpp>
|
||||||
#include <opm/parser/eclipse/EclipseState/Schedule/Well/Well.hpp>
|
#include <opm/parser/eclipse/EclipseState/Schedule/Well/Well.hpp>
|
||||||
|
|
||||||
#include <opm/core/well_controls.h>
|
|
||||||
|
|
||||||
namespace Opm
|
namespace Opm
|
||||||
{
|
{
|
||||||
namespace SimFIBODetails {
|
namespace SimFIBODetails {
|
||||||
@@ -48,43 +46,6 @@ namespace Opm
|
|||||||
return wmap;
|
return wmap;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline int
|
|
||||||
resv_control(const WellControls* ctrl)
|
|
||||||
{
|
|
||||||
int i, n = well_controls_get_num(ctrl);
|
|
||||||
|
|
||||||
bool match = false;
|
|
||||||
for (i = 0; (! match) && (i < n); ++i) {
|
|
||||||
match = well_controls_iget_type(ctrl, i) == RESERVOIR_RATE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (! match) { i = 0; }
|
|
||||||
|
|
||||||
return i - 1; // -1 if no match, undo final "++" otherwise
|
|
||||||
}
|
|
||||||
|
|
||||||
inline bool
|
|
||||||
is_resv(const Wells& wells,
|
|
||||||
const int w)
|
|
||||||
{
|
|
||||||
return (0 <= resv_control(wells.ctrls[w]));
|
|
||||||
}
|
|
||||||
|
|
||||||
inline std::vector<int>
|
|
||||||
resvWells(const Wells* wells)
|
|
||||||
{
|
|
||||||
std::vector<int> resv_wells;
|
|
||||||
if( wells )
|
|
||||||
{
|
|
||||||
for (int w = 0, nw = wells->number_of_wells; w < nw; ++w) {
|
|
||||||
if ( is_resv(*wells, w) ) {
|
|
||||||
resv_wells.push_back(w);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return resv_wells;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline void
|
inline void
|
||||||
historyRates(const PhaseUsage& pu,
|
historyRates(const PhaseUsage& pu,
|
||||||
|
|||||||
@@ -21,7 +21,6 @@
|
|||||||
#define OPM_AUTODIFF_VFPINJPROPERTIES_HPP_
|
#define OPM_AUTODIFF_VFPINJPROPERTIES_HPP_
|
||||||
|
|
||||||
#include <opm/parser/eclipse/EclipseState/Schedule/VFPInjTable.hpp>
|
#include <opm/parser/eclipse/EclipseState/Schedule/VFPInjTable.hpp>
|
||||||
#include <opm/core/wells.h>
|
|
||||||
#include <opm/material/densead/Math.hpp>
|
#include <opm/material/densead/Math.hpp>
|
||||||
#include <opm/material/densead/Evaluation.hpp>
|
#include <opm/material/densead/Evaluation.hpp>
|
||||||
#include <opm/simulators/wells/VFPHelpers.hpp>
|
#include <opm/simulators/wells/VFPHelpers.hpp>
|
||||||
|
|||||||
@@ -21,7 +21,6 @@
|
|||||||
#define OPM_AUTODIFF_VFPPRODPROPERTIES_HPP_
|
#define OPM_AUTODIFF_VFPPRODPROPERTIES_HPP_
|
||||||
|
|
||||||
#include <opm/parser/eclipse/EclipseState/Schedule/VFPProdTable.hpp>
|
#include <opm/parser/eclipse/EclipseState/Schedule/VFPProdTable.hpp>
|
||||||
#include <opm/core/wells.h>
|
|
||||||
#include <opm/material/densead/Math.hpp>
|
#include <opm/material/densead/Math.hpp>
|
||||||
#include <opm/material/densead/Evaluation.hpp>
|
#include <opm/material/densead/Evaluation.hpp>
|
||||||
#include <opm/simulators/wells/VFPHelpers.hpp>
|
#include <opm/simulators/wells/VFPHelpers.hpp>
|
||||||
|
|||||||
@@ -25,8 +25,6 @@
|
|||||||
|
|
||||||
#include <opm/grid/CpGrid.hpp>
|
#include <opm/grid/CpGrid.hpp>
|
||||||
|
|
||||||
#include <opm/core/wells.h>
|
|
||||||
|
|
||||||
#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
|
#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
|
||||||
|
|
||||||
namespace Opm
|
namespace Opm
|
||||||
|
|||||||
@@ -22,8 +22,6 @@
|
|||||||
#ifndef OPM_WELLHELPERS_HEADER_INCLUDED
|
#ifndef OPM_WELLHELPERS_HEADER_INCLUDED
|
||||||
#define OPM_WELLHELPERS_HEADER_INCLUDED
|
#define OPM_WELLHELPERS_HEADER_INCLUDED
|
||||||
|
|
||||||
#include <opm/core/wells.h>
|
|
||||||
// #include <opm/autodiff/AutoDiffHelpers.hpp>
|
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
@@ -35,35 +33,6 @@ namespace Opm {
|
|||||||
namespace wellhelpers
|
namespace wellhelpers
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
// --------- Types ---------
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Simple hydrostatic correction for VFP table
|
|
||||||
* @param wells - wells struct
|
|
||||||
* @param w Well number
|
|
||||||
* @param vfp_table VFP table
|
|
||||||
* @param well_perforation_densities Densities at well perforations
|
|
||||||
* @param gravity Gravitational constant (e.g., 9.81...)
|
|
||||||
*/
|
|
||||||
inline
|
|
||||||
double computeHydrostaticCorrection(const Wells& wells, const int w, double vfp_ref_depth,
|
|
||||||
const double& rho, const double gravity) {
|
|
||||||
if ( wells.well_connpos[w] == wells.well_connpos[w+1] )
|
|
||||||
{
|
|
||||||
// This is a well with no perforations.
|
|
||||||
// If this is the last well we would subscript over the
|
|
||||||
// bounds below.
|
|
||||||
// we assume well_perforation_densities to be 0
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
const double well_ref_depth = wells.depth_ref[w];
|
|
||||||
const double dh = vfp_ref_depth - well_ref_depth;
|
|
||||||
const double dp = rho*gravity*dh;
|
|
||||||
|
|
||||||
return dp;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline
|
inline
|
||||||
double computeHydrostaticCorrection(const double well_ref_depth, const double vfp_ref_depth,
|
double computeHydrostaticCorrection(const double well_ref_depth, const double vfp_ref_depth,
|
||||||
const double rho, const double gravity) {
|
const double rho, const double gravity) {
|
||||||
@@ -73,41 +42,53 @@ namespace Opm {
|
|||||||
return dp;
|
return dp;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class Vector>
|
|
||||||
inline
|
|
||||||
Vector computeHydrostaticCorrection(const Wells& wells, const Vector vfp_ref_depth,
|
|
||||||
const Vector& well_perforation_densities, const double gravity) {
|
|
||||||
const int nw = wells.number_of_wells;
|
|
||||||
Vector retval = Vector::Zero(nw);
|
|
||||||
|
|
||||||
#if HAVE_OPENMP
|
|
||||||
#pragma omp parallel for schedule(static)
|
|
||||||
#endif // HAVE_OPENMP
|
template <int dim, class C2F, class FC>
|
||||||
for (int i=0; i<nw; ++i) {
|
std::array<double, dim>
|
||||||
const int perf = wells.well_connpos[i];
|
getCubeDim(const C2F& c2f,
|
||||||
retval[i] = computeHydrostaticCorrection(wells, i, vfp_ref_depth[i], well_perforation_densities[perf], gravity);
|
FC begin_face_centroids,
|
||||||
|
int cell)
|
||||||
|
{
|
||||||
|
std::array< std::vector<double>, dim > X;
|
||||||
|
{
|
||||||
|
const std::vector<double>::size_type
|
||||||
|
nf = std::distance(c2f[cell].begin(),
|
||||||
|
c2f[cell].end ());
|
||||||
|
|
||||||
|
for (int d = 0; d < dim; ++d) {
|
||||||
|
X[d].reserve(nf);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return retval;
|
typedef typename C2F::row_type::const_iterator FI;
|
||||||
}
|
|
||||||
|
|
||||||
inline
|
for (FI f = c2f[cell].begin(), e = c2f[cell].end(); f != e; ++f) {
|
||||||
std::vector<double> computeHydrostaticCorrection(const Wells& wells, const std::vector<double>& vfp_ref_depth,
|
using Opm::UgGridHelpers::increment;
|
||||||
const std::vector<double>& well_perforation_densities, const double gravity) {
|
using Opm::UgGridHelpers::getCoordinate;
|
||||||
const int nw = wells.number_of_wells;
|
|
||||||
std::vector<double> retval(nw,0.0);
|
|
||||||
|
|
||||||
#if HAVE_OPENMP
|
const FC& fc = increment(begin_face_centroids, *f, dim);
|
||||||
#pragma omp parallel for schedule(static)
|
|
||||||
#endif // HAVE_OPENMP
|
for (int d = 0; d < dim; ++d) {
|
||||||
for (int i=0; i<nw; ++i) {
|
X[d].push_back(getCoordinate(fc, d));
|
||||||
const int perf = wells.well_connpos[i];
|
}
|
||||||
retval[i] = computeHydrostaticCorrection(wells, i, vfp_ref_depth[i], well_perforation_densities[perf], gravity);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return retval;
|
std::array<double, dim> cube;
|
||||||
|
for (int d = 0; d < dim; ++d) {
|
||||||
|
typedef std::vector<double>::iterator VI;
|
||||||
|
typedef std::pair<VI,VI> PVI;
|
||||||
|
|
||||||
|
const PVI m = std::minmax_element(X[d].begin(), X[d].end());
|
||||||
|
|
||||||
|
cube[d] = *m.second - *m.first;
|
||||||
|
}
|
||||||
|
|
||||||
|
return cube;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
} // namespace wellhelpers
|
} // namespace wellhelpers
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,10 +32,7 @@
|
|||||||
#include <opm/parser/eclipse/EclipseState/Schedule/Well/WellTestState.hpp>
|
#include <opm/parser/eclipse/EclipseState/Schedule/Well/WellTestState.hpp>
|
||||||
#include <opm/parser/eclipse/EclipseState/Schedule/Group/GuideRate.hpp>
|
#include <opm/parser/eclipse/EclipseState/Schedule/Group/GuideRate.hpp>
|
||||||
|
|
||||||
#include <opm/core/wells.h>
|
|
||||||
#include <opm/core/well_controls.h>
|
|
||||||
#include <opm/core/props/BlackoilPhases.hpp>
|
#include <opm/core/props/BlackoilPhases.hpp>
|
||||||
#include <opm/core/wells/WellsManager.hpp>
|
|
||||||
#include <opm/simulators/timestepping/SimulatorReport.hpp>
|
#include <opm/simulators/timestepping/SimulatorReport.hpp>
|
||||||
|
|
||||||
#include <opm/simulators/wells/RateConverter.hpp>
|
#include <opm/simulators/wells/RateConverter.hpp>
|
||||||
@@ -146,9 +143,6 @@ namespace Opm
|
|||||||
/// Well cells.
|
/// Well cells.
|
||||||
const std::vector<int>& cells() const {return well_cells_; }
|
const std::vector<int>& cells() const {return well_cells_; }
|
||||||
|
|
||||||
/// Well controls
|
|
||||||
WellControls* wellControls() const;
|
|
||||||
|
|
||||||
void setVFPProperties(const VFPProperties<VFPInjProperties,VFPProdProperties>* vfp_properties_arg);
|
void setVFPProperties(const VFPProperties<VFPInjProperties,VFPProdProperties>* vfp_properties_arg);
|
||||||
|
|
||||||
void setGuideRate(const GuideRate* guide_rate_arg);
|
void setGuideRate(const GuideRate* guide_rate_arg);
|
||||||
@@ -397,8 +391,6 @@ namespace Opm
|
|||||||
|
|
||||||
double getTHPConstraint(const SummaryState& summaryState) const;
|
double getTHPConstraint(const SummaryState& summaryState) const;
|
||||||
|
|
||||||
int getControlIndex(const WellControlType& type) const;
|
|
||||||
|
|
||||||
// Component fractions for each phase for the well
|
// Component fractions for each phase for the well
|
||||||
const std::vector<double>& compFrac() const;
|
const std::vector<double>& compFrac() const;
|
||||||
|
|
||||||
|
|||||||
@@ -1099,7 +1099,7 @@ namespace Opm
|
|||||||
{
|
{
|
||||||
double radius = connection.rw();
|
double radius = connection.rw();
|
||||||
const std::array<double, 3> cubical =
|
const std::array<double, 3> cubical =
|
||||||
WellsManagerDetail::getCubeDim<3>(cell_to_faces, begin_face_centroids, cell);
|
wellhelpers::getCubeDim<3>(cell_to_faces, begin_face_centroids, cell);
|
||||||
|
|
||||||
double re; // area equivalent radius of the grid block
|
double re; // area equivalent radius of the grid block
|
||||||
double perf_length; // the length of the well perforation
|
double perf_length; // the length of the well perforation
|
||||||
|
|||||||
@@ -21,8 +21,6 @@
|
|||||||
#define OPM_WELLSTATE_HEADER_INCLUDED
|
#define OPM_WELLSTATE_HEADER_INCLUDED
|
||||||
|
|
||||||
#include <opm/core/props/BlackoilPhases.hpp>
|
#include <opm/core/props/BlackoilPhases.hpp>
|
||||||
#include <opm/core/wells.h>
|
|
||||||
#include <opm/core/well_controls.h>
|
|
||||||
#include <opm/output/data/Wells.hpp>
|
#include <opm/output/data/Wells.hpp>
|
||||||
#include <opm/parser/eclipse/EclipseState/Schedule/Well/Well.hpp>
|
#include <opm/parser/eclipse/EclipseState/Schedule/Well/Well.hpp>
|
||||||
#include <opm/simulators/wells/PerforationData.hpp>
|
#include <opm/simulators/wells/PerforationData.hpp>
|
||||||
|
|||||||
@@ -21,8 +21,6 @@
|
|||||||
#ifndef OPM_WELLSTATEFULLYIMPLICITBLACKOIL_HEADER_INCLUDED
|
#ifndef OPM_WELLSTATEFULLYIMPLICITBLACKOIL_HEADER_INCLUDED
|
||||||
#define OPM_WELLSTATEFULLYIMPLICITBLACKOIL_HEADER_INCLUDED
|
#define OPM_WELLSTATEFULLYIMPLICITBLACKOIL_HEADER_INCLUDED
|
||||||
|
|
||||||
#include <opm/core/wells.h>
|
|
||||||
#include <opm/core/well_controls.h>
|
|
||||||
#include <opm/simulators/wells/WellState.hpp>
|
#include <opm/simulators/wells/WellState.hpp>
|
||||||
#include <opm/core/props/BlackoilPhases.hpp>
|
#include <opm/core/props/BlackoilPhases.hpp>
|
||||||
|
|
||||||
|
|||||||
@@ -34,7 +34,6 @@
|
|||||||
#include <boost/filesystem.hpp>
|
#include <boost/filesystem.hpp>
|
||||||
#include <opm/common/utility/platform_dependent/reenable_warnings.h>
|
#include <opm/common/utility/platform_dependent/reenable_warnings.h>
|
||||||
|
|
||||||
#include <opm/core/wells.h>
|
|
||||||
#include <opm/parser/eclipse/Parser/Parser.hpp>
|
#include <opm/parser/eclipse/Parser/Parser.hpp>
|
||||||
#include <opm/parser/eclipse/EclipseState/checkDeck.hpp>
|
#include <opm/parser/eclipse/EclipseState/checkDeck.hpp>
|
||||||
#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
|
#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
|
||||||
|
|||||||
@@ -37,8 +37,6 @@
|
|||||||
|
|
||||||
#include <opm/grid/GridManager.hpp>
|
#include <opm/grid/GridManager.hpp>
|
||||||
#include <opm/parser/eclipse/Units/Units.hpp>
|
#include <opm/parser/eclipse/Units/Units.hpp>
|
||||||
#include <opm/core/wells/WellsManager.hpp>
|
|
||||||
#include <opm/core/wells.h>
|
|
||||||
|
|
||||||
#include <opm/material/fluidmatrixinteractions/EclMaterialLawManager.hpp>
|
#include <opm/material/fluidmatrixinteractions/EclMaterialLawManager.hpp>
|
||||||
#include <opm/grid/GridHelpers.hpp>
|
#include <opm/grid/GridHelpers.hpp>
|
||||||
|
|||||||
@@ -30,10 +30,10 @@
|
|||||||
#include <opm/parser/eclipse/EclipseState/Schedule/Schedule.hpp>
|
#include <opm/parser/eclipse/EclipseState/Schedule/Schedule.hpp>
|
||||||
#include <opm/parser/eclipse/Units/Units.hpp>
|
#include <opm/parser/eclipse/Units/Units.hpp>
|
||||||
|
|
||||||
|
#include <opm/grid/GridHelpers.hpp>
|
||||||
|
|
||||||
#include <opm/core/props/BlackoilPhases.hpp>
|
#include <opm/core/props/BlackoilPhases.hpp>
|
||||||
#include <opm/core/props/phaseUsageFromDeck.hpp>
|
#include <opm/core/props/phaseUsageFromDeck.hpp>
|
||||||
#include <opm/core/wells/WellsManager.hpp>
|
|
||||||
#include <opm/core/wells.h>
|
|
||||||
|
|
||||||
#include <opm/grid/GridManager.hpp>
|
#include <opm/grid/GridManager.hpp>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user