马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
x
#include <iostream>
#include <cmath>
#include <cstdlib>
#include <iomanip>
#include <fstream>
#include <sstream>
#include <string>
#include <time.h>
using namespace std;
#define PAI 3.14159265
#define NP 1 // Number of Particles
#define stiffness 1.0
#define Q 19
#define NX 666
#define NY 666
#define NZ 1066
#define Ns 15
#define U 0.1
int e[Q][3] = {{0,0,0},{1,0,0},{-1,0,0},{0,-1,0},{0,0,1},{0,0,-1},{1,1,0},{-1,-1,0},{1,-1,0},{-1,1,0},{1,0,1},{-1,0,-1},{1,0,-1},{-1,0,1},{0,1,1},{0,-1,-1},{0,1,-1},{0,-1,1}};
double w[Q] = {1.0/3,1.0/18,1.0/18,1.0/18,1.0/18,1.0/18,1.0/18,1.0/36,1.0/36,1.0/36,1.0/36,1.0/36,1.0/36,1.0/36,1.0/36,1.0/36,1.0/36,1.0/36,1.0/36};
double Nt[Ns] = {1,6,12,17,21,25,27,27,27,25,21,17,12,6,1};
double ux[NX+1][NY+1][NZ+1],uy[NX+1][NY+1][NZ+1],uz[NX+1][NY+1][NZ+1],ux0[NX+1][NY+1][NZ+1],uy0[NX+1][NY+1][NZ+1],uz0[NX+1][NY+1][NZ+1];
double rho[NX+1][NY+1][NZ+1],F[NX+1][NY+1][NZ+1][Q],f[NX+1][NY+1][NZ+1][Q],vor[NX+1][NY+1][NZ+1], psi[NX+1][NY+1][NZ+1];
double ExternalForceX[NX+1][NY+1][NZ+1],ExternalForceY[NX+1][NY+1][NZ+1],ExternalForceZ[NX+1][NY+1][NZ+1],force[Q];
double Lx_p, Ly_p, Lz_p ,d_p, niu_p, g_p, tmax_p;
void main()
{
double a = 0.0;
double b = 0.0;
//******************************************************************
// Physical Unit
Lx_p = 10.0; // (cm)
Ly_p = 10.0; // (cm)
Lz_p = 16.0; // (cm)
d_p = 0.15; // particle diameter(cm
cout<<Lx_p<<endl;
}
|