mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Merge pull request #3028 from totto82/quarryPerfLengthAndRadius
get connection length and radius from the connection object
This commit is contained in:
commit
d8f8b9f0cc
@ -394,7 +394,7 @@ namespace Opm {
|
|||||||
|
|
||||||
void setupCartesianToCompressed_(const int* global_cell, int local_num__cells);
|
void setupCartesianToCompressed_(const int* global_cell, int local_num__cells);
|
||||||
|
|
||||||
void computeRepRadiusPerfLength(const Grid& grid, Opm::DeferredLogger& deferred_logger);
|
void setRepRadiusPerfLength(Opm::DeferredLogger& deferred_logger);
|
||||||
|
|
||||||
|
|
||||||
void computeAverageFormationFactor(std::vector<Scalar>& B_avg) const;
|
void computeAverageFormationFactor(std::vector<Scalar>& B_avg) const;
|
||||||
|
@ -361,9 +361,8 @@ namespace Opm {
|
|||||||
|
|
||||||
if (has_polymer_)
|
if (has_polymer_)
|
||||||
{
|
{
|
||||||
const Grid& grid = ebosSimulator_.vanguard().grid();
|
|
||||||
if (PolymerModule::hasPlyshlog() || getPropValue<TypeTag, Properties::EnablePolymerMW>() ) {
|
if (PolymerModule::hasPlyshlog() || getPropValue<TypeTag, Properties::EnablePolymerMW>() ) {
|
||||||
computeRepRadiusPerfLength(grid, local_deferredLogger);
|
setRepRadiusPerfLength(local_deferredLogger);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (std::exception& e) {
|
} catch (std::exception& e) {
|
||||||
@ -1580,10 +1579,10 @@ namespace Opm {
|
|||||||
template<typename TypeTag>
|
template<typename TypeTag>
|
||||||
void
|
void
|
||||||
BlackoilWellModel<TypeTag>::
|
BlackoilWellModel<TypeTag>::
|
||||||
computeRepRadiusPerfLength(const Grid& grid, Opm::DeferredLogger& deferred_logger)
|
setRepRadiusPerfLength(Opm::DeferredLogger& deferred_logger)
|
||||||
{
|
{
|
||||||
for (const auto& well : well_container_) {
|
for (const auto& well : well_container_) {
|
||||||
well->computeRepRadiusPerfLength(grid, cartesian_to_compressed_, deferred_logger);
|
well->setRepRadiusPerfLength(cartesian_to_compressed_, deferred_logger);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -189,7 +189,7 @@ namespace Opm
|
|||||||
|
|
||||||
void setWellEfficiencyFactor(const double efficiency_factor);
|
void setWellEfficiencyFactor(const double efficiency_factor);
|
||||||
|
|
||||||
void computeRepRadiusPerfLength(const Grid& grid, const std::vector<int>& cartesian_to_compressed, Opm::DeferredLogger& deferred_logger);
|
void setRepRadiusPerfLength(const std::vector<int>& cartesian_to_compressed, Opm::DeferredLogger& deferred_logger);
|
||||||
|
|
||||||
/// using the solution x to recover the solution xw for wells and applying
|
/// using the solution x to recover the solution xw for wells and applying
|
||||||
/// xw to update Well State
|
/// xw to update Well State
|
||||||
|
@ -1195,14 +1195,10 @@ namespace Opm
|
|||||||
template<typename TypeTag>
|
template<typename TypeTag>
|
||||||
void
|
void
|
||||||
WellInterface<TypeTag>::
|
WellInterface<TypeTag>::
|
||||||
computeRepRadiusPerfLength(const Grid& grid,
|
setRepRadiusPerfLength(const std::vector<int>& cartesian_to_compressed,
|
||||||
const std::vector<int>& cartesian_to_compressed,
|
|
||||||
Opm::DeferredLogger& deferred_logger
|
Opm::DeferredLogger& deferred_logger
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
auto cell_to_faces = Opm::UgGridHelpers::cell2Faces(grid);
|
|
||||||
auto begin_face_centroids = Opm::UgGridHelpers::beginFaceCentroids(grid);
|
|
||||||
|
|
||||||
const int nperf = number_of_perforations_;
|
const int nperf = number_of_perforations_;
|
||||||
|
|
||||||
perf_rep_radius_.clear();
|
perf_rep_radius_.clear();
|
||||||
@ -1228,29 +1224,8 @@ namespace Opm
|
|||||||
|
|
||||||
if (cell >= 0) {
|
if (cell >= 0) {
|
||||||
double radius = connection.rw();
|
double radius = connection.rw();
|
||||||
const std::array<double, 3> cubical =
|
double re = connection.re(); // area equivalent radius of the grid block
|
||||||
wellhelpers::getCubeDim<3>(cell_to_faces, begin_face_centroids, cell);
|
double perf_length = connection.connectionLength(); // the length of the well perforation
|
||||||
|
|
||||||
double re; // area equivalent radius of the grid block
|
|
||||||
double perf_length; // the length of the well perforation
|
|
||||||
|
|
||||||
switch (connection.dir()) {
|
|
||||||
case Opm::Connection::Direction::X:
|
|
||||||
re = std::sqrt(cubical[1] * cubical[2] / M_PI);
|
|
||||||
perf_length = cubical[0];
|
|
||||||
break;
|
|
||||||
case Opm::Connection::Direction::Y:
|
|
||||||
re = std::sqrt(cubical[0] * cubical[2] / M_PI);
|
|
||||||
perf_length = cubical[1];
|
|
||||||
break;
|
|
||||||
case Opm::Connection::Direction::Z:
|
|
||||||
re = std::sqrt(cubical[0] * cubical[1] / M_PI);
|
|
||||||
perf_length = cubical[2];
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
OPM_DEFLOG_THROW(std::runtime_error, " Dirtecion of well is not supported ", deferred_logger);
|
|
||||||
}
|
|
||||||
|
|
||||||
const double repR = std::sqrt(re * radius);
|
const double repR = std::sqrt(re * radius);
|
||||||
perf_rep_radius_.push_back(repR);
|
perf_rep_radius_.push_back(repR);
|
||||||
perf_length_.push_back(perf_length);
|
perf_length_.push_back(perf_length);
|
||||||
|
Loading…
Reference in New Issue
Block a user