mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
WellHelpers: template computeHydrostaticCorrection Scalar type
This commit is contained in:
parent
ca9baea09d
commit
96c4a2f510
@ -122,11 +122,12 @@ mmv (const X& x, Y& y) const
|
||||
}
|
||||
}
|
||||
|
||||
double computeHydrostaticCorrection(const double well_ref_depth, const double vfp_ref_depth,
|
||||
const double rho, const double gravity)
|
||||
template<class Scalar>
|
||||
Scalar computeHydrostaticCorrection(const Scalar well_ref_depth, const Scalar vfp_ref_depth,
|
||||
const Scalar rho, const Scalar gravity)
|
||||
{
|
||||
const double dh = vfp_ref_depth - well_ref_depth;
|
||||
const double dp = rho * gravity * dh;
|
||||
const Scalar dh = vfp_ref_depth - well_ref_depth;
|
||||
const Scalar dp = rho * gravity * dh;
|
||||
|
||||
return dp;
|
||||
}
|
||||
@ -200,7 +201,6 @@ bool rateControlWithZeroProdTarget(const WellProductionControls& controls,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool rateControlWithZeroInjTarget(const WellInjectionControls& controls,
|
||||
const WellInjectorCMode mode)
|
||||
{
|
||||
@ -214,7 +214,6 @@ bool rateControlWithZeroInjTarget(const WellInjectionControls& controls,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template class ParallelStandardWellB<double>;
|
||||
|
||||
template<int Dim> using Vec = Dune::BlockVector<Dune::FieldVector<double,Dim>>;
|
||||
@ -239,5 +238,10 @@ template void sumDistributedWellEntries<double,Comm>(Dune::DynamicMatrix<double>
|
||||
using DMatrix = Dune::DynamicMatrix<double>;
|
||||
template DMatrix transposeDenseDynMatrix<DMatrix>(const DMatrix&);
|
||||
|
||||
template double computeHydrostaticCorrection<double>(const double,
|
||||
const double,
|
||||
const double,
|
||||
const double);
|
||||
|
||||
} // namespace wellhelpers
|
||||
} // namespace Opm
|
||||
|
@ -26,8 +26,6 @@
|
||||
#include <dune/istl/bcrsmatrix.hh>
|
||||
#include <dune/common/dynmatrix.hh>
|
||||
|
||||
#include <array>
|
||||
|
||||
namespace Opm {
|
||||
|
||||
class ParallelWellInfo;
|
||||
@ -70,10 +68,11 @@ private:
|
||||
const ParallelWellInfo& parallel_well_info_;
|
||||
};
|
||||
|
||||
double computeHydrostaticCorrection(const double well_ref_depth,
|
||||
const double vfp_ref_depth,
|
||||
const double rho, const double gravity);
|
||||
|
||||
template<class Scalar>
|
||||
Scalar computeHydrostaticCorrection(const Scalar well_ref_depth,
|
||||
const Scalar vfp_ref_depth,
|
||||
const Scalar rho,
|
||||
const Scalar gravity);
|
||||
|
||||
/// \brief Sums entries of the diagonal Matrix for distributed wells
|
||||
template<typename Scalar, typename Comm>
|
||||
|
Loading…
Reference in New Issue
Block a user