mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Remove unused code and remove Eigen vectors
-- isRS and phaseCondition is removed and hydroCarbonState in the state is used instead -- input of pressurediffs to computeHydrostaticCorrection() is changed to double from Vector in WellHelpers.hpp
This commit is contained in:
@@ -131,7 +131,7 @@ namespace Opm {
|
||||
*/
|
||||
inline
|
||||
double computeHydrostaticCorrection(const Wells& wells, const int w, double vfp_ref_depth,
|
||||
const Vector& well_perforation_densities, const double gravity) {
|
||||
const double& rho, const double gravity) {
|
||||
if ( wells.well_connpos[w] == wells.well_connpos[w+1] )
|
||||
{
|
||||
// This is a well with no perforations.
|
||||
@@ -142,13 +142,12 @@ namespace Opm {
|
||||
}
|
||||
const double well_ref_depth = wells.depth_ref[w];
|
||||
const double dh = vfp_ref_depth - well_ref_depth;
|
||||
const int perf = wells.well_connpos[w];
|
||||
const double rho = well_perforation_densities[perf];
|
||||
const double dp = rho*gravity*dh;
|
||||
|
||||
return dp;
|
||||
}
|
||||
|
||||
|
||||
inline
|
||||
Vector computeHydrostaticCorrection(const Wells& wells, const Vector vfp_ref_depth,
|
||||
const Vector& well_perforation_densities, const double gravity) {
|
||||
@@ -157,7 +156,23 @@ namespace Opm {
|
||||
|
||||
#pragma omp parallel for schedule(static)
|
||||
for (int i=0; i<nw; ++i) {
|
||||
retval[i] = computeHydrostaticCorrection(wells, i, vfp_ref_depth[i], well_perforation_densities, gravity);
|
||||
const int perf = wells.well_connpos[i];
|
||||
retval[i] = computeHydrostaticCorrection(wells, i, vfp_ref_depth[i], well_perforation_densities[perf], gravity);
|
||||
}
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
inline
|
||||
std::vector<double> computeHydrostaticCorrection(const Wells& wells, const std::vector<double>& vfp_ref_depth,
|
||||
const std::vector<double>& well_perforation_densities, const double gravity) {
|
||||
const int nw = wells.number_of_wells;
|
||||
std::vector<double> retval(nw,0.0);
|
||||
|
||||
#pragma omp parallel for schedule(static)
|
||||
for (int i=0; i<nw; ++i) {
|
||||
const int perf = wells.well_connpos[i];
|
||||
retval[i] = computeHydrostaticCorrection(wells, i, vfp_ref_depth[i], well_perforation_densities[perf], gravity);
|
||||
}
|
||||
|
||||
return retval;
|
||||
|
||||
Reference in New Issue
Block a user