make the simulator read from deckfile

make it much more gerenal.
This commit is contained in:
Liu Ming
2013-12-17 23:49:09 +08:00
parent 6d5b90df54
commit 2985dc7cce
3 changed files with 265 additions and 11 deletions

View File

@@ -313,7 +313,7 @@ namespace {
residual_.mass_balance[phase] = residual_.mass_balance[phase] - source;
}
}
#if 0
// -------- Well equation, and well contributions to the mass balance equations --------
// Contribution to mass balance will have to wait.
@@ -407,6 +407,7 @@ namespace {
const ADB bhp_residual = bhp - bhp_targets;
// Choose bhp residual for positive bhp targets.
residual_.well_eq = bhp_residual;
#endif
}
@@ -587,7 +588,7 @@ namespace {
const double* grav = gravity();
const ADB rho = fluidDensity(phase, state.pressure);
const ADB rhoavg = ops_.caver * rho;
const ADB dp = ops_.ngrad * state.pressure - grav[2] * (rhoavg * (ops_.ngrad * z.matrix()));
const ADB dp = ops_.ngrad * state.pressure;// - grav[2] * (rhoavg * (ops_.ngrad * z.matrix()));
const ADB head = trans * dp;
UpwindSelector<double> upwind(grid_, ops_, head.value());

View File

@@ -22,14 +22,14 @@ namespace Opm {
public:
FullyImplicitTwoPhaseSolver(const UnstructuredGrid& grid,
const IncompPropsAdInterface& fluid,
const Wells& wells,
const LinearSolverInterface& linsolver,
const double* gravity);
// const Wells& wells,
const LinearSolverInterface& linsolver);
// const double* gravity);
void step(const double dt,
TwophaseState& state,
const std::vector<double>& src,
WellState& wstate);
const std::vector<double>& src);
// WellState& wstate);
private:
typedef AutoDiffBlock<double> ADB;
typedef ADB::V V;
@@ -50,20 +50,21 @@ namespace Opm {
std::vector<double> src;
} source;
*/
/*
struct WellOps {
WellOps(const Wells& wells);
M w2p; // well->perf
M p2w; // perf->well
};
*/
const UnstructuredGrid& grid_;
const IncompPropsAdInterface& fluid_;
const Wells& wells_;
// const Wells& wells_;
const LinearSolverInterface& linsolver_;
const double* grav_;
// const double* grav_;
const std::vector<int> cells_;
HelperOps ops_;
const WellOps wops_;
// const WellOps wops_;
std::vector<ADB> mob_;