mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
make the simulator read from deckfile
make it much more gerenal.
This commit is contained in:
@@ -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());
|
||||
|
||||
@@ -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_;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user