Skip to content

Commit

Permalink
Merge remote-tracking branch 'opm/master' into bo_polymer
Browse files Browse the repository at this point in the history
Conflicts:
	opm/polymer/PolymerProperties.hpp
  • Loading branch information
qilicun committed Oct 20, 2014
2 parents 7178b54 + 96d95a9 commit 5333734
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 21 deletions.
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,10 @@ examples/upscale_*
examples/grdecldips
data
steadystate_test_implicit
steadystate_test_explicit
steadystate_test_explicit
=======
*.iml
.idea
*/opm-simulation


10 changes: 8 additions & 2 deletions examples/sim_poly_fibo_ad.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@ try
// Rock and fluid init
props.reset(new BlackoilPropertiesFromDeck(deck, eclipseState, *grid->c_grid(), param));
new_props.reset(new BlackoilPropsAdFromDeck(deck, eclipseState, *grid->c_grid()));
const bool polymer = deck->hasKeyword("POLYMER");
const bool use_wpolymer = deck->hasKeyword("WPOLYMER");
PolymerProperties polymer_props(deck, eclipseState);
PolymerPropsAd polymer_props_ad(polymer_props);
// check_well_controls = param.getDefault("check_well_controls", false);
Expand Down Expand Up @@ -158,6 +160,7 @@ try
initStateEquil(*grid->c_grid(), *props, deck, eclipseState, grav, state.blackoilState());
state.faceflux().resize(grid->c_grid()->number_of_faces, 0.0);
} else {
state.init(*grid->c_grid(), props->numPhases());
initBlackoilStateFromDeck(*grid->c_grid(), *props, deck, gravity[2], state.blackoilState());
}

Expand Down Expand Up @@ -197,8 +200,7 @@ try
simtimer.init(timeMap);
//Check for WPOLYMER presence in last report step to decide
//polymer injection control type.
const bool polymer = deck->hasKeyword("POLYMER");
const bool use_wpolymer = deck->hasKeyword("WPOLYMER");
std::cout << polymer << " " << use_wpolymer << std::endl;
if (polymer){
if (!use_wpolymer) {
OPM_MESSAGE("Warning: simulate polymer injection without WPOLYMER.");
Expand Down Expand Up @@ -229,6 +231,10 @@ try
OPM_THROW(std::runtime_error, "Cannot control polymer injection via WPOLYMER without wells.");
}
polymer_inflow.reset(new PolymerInflowFromDeck(deck, *wells.c_wells(), props->numCells()));
} else {
polymer_inflow.reset(new PolymerInflowBasic(0.0*Opm::unit::day,
1.0*Opm::unit::day,
0.0));
}
SimulatorFullyImplicitBlackoilPolymer<UnstructuredGrid> simulator(param,
*grid->c_grid(),
Expand Down
16 changes: 0 additions & 16 deletions opm/polymer/PolymerProperties.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,6 @@ namespace Opm
c_max_ = plymaxTable.getPolymerConcentrationColumn()[0];
mix_param_ = plmixparRecord->getItem("TODD_LONGSTAFF")->getSIDouble(0);

std::cout << "Debug output:\n";
std::cout << "mix_param: " << mix_param_ <<" cmax: " << c_max_;
// We assume NTSFUN=1
const auto& plyrockTable = eclipseState->getPlyrockTables()[0];

Expand All @@ -143,32 +141,18 @@ namespace Opm
ads_index_ = static_cast<AdsorptionBehaviour>(plyrockTable.getAdsorbtionIndexColumn()[0]);
c_max_ads_ = plyrockTable.getMaxAdsorbtionColumn()[0];

std::cout << " IPV: " << dead_pore_vol_ <<" rs: " << res_factor_ << " rock_den: " << rock_density_
<< " ads_index: " << ads_index_ << " cmax_ads: " << c_max_ads_ << std::endl;
// We assume NTPVT=1
const auto& plyviscTable = eclipseState->getPlyviscTables()[0];


c_vals_visc_ = plyviscTable.getPolymerConcentrationColumn();
visc_mult_vals_ = plyviscTable.getViscosityMultiplierColumn();

std::cout << "PLYVISC\n";
auto N = c_vals_visc_.size();
for (size_t i = 0; i < N; ++i) {
std::cout << c_vals_visc_[i] << " " << visc_mult_vals_[i] << "\n";
}

// We assume NTSFUN=1
const auto& plyadsTable = eclipseState->getPlyadsTables()[0];


c_vals_ads_ = plyadsTable.getPolymerConcentrationColumn();
ads_vals_ = plyadsTable.getAdsorbedPolymerColumn();
std::cout << "PLYADS\n";
auto M = c_vals_ads_.size();
for (size_t i = 0; i < M; ++i) {
std::cout << c_vals_ads_[i] << " " << ads_vals_[i] << "\n";
}
}

double cMax() const;
Expand Down
5 changes: 3 additions & 2 deletions opm/polymer/SimulatorCompressiblePolymer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ namespace Opm
wellreport.push(props_, *wells_, state.pressure(), state.surfacevol(),
state.saturation(), 0.0, well_state.bhp(), well_state.perfRates());
}
for (; !timer.done(); ++timer) {
// for (; !timer.done(); ++timer) {
// Report timestep and (optionally) write state to disk.
timer.report(std::cout);
if (output_ && (timer.currentStepNum() % output_interval_ == 0)) {
Expand Down Expand Up @@ -388,6 +388,7 @@ namespace Opm
double stepsize = timer.currentStepLength();
polymer_inflow_.getInflowValues(current_time, current_time + stepsize, polymer_inflow_c);


// Solve transport.
transport_timer.start();
if (num_transport_substeps_ != 1) {
Expand Down Expand Up @@ -492,7 +493,7 @@ namespace Opm
state.saturation(), timer.simulationTimeElapsed() + timer.currentStepLength(),
well_state.bhp(), well_state.perfRates());
}
}
// }

if (output_) {
if (output_vtk_) {
Expand Down

0 comments on commit 5333734

Please sign in to comment.