tset ghost nodes in epsilon no matter if smoothing is performed - 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 d9c105e6573b3b57207bcc8fb86b5857607575e9
(DIR) parent 07ad1b9a07bcb030f82bfe8813fd7f4e8ad800eb
(HTM) Author: Anders Damsgaard <anders.damsgaard@geo.au.dk>
Date: Tue, 21 Oct 2014 15:34:52 +0200
set ghost nodes in epsilon no matter if smoothing is performed
Diffstat:
M src/debug.h | 6 +++---
M src/device.cu | 15 ++++++++-------
M tests/cfd_tests_neumann.py | 7 ++++---
3 files changed, 15 insertions(+), 13 deletions(-)
---
(DIR) diff --git a/src/debug.h b/src/debug.h
t@@ -21,8 +21,8 @@ const unsigned int nijacnorm = 10;
const int write_res_log = 0;
// Report epsilon values during Jacobi iterations to stdout
-//#define REPORT_EPSILON
-//#define REPORT_MORE_EPSILON
+#define REPORT_EPSILON
+#define REPORT_MORE_EPSILON
// Report the number of iterations it took before convergence to logfile
// 'output/<sid>-conv.dat'
t@@ -47,7 +47,7 @@ const int conv_log_interval = 1;
#define REPORT_V_C_COMPONENTS
// Enable reporting of forcing function terms to stdout
-//#define REPORT_FORCING_TERMS
+#define REPORT_FORCING_TERMS
// Choose solver model (see Zhou et al. 2010 "Discrete particle simulation of
// particle-fluid flow: model formulations and their applicability", table. 1.
(DIR) diff --git a/src/device.cu b/src/device.cu
t@@ -1563,15 +1563,16 @@ __host__ void DEM::startTime()
if (write_conv_log == 1 && iter % conv_log_interval == 0)
convlog << iter << '\t' << nijac << std::endl;
+ setNSghostNodes<Float>
+ <<<dimGridFluid, dimBlockFluid>>>(
+ dev_ns_epsilon,
+ ns.bc_bot, ns.bc_top);
+ cudaThreadSynchronize();
+ checkForCudaErrorsIter
+ ("Post setNSghostNodesEpsilon(4)", iter);
+
// Apply smoothing if requested
if (ns.gamma > 0.0) {
- setNSghostNodes<Float>
- <<<dimGridFluid, dimBlockFluid>>>(
- dev_ns_epsilon,
- ns.bc_bot, ns.bc_top);
- cudaThreadSynchronize();
- checkForCudaErrorsIter
- ("Post setNSghostNodesEpsilon(4)", iter);
smoothing<<<dimGridFluid, dimBlockFluid>>>(
dev_ns_epsilon,
(DIR) diff --git a/tests/cfd_tests_neumann.py b/tests/cfd_tests_neumann.py
t@@ -43,13 +43,14 @@ else:
print('''# Neumann bottom, Dirichlet top BC.
# Gravity, pressure gradients => transient flow''')
orig = sphere.sim("neumann", fluid = True)
-orig.defaultParams(mu_s = 0.4, mu_d = 0.4)
-orig.defineWorldBoundaries([0.4, 0.4, 1], dx = 0.1)
+orig.cleanup()
+#orig.defineWorldBoundaries([0.4, 0.4, 1], dx = 0.1)
+orig.defineWorldBoundaries([0.3, 0.3, 0.3], dx = 0.1)
#orig.g[2] = -10.0
orig.initFluid(mu = 8.9e-4)
#orig.initTemporal(total = 0.05, file_dt = 0.005, dt = 1.0e-4)
#orig.initTemporal(total = 1.0e-2, file_dt = 1.0e-4, dt = 1.0e-4)
-orig.initTemporal(total = 2.0e-4, file_dt = 1.0e-4, dt = 1.0e-4)
+orig.initTemporal(total = 1.0e-3, file_dt = 1.0e-4, dt = 1.0e-4)
#print(orig.largestFluidTimeStep())
#orig.initTemporal(total = orig.largestFluidTimeStep()*10.0,
#file_dt = orig.largestFluidTimeStep(),