added droplet coalescence example
This commit is contained in:
parent
d2f1b6ab08
commit
05ad35f323
35
example/DropletCoalescence/Droplets.py
Normal file
35
example/DropletCoalescence/Droplets.py
Normal file
|
@ -0,0 +1,35 @@
|
|||
import numpy
|
||||
import math
|
||||
|
||||
nx=400
|
||||
ny=200
|
||||
nz=200
|
||||
N=nx*ny*nz
|
||||
Radius=64
|
||||
|
||||
mesh=(nx,ny,nz)
|
||||
data=numpy.ones(mesh,dtype=numpy.int8)
|
||||
|
||||
#print(data)
|
||||
print("Create two droplets")
|
||||
print("Mesh size: "+repr(mesh))
|
||||
print("Droplet radius: "+repr(Radius))
|
||||
|
||||
gap = 6
|
||||
c1x = nx/2 - gap/2 - Radius
|
||||
c2x = nx/2 + gap/2 + Radius
|
||||
|
||||
# assign a bubble on each side
|
||||
for x in range(0,200):
|
||||
for y in range(0,ny):
|
||||
for z in range(0,nz):
|
||||
if math.sqrt((x-c1x)*(x-c1x)+(y-ny/2)*(y-ny/2)+(z-nz/2)*(z-nz/2) ) < Radius:
|
||||
data[x,y,z]=2
|
||||
|
||||
for x in range(200,nx):
|
||||
for y in range(0,ny):
|
||||
for z in range(0,nz):
|
||||
if math.sqrt((x-c2x)*(x-c2x)+(y-ny/2)*(y-ny/2)+(z-nz/2)*(z-nz/2) ) < Radius:
|
||||
data[x,y,z]=2
|
||||
|
||||
data.tofile("Droplets.raw")
|
51
example/DropletCoalescence/input.db
Normal file
51
example/DropletCoalescence/input.db
Normal file
|
@ -0,0 +1,51 @@
|
|||
MRT {
|
||||
timestepMax = 10000
|
||||
tau = 0.7
|
||||
F = 1e-05, 0, 0
|
||||
Restart = false
|
||||
din = 1.0
|
||||
dout = 1.0
|
||||
flux = 0.0
|
||||
}
|
||||
|
||||
Color {
|
||||
tauA = 0.7;
|
||||
tauB = 1.0;
|
||||
rhoA = 1.0;
|
||||
rhoB = 1.0;
|
||||
alpha = 5e-3;
|
||||
beta = 0.95;
|
||||
F = 0, 0, 0
|
||||
Restart = false
|
||||
timestepMax = 40000
|
||||
ComponentLabels = -2
|
||||
ComponentAffinity = -0.5
|
||||
}
|
||||
|
||||
Domain {
|
||||
Filename = "Droplets.raw"
|
||||
nproc = 1, 1, 2 // Number of processors (Npx,Npy,Npz)
|
||||
n = 200, 200, 200 // Size of local domain (Nx,Ny,Nz)
|
||||
N = 200, 200, 400 // size of the input image
|
||||
voxel_length = 1.0
|
||||
BC = 0 // Boundary condition type
|
||||
Sw = 0.15
|
||||
ReadType = "8bit"
|
||||
ReadValues = -2, 1, 2
|
||||
WriteValues = -2, 1, 2
|
||||
ComponentLabels = -2
|
||||
HistoryLabels = -2
|
||||
}
|
||||
|
||||
Analysis {
|
||||
analysis_interval = 1000 // Frequency to perform analysis
|
||||
subphase_analysis_interval = 5000 // Frequency to perform analysis
|
||||
restart_interval = 60000 // Frequency to write restart data
|
||||
visualization_interval = 100000 // Frequency to write visualization data
|
||||
restart_file = "Restart" // Filename to use for restart file (will append rank)
|
||||
N_threads = 4 // Number of threads to use
|
||||
load_balance = "independent" // Load balance method to use: "none", "default", "independent"
|
||||
}
|
||||
|
||||
Visualization {
|
||||
}
|
Loading…
Reference in New Issue
Block a user