tadd test for fixed pressure BCs at X - 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 d1f1f06606be74e7eaed6f43e868b4515df28c43
(DIR) parent b456fd10ab9a15540b915c36ee2d3ed08ca44faf
(HTM) Author: Anders Damsgaard Christensen <adc@geo.au.dk>
Date: Fri, 12 Aug 2016 10:46:43 -0700
add test for fixed pressure BCs at X
Diffstat:
M tests/cfd_tests_darcy.py | 32 +++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+), 0 deletions(-)
---
(DIR) diff --git a/tests/cfd_tests_darcy.py b/tests/cfd_tests_darcy.py
t@@ -212,6 +212,38 @@ py = sphere.sim(sid = orig.sid, fluid = True)
+# Add horizontal pressure gradient along X
+print("# Pressure gradient along X")
+orig.cleanup()
+orig.p_f[:,:,:] = 0.0
+orig.p_f[0,:,-1] = 2.0
+orig.p_f[-1,:,-1] = 0.0
+orig.setFluidXFixedPressure()
+orig.setFluidYNoFlow()
+orig.setFluidTopFixedPressure()
+orig.setFluidBottomNoFlow()
+orig.initTemporal(total = 0.5, file_dt = 0.01, dt = 1.0e-6)
+#orig.time_dt[0] *= 0.01
+#orig.time_file_dt = orig.time_dt*0.99
+#orig.time_total = orig.time_dt*1
+#orig.run(device=2, verbose=False)
+orig.run(verbose=False)
+py.readlast(verbose = False)
+
+# Fluid flow direction, opposite of gradient (i.e. towards -z)
+if ((py.v_f[:,:,:,2] < 0.0).all()):
+ print("Flow field (Z):\t\t" + passed())
+else:
+ print("Flow field (Z):\t\t" + failed())
+ raise Exception("Failed")
+
+# Fluid flow direction, opposite of gradient (i.e. towards -z)
+if ((py.v_f[:,:,:,0] > 0.0).all()):
+ print("Flow field (X):\t\t" + passed())
+else:
+ print("Flow field (X):\t\t" + failed())
+ raise Exception("Failed")
+
#cleanup(orig)