db for dfh

This commit is contained in:
James E McClure 2018-05-16 22:53:38 -04:00
parent 86c49f3477
commit 3a458c4a9c

View File

@ -20,7 +20,6 @@
using namespace std; using namespace std;
//************************************************************************* //*************************************************************************
// Implementation of Two-Phase Immiscible LBM // Implementation of Two-Phase Immiscible LBM
//************************************************************************* //*************************************************************************
@ -66,19 +65,19 @@ int main(int argc, char **argv)
string FILENAME; string FILENAME;
// Color Model parameters // Color Model parameters
int timestepMax = domain_db->getScalar<int>( "timestepMax" ); int timestepMax = color_db->getScalar<int>( "timestepMax" );
double tauA = domain_db->getScalar<double>( "tauA" ); double tauA = color_db->getScalar<double>( "tauA" );
double tauB = domain_db->getScalar<double>( "tauB" ); double tauB = color_db->getScalar<double>( "tauB" );
double rhoA = domain_db->getScalar<double>( "rhoA" ); double rhoA = color_db->getScalar<double>( "rhoA" );
double rhoB = domain_db->getScalar<double>( "rhoB" ); double rhoB = color_db->getScalar<double>( "rhoB" );
double Fx = domain_db->getVector<double>( "F" )[0]; double Fx = color_db->getVector<double>( "F" )[0];
double Fy = domain_db->getVector<double>( "F" )[1]; double Fy = color_db->getVector<double>( "F" )[1];
double Fz = domain_db->getVector<double>( "F" )[2]; double Fz = color_db->getVector<double>( "F" )[2];
double alpha = domain_db->getScalar<double>( "alpha" ); double alpha = color_db->getScalar<double>( "alpha" );
double beta = domain_db->getScalar<double>( "beta" ); double beta = color_db->getScalar<double>( "beta" );
bool Restart = domain_db->getScalar<int>( "Restart" ); bool Restart = color_db->getScalar<bool>( "Restart" );
double din = domain_db->getScalar<double>( "din" ); double din = color_db->getScalar<double>( "din" );
double dout = domain_db->getScalar<double>( "dout" );; double dout = color_db->getScalar<double>( "dout" );;
double inletA=1.f; double inletA=1.f;
double inletB=0.f; double inletB=0.f;
double outletA=0.f; double outletA=0.f;
@ -86,16 +85,16 @@ int main(int argc, char **argv)
double flux = 10.f; double flux = 10.f;
// Read domain values // Read domain values
auto L = domain_db->getVector<int>( "L" ); auto L = domain_db->getVector<double>( "L" );
auto size = domain_db->getVector<int>( "n" ); auto size = domain_db->getVector<int>( "n" );
auto nproc = domain_db->getVector<int>( "nproc" ); auto nproc = domain_db->getVector<int>( "nproc" );
int BoundaryCondition = domain_db->getScalar<int>( "BC" ); int BoundaryCondition = domain_db->getScalar<int>( "BC" );
int Nx = size[0]; int Nx = size[0];
int Ny = size[1]; int Ny = size[1];
int Nz = size[2]; int Nz = size[2];
int Lx = L[0]; double Lx = L[0];
int Ly = L[1]; double Ly = L[1];
int Lz = L[2]; double Lz = L[2];
int nprocx = nproc[0]; int nprocx = nproc[0];
int nprocy = nproc[1]; int nprocy = nproc[1];
int nprocz = nproc[2]; int nprocz = nproc[2];
@ -155,7 +154,7 @@ int main(int argc, char **argv)
Dm.CommInit(comm); Dm.CommInit(comm);
// Mask that excludes the solid phase // Mask that excludes the solid phase
Domain Mask(Nx,Ny,Nz,rank,nprocx,nprocy,nprocz,Lx,Ly,Lz,BoundaryCondition); Domain Mask(domain_db);
MPI_Barrier(comm); MPI_Barrier(comm);
Nx+=2; Ny+=2; Nz += 2; Nx+=2; Ny+=2; Nz += 2;