fix wrong implementation.

This commit is contained in:
Liu Ming 2014-12-08 09:54:16 +08:00
parent 93994a3e53
commit d2892833b4

View File

@ -233,9 +233,8 @@ namespace Opm {
double res_factor = polymer_props_.resFactor();
double factor = (res_factor -1.) / max_ads;
V rk = one + factor * ads;
V krw_eff = krw / rk;
return krw_eff;
return krw / rk;
}
@ -257,17 +256,8 @@ namespace Opm {
double res_factor = polymer_props_.resFactor();
double factor = (res_factor - 1.) / max_ads;
ADB rk = one + ads * factor;
ADB dkrw_ds = krw / rk;
ADB dkrw_dc = -factor * krw / (rk * rk) * ads ;
const int num_blocks = c.numBlocks();
std::vector<ADB::M> jacs(num_blocks);
for (int block = 0; block < num_blocks; ++block) {
jacs[block] = dkrw_ds.derivative()[block] * sw.derivative()[block]
+ dkrw_dc.derivative()[block] * c.derivative()[block];
}
return ADB::function(krw_eff, jacs);
return krw / rk;
}
}// namespace Opm