| tset velocity to zero above dynamic wall - sphere - GPU-based 3D discrete eleme… | |
| git clone git://src.adamsgaard.dk/sphere | |
| Log | |
| Files | |
| Refs | |
| LICENSE | |
| --- | |
| commit fb42b7f7543b15269762f52992d036dd086c4ae4 | |
| parent 63009d48011ba447f2ac372b36afe63dbb0d978e | |
| Author: Anders Damsgaard <[email protected]> | |
| Date: Mon, 22 Sep 2014 15:10:29 +0200 | |
| set velocity to zero above dynamic wall | |
| Diffstat: | |
| M src/device.cu | 1 + | |
| M src/navierstokes.cuh | 5 +++++ | |
| 2 files changed, 6 insertions(+), 0 deletions(-) | |
| --- | |
| diff --git a/src/device.cu b/src/device.cu | |
| t@@ -1638,6 +1638,7 @@ __host__ void DEM::startTime() | |
| ns.bc_top, | |
| ns.ndem, | |
| ns.c_grad_p, | |
| + wall0_iz, | |
| dev_ns_v_x, | |
| dev_ns_v_y, | |
| dev_ns_v_z); | |
| diff --git a/src/navierstokes.cuh b/src/navierstokes.cuh | |
| t@@ -2910,6 +2910,7 @@ __global__ void updateNSvelocity( | |
| const int bc_top, // in | |
| const unsigned int ndem, // in | |
| const Float c_grad_p, // in | |
| + const unsigned int wall0_iz, // in | |
| Float* __restrict__ dev_ns_v_x, // out | |
| Float* __restrict__ dev_ns_v_y, // out | |
| Float* __restrict__ dev_ns_v_z) // out | |
| t@@ -3006,6 +3007,10 @@ __global__ void updateNSvelocity( | |
| v.y = 0.0; | |
| } | |
| + // Set velocities to zero above the dynamic wall | |
| + if (z > wall0_iz) | |
| + v = MAKE_FLOAT3(0.0, 0.0, 0.0); | |
| + | |
| // Check the advection term using the Courant-Friedrichs-Lewy condition | |
| __syncthreads(); | |
| if (v.x*ndem*devC_dt/dx |