added droplet examples
This commit is contained in:
parent
fb99e78815
commit
93f99057bb
@ -3,6 +3,8 @@
|
|||||||
INSTALL_EXAMPLE( Bubble )
|
INSTALL_EXAMPLE( Bubble )
|
||||||
INSTALL_EXAMPLE( ConstrainedBubble )
|
INSTALL_EXAMPLE( ConstrainedBubble )
|
||||||
INSTALL_EXAMPLE( Piston )
|
INSTALL_EXAMPLE( Piston )
|
||||||
|
INSTALL_EXAMPLE( Droplet )
|
||||||
|
INSTALL_EXAMPLE( DropletCoalescence )
|
||||||
INSTALL_EXAMPLE( Plates )
|
INSTALL_EXAMPLE( Plates )
|
||||||
INSTALL_EXAMPLE( SquareTube )
|
INSTALL_EXAMPLE( SquareTube )
|
||||||
INSTALL_EXAMPLE( InkBottle )
|
INSTALL_EXAMPLE( InkBottle )
|
||||||
|
197
example/Droplet/CreateDroplet.ipynb
Normal file
197
example/Droplet/CreateDroplet.ipynb
Normal file
File diff suppressed because one or more lines are too long
20
example/Droplet/CreateDroplet.py
Normal file
20
example/Droplet/CreateDroplet.py
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
import numpy as np
|
||||||
|
import matplotlib.pylab as plt
|
||||||
|
|
||||||
|
D=np.ones((80,80,40),dtype="uint8")
|
||||||
|
|
||||||
|
cx = 40
|
||||||
|
cy = 40
|
||||||
|
cz = 0
|
||||||
|
|
||||||
|
for i in range(0,80):
|
||||||
|
for j in range (0, 80):
|
||||||
|
for k in range (0,40):
|
||||||
|
dist = np.sqrt((i-cx)*(i-cx) + (j-cx)*(j-cx) + (k-cz)*(k-cz))
|
||||||
|
if (dist < 25) :
|
||||||
|
D[i,j,k] = 2
|
||||||
|
if k < 4 :
|
||||||
|
D[i,j,k] = 0
|
||||||
|
|
||||||
|
D.tofile("droplet_40x80x80.raw")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user