added droplet examples

This commit is contained in:
James McClure 2021-12-13 11:02:17 -05:00
parent fb99e78815
commit 93f99057bb
3 changed files with 219 additions and 0 deletions

View File

@ -3,6 +3,8 @@
INSTALL_EXAMPLE( Bubble )
INSTALL_EXAMPLE( ConstrainedBubble )
INSTALL_EXAMPLE( Piston )
INSTALL_EXAMPLE( Droplet )
INSTALL_EXAMPLE( DropletCoalescence )
INSTALL_EXAMPLE( Plates )
INSTALL_EXAMPLE( SquareTube )
INSTALL_EXAMPLE( InkBottle )

File diff suppressed because one or more lines are too long

View 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")