mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-11-29 04:23:48 -06:00
Incorporate transmissibility into water flux definition.
This means that we're computing the correct solution for dt=0.0005 (as verified by 'sim_simple.m', but we're still failing larger time steps).
This commit is contained in:
parent
8b12d1506d
commit
e31101e80f
@ -403,6 +403,8 @@ int main()
|
|||||||
double res_norm = 1e100;
|
double res_norm = 1e100;
|
||||||
V s1 = /*s0.leftCols<1>()*/0.5*V::Ones(nc,1); // Initial guess.
|
V s1 = /*s0.leftCols<1>()*/0.5*V::Ones(nc,1); // Initial guess.
|
||||||
UpwindSelector<double> upws(grid, ops);
|
UpwindSelector<double> upws(grid, ops);
|
||||||
|
const ADB nkdp = (ADB::constant(transi , block_pattern) *
|
||||||
|
ADB::constant(ops.ngrad * p1.matrix(), block_pattern));
|
||||||
do {
|
do {
|
||||||
const std::vector<int>& bp = block_pattern;
|
const std::vector<int>& bp = block_pattern;
|
||||||
ADB s = ADB::variable(0, s1, bp);
|
ADB s = ADB::variable(0, s1, bp);
|
||||||
@ -411,16 +413,11 @@ int main()
|
|||||||
* Eigen::Map<const V>(grid.cell_volumes, nc, 1);
|
* Eigen::Map<const V>(grid.cell_volumes, nc, 1);
|
||||||
V dtpv = dt/pv;
|
V dtpv = dt/pv;
|
||||||
// std::cout << dtpv;
|
// std::cout << dtpv;
|
||||||
V ngradp1 = ops.ngrad*p1.matrix();
|
|
||||||
// std::cout << ngradp1 << std::endl;
|
|
||||||
std::vector<ADB> pmobc = phaseMobility<ADB>(props, allcells, s.value());
|
std::vector<ADB> pmobc = phaseMobility<ADB>(props, allcells, s.value());
|
||||||
std::vector<ADB> pmobf = upws.select(p1, pmobc);
|
std::vector<ADB> pmobf = upws.select(p1, pmobc);
|
||||||
|
|
||||||
ADB fw_cell = fluxFunc(pmobc);
|
ADB fw_cell = fluxFunc(pmobc);
|
||||||
ADB fw_face = fluxFunc(pmobf);
|
ADB flux1 = pmobf[0] * nkdp;
|
||||||
|
|
||||||
// std::cout << fw_face;
|
|
||||||
ADB flux1 = fw_face*ADB::constant(ngradp1, bp);
|
|
||||||
// std::cout << flux1;
|
// std::cout << flux1;
|
||||||
V qneg = dtpv*q;
|
V qneg = dtpv*q;
|
||||||
V qpos = dtpv*q;
|
V qpos = dtpv*q;
|
||||||
|
Loading…
Reference in New Issue
Block a user