mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
cleaning up.
no functional change.
This commit is contained in:
parent
93b7cceaf3
commit
86269e0de2
@ -98,7 +98,7 @@ namespace Opm {
|
||||
const RateConverterType& rate_converter,
|
||||
const bool terminal_output,
|
||||
const int current_index,
|
||||
std::vector<int>& pvt_region_idx);
|
||||
const std::vector<int>& pvt_region_idx);
|
||||
|
||||
void init(const PhaseUsage phase_usage_arg,
|
||||
const std::vector<bool>& active_arg,
|
||||
@ -190,7 +190,7 @@ namespace Opm {
|
||||
PhaseUsage phase_usage_;
|
||||
std::vector<bool> active_;
|
||||
const RateConverterType& rate_converter_;
|
||||
std::vector<int> pvt_region_idx_;
|
||||
const std::vector<int>& pvt_region_idx_;
|
||||
|
||||
// the number of the cells in the local grid
|
||||
int number_of_cells_;
|
||||
|
@ -12,7 +12,7 @@ namespace Opm {
|
||||
const RateConverterType& rate_converter,
|
||||
const bool terminal_output,
|
||||
const int current_timeIdx,
|
||||
std::vector<int>& pvt_region_idx)
|
||||
const std::vector<int>& pvt_region_idx)
|
||||
: wells_active_(wells_arg!=nullptr)
|
||||
, wells_(wells_arg)
|
||||
, wells_ecl_(wells_ecl)
|
||||
|
@ -261,7 +261,7 @@ namespace Opm
|
||||
case THP: {
|
||||
well_state.thp()[index_of_well_] = target;
|
||||
|
||||
const Opm::PhaseUsage& pu = phaseUsage();
|
||||
/* const Opm::PhaseUsage& pu = phaseUsage();
|
||||
std::vector<double> rates(3, 0.0);
|
||||
if (active()[ Water ]) {
|
||||
rates[ Water ] = well_state.wellRates()[index_of_well_ * number_of_phases_ + pu.phase_pos[ Water ] ];
|
||||
@ -271,7 +271,7 @@ namespace Opm
|
||||
}
|
||||
if (active()[ Gas ]) {
|
||||
rates[ Gas ] = well_state.wellRates()[index_of_well_ * number_of_phases_ + pu.phase_pos[ Gas ] ];
|
||||
}
|
||||
} */
|
||||
|
||||
// const int table_id = well_controls_iget_vfp(well_controls_, current);
|
||||
// const double& thp = well_controls_iget_target(well_controls_, current);
|
||||
@ -733,6 +733,8 @@ namespace Opm
|
||||
const BlackoilModelParameters& param,
|
||||
WellState& well_state) const
|
||||
{
|
||||
// TODO: we should probably distinguish the inner iteration or the final update
|
||||
|
||||
const bool use_inner_iterations = param.use_inner_iterations_ms_wells_;
|
||||
|
||||
const double relaxation_factor = use_inner_iterations ? 0.2 : 1.0;
|
||||
@ -1112,18 +1114,10 @@ namespace Opm
|
||||
// TODO: the concept of phases and components are rather confusing in this function.
|
||||
// needs to be addressed sooner or later.
|
||||
|
||||
|
||||
// TODO: the phase location is so confusing, double check to make sure they are right
|
||||
// do I need the gaspos, oilpos here?
|
||||
|
||||
// compute the segment density first
|
||||
// TODO: the new understanding is that it might not need to know the grid block of the segments
|
||||
// It is a try to calculate the fluid properties without assuming the segment is associated with
|
||||
// any grid blocks
|
||||
|
||||
// get the temperature for later use. It is only useful when we are not handling
|
||||
// thermal related simulation
|
||||
// basically, it is a single value for all the segments
|
||||
|
||||
EvalWell temperature;
|
||||
// not sure how to handle the pvt region related to segment
|
||||
// for the current approach, we use the pvt region of the first perforated cell
|
||||
@ -1557,7 +1551,6 @@ namespace Opm
|
||||
const EvalWell density = segment_densities_[seg];
|
||||
const EvalWell out_velocity_head = mswellhelpers::velocityHead(area, mass_rate, density);
|
||||
|
||||
// TODO: the sign is really hard and not sure
|
||||
resWell_[seg][SPres] -= out_velocity_head.value();
|
||||
for (int pv_idx = 0; pv_idx < numWellEq; ++pv_idx) {
|
||||
duneD_[seg][seg][SPres][pv_idx] -= out_velocity_head.derivative(pv_idx + numEq);
|
||||
|
@ -298,17 +298,22 @@ public:
|
||||
|
||||
const auto& wells_ecl = eclState().getSchedule().getWells(timer.currentStepNum());
|
||||
extractLegacyCellPvtRegionIndex_();
|
||||
WellModel well_model(wells, &(wells_manager.wellCollection()), wells_ecl, model_param_,
|
||||
rateConverter_, terminal_output_, timer.currentStepNum(), legacyCellPvtRegionIdx_);
|
||||
|
||||
// handling MS well related
|
||||
if (model_param_.use_multisegment_well_) { // if we use MultisegmentWell model
|
||||
for (const auto& well : wells_ecl) {
|
||||
// TODO: this is acutally not very accurate, because sometimes a deck just claims a MS well
|
||||
// while keep the well shut. More accurately, we should check if the well exisits in the Wells
|
||||
// structure here
|
||||
if (well->isMultiSegment(timer.currentStepNum()) ) { // there is one well is MS well
|
||||
well_state.initWellStateMSWell(wells, wells_ecl, timer.currentStepNum(), phaseUsage_, prev_well_state);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
WellModel well_model(wells, &(wells_manager.wellCollection()), wells_ecl, model_param_,
|
||||
rateConverter_, terminal_output_, timer.currentStepNum(), legacyCellPvtRegionIdx_);
|
||||
|
||||
|
||||
auto solver = createSolver(well_model);
|
||||
|
||||
|
@ -379,7 +379,8 @@ namespace Opm
|
||||
// scale the phase rates for Gas to avoid too bad initial guess for gas fraction
|
||||
// it will probably benefit the standard well too, while it needs to be justified
|
||||
// TODO: to see if this strategy can benefit StandardWell too
|
||||
// TODO: it might cause big problem for gas rate control or if there is gas rate limit
|
||||
// TODO: it might cause big problem for gas rate control or if there is a gas rate limit
|
||||
// maybe the best way is to initialize the fractions first then get the rates
|
||||
for (int perf = 0; perf < nperf; perf++) {
|
||||
const int perf_pos = start_perf + perf;
|
||||
perfPhaseRates()[np * perf_pos + gaspos] *= 100.;
|
||||
|
Loading…
Reference in New Issue
Block a user