⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 csimple2d.h

📁 CSIMPLE2d CFD C源程序
💻 H
字号:
/*
* SIMPLE--Semi-Implicit Method for Pressure-Linked Equations--program
*								by Suhas V. Patankar
*
* This is a two demensional SIMPLE program in ANSI C language rewritten from its fortran versoin
*
* Copyright May 2000, written by xu xianghua(zuoshan@SMTH.org)
*								mailto: xu_xianghua@263.net
*								http://166.111.37.31
*
* This code is freedom, may be used in any form in any way you desire. This  
* file may be redistributed unmodified by any means PROVIDING it is   
* not sold for profit without the authors written consent, and   
* providing that this notice and the authors name and all copyright   
* notices remains intact.  
*  
* I will be very pleased if you find any bug or improve this code and inform me.
* Thank you! Good Luck!
*/
/*
* CSimple2D.h : header file of the main program of the SIMPLE 
*/

#ifndef _SIMPLEC_H
#define _SIMPLEC_H

/*
* functions, with fn- begin
*/
void fnEnd();
void fnBegin();
void fnDiFlow();
void fnSolve();
void fnSetUp1();
void fnSetUp2();

void fnGrid();
void fnStart();
void fnDense();
void fnOutPut();
void fnGamSor();
void fnBound();

void fnUGrid();
void fnPrint();

double power(double a,int b);
/*
* member variables, short with n_, int with i_, bool with b_,
* all arrays begin 0.
* variables, short with n_, int with i_, bool with b_,
* all arrays begin 0.
*/
short	nMode;
short	nF;
short	nTimes[NFMAX];
short	L1;
short	L2;
short	L3;
short	M1;
short	M2;
short	M3;
short	nFMax;
short	nGam;
short	nP;
short	nRho;

int		iIter;
int		iLast;

double	Dt;
double	RhoCon;
double	Time;
double	XL;
double	YL;
double	SMax;
double	SSum;

double	(*PC)[NSIZE];//PC[i][j]
double	(*U)[NSIZE];//U[i][j]
double	(*V)[NSIZE];//V[i][j]
double	(*P)[NSIZE];//P[i][j]
double	(*Rho)[NSIZE];//Rho[i][j]
double	(*Gam)[NSIZE];//Gam[i][j]

double	AIM[NSIZE][NSIZE];
double	AIP[NSIZE][NSIZE];
double	AJM[NSIZE][NSIZE];
double	AJP[NSIZE][NSIZE];
double	AP[NSIZE][NSIZE];
double	ARX[NSIZE];
double	ARXJ[NSIZE];
double	ARXJP[NSIZE];
double	Con[NSIZE][NSIZE];
double	DU[NSIZE][NSIZE];
double	DV[NSIZE][NSIZE];
double	F[NFMAX+3][NSIZE][NSIZE];//!!!
double	FV[NSIZE];
double	FVP[NSIZE];
double	FX[NSIZE];
double	FXM[NSIZE];
double	FY[NSIZE];
double	FYM[NSIZE];
double	R[NSIZE];
double	Relax[NFMAX+3];//
double	RMN[NSIZE];
double	SX[NSIZE];
double	SXMN[NSIZE];
double	X[NSIZE];
double	XCV[NSIZE];
double	XCVI[NSIZE];
double	XCVIP[NSIZE];
double	XCVS[NSIZE];
double	XDif[NSIZE];
double	XU[NSIZE];
double	Y[NSIZE];
double	YV[NSIZE];
double	YCV[NSIZE];
double	YCVR[NSIZE];
double	YCVRS[NSIZE];
double	YCVS[NSIZE];
double	YDif[NSIZE];

BOOL	bBlk[NFMAX];
BOOL	bPrint[NFMAX+3];//
BOOL	bSolve[NFMAX];

char*	szTitle[NFMAX+3];
char*	szFileName;			//output file name
FILE*	pFileOut;

static short	IPRef;
static short	IST;
static short	JPRef;
static short	JST;

static double	ACof;
static double	Diff;
static double	Flow;

static BOOL	bStop;

static time_t	start_time;

#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -