Update Readme and Add example

This commit is contained in:
JacksonYang2022 2024-10-14 09:58:15 +08:00
parent eda20ac131
commit 75dee59027
15 changed files with 32678 additions and 44 deletions

View File

@ -1,83 +1,66 @@
<div align=left><img src="PHengLEI\Documents/PHengLEI-LOGO.png" style="zoom: 15%;"/><br>
# 风雷软件PHengLEI2312.v975
备注主分支为master分支更稳定更多新功能请切换到ActiveBranch分支。
# 风雷NCCR(PHengLEI-StructureNCCR基于PHengLEI2312.v975版本开发)
## 1.软件简介
&ensp;&ensp;&ensp;&ensp;风雷软件<sup>[1,2]</sup>PHengLEIPlatform for Hybrid ENGineering simulation of flows是中国空气动力研究与发展中心CARDC研发的面向流体工程的混合CFD平台。平台以面向对象的设计理念采用C++语言编程。2020年12月风雷软件正式面向全国开源与其他开源CFD软件相比风雷软件具有扩展能力强、开发难度低、计算效率高等特点。更多介绍请阅读PHengLEI/Documents文件夹下的**《风雷软件应用与开发指南》**
&ensp;&ensp;&ensp;&ensp;风雷软件<sup>[1,2]</sup>(PHengLEI,Platform for Hybrid ENGineering simulation of flows)是中国空气动力研究与发展中心(CARDC)研发的面向流体工程的混合CFD平台。平台以面向对象的设计理念,采用C++语言编程。2020年12月,风雷软件正式面向全国开源,与其他开源CFD软件相比,风雷软件具有扩展能力强、开发难度低、计算效率高等特点。(更多介绍请阅读PHengLEI/Documents文件夹下的**《风雷软件应用与开发指南》**)
&ensp;&ensp;&ensp;&ensp;风雷软件更多动态和Demo请登录以下网址查看
- 官网地址: https://www.cardc.cn/nnw/products.aspx?t=9
- 代码库地址https://forge.osredm.com/PHengLEI/PHengLEI
- 算例库地址https://forge.osredm.com/PHengLEI/PHengLEI-TestCases
- 论坛常见问题、算例展示、技术分享地址https://osredm.com/forums/theme/38
&ensp;&ensp;&ensp;&ensp;风雷软件用户录制视频教程地址:
- 视频教程https://www.bilibili.com/video/BV1eX4y1T7yW?from=search&seid=9482198996609923785
[1] 赵钟,等.风雷PHengLEI通用CFD软件设计[J]. 计算机工程与科学, 2020, 42(2): 210-219.( ZHAO Zhong, et al. Design of general CFD software PHengLEI [J]. Computer Engineering & Science, 2020, 42(2): 210-219. (in Chinese) )
[1] 赵钟,等.风雷(PHengLEI)通用CFD软件设计[J]. 计算机工程与科学, 2020, 42(2): 210-219.( ZHAO Zhong, et al. Design of general CFD software PHengLEI [J]. Computer Engineering & Science, 2020, 42(2): 210-219. (in Chinese) )
[2] 赵钟,等.适用于任意网格的大规模并行CFD计算框架PHengLEI[J]. 计算机学报, 2019, 42(11):2368
-2383. ( ZHAO Zhong, et al. PHengLEI: A Large Scale Parallel CFD Framework for Arbitrary Grids [J]. Chinese Journal of Computers, 2019, 42(11): 2368-2383. (in Chinese) )
**声明** 若用户将该软件用于学术研究或工程应用须在相关的论文成果的显要位置处标注基于“风雷PHengLEI“软件并引用“风雷PHengLEI”软件相关的参考文献例如[1]和[2]
**声明:** 若用户将该软件用于学术研究或工程应用,须在相关的论文成果的显要位置处标注基于“风雷(PHengLEI)“软件,并引用“风雷(PHengLEI)”软件相关的参考文献(例如[1]和[2])。
## 2.软件功能
&ensp;&ensp;&ensp;&ensp;风雷软件是一款结构/非结构通用CFD软件计算范围覆盖低速、亚跨声速和高超声速。软件采用有限体积法求解定常/非定常的雷诺平均NS方程RANS方程集成了典型湍流模型如SA、SST模型等无粘项采用Roe、Vanleer、AUSM、Steger-Warming等格式粘性项采用中心格式时间推进采用LU-SGS或Block LU-SGS隐式方法求解非定常计算时采用双时间步方法。针对大规模问题软件支持分区并行计算并且使用多重网格技术加速收敛。同时风雷软件也提供常用前/后置接口如Gridgen、ICEM-CFD、FieldView、Tecplot等。
实现风雷软件使用矩方法求解稀薄非平衡问题
## 3.代码获取
1. 环境准备安装git官网地址https://git-scm.com/;
2. 点击右上角Fork按钮
3. Fork完成后将生成并跳转到新的仓库复制新仓库版本库地址如https://git.osredm.com/PHengLEI/PHengLEI.git;
4. 在本地选择一个目录右键打开git bash输入命令进行代码克隆如git clone https://git.osredm.com/PHengLEI/PHengLEI.git;
5. 输入用户名和密码其中用户名是指上面命令中p开头的用户名比如p68217053
6. 项目克隆完成后进入项目目录默认分支为master分支可通过命令切换到ActiveBranch分支如git checkout ActiveBranch;
7. 切换到开发分支后可输入git log查看日志确认当前版本。
1. 环境准备,安装git,官网地址:https://git-scm.com/;
2. 点击右上角Fork按钮;
3. Fork完成后,将生成并跳转到新的仓库,复制新仓库版本库地址,https://osredm.com/p86739025/PHengLEI-NCCR.git;
4. 在本地选择一个目录,右键打开git bash,输入命令进行代码克隆,如git clone https://git.osredm.com/PHengLEI/PHengLEI.git;
5. 输入用户名和密码,其中用户名是指上面命令中p开头的用户名,比如p68217053
## 4.软件安装
&ensp;&ensp;&ensp;&ensp;风雷软件能够在Windows、Linux、Mac系统下运行源代码采用C++语言编写需要CMake软件构建项目并行计算采用MPI库。因此操作系统必须提供C++编译器、CMake2.8以上版本软件和MPI1.0或MPI2.0标准库。
&ensp;&ensp;&ensp;&ensp;风雷软件能够在Windows、Linux、Mac系统下运行,源代码采用C++语言编写,需要CMake软件构建项目,并行计算采用MPI库。因此,操作系统必须提供C++编译器、CMake2.8以上版本软件和MPI1.0或MPI2.0标准库。
本程序同风雷主软件编译方法一致,无需特殊步骤。
### 4.1 Windows环境配置
&ensp;&ensp;&ensp;&ensp;Windows环境下所有必备软件按照默认步骤安装即可。
1. 安装Microsoft Visual Studio 2012以上版本
2. 安装MPI库推荐采用MSMPI
1. 安装Microsoft Visual Studio 2012以上版本;
2. 安装MPI库,推荐采用MSMPI;
3. 安装Cmake。
### 4.2 Linux环境配置
&ensp;&ensp;&ensp;&ensp;Linux环境配置的简要步骤如下
&ensp;&ensp;&ensp;&ensp;Linux环境配置的简要步骤如下:
1. 安装Cmake
2. 安装MPICH3库
3. 编译HDF5库
4. 编译CGNS库
1. 安装Cmake;
2. 安装MPICH3库;
3. 编译HDF5库;
4. 编译CGNS库;
5. 编译metis库和parmetis库。
**备注**Linux环境配置的具体步骤请阅读《风雷软件应用与开发指南》。
**备注:**Linux环境配置的具体步骤请阅读《风雷软件应用与开发指南》。
## 5.如何贡献
&ensp;&ensp;&ensp;&ensp;针对基于风雷软件进行二次开发的用户后续添加如何测试、提交Pull Request的步骤。
&ensp;&ensp;&ensp;&ensp;软件贡献者信息参见项目根目录下的Contributing文件待增加
## 6.软件版权
## 5.软件版权
&ensp;&ensp;&ensp;&ensp;风雷软件开源协议参见项目根目录下的LICENSE文件。
## 7.鸣谢
## 6.鸣谢
&ensp;&ensp;&ensp;&ensp;感谢所有参与风雷软件开发与推广的工作人员,也感谢所有支持风雷软件发展并提出宝贵意见和建议的广大用户
&ensp;&ensp;&ensp;&ensp;感谢风雷研发团队的辛苦付出,感谢浙江大学陈伟芳教授和赵文文副教授的亲切指导
## 8.联系我们
## 7.联系我们
&ensp;&ensp;&ensp;&ensp;电子邮箱phenglei@126.com
&ensp;&ensp;&ensp;&ensp;电子邮箱:yangjy2022@zju.edu.cn

View File

@ -0,0 +1,60 @@
# nBoundaryConditions: Number of global boundary conditions.
# bcName : Boundary condition name.
# bcType(in PHengLEI): Boundary condition type.
# How to set boundary condition, for example:
# string bcName = "Wall";
# {
# int bcType = 2;
# int viscousType = 1;
# double wallTemperature = -1.0;
# double uWall = 0.0;
# double vWall = 0.0;
# double wWall = 0.0;
# }
# string bcName = "Inflow";
# {
# int bcType = 5;
# int inflowParaType = 0;
# double refMachNumber = 0.73;
# double attackd = 2.79;
# double angleSlide = 0.0;
# double refReNumber = 6.5e6;
# double refDimensionalTemperature = 288.15;
# }
# For more information, see examples/bin/boundary_condition.hypara file!!!
int nBoundaryConditions = 4;
string bcName = "SOLID_SURFACE";
{
string bodyName = "body";
int bcType = 2;
}
string bcName = "SYMMETRY";
{
int bcType = 3;
}
string bcName = "INFLOW";
{
int bcType = 5;
}
string bcName = "OUTFLOW";
{
int bcType = 6;
}
# 'bcType' is defined as following:
# -2: WAKE
# -1: INTERFACE
# 0 : NO_BOUNDARY_CONDITION
# 1 : EXTRAPOLATION
# 2 : SOLID_SURFACE
# 3 : SYMMETRY
# 4 : FARFIELD
# 5 : INFLOW
# 6 : OUTFLOW
# 52: PRESSURE_INLET
# 62: PRESSURE_OUTLET
# 61: OUTFLOW_CONFINED
# 7 : POLE

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,322 @@
#########################################################################
# General Control Parameter #
#########################################################################
// maxSimuStep: The max simulation step, don't care simulation is restart or not.
// intervalStepFlow: The step intervals for flow variables file 'flow.dat' saved.
// intervalStepPlot: The step intervals for tecplot visual file 'tecflow.dat' saved.
// intervalStepForce: The step intervals for aerodynamics coefficients file 'aircoef.dat' saved.
// intervalStepRes: The step intervals for residual 'res.dat' saved.
int maxSimuStep = 200000;
int intervalStepFlow = 100000;
int intervalStepPlot = 100000;
int intervalStepForce = 10000;
int intervalStepRes = 10000;
int isCalRarefied = 0;
#########################################################################
# Inflow Parameter #
#########################################################################
// refMachNumber: Mach number.
// attackd: Angle of attack.
// angleSlide: Angle of sideslip.
// wallTemperature: Temprature of the solid wall, minus value is for adiabatic boundary condition.
// inflowParaType: The type of inflow parameters.
// 0 -- the nondimensional conditions.
// 1 -- the flight conditions.
// 2 -- the experiment conditions.
// 3 -- the subsonic boundary conditions.
// 4 -- the condition that the velocity, temperature and density are given.
// 5 -- the condition that the velocity, temperature and pressure are given.
// refReNumber: Reynolds number, which is based unit length, unit of 1/m.
// refDimensionalTemperature: Dimensional reference temperature, or the total temperature only for the experiment condition.
// freestream_vibration_temperature: Dimensional freestream vibration temperature.
// refDimensionalPressure: Dimensional reference pressure, or the total pressure only for the experiment condition.
// height: Fly height, unit of km.
// gridScaleFactor: The customizable unit of the grid, default value is 1.0 for meter.Common dimensions like:
// 1 dm = 0.1 m.
// 1 cm = 0.01 m.
// 1 mm = 0.001m.
// 1 inch = 0.0254m.
// 1 foot = 12 inches = 0.3048m.
// 1 yard = 3 feet = 0.9144m.
// forceReferenceLength, forceReferenceLengthSpanWise, forceReferenceArea: Reference length, SpanWise length and area, independent of grid unit.
// TorqueRefX, TorqueRefY, TorqueRefZ: Reference point, independent of grid unit.
double refMachNumber = 5;
double attackd = 0.00;
double angleSlide = 0.00;
double wallTemperature = 273;
//The velocity, temperature and pressure are fixed.
int inflowParaType = 5;
double refDimensionalVelocity = 1683.7932;
double refDimensionalTemperature = 273;
double refDimensionalPressure = 4.8788;
double gridScaleFactor = 1.0;
double forceReferenceLengthSpanWise = 1.0; // unit of meter.
double forceReferenceLength = 1.0; // unit of meter.
double forceReferenceArea = 1.0; // unit of meter^2.
double TorqueRefX = 0.0; // unit of meter.
double TorqueRefY = 0.0; // unit of meter.
double TorqueRefZ = 0.0; // unit of meter.
double knudsenLength = 1.0; // unit of meter.
#########################################################################
# Physical models #
#########################################################################
// viscousType: Viscous model.
// 0 -- Euler.
// 1 -- Laminar.
// 3 -- 1eq turbulent.
// 4 -- 2eq turbulent.
// viscousName: Laminar or tubulent model.
// -- "1eq-sa", when viscousType = 3.
// -- "2eq-kw-menter-sst", when viscousType = 4.
// DESType: Type of DES.
// 0 -- RANS.(default)
// 1 -- DES.
// 2 -- DDES.
// 3 -- IDDES.
//int viscousType = 0;
//string viscousName = "Euler";
int viscousType = 1;
string viscousName = "laminar";
//int viscousType = 3;
//string viscousName = "1eq-sa";
//int viscousType = 4;
//string viscousName = "2eq-kw-menter-sst";
int DESType = 0;
int roeEntropyFixMethod = 3;
double roeEntropyScale = 1.0;
#########################################################################
# Spatial Discretisation #
#########################################################################
#*******************************************************************
# Struct Solver *
#*******************************************************************
// inviscidSchemeName: Spatial discretisation scheme of struct grid.
// Using this when solve structered grid or hybrid.
// -- "vanleer", "steger", "ausmpw", "ausmpw+".
// str_limiter_name: Limiter of struct grid.
// -- "minmod", "3rd_minmod_smooth", "vanalbada".
string inviscidSchemeName = "ausmpw+";
string str_limiter_name = "vanalbada";
#*******************************************************************
# UnStruct Solver *
#*******************************************************************
// uns_scheme_name: Spatial discretisation scheme of Unstruct grid.
// Using this when solve Unstructered grid or hybrid.
// -- "vanleer", "roe", "steger", "kfvs", "lax_f", "hlle".
// -- "ausm+", "ausmdv", "ausm+w", "ausmpw", "ausmpwplus".
// uns_limiter_name: Limiter of Unstruct grid.
// -- "vencat", "barth".
// -- "1st", meaning accuracy of first-order.
// -- "nolim", no limiter.
// venkatCoeff: Coefficient of vencat limiter, when uns_limiter_name = 'vencat'.
// The smaller the value, the more robust it is.
string uns_scheme_name = "vanleer";
string uns_limiter_name = "vencat";
double venkatCoeff = 0.5;
#########################################################################
# Temporal Discretisation #
#########################################################################
// iunsteady: Steady or unsteady.
// 0 -- steady.
// 1 -- unsteay.
// CFLEnd: The CFL number, [0.1, 100].
// The bigger the value, the convergence faster but lower robustness.
// ktmax: The lower the value, the more robustness, 1.0e5 - 1.0e10.
int iunsteady = 0;
double CFLEnd = 10.0;
double ktmax = 1.0e10;
#########################################################################
# File In or Out #
#########################################################################
// gridfile: The partitioned Grid file path, using relative path,
// which is relative to the working directory.
// IMPORTANT WARNING: The file index should be ignored,
// e.g. if the partitioned grid is rae2822_hybrid2d__4_0.fts,
// Please use 'rae2822_hybrid2d__4.fts' here!
// plotFieldType: If dump out the whole field results to tecplot or not, 0 / 1.
string gridfile = "./grid/bluntcylinder_4.fts";
int plotFieldType = 1;
// ----------------- Advanced Parameters, DO NOT care it ----------------
// nVisualVariables: Number of variables want to be dumped for tecplot visualization.
// visualVariables: Variable types dumped, listed as following:
// -- density(0), u(1), v(2), w(3), pressure(4), temperature(5), mach(6),
// -- viscosityLaminar(7), viscosityTurbulent(8),
// -- vorticity_x(9), vorticity_y(10), vorticity_z(11), vorticityMagnitude(12),
// -- strain_rate(13), Q_criteria(14), Cp(15), timeStep(16), volume(17),
// -- modeledTKE(18), modeleddissipationrate(19), SSTF1(20), SSTF2(21),
// -- vibration temperature(Tv, 33), electron temperature(Te, 34), vibrational energy(Ev, 35), electric energy(Ee, 36),
// -- number density of electron(Ne, 37), dimensioanl density(rho, 38), dimensioanl pressure(p, 39), dimensioanl temperature(T, 40).
// -- Knudsen number(kn, 60), Damkohler number(Da, 61), vibrational nonequilibrium number(Vi, 62)
// Important Warning: Array size of visualVariables MUST be equal to nVisualVariables!!!
// Variables order must from small to big.
int nVisualVariables = 12;
int visualVariables[] = [0, 1, 2, 3, 4, 5, 6, 15, 38, 39, 40, 60];
//-----------the optional parameters list for the wall boundary condition----------------
// nVisualWallVariables: The number of visual variables on wall.
// visualWallVariables : dumped variable types, listed as following:
// -coefficient of pressure(cp, 0), -coefficient of friction(cf, 1), yplus(2), -non-dimensional heat flux(Q_NonDim, 3), -dimensional heat flux(Q_Dim, 4),
// -pressure on wall(pw, 5), -temperature on wall(Tw, 6), -density on wall(rhow, 7), -heat flux of translational-rotational temperature term(Qtr, 8),
// -heat flux of species diffusion term(Qs, 9), -heat flux of vibrational temperature term(Qv, 10), -heat flux of electron temperature term(Qe, 11),
// -species mass fractions(Ns, 12), -x component of wall velocity(Vx, 13), -y component of wall velocity(Vy, 14), -z component of wall velocity(Vz, 15)
// -slip translational-rotational temperature(Tts, 16), -slip vibrational temperature(Tvs, 17), -slip electron temperature(Tes, 18), -absolute wall velocity(Vs, 19)
// -Stanton number(St, 20), -coefficient of heat rate(Ch, 21), -temperature jump(deltaT, 22), -Grid Reynolds number on wall(Re_w, 23) , -Knudsen number(Kn_wall, 24)
int nVisualWallVariables = 9;
int visualWallVariables[] = [0, 1, 2, 3, 4, 5, 9, 10, 11];
// limitVariables: Limit model (It is useful only if limitVector is 0).
// 0 -- limit only for pressure and denstiny, then get the min value.
// 1 -- limit for every variables, then get the min value.
// limitVector:
// 0 -- Each variable use the same limiter coefficient.
// 1 -- Each variable use the respective limiter coefficients.
// reconmeth:
// 0 -- When reconstruct face value, Q+, Q- use respective limiter coefficients.
// 1 -- Q+, Q- use the min limiter coefficients of left and right cell.
int reconmeth = 0;
int limitVariables = 0;
int limitVector = 1;
#########################################################################
# Non-equilibrium gas #
#########################################################################
// isAdaptiveSolver: isAdaptiveSolver=0 indicates the generic Navier-Stokes solver,
// isAdaptiveSolver>0 indicates the HyFlow self-adaptive solver.
// 1 -- using HyFlow self-adaptive solver where the switch is controlled by the total iteration steps.
// 2 -- using HyFlow self-adaptive solver where the switch is controlled by variation of the key residual.
// nGasModel: The type of gas. less than and equal to 1 represents the mixture gas.
// Otherwise, the pure gas with one component is used for perfect gas.
// 0 -- Earth gas.
// 1 -- Mars gas.
// 2 -- Argon.
// 3 -- Nitrogen.
// nchem:
// 0 -- without chemical reaction flow.
// 1 -- the chemical reaction flow is considered.
// nchemsrc:
// 0 -- the source terms are not computed.
// 1 -- the source terms are computed.
// nchemrad:
// 0 -- compute the spectrum radius without considering chemical reaction flow.
// 1 -- compute the spectrum radius that need to count the contribution from chemical reaction flow.
// ntmodel: The thermodynamic temperature model.
// 1 -- One-temperature model.
// 2 -- Two-temperature model.
// 3 -- Three-temperature model.
// nContinueModel: The new continue model can switch different computation model.
// 0 -- Not use the new continue model.
// 1 -- use the new continue model.
// nTEnergyModel: the method to computing temperature energy model.
// 0 -- the energy term is computed using the conventional method.
// 1 -- the energy term is computed using the polynomial fitting method.
// 2 -- the energy term is computed using the piecewise polynomial fitting method.
// nSlipBCModel : The computational model of slip boundary conditions.
// 0 -- no slip.
// 1 -- the conventional Maxwell slip conditions.
// 2 -- the Gokcen slip conditions.
// 3 -- the Knudsen-layer correction of the standard slip conditions proposed by Lockerby, et al.
// 4 -- the Kogan simplified slip conditions.
// nMeanFreePathType: the method to the mean free-path for the slip conditions. For the mixture, 0 is suggested.
// 0 -- the equivalent mean free-path is calculated by the simple hard sphere model(HS).
// 1 -- calculated by the definition that includes the variables of the number density and the molecule diameter.
// 2 -- the equivalent mean free-path is calculated by the variable hard sphere model(VHS).
// parkVDPower: the power of translational-rotational temperature in the Park V-D(vibration-dissociation) coupling model.
// The value is in range of [0.0, 1.0], DPLR suggests 0.5, LAURA suggests 0.7, while 0.6 is given as default value.
// catalyticCoef:
// 0.0 -- full non-catalytic wall boundary condition.
// 1.0 -- full catalytic wall boundary condition.
// in range of (0.0, 1.0) -- partial catalytic condition, the value indicates the catalytic coefficient.
// nIsSuperCatalytic : the super catalytic condition for the fully catalytic wall, and assigned with the value of 1.
// 0 -- equilibrium condition for the fully catalytic wall where the mass fractions are assigned with the values of the free stream.
// 1 -- super catalytic condition for the fully catalytic wall where all the atomic components combine into molecular components.
// nIsChemicalFreeze : the flag to freeze the chemical reactions.
// 0 -- not freeze, the chemical reaction sources will be calculated.
// 1 -- freezes the chemical reactions, the chemical reaction sources will not be calculated.
// gasfile: Indicates the gas model, 9 models are provided, namely "Gu5", "Gu7", "Gu11", "Pa5", "Pa7", "Pa11", "DK5", "DK7", "DK11".
// "Gu" -- indicates the Gupta Model, three-Type Models are embeded in the library, namely, the 5-species-6-reactions, the 7-species-9-reactions, the 11-species-20-reactions.
// "Pa" -- indicates the Park Model, three-Type Models are embeded in the library, namely, the 5-species-17-reactions, the 7-species-22-reactions, the 11-species-48-reactions.
// "DK" -- indicates the Dunn-Kang Model, three-Type Models are embeded in the library, namely, the 5-species-11-reactions, the 7-species-15-reactions, the 11-species-26-reactions.
// "Mars-Pa8" is for Park model of Mars gas, "Mars-Mc8" for McKenzie model of Mars gas.
// For self-definition model, the gasfile is used to indicate the file path of the new gas model.
// speciesName: Used to list the names of each species, while each species name is separated by the symbol of comma.
// initMassFraction: Used to list the initial mass fractions of species in accordance with the sequence of names in the parameter speciesName.
// ifStartFromPerfectGasResults: The chemical reaction simulation is start from perfect gas flowfield or not, 0 is for no and else is for yes.
// nIterFirstStep : the maximum number of iteration in the first step for the self-adaptive calculation.
// nIterSecondStep : the maximum number of iteration in the second step for the self-adaptive calculation.
// nIterThirdStep : the maximum number of iteration in the third step for the self-adaptive calculation.
// nEnergyAssembly : the vibration energy is computed with combined method which includes the fitting method and the molecular kinetic theory.
// 0 -- no,
// 1 -- yes.
// nControlVariable: the variable to computing the residual error that determines the convergence is meet or not in the one-temperature model.
// 0 -- the density.
// 1 -- the translation temperature.
// 2 -- the vibration temperature.
// 3 -- the electron temperature.
// 4 -- the pressure.
// 5 -- the mass fraction of oxygen.
// 6 -- the mass fraction of nitrogen.
// firstStepError : the residual error of the first step iteration for the self-adaptive calculation.
// secondStepError : the residual error of the second step iteration for the self-adaptive calculation.
// thirdStepError : the residual error of the third step iteration for the self-adaptive calculation.
// isMoleFractionType : 1 indicates the mass fractions, or else the mole fractions.
int isAdaptiveSolver = 0;
int nIterFirstStep = 1000;
int nIterSecondStep= 2000;
int nIterThirdStep = 2000;
int nEnergyAssembly = 0;
int nControlVariable = 1;
double firstStepError = 0.01;
double secondStepError = 0.001;
double thirdStepError = 0.001;
int nGasModel = 3;
int nchem = 0;
int ntmodel = 1;
int nTEnergyModel = 0;
int nchemsrc = 1;
int nchemrad = 1;
int nIsChemicalFreeze = 0;
int nSlipBCModel = 0;
int nMeanFreePathType = 0;
double parkVDPower = 0.6;
double catalyticCoef = 1.0;
int nIsSuperCatalytic = 1;
int nAblation = 0;
int isInjection = 0;
string gasfile = "DK5";
string speciesName = "O, O2, NO, N, N2";
string initMassFraction = "0.07955, 0.134, 0.0509, 1.0e-9, 0.73555";
int isMoleFractionType = 0;
int nContinueModel = 1;
int nRapidFlowfield = 0;
int nSurfHeatMonitor = 1;
double radiationCoef = 0.8;

View File

@ -0,0 +1,37 @@
#########################################################################
# Grid data type #
#########################################################################
// gridtype: Grid type for generation, conversion, reconstruction, merging.
// 0 -- Unstructured grid.
// 1 -- Structured grid.
// nAxisRotateTimes: number of axis rotating times, zero (default) meaning without rotating.
// axisRotateOrder : axis rotating order.
// 1 -- X-axis.
// 2 -- Y-axis.
// 3 -- Z-axis.
// axisRotateAngles: axis rotating angles (degree), which are corresponding to the axis rotating order.
// from_gtype: Type of grid data type in grid conversion process.
// -1 -- MULTI_TYPE.
// 1 -- PHengLEI, *.fts.
// 2 -- CGNS, *.cgns.
// 3 -- Plot3D type of structured grid, *.dat/*.grd.
// 4 -- Fieldview type of unstructured grid, *.dat/*.inp.
// 5 -- Fluent, *.cas/*.msh.
// 6 -- Ustar, mgrid.in.
// 7 -- Hybrid, include both of unstructured and structured grid, *.fts.
// 8 -- GMSH, *.msh.
// 9 -- Gridgen type of structured grid, *.dat/*.grd.
int gridtype = 1;
int nAxisRotateTimes = 0;
int axisRotateOrder[] = [1, 2, 3];
double axisRotateAngles[] = [0.0, 0.0, 0.0];
int from_gtype = 9;
#########################################################################
# File path #
#########################################################################
// from_gfile: path of original data file for unstructure grid convert from.
// out_gfile: path of target file for grid convert to, *.fts type of file usually.
string from_gfile = "./grid/grid.dat";
string out_gfile = "./grid/bluntcylinder.fts";

View File

@ -0,0 +1,52 @@
string title = "PHengLEI Main Parameter Control File";
// IMPORTANT NOTICE: DON NOT MODIFY THE FOWLLOWING LINE.
string defaultParaFile = "./bin/cfd_para.hypara";
// ndim: Dimensional of the grid, 2 or 3.
// nparafile: the number of parameter files.
// nsimutask: simulation task type.
// 0 -- CFD Solver of NS or Turbulation.
// 1 -- Grid generation: for special typical cases, such as cylinder, flat plate, etc.
// Grid conversion: from other format to PHengLEI format (.fts).
// Grid reconstruction: such as grid adaptation.
// Grid merging: merge two blocks into one block.
// Grid repairing: repair the original grid in order to remove the negative volume cells.
// 2 -- Wall distance computation for turb-solver.
// 3 -- Grid partition.
int ndim = 3;
int nparafile = 1;
int nsimutask = 0;
//string parafilename = "./bin/cfd_para_subsonic.hypara";
//string parafilename = "./bin/cfd_para_transonic.hypara";
//string parafilename = "./bin/cfd_para_supersonic.hypara";
string parafilename = "./bin/cfd_para_hypersonic.hypara";
//string parafilename = "./bin/cfd_para_incompressible.hypara";
//int nsimutask = 1;
//string parafilename = "./bin/grid_para.hypara";
//int nsimutask = 2;
//string parafilename = "./bin/cfd_para.hypara";
//int nsimutask = 3;
//string parafilename = "./bin/partition.hypara";
//int nsimutask = 1;
//string parafilename = "./bin/grid_deform_para.hypara";
//int nsimutask = 1;
//string parafilename = "./bin/grid_refine_para.hypara";
//int nsimutask = 14;
//string parafilename = "./bin/integrative_solver.hypara";
//int nsimutask = 99;
//string parafilename = "./bin/post_processing.hypara";
// ---------------- Advanced Parameters, DO NOT care it ----------------
int numberOfGridProcessor = 0;
// ATP read
//@string parafilename1 = ""
//@string parafilename2 = "";

View File

@ -0,0 +1,24 @@
// pgridtype: The grid type.
// 0 -- unstruct grid.
// 1 -- struct grid.
// maxproc: The number of partition zones that want to be divided into,
// which is equal to the number of CPU processors you want.
// Usually, 50~100 thousands structured cells per CPU-Core is suggested.
// 30~70 thousands unstructured cells per CPU-Core is suggested.
// original_grid_file: Original grid file that want to be divided(PHengLEI type, *.fts).
// partition_grid_file: Target partition grid file(PHengLEI type, *.fts).
// numberOfMultifile: The number of partition grid files that want to be dumped out.
int pgridtype = 1;
int maxproc = 4;
string original_grid_file = "./grid/bluntcylinder.fts";
string partition_grid_file = "./grid/bluntcylinder_4.fts";
int numberOfMultifile = 1;
// numberOfMultigrid: Number of multi-grid levels, ONLY used for structured grid.
// 1 -- single level.
// 2 -- 2 level.
// N -- N level,..., et al.
int numberOfMultigrid = 1;

Binary file not shown.

View File

@ -0,0 +1,23 @@
# Boundary Face Information of Grid ./grid/bluntcylinder.fts
# nBoundaryConditions: number of global boundary conditions.
# bcName : Boundary Condition Name.
# bcType(in PHengLEI): Boundary Condition Type.
int nBoundaryConditions = 4;
string bcName = "SOLID_SURFACE";
{
string bodyName = "body";
int bcType = 2;
}
string bcName = "SYMMETRY";
{
int bcType = 3;
}
string bcName = "INFLOW";
{
int bcType = 5;
}
string bcName = "OUTFLOW";
{
int bcType = 6;
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

30605
phenglei/example/grid/grid.dat Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,18 @@
FVBND 1 3
No_Boundary_Condition
Solid_Surface
Symmetry
Farfield
Inflow
Outflow
Pole
Generic_#1
Generic_#2
Generic_#3
BOUNDARIES
3 1 1 101 1 101 1 1
3 1 1 101 1 101 4 4
3 1 1 1 1 101 1 4
6 1 101 101 1 101 1 4
5 1 1 101 1 1 1 4
2 1 1 101 101 101 1 4

View File

@ -0,0 +1,11 @@
1
1
101 101 4
blk-1
6
1 101 1 101 1 1 3
1 101 1 101 4 4 3
1 1 1 101 1 4 3
101 101 1 101 1 4 6
1 101 1 1 1 4 5
1 101 101 101 1 4 2