change anisotropy of blobs
@@ -572,10 +572,10 @@ class RandomWalk():
if __name__ == "__main__":
plt.close('all')
- for image_run in range(4):
+ image_run = 0
if image_run == 0:
# Open space
- im = np.ones([1, 1], dtype=int)
+ im = np.ones([3, 3], dtype=int)
fname = 'open_'
num_t = 10000
num_w = 10000
@@ -606,12 +606,12 @@ if __name__ == "__main__":
num_w = 100000
else:
# Do some blobs
- im = ps.generators.blobs(shape=[200, 200, 200], porosity=0.75,
- blobiness=[1, 2, 3]).astype(int)
+ im = ps.generators.blobs(shape=[300, 300, 300], porosity=0.5,
+ blobiness=[1, 2, 5]).astype(int)
fname = 'blobs_'
# Number of time steps and walkers
- num_t = 1000
- num_w = 10000
+ num_t = 10000
+ num_w = 100000
# Track time of simulation
st = time.time()
@@ -625,15 +625,12 @@ if __name__ == "__main__":
if rw.dim == 2:
# Plot the longest walk
rw.plot_walk_2d(w_id=np.argmax(rw.sq_disp[-1, :]), data='w')
-# big_shape = np.shape(rw.im_big)
-# dpi = np.int(np.ceil(big_shape[0]))
dpi = 600
rw._save_fig(fname+'longest.png', dpi=dpi)
# Plot all the walks
rw.plot_walk_2d(check_solid=True)
rw._save_fig(fname+'all.png', dpi=dpi)
else:
- pass
# export to paraview
-# rw.export_walk(image=rw.im, stride=1)
+ rw.export_walk(image=rw.im, stride=1)
#rw.run_analytics(lw=2, uw=3, lt=2, ut=6)
