Merge pull request #6160 from GitPaean/cleaning_up

removing something not used or not defined
This commit is contained in:
Bård Skaflestad authored and GitHub committed 2025-04-25 13:21:45 +02:00
commit a05ce2dd39
5 files changed
+5 -99

No files matched your search

-12
View File
@@ -89,7 +89,6 @@ namespace Opm
using PolymerModule = BlackOilPolymerModule<TypeTag>;
using FoamModule = BlackOilFoamModule<TypeTag>;
using BrineModule = BlackOilBrineModule<TypeTag>;
using typename Base::PressureMatrix;
// number of the conservation equations
@@ -210,12 +209,6 @@ namespace Opm
const bool fixed_control = false,
const bool fixed_status = false) override;
/// \brief Wether the Jacobian will also have well contributions in it.
bool jacobianContainsWellContributions() const override
{
return this->param_.matrix_add_well_contributions_;
}
/* returns BHP */
Scalar computeWellRatesAndBhpWithThpAlqProd(const Simulator& ebos_simulator,
const SummaryState &summary_state,
@@ -392,11 +385,6 @@ namespace Opm
// be able to produce/inject .
bool allDrawDownWrongDirection(const Simulator& simulator) const;
// whether the well can produce / inject based on the current well state (bhp)
bool canProduceInjectWithCurrentBhp(const Simulator& simulator,
const WellState<Scalar>& well_state,
DeferredLogger& deferred_logger);
// turn on crossflow to avoid singular well equations
// when the well is banned from cross-flow and the BHP is not properly initialized,
// we turn on crossflow to avoid singular well equations. It can result in wrong-signed
+2 -36
View File
@@ -187,6 +187,8 @@ namespace Opm
deferred_logger);
}
template<typename TypeTag>
template<class Value>
void
@@ -1096,42 +1098,6 @@ namespace Opm
template<typename TypeTag>
bool
StandardWell<TypeTag>::
canProduceInjectWithCurrentBhp(const Simulator& simulator,
const WellState<Scalar>& well_state,
DeferredLogger& deferred_logger)
{
const Scalar bhp = well_state.well(this->index_of_well_).bhp;
std::vector<Scalar> well_rates;
computeWellRatesWithBhp(simulator, bhp, well_rates, deferred_logger);
const Scalar sign = (this->isProducer()) ? -1. : 1.;
const Scalar threshold = sign * std::numeric_limits<Scalar>::min();
bool can_produce_inject = false;
for (const auto value : well_rates) {
if (this->isProducer() && value < threshold) {
can_produce_inject = true;
break;
} else if (this->isInjector() && value > threshold) {
can_produce_inject = true;
break;
}
}
if (!can_produce_inject) {
deferred_logger.debug(" well " + name() + " CANNOT produce or inejct ");
}
return can_produce_inject;
}
template<typename TypeTag>
bool
StandardWell<TypeTag>::
+1 -16
View File
@@ -269,12 +269,6 @@ public:
WellState<Scalar>& well_state,
DeferredLogger& deferred_logger) const = 0;
/// \brief Wether the Jacobian will also have well contributions in it.
virtual bool jacobianContainsWellContributions() const
{
return false;
}
// Add well contributions to matrix
virtual void addWellContributions(SparseMatrixAdapter&) const = 0;
@@ -304,12 +298,6 @@ public:
const WellState<Scalar>& well_state,
DeferredLogger& deferred_logger);
bool gliftBeginTimeStepWellTestIterateWellEquations(const Simulator& ebos_simulator,
const double dt,
WellState<Scalar>& well_state,
const GroupState<Scalar>& group_state,
DeferredLogger& deferred_logger);
void gliftBeginTimeStepWellTestUpdateALQ(const Simulator& simulator,
WellState<Scalar>& well_state,
const GroupState<Scalar>& group_state,
@@ -372,7 +360,7 @@ public:
WellState<Scalar>& well_state,
const GroupState<Scalar>& group_state,
DeferredLogger& deferred_logger,
const bool fixed_control = false,
const bool fixed_control = false,
const bool fixed_status = false) = 0;
protected:
// simulation parameters
@@ -390,9 +378,6 @@ protected:
virtual Scalar getRefDensity() const = 0;
// Component fractions for each phase for the well
const std::vector<Scalar>& compFrac() const;
std::vector<Scalar>
initialWellRateFractions(const Simulator& ebosSimulator,
const WellState<Scalar>& well_state) const;
@@ -399,4 +399,4 @@ protected:
}
#endif // OPM_WELLINTERFACE_HEADER_INCLUDED
#endif // OPM_WELLINTERFACE_GENERIC_HEADER_INCLUDED
+1 -34
View File
@@ -977,40 +977,7 @@ namespace Opm
}
}
template<typename TypeTag>
bool
WellInterface<TypeTag>::
gliftBeginTimeStepWellTestIterateWellEquations(const Simulator& simulator,
const double dt,
WellState<Scalar>& well_state,
const GroupState<Scalar>& group_state,
DeferredLogger& deferred_logger)
{
OPM_TIMEFUNCTION();
const auto& well_name = this->name();
assert(this->wellHasTHPConstraints(simulator.vanguard().summaryState()));
const auto& schedule = simulator.vanguard().schedule();
auto report_step_idx = simulator.episodeIndex();
const auto& glo = schedule.glo(report_step_idx);
if(glo.active() && glo.has_well(well_name)) {
const auto increment = glo.gaslift_increment();
auto alq = well_state.getALQ(well_name);
bool converged;
while (alq > 0) {
well_state.setALQ(well_name, alq);
if ((converged =
iterateWellEquations(simulator, dt, well_state, group_state, deferred_logger)))
{
return converged;
}
alq -= increment;
}
return false;
}
else {
return iterateWellEquations(simulator, dt, well_state, group_state, deferred_logger);
}
}
template<typename TypeTag>
void