Files
LBPM/models/ColorModel.h

77 lines
1.7 KiB
C
Raw Normal View History

2018-05-16 14:40:38 -04:00
/*
Implementation of color lattice boltzmann model
*/
#include <stdio.h>
#include <stdlib.h>
#include <sys/stat.h>
#include <iostream>
#include <exception>
#include <stdexcept>
#include <fstream>
#include "common/Communication.h"
#include "analysis/TwoPhase.h"
#include "analysis/runAnalysis.h"
#include "common/MPI_Helpers.h"
#include "ProfilerApp.h"
#include "threadpool/thread_pool.h"
class ScaLBL_ColorModel{
public:
2018-05-16 15:08:47 -04:00
ScaLBL_ColorModel();
2018-05-16 14:46:11 -04:00
~ScaLBL_ColorModel();
2018-05-16 14:40:38 -04:00
// functions in they should be run
2018-05-16 15:08:47 -04:00
void ReadParams(string filename);
2018-05-17 10:18:57 -04:00
void ReadParams(std::shared_ptr<Database> DB)
2018-05-16 14:40:38 -04:00
void ReadInput();
void Create();
void Initialize();
void Run();
2018-05-16 15:08:47 -04:00
bool Restart,pBC;
2018-05-16 14:40:38 -04:00
int timestep,timestepMax;
2018-05-16 15:08:47 -04:00
int BoundaryCondition;
2018-05-16 14:40:38 -04:00
double tauA,tauB,rhoA,rhoB,alpha,beta;
double Fx,Fy,Fz,flux;
double din,dout,inletA,inletB,outletA,outletB;
int Nx,Ny,Nz,N,Np;
2018-05-16 15:08:47 -04:00
int nprocx,nprocy,nprocz;
2018-05-16 14:40:38 -04:00
double Lx,Ly,Lz;
private:
MPI_Comm comm;
2018-05-16 15:15:01 -04:00
std::shared_ptr<Domain> Dm; // this domain is for analysis
std::shared_ptr<Domain> Mask; // this domain is for lbm
std::shared_ptr<ScaLBL_Communicator> ScaLBL_Comm;
2018-05-16 14:40:38 -04:00
std::shared_ptr<TwoPhase> Averages;
2018-05-17 09:55:28 -04:00
// input database
std::shared_ptr<Database> db;
std::shared_ptr<Database> domain_db;
std::shared_ptr<Database> color_db;
std::shared_ptr<Database> analysis_db;
2018-05-16 14:40:38 -04:00
// filenames
char LocalRankString[8];
char LocalRankFilename[40];
char LocalRestartFile[40];
IntArray Map;
char *id;
int *NeighborList;
int *dvcMap;
double *fq, *Aq, *Bq;
double *Den, *Phi;
double *SolidPotential;
double *Velocity;
double *Gradient;
double *Pressure;
2018-05-16 15:08:47 -04:00
//int rank,nprocs;
2018-05-16 14:40:38 -04:00
};