tdisable time, add fixed particles to end walls - sphere - GPU-based 3D discret… | |
git clone git://src.adamsgaard.dk/sphere | |
Log | |
Files | |
Refs | |
LICENSE | |
--- | |
commit feefefc3bb93324e8b0d2aa41d2abf3879e1f6d6 | |
parent 84c23d36a1d3f1e6224370ff727a1e96b733e34f | |
Author: Anders Damsgaard <[email protected]> | |
Date: Tue, 24 Jun 2014 16:29:41 +0200 | |
disable time, add fixed particles to end walls | |
Diffstat: | |
M python/shortening.py | 15 ++++++++------- | |
M python/sphere.py | 2 +- | |
M tests/cfd_tests.py | 1 + | |
3 files changed, 10 insertions(+), 8 deletions(-) | |
--- | |
diff --git a/python/shortening.py b/python/shortening.py | |
t@@ -140,14 +140,15 @@ sim.color[I] = 0 | |
sim.x[I,1] = 0.0 # move into center into lower wall to avoid stuck particles | |
# fix left-most plane of particles | |
-#I = numpy.nonzero(sim.x[:,2] < 1.5*numpy.mean(sim.radius)) | |
-#sim.fixvel[I] = -1 | |
-#sim.color[I] = 0 | |
+I = numpy.nonzero(sim.x[:,2] < 1.5*numpy.mean(sim.radius)) | |
+sim.fixvel[I] = -1 | |
+sim.color[I] = 0 | |
# fix right-most plane of particles | |
-#I = numpy.nonzero(sim.x[:,2] > z_max - 1.5*numpy.mean(sim.radius)) | |
-#sim.fixvel[I] = -1 | |
-#sim.color[I] = 0 | |
+I = numpy.nonzero((sim.x[:,2] > z_max - 1.5*numpy.mean(sim.radius)) & | |
+ (sim.x[:,1] > 4.0*numpy.mean(sim.radius))) | |
+sim.fixvel[I] = -1 | |
+sim.color[I] = 0 | |
#sim.normalBoundariesXY() | |
#sim.periodicBoundariesX() | |
t@@ -171,7 +172,7 @@ sim.gamma_t[0] = 0.0 | |
compressional_strain = 0.5 | |
wall_velocity = -compressional_strain*(z_max - z_min)/sim.time_total[0] | |
sim.uniaxialStrainRate(wvel = wall_velocity) | |
-#sim.vel[I,2] = wall_velocity | |
+sim.vel[I,2] = wall_velocity | |
sim.run(dry=True) | |
sim.run() | |
diff --git a/python/sphere.py b/python/sphere.py | |
t@@ -3108,7 +3108,7 @@ class sim: | |
if (self.fluid == True): | |
binary = "porousflow" | |
- cmd = "cd ..; time " + valgrindbin + cudamemchk + "./" + binary + " " \ | |
+ cmd = "cd ..; " + valgrindbin + cudamemchk + "./" + binary + " " \ | |
+ quiet + dryarg + "input/" + self.sid + ".bin " + stdout | |
#print(cmd) | |
status = subprocess.call(cmd, shell=True) | |
diff --git a/tests/cfd_tests.py b/tests/cfd_tests.py | |
t@@ -44,6 +44,7 @@ else: | |
print(numpy.max(py.v_f)) | |
raise Exception("Failed") | |
+ | |
# Add pressure gradient | |
# This test passes with BETA=0.0 and tolerance=1.0e-9 | |
orig.p_f[:,:,-1] = 1.1 |