tremove neumann BC at top wall - sphere - GPU-based 3D discrete element method algorithm with optional fluid coupling
 (HTM) git clone git://src.adamsgaard.dk/sphere
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) LICENSE
       ---
 (DIR) commit 8881a695c9ccc84a21f6c62ca6fbdcc7f459f582
 (DIR) parent 27d9ec5c70dc36de44a3b440e1eab9293e67b3b6
 (HTM) Author: Anders Damsgaard <anders.damsgaard@geo.au.dk>
       Date:   Wed, 26 Nov 2014 14:55:04 +0100
       
       remove neumann BC at top wall
       
       Diffstat:
         M src/darcy.cuh                       |       7 ++++---
         M tests/cfd_tests_darcy.py            |       2 +-
       
       2 files changed, 5 insertions(+), 4 deletions(-)
       ---
 (DIR) diff --git a/src/darcy.cuh b/src/darcy.cuh
       t@@ -447,7 +447,6 @@ __global__ void findDarcyPorosities(
                    else
                        dphi = 0.5*(phi_new - phi_0);
        
       -
                    // report values to stdout for debugging
                    //printf("%d,%d,%d\tphi = %f dphi = %f\n", x,y,z, phi, dphi);
                    //printf("%d,%d,%d\tphi = %f dphi = %f v_avg = %f,%f,%f d_avg = %f\n",
       t@@ -925,7 +924,8 @@ __global__ void firstDarcySolution(
                // Neumann BCs
                if (z == 0 && bc_bot == 1)
                    p_zn = p;
       -        if ((z == nz-1 && bc_top == 1) || z >= wall0_iz)
       +        //if ((z == nz-1 && bc_top == 1) || z >= wall0_iz)
       +        if (z == nz-1 && bc_top == 1)
                    p_zp = p;
        
                // upwind coefficients for grad(p) determined from values of k
       t@@ -1086,7 +1086,8 @@ __global__ void updateDarcySolution(
                // Neumann BCs
                if (z == 0 && bc_bot == 1)
                    p_zn = p;
       -        if ((z == nz-1 && bc_top == 1) || z >= wall0_iz)
       +        //if ((z == nz-1 && bc_top == 1) || z >= wall0_iz)
       +        if (z == nz-1 && bc_top == 1)
                    p_zp = p;
        
                // upwind coefficients for grad(p) determined from values of k
 (DIR) diff --git a/tests/cfd_tests_darcy.py b/tests/cfd_tests_darcy.py
       t@@ -58,7 +58,7 @@ orig.initTemporal(total = 0.5, file_dt = 0.01, dt = 1.0e-6)
        orig.run(verbose=False)
        py.readlast(verbose = False)
        ideal_grad_p_z = numpy.linspace(orig.p_f[0,0,0], orig.p_f[0,0,-1], orig.num[2])
       -#orig.writeVTKall()
       +orig.writeVTKall()
        compareNumpyArraysClose(numpy.zeros((1,orig.num[2])),\
                ideal_grad_p_z - py.p_f[0,0,:],\
                "Pressure gradient:\t", tolerance=1.0e-1)