Merge branch 'master' of github.com:JamesEMcClure/LBPM-WIA
This commit is contained in:
commit
7fa1588b50
@ -522,10 +522,12 @@ void SubPhase::Full(){
|
|||||||
double wx = 0.5*(Vel_z(i+1,j,k) - Vel_z(i-1,j,k));
|
double wx = 0.5*(Vel_z(i+1,j,k) - Vel_z(i-1,j,k));
|
||||||
double wy = 0.5*(Vel_z(i,j+1,k) - Vel_z(i,j-1,k));
|
double wy = 0.5*(Vel_z(i,j+1,k) - Vel_z(i,j-1,k));
|
||||||
double wz = 0.5*(Vel_z(i,j,k+1) - Vel_z(i,j,k-1));
|
double wz = 0.5*(Vel_z(i,j,k+1) - Vel_z(i,j,k-1));
|
||||||
|
if (SDs(i,j,k) > 2.0){
|
||||||
Dissipation(i,j,k) = 2*rho*nu*( ux*ux + vy*vy + wz*wz + 0.5*(vx + uy)*(vx + uy)+ 0.5*(vz + wy)*(vz + wy)+ 0.5*(uz + wx)*(uz + wx));
|
Dissipation(i,j,k) = 2*rho*nu*( ux*ux + vy*vy + wz*wz + 0.5*(vx + uy)*(vx + uy)+ 0.5*(vz + wy)*(vz + wy)+ 0.5*(uz + wx)*(uz + wx));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Set up geometric analysis of each region */
|
/* Set up geometric analysis of each region */
|
||||||
|
|
||||||
|
@ -303,13 +303,13 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ( vis_db->getWithDefault<bool>( "save_distance", false ) ) {
|
if ( vis_db->getWithDefault<bool>( "save_distance", false ) ) {
|
||||||
ASSERT( visData[0].vars[5]->name == "SignDist" );
|
ASSERT( visData[0].vars[6]->name == "SignDist" );
|
||||||
Array<double> &SignData = visData[0].vars[6]->data;
|
Array<double> &SignData = visData[0].vars[6]->data;
|
||||||
fillData.copy( Averages.SDs, SignData );
|
fillData.copy( Averages.SDs, SignData );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( vis_db->getWithDefault<bool>( "save_connected_components", false ) ) {
|
if ( vis_db->getWithDefault<bool>( "save_connected_components", false ) ) {
|
||||||
ASSERT( visData[0].vars[6]->name == "BlobID" );
|
ASSERT( visData[0].vars[7]->name == "BlobID" );
|
||||||
Array<double> &BlobData = visData[0].vars[7]->data;
|
Array<double> &BlobData = visData[0].vars[7]->data;
|
||||||
fillData.copy( Averages.morph_n->label, BlobData );
|
fillData.copy( Averages.morph_n->label, BlobData );
|
||||||
}
|
}
|
||||||
@ -658,6 +658,7 @@ runAnalysis::runAnalysis( std::shared_ptr<Database> input_db, const RankInfoStru
|
|||||||
auto VxVar = std::make_shared<IO::Variable>();
|
auto VxVar = std::make_shared<IO::Variable>();
|
||||||
auto VyVar = std::make_shared<IO::Variable>();
|
auto VyVar = std::make_shared<IO::Variable>();
|
||||||
auto VzVar = std::make_shared<IO::Variable>();
|
auto VzVar = std::make_shared<IO::Variable>();
|
||||||
|
auto ViscousDissipationVar = std::make_shared<IO::Variable>();
|
||||||
auto SignDistVar = std::make_shared<IO::Variable>();
|
auto SignDistVar = std::make_shared<IO::Variable>();
|
||||||
auto BlobIDVar = std::make_shared<IO::Variable>();
|
auto BlobIDVar = std::make_shared<IO::Variable>();
|
||||||
|
|
||||||
@ -695,6 +696,14 @@ runAnalysis::runAnalysis( std::shared_ptr<Database> input_db, const RankInfoStru
|
|||||||
d_meshData[0].vars.push_back( VzVar );
|
d_meshData[0].vars.push_back( VzVar );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( vis_db->getWithDefault<bool>( "save_dissipation", false ) ) {
|
||||||
|
ViscousDissipationVar->name = "ViscousDissipation";
|
||||||
|
ViscousDissipationVar->type = IO::VariableType::VolumeVariable;
|
||||||
|
ViscousDissipationVar->dim = 1;
|
||||||
|
ViscousDissipationVar->data.resize( d_n[0], d_n[1], d_n[2] );
|
||||||
|
d_meshData[0].vars.push_back( ViscousDissipationVar );
|
||||||
|
}
|
||||||
|
|
||||||
if ( vis_db->getWithDefault<bool>( "save_distance", false ) ) {
|
if ( vis_db->getWithDefault<bool>( "save_distance", false ) ) {
|
||||||
SignDistVar->name = "SignDist";
|
SignDistVar->name = "SignDist";
|
||||||
SignDistVar->type = IO::VariableType::VolumeVariable;
|
SignDistVar->type = IO::VariableType::VolumeVariable;
|
||||||
|
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