From 05ad35f32379d337d6ee1e8286d2f57815fbee7d Mon Sep 17 00:00:00 2001 From: James McClure Date: Wed, 30 Jun 2021 08:38:21 -0400 Subject: [PATCH] added droplet coalescence example --- example/DropletCoalescence/Droplets.py | 35 ++++++++++++++++++ example/DropletCoalescence/input.db | 51 ++++++++++++++++++++++++++ 2 files changed, 86 insertions(+) create mode 100644 example/DropletCoalescence/Droplets.py create mode 100644 example/DropletCoalescence/input.db diff --git a/example/DropletCoalescence/Droplets.py b/example/DropletCoalescence/Droplets.py new file mode 100644 index 00000000..aa8e33d0 --- /dev/null +++ b/example/DropletCoalescence/Droplets.py @@ -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") diff --git a/example/DropletCoalescence/input.db b/example/DropletCoalescence/input.db new file mode 100644 index 00000000..ba74be4e --- /dev/null +++ b/example/DropletCoalescence/input.db @@ -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 { +}