tupdate fluid interaction test - sphere - GPU-based 3D discrete element method … | |
git clone git://src.adamsgaard.dk/sphere | |
Log | |
Files | |
Refs | |
LICENSE | |
--- | |
commit dbd9e94926db5f0835a2aa67cb1b91a2b6200cd2 | |
parent 71b8e41784b28fc36ba0e5552588af4e06bdc69a | |
Author: Anders Damsgaard <[email protected]> | |
Date: Fri, 20 Mar 2015 11:31:15 +0100 | |
update fluid interaction test | |
Diffstat: | |
M src/darcy.cuh | 7 ++----- | |
M tests/fluid_particle_interaction_d… | 6 ++++-- | |
2 files changed, 6 insertions(+), 7 deletions(-) | |
--- | |
diff --git a/src/darcy.cuh b/src/darcy.cuh | |
t@@ -925,7 +925,6 @@ __global__ void findDarcyPressureForceLinear( | |
Float3 grad_p = MAKE_FLOAT3(0., 0., 0.); | |
Float3 grad_p_iter, n; | |
- Float s; | |
// Loop over 27 closest cells to find all pressure gradient | |
// contributions | |
t@@ -943,8 +942,6 @@ __global__ void findDarcyPressureForceLinear( | |
n = MAKE_FLOAT3(dx*d_ix, dy*d_iy, dz*d_iz); | |
- s = weight(x3, X+n, dx, dy, dz); | |
- | |
grad_p += weight(x3, X + n, dx, dy, dz)*grad_p_iter; | |
/*printf("[%d + %d, %d + %d, %d + %d]\n" | |
t@@ -982,7 +979,7 @@ __global__ void findDarcyPressureForceLinear( | |
if (i_z >= wall0_iz) | |
f_p.z = 0.0; | |
- printf("%d,%d,%d findPF:\n" | |
+ /*printf("%d,%d,%d findPF:\n" | |
//"\tphi = %f\n" | |
"\tx = %f, %f, %f\n" | |
"\tX = %f, %f, %f\n" | |
t@@ -992,7 +989,7 @@ __global__ void findDarcyPressureForceLinear( | |
x3.x, x3.y, x3.z, | |
X.x, X.y, X.z, | |
grad_p.x, grad_p.y, grad_p.z, | |
- f_p.x, f_p.y, f_p.z); | |
+ f_p.x, f_p.y, f_p.z);*/ | |
#ifdef CHECK_FLUID_FINITE | |
checkFiniteFloat3("f_p", i_x, i_y, i_z, f_p); | |
diff --git a/tests/fluid_particle_interaction_darcy.py b/tests/fluid_particle_i… | |
t@@ -33,8 +33,10 @@ sim.cleanup() | |
# Gravity, pressure gradient enforced by Dirichlet boundaries. | |
# The particle should be sucked towards the low pressure | |
-print('# Test 1: Test pressure gradient force from buoyancy') | |
-sim.p_f[:,:,-1] = 1.0 | |
+print('# Test 2: Test pressure gradient force from buoyancy') | |
+ | |
+sim.initFluid(cfd_solver = 1) | |
+sim.p_f[:,:,-1] = 0.0 | |
sim.addParticle([0.5, 0.5, 0.5], 0.01) | |
sim.initTemporal(total=0.001, file_dt=0.0001) | |
#sim.time_file_dt[0] = sim.time_dt[0] |