Remove repetitive logging info

This commit is contained in:
Tor Harald Sandve committed 2018-12-07 09:28:27 +01:00
1 parent 7b550ba06c
commit 77869606f3
2 files changed
+21 -5

No files matched your search

+8 -1
View File
@@ -29,6 +29,8 @@
#include <opm/parser/eclipse/EclipseState/Schedule/Well.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/WellTestState.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/ScheduleEnums.hpp>
#include <opm/core/wells.h>
#include <opm/core/well_controls.h>
@@ -388,7 +390,11 @@ namespace Opm
WellState& well_state,
wellhelpers::WellSwitchingLogger& logger);
void scaleProductivityIndex(const int perfIdx, double& productivity_index) const;
void scaleProductivityIndex(const int perfIdx, double& productivity_index);
// count the number of times an output log message is created in the productivity
// index calculations
int well_productivity_index_logger_counter_;
};
@@ -435,6 +441,7 @@ namespace Opm
bool can_obtain_bhp_with_thp_limit = true;
// whether the well obey bhp limit when operated under thp limit
bool obey_bhp_limit_with_thp_limit = true;
};
}
+13 -4
View File
@@ -107,6 +107,8 @@ namespace Opm
connectionRates_.resize(number_of_perforations_);
well_productivity_index_logger_counter_ = 0;
}
template<typename TypeTag>
@@ -1245,20 +1247,27 @@ namespace Opm
template<typename TypeTag>
void
WellInterface<TypeTag>::scaleProductivityIndex(const int perfIdx, double& productivity_index) const
WellInterface<TypeTag>::scaleProductivityIndex(const int perfIdx, double& productivity_index)
{
const auto& connection = well_ecl_->getConnections(current_step_)[perfIdx];
const bool new_well = well_ecl_->hasEvent(ScheduleEvents::NEW_WELL , current_step_);
if (well_ecl_->getDrainageRadius(current_step_) < 0) {
OpmLog::warning("PRODUCTIVITY_INDEX_WARNING", "Negative drainage radius not supported. The productivity index is set to zero");
if (new_well && perfIdx == 0) {
OpmLog::warning("PRODUCTIVITY_INDEX_WARNING", "Negative drainage radius not supported. The productivity index is set to zero");
}
productivity_index = 0.0;
return;
}
if (connection.r0() > well_ecl_->getDrainageRadius(current_step_)) {
OpmLog::info("PRODUCTIVITY_INDEX_INFO", "The effective radius is larger then the well drainage radius for well " + name() +
" They are set to equal in the well productivity index calculations");
if (new_well && well_productivity_index_logger_counter_ < 1) {
OpmLog::info("PRODUCTIVITY_INDEX_INFO", "The effective radius is larger than the well drainage radius for well " + name() +
" They are set to equal in the well productivity index calculations");
well_productivity_index_logger_counter_++;
}
return;
}