Improved saturation estimate

This commit is contained in:
James McClure
2014-08-20 08:59:18 -04:00
parent a9d975a9ab
commit 43f89b27c5
3 changed files with 27 additions and 16 deletions

View File

@@ -2169,13 +2169,26 @@ int main(int argc, char **argv)
for (k=kstart; k<kfinish; k++){
for (j=1; j<Ny-1; j++){
for (i=1; i<Nx-1; i++){
if ( SignDist(i,j,k) > 0.0 ){
// 1-D index for this cube corner
n = i + j*Nx + k*Nx*Ny;
// Compute the non-wetting phase volume contribution
if ( Phase(i,j,k) > 0.0 )
nwp_volume += 1.0;
// 1-D index
n = i + j*Nx + k*Nx*Ny;
// Compute the non-wetting phase volume contribution
if ( Phase(i,j,k) > 0.0 && id[n] > 0)
nwp_volume += 1.0;
if ( SignDist(i,j,k) > 0.0 ){
// volume averages over the non-wetting phase
if ( Phase(i,j,k) > 0.999 ){
// volume the excludes the interfacial region
vol_n += 1.0;
// pressure
pan += Press(i,j,k);
// velocity
van(0) += Vel_x(i,j,k);
van(1) += Vel_y(i,j,k);
van(2) += Vel_z(i,j,k);
}
// volume averages over the non-wetting phase
if ( Phase(i,j,k) > 0.999 ){

View File

@@ -680,9 +680,6 @@ int main(int argc, char **argv)
for (p=0;p<8;p++){
if ( SignDist(i+cube[p][0],j+cube[p][1],k+cube[p][2]) > 0 ){
// 1-D index for this cube corner
n = i+cube[p][0] + (j+cube[p][1])*Nx + (k+cube[p][2])*Nx*Ny;
// Compute the non-wetting phase volume contribution
if ( Phase(i+cube[p][0],j+cube[p][1],k+cube[p][2]) > 0 )
nwp_volume += 0.125;

View File

@@ -2182,14 +2182,15 @@ int main(int argc, char **argv)
for (k=kstart; k<kfinish; k++){
for (j=1; j<Ny-1; j++){
for (i=1; i<Nx-1; i++){
// 1-D index
n = i + j*Nx + k*Nx*Ny;
// Compute the non-wetting phase volume contribution
if ( Phase(i,j,k) > 0.0 && id[n] > 0)
nwp_volume += 1.0;
if ( SignDist(i,j,k) > 0.0 ){
// 1-D index for this cube corner
n = i + j*Nx + k*Nx*Ny;
// Compute the non-wetting phase volume contribution
if ( Phase(i,j,k) > 0.0 )
nwp_volume += 1.0;
// volume averages over the non-wetting phase
if ( Phase(i,j,k) > 0.999 ){
// volume the excludes the interfacial region