Completly revamped the way group control is checked

This commit is contained in:
Kjetil Olsen Lye 2012-04-25 16:14:40 +02:00
parent 6b00381393
commit 7c6ac0bf09

View File

@ -76,9 +76,17 @@ int main(int argc, char** argv) {
std::vector<double> well_rate;
computeFlowRatePerWell(*wells.c_wells(), well_rate_per_cell, well_rate);
WellControlResult well_control_results;
wells.wellCollection().conditionsMet(well_bhp, well_rate, *grid.c_grid(), well_control_results );
wells.applyControl(well_control_results);
while (!wells.conditionsMet(well_bhp, well_rate)) {
std::cout << "Conditions not met for well, trying again" << std::endl;
pressure_solver.solve(totmob, omega, src, wdp, bcs.c_bcs(), pressure, face_flux, well_bhp, well_rate_per_cell);
std::cout << "Solved" << std::endl;
for (size_t i = 0; i < well_rate_per_cell.size(); i++) {
std::cout << well_rate_per_cell[i] << std::endl;
}
computeFlowRatePerWell(*wells.c_wells(), well_rate_per_cell, well_rate);
}
#if 0
std::vector<double> porevol;