mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-01-01 12:06:54 -06:00
Added a (small) hack to wellmanager (defaulting injected_phase to water)
This commit is contained in:
parent
4197f16a14
commit
1d54445546
@ -78,13 +78,44 @@ int main(int argc, char** argv) {
|
||||
|
||||
computeFlowRatePerWell(*wells.c_wells(), well_rate_per_cell, well_rate);
|
||||
WellControlResult well_control_results;
|
||||
if(wells.wellCollection().conditionsMet(well_bhp, well_rate, *grid.c_grid(), state.saturation(), well_control_results )) {
|
||||
std::cout << "Conditions met for wells!" << std::endl;
|
||||
}
|
||||
else
|
||||
wells.wellCollection().conditionsMet(well_bhp, well_rate, *grid.c_grid(), state.saturation(), well_control_results );
|
||||
wells.applyControl(well_control_results);
|
||||
|
||||
#if 0
|
||||
std::vector<double> porevol;
|
||||
computePorevolume(*grid->c_grid(), incomp_properties, porevol);
|
||||
|
||||
|
||||
|
||||
TwophaseFluid fluid(incomp_properties);
|
||||
TransportModel model (fluid, *grid->c_grid(), porevol, gravity[2], true);
|
||||
|
||||
TransportSolver tsolver(model);
|
||||
|
||||
TransportSource* tsrc = create_transport_source(2, 2);
|
||||
double ssrc[] = { 1.0, 0.0 };
|
||||
double ssink[] = { 0.0, 1.0 };
|
||||
double zdummy[] = { 0.0, 0.0 };
|
||||
|
||||
{
|
||||
std::cout << "Conditions not met for wells!"<<std::endl;
|
||||
int well_cell_index = 0;
|
||||
for (int well = 0; well < wells.c_wells()->number_of_wells; ++well) {
|
||||
for( int cell = wells.c_wells()->well_connpos[well]; cell < wells.c_wells()->well_connpos[well + 1]; ++cell) {
|
||||
if (well_rate_per_cell[well_cell_index] > 0.0) {
|
||||
append_transport_source(well_cell_index, 2, 0,
|
||||
well_rate_per_cell[well_cell_index], ssrc, zdummy, tsrc);
|
||||
} else if (well_rate_per_cell[well_cell_index] < 0.0) {
|
||||
append_transport_source(well_cell_index, 2, 0,
|
||||
well_rate_per_cell[well_cell_index], ssink, zdummy, tsrc);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tsolver.solve(*grid->c_grid(), tsrc, stepsize, ctrl, state, linsolve, rpt);
|
||||
|
||||
Opm::computeInjectedProduced(*props, state.saturation(), src, stepsize, injected, produced);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user