mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
putting Vector and ADB to be inside StandardWells and wellhelpers
This commit is contained in:
parent
14d774e08f
commit
75b73a893e
@ -780,8 +780,8 @@ namespace detail {
|
|||||||
asImpl().stdWells().computePropertiesForWellConnectionPressures(state, xw, fluid_, active_, phaseCondition_, b_perf, rsmax_perf, rvmax_perf, surf_dens_perf);
|
asImpl().stdWells().computePropertiesForWellConnectionPressures(state, xw, fluid_, active_, phaseCondition_, b_perf, rsmax_perf, rvmax_perf, surf_dens_perf);
|
||||||
|
|
||||||
// Extract well connection depths.
|
// Extract well connection depths.
|
||||||
const Vector depth = cellCentroidsZToEigen(grid_);
|
const StandardWells::Vector depth = cellCentroidsZToEigen(grid_);
|
||||||
const Vector pdepth = subset(depth, asImpl().stdWells().wellOps().well_cells);
|
const StandardWells::Vector pdepth = subset(depth, asImpl().stdWells().wellOps().well_cells);
|
||||||
const int nperf = wells().well_connpos[wells().number_of_wells];
|
const int nperf = wells().well_connpos[wells().number_of_wells];
|
||||||
const std::vector<double> depth_perf(pdepth.data(), pdepth.data() + nperf);
|
const std::vector<double> depth_perf(pdepth.data(), pdepth.data() + nperf);
|
||||||
|
|
||||||
|
@ -37,16 +37,6 @@
|
|||||||
|
|
||||||
namespace Opm {
|
namespace Opm {
|
||||||
|
|
||||||
// --------- Types ---------
|
|
||||||
typedef AutoDiffBlock<double> ADB;
|
|
||||||
typedef ADB::V Vector;
|
|
||||||
|
|
||||||
// copied from BlackoilModelBase
|
|
||||||
// should put to somewhere better
|
|
||||||
typedef Eigen::Array<double,
|
|
||||||
Eigen::Dynamic,
|
|
||||||
Eigen::Dynamic,
|
|
||||||
Eigen::RowMajor> DataBlock;
|
|
||||||
|
|
||||||
/// Class for handling the standard well model.
|
/// Class for handling the standard well model.
|
||||||
class StandardWells {
|
class StandardWells {
|
||||||
@ -59,6 +49,16 @@ namespace Opm {
|
|||||||
};
|
};
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
// --------- Types ---------
|
||||||
|
using ADB = AutoDiffBlock<double>;
|
||||||
|
using Vector = ADB::V;
|
||||||
|
|
||||||
|
// copied from BlackoilModelBase
|
||||||
|
// should put to somewhere better
|
||||||
|
using DataBlock = Eigen::Array<double,
|
||||||
|
Eigen::Dynamic,
|
||||||
|
Eigen::Dynamic,
|
||||||
|
Eigen::RowMajor>;
|
||||||
// --------- Public methods ---------
|
// --------- Public methods ---------
|
||||||
explicit StandardWells(const Wells* wells);
|
explicit StandardWells(const Wells* wells);
|
||||||
|
|
||||||
@ -73,11 +73,11 @@ namespace Opm {
|
|||||||
const WellOps& wellOps() const;
|
const WellOps& wellOps() const;
|
||||||
|
|
||||||
/// Density of each well perforation
|
/// Density of each well perforation
|
||||||
Vector& wellPerforationDensities();
|
Vector& wellPerforationDensities(); // mutable version kept for BlackoilMultisegmentModel
|
||||||
const Vector& wellPerforationDensities() const;
|
const Vector& wellPerforationDensities() const;
|
||||||
|
|
||||||
/// Diff to bhp for each well perforation.
|
/// Diff to bhp for each well perforation.
|
||||||
Vector& wellPerforationPressureDiffs();
|
Vector& wellPerforationPressureDiffs(); // mutable version kept for BlackoilMultisegmentModel
|
||||||
const Vector& wellPerforationPressureDiffs() const;
|
const Vector& wellPerforationPressureDiffs() const;
|
||||||
|
|
||||||
template <class SolutionState, class WellState>
|
template <class SolutionState, class WellState>
|
||||||
|
@ -130,7 +130,7 @@ namespace Opm
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
Vector& StandardWells::wellPerforationDensities()
|
StandardWells::Vector& StandardWells::wellPerforationDensities()
|
||||||
{
|
{
|
||||||
return well_perforation_densities_;
|
return well_perforation_densities_;
|
||||||
}
|
}
|
||||||
@ -139,7 +139,7 @@ namespace Opm
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
const Vector&
|
const StandardWells::Vector&
|
||||||
StandardWells::wellPerforationDensities() const
|
StandardWells::wellPerforationDensities() const
|
||||||
{
|
{
|
||||||
return well_perforation_densities_;
|
return well_perforation_densities_;
|
||||||
@ -149,7 +149,7 @@ namespace Opm
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
Vector&
|
StandardWells::Vector&
|
||||||
StandardWells::wellPerforationPressureDiffs()
|
StandardWells::wellPerforationPressureDiffs()
|
||||||
{
|
{
|
||||||
return well_perforation_pressure_diffs_;
|
return well_perforation_pressure_diffs_;
|
||||||
@ -159,7 +159,7 @@ namespace Opm
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
const Vector&
|
const StandardWells::Vector&
|
||||||
StandardWells::wellPerforationPressureDiffs() const
|
StandardWells::wellPerforationPressureDiffs() const
|
||||||
{
|
{
|
||||||
return well_perforation_pressure_diffs_;
|
return well_perforation_pressure_diffs_;
|
||||||
|
@ -31,9 +31,6 @@
|
|||||||
namespace Opm {
|
namespace Opm {
|
||||||
|
|
||||||
|
|
||||||
// --------- Types ---------
|
|
||||||
typedef AutoDiffBlock<double> ADB;
|
|
||||||
typedef ADB::V Vector;
|
|
||||||
|
|
||||||
|
|
||||||
namespace wellhelpers
|
namespace wellhelpers
|
||||||
@ -120,6 +117,10 @@ namespace Opm {
|
|||||||
return broken;
|
return broken;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// --------- Types ---------
|
||||||
|
using Vector = AutoDiffBlock<double>::V;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Simple hydrostatic correction for VFP table
|
* Simple hydrostatic correction for VFP table
|
||||||
* @param wells - wells struct
|
* @param wells - wells struct
|
||||||
|
Loading…
Reference in New Issue
Block a user