tfixed fluid node offset - sphere - GPU-based 3D discrete element method algori… | |
git clone git://src.adamsgaard.dk/sphere | |
Log | |
Files | |
Refs | |
LICENSE | |
--- | |
commit c85c4dd6a7e29a847f770116b14a7c5100ada0f6 | |
parent 280cd9241ebb2c8858d2bcae6672a90e77fced32 | |
Author: Anders Damsgaard <[email protected]> | |
Date: Tue, 22 Oct 2013 15:11:01 +0200 | |
fixed fluid node offset | |
Diffstat: | |
M python/sphere.py | 7 +++++-- | |
1 file changed, 5 insertions(+), 2 deletions(-) | |
--- | |
diff --git a/python/sphere.py b/python/sphere.py | |
t@@ -524,6 +524,8 @@ class Spherebin: | |
sb.sid = self.sid + ".{:0=5}".format(i) | |
sb.readbin(fn, verbose = False) | |
sb.writeVTK() | |
+ if (sb.nu > 0.0): | |
+ sb.writeFluidVTK() | |
def writeVTK(self, folder = '../output/', verbose = True): | |
t@@ -695,8 +697,9 @@ class Spherebin: | |
# initalize VTK data structure | |
grid = vtk.vtkImageData() | |
- grid.SetOrigin(self.origo) | |
- grid.SetSpacing((self.L-self.origo)/self.num) | |
+ dx = (self.L-self.origo)/self.num # cell center spacing | |
+ grid.SetOrigin(self.origo + 0.5*dx) | |
+ grid.SetSpacing(dx) | |
grid.SetDimensions(self.num) # no. of points in each direction | |
# array of scalars: hydraulic pressures |