mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Use cell depths based on averaging cell corners
This commit is contained in:
parent
ca902168ed
commit
d77e33b5dc
@ -313,7 +313,6 @@ namespace Opm
|
|||||||
const CellRange& cells,
|
const CellRange& cells,
|
||||||
std::vector<double>& p )
|
std::vector<double>& p )
|
||||||
{
|
{
|
||||||
const int nd = UgGridHelpers::dimensions(G);
|
|
||||||
|
|
||||||
enum { up = 0, down = 1 };
|
enum { up = 0, down = 1 };
|
||||||
|
|
||||||
@ -324,7 +323,7 @@ namespace Opm
|
|||||||
{
|
{
|
||||||
assert (c < p.size());
|
assert (c < p.size());
|
||||||
|
|
||||||
const double z = UgGridHelpers::cellCentroidCoordinate(G, *ci, nd-1);
|
const double z = UgGridHelpers::cellCenterDepth(G, *ci);
|
||||||
p[c] = (z < split) ? f[up](z) : f[down](z);
|
p[c] = (z < split) ? f[up](z) : f[down](z);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -703,10 +702,8 @@ namespace Opm
|
|||||||
double sw = 0.0;
|
double sw = 0.0;
|
||||||
if (water) {
|
if (water) {
|
||||||
if (isConstPc(props,waterpos,cell)){
|
if (isConstPc(props,waterpos,cell)){
|
||||||
const int nd = UgGridHelpers::dimensions(G);
|
const double cellDepth = UgGridHelpers::cellCenterDepth(G,
|
||||||
const double cellDepth = UgGridHelpers::cellCentroidCoordinate(G,
|
cell);
|
||||||
cell,
|
|
||||||
nd-1);
|
|
||||||
sw = satFromDepth(props,cellDepth,reg.zwoc(),waterpos,cell,false);
|
sw = satFromDepth(props,cellDepth,reg.zwoc(),waterpos,cell,false);
|
||||||
phase_saturations[waterpos][local_index] = sw;
|
phase_saturations[waterpos][local_index] = sw;
|
||||||
}
|
}
|
||||||
@ -725,10 +722,8 @@ namespace Opm
|
|||||||
double sg = 0.0;
|
double sg = 0.0;
|
||||||
if (gas) {
|
if (gas) {
|
||||||
if (isConstPc(props,gaspos,cell)){
|
if (isConstPc(props,gaspos,cell)){
|
||||||
const int nd = UgGridHelpers::dimensions(G);
|
const double cellDepth = UgGridHelpers::cellCenterDepth(G,
|
||||||
const double cellDepth = UgGridHelpers::cellCentroidCoordinate(G,
|
cell);
|
||||||
cell,
|
|
||||||
nd-1);
|
|
||||||
sg = satFromDepth(props,cellDepth,reg.zgoc(),gaspos,cell,true);
|
sg = satFromDepth(props,cellDepth,reg.zgoc(),gaspos,cell,true);
|
||||||
phase_saturations[gaspos][local_index] = sg;
|
phase_saturations[gaspos][local_index] = sg;
|
||||||
}
|
}
|
||||||
@ -829,7 +824,7 @@ namespace Opm
|
|||||||
std::vector<double> rs(cells.size());
|
std::vector<double> rs(cells.size());
|
||||||
int count = 0;
|
int count = 0;
|
||||||
for (auto it = cells.begin(); it != cells.end(); ++it, ++count) {
|
for (auto it = cells.begin(); it != cells.end(); ++it, ++count) {
|
||||||
const double depth = UgGridHelpers::cellCentroidCoordinate(grid, *it, 2);
|
const double depth = UgGridHelpers::cellCenterDepth(grid, *it);
|
||||||
rs[count] = rs_func(depth, oil_pressure[count], temperature[count], gas_saturation[count]);
|
rs[count] = rs_func(depth, oil_pressure[count], temperature[count], gas_saturation[count]);
|
||||||
}
|
}
|
||||||
return rs;
|
return rs;
|
||||||
|
Loading…
Reference in New Issue
Block a user