吾生有涯 学海无涯
析模有界 知识无界

OpenFOAM|验证13 后向台阶湍流传热

内容纲要

本算例利用OpenFOAM对2D后向台阶的流体流动和对流换热进行计算,并对计算结果进行验证。

参考文献:J.C. Vogel, J.K. Eaton, “Combined Heat Transfer and Fluid Dynamic Measurements Downstream of a Backward-Facing Step”. Journal of Heat Transfer, Vol. 107, pp. 922-929, 1985.

1 问题描述

突扩几何导致的流动分离及边界层再附会影响到其后方恒定热流表面的局部换热。本算例利用测量的热流表面的局部Nusselt数分布验证CFD仿真结果。

本案例计算模型如下图所示(图中H=1 m)。采用非均匀四边形网格划分,采用稳态计算,不考虑流体的可压缩性。计算域入口为充分发展流动,速度分布如下图所示。入口雷诺数为28000,计算中采用Realiable k-epsilon湍流模型,并使用标准壁面函数处理湍流。

算例中涉及到的的介质物性参数:

  • Density = 1 kg/m3
  • Viscosity = 0.0001 kg/m-s
  • Conductivity = 1.408 W/m-K
  • Specific Heat = 10,000 J/kg-K

壁面热通量 1000 W/m2。入口边界上x方向速度分布如下图所示。

2 OpenFOAM设置

本算例使用经过改造的simpleFoam求解器TsimpleFoam进行求解。TsimpleFoam求解器是在simpleFoam的基础上加入了温度场求解功能。详细改造过程可见之前的文章(OpenFOAM|24 TsimpleFoam求解器)。

注:本案例也可以使用buoyantSimpleFoam求解器进行计算。

2.1 文件准备

这里以simpleFoam算例中的pitzDaily作为模板算例。利用下面的命令准备算例文件。

cp -r $FOAM_TUTORIALS/incompressible/simpleFoam/pitzDaily .
mv pitzDaily VM13
cd VM13

删除多余的文件,最终算例文件夹结构如下所示。

2.2 网格处理

采用导入外部msh网格文件的方式准备网格。

  • 将网格文件VM13.msh拷贝到算例文件夹中,运行下面的命令转换并检查计算网格
fluentMeshToFoam VM13.msh
checkMesh

网格检查结果如下图所示,确保网格检查过程中没有错误或警告信息。

2.3 修改介质属性与物理模型

1、transportProperties文件

修改transportProperties文件,在其中加入热扩散系数。文件内容如下所示。

FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "constant";
object transportProperties;
}
// * * * * * * * * * * * * * * * * //

transportModel Newtonian;

nu [0 2 -1 0 0 0 0] 1e-04;
DT [0 2 -1 0 0 0 0] 1.408e-5;

注意这里热扩散系数:

2、momentumTransport文件

采用Realizable k-Epsilon湍流模型进行计算。

FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "constant";
object momentumTransport;
}
// * * * * * * * * * * * * * * * * * * //
simulationType RAS;
RAS
{
model realizableKE;
turbulence on;
printCoeffs on;
}

2.4 指定边界条件

1、p文件

p文件内容如下所示。

FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object p;
}
// * * * * * * * * * * * * * * * * //

dimensions [0 2 -2 0 0 0 0];
internalField uniform 0;

boundaryField
{
WALLS
{
type zeroGradient;
}
HOTWALL
{
type zeroGradient;
}
INLET
{
type zeroGradient;
}
OUTLET
{
type fixedValue;
value uniform 0;

}
frontAndBackPlanes
{
type empty;
}
}

2、U文件

U文件中指定入口INLET的速度分布,这里采用数据点的方式进行指定。

可以利用命令postProcess -time 0 -func writeCellCentres之后读取Cx文件中入口的y坐标,并根据y坐标赋速度值。

U文件内容如下所示。

FoamFile
{
version 2.0;
format ascii;
class volVectorField;
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [0 1 -1 0 0 0 0];

internalField uniform (0 0 0);

boundaryField
{
INLET
{
type fixedValue;
value nonuniform List<vector>
30
(
(0 0 0)
(1.84 0 0)
(1.94 0 0)
(2.1 0 0)
(2.21 0 0)
(2.3 0 0)
(2.42 0 0)
(2.57 0 0)
(2.68 0 0)
(2.77 0 0)
(2.8 0 0)
(2.8 0 0)
(2.8 0 0)
(2.8 0 0)
(2.8 0 0)
(2.8 0 0)
(2.8 0 0)
(2.8 0 0)
(2.73 0 0)
(2.63 0 0)
(2.5 0 0)
(2.39 0 0)
(2.28 0 0)
(2.15 0 0)
(2.1 0 0)
(2.03 0 0)
(1.94 0 0)
(1.83 0 0)
(1.63 0 0)
(0 0 0)
);
}

WALLS
{
type noSlip;
}
HOTWALL
{
type noSlip;
}

OUTLET
{
type zeroGradient;
}
frontAndBackPlanes
{
type empty;
}
}

3、k文件

k文件内容为:

FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object k;
}
// * * * * * * * * * * * * * * * * * //

dimensions [0 2 -2 0 0 0 0];

internalField uniform 0.016;

boundaryField
{
INLET
{
type fixedValue;
value $internalField;
}
OUTLET
{
type zeroGradient;
}
WALLS
{
type kqRWallFunction;
value $internalField;
}
HOTWALL
{
type kqRWallFunction;
value $internalField;
}
frontAndBack
{
type empty;
}
}

4、epsilon文件

epsilon文件内容如下所示。

FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object epsilon;
}
// * * * * * * * * * * * * * * * //

dimensions [0 2 -3 0 0 0 0];

internalField uniform 0.00124;

boundaryField
{
INLET
{
type fixedValue;
value $internalField;
}
OUTLET
{
type zeroGradient;
}
WALLS
{
type epsilonWallFunction;
value $internalField;
}
HOTWALL
{
type epsilonWallFunction;
value $internalField;
}
frontAndBack
{
type empty;
}
}

5、nut文件

nut文件内容如下所示。

FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object nut;
}
// * * * * * * * * * * * * * * * * * * //

dimensions [0 2 -1 0 0 0 0];

internalField uniform 0;

boundaryField
{
INLET
{
type calculated;
value uniform 0;
}
OUTLET
{
type calculated;
value uniform 0;
}
WALLS
{
type nutkWallFunction;
value uniform 0;
}
HOTWALL
{
type nutkWallFunction;
value uniform 0;
}
frontAndBack
{
type empty;
}
}

6、T文件

  • 添加T文件
cp 0/p 0/T

修改T文件为:

FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object p;
}
// * * * * * * ** * * * * * * ** * * * * //

dimensions [0 2 -2 0 0 0 0];
internalField uniform 273;

boundaryField
{
WALLS
{
type fixedGradient;
gradient uniform 0;
}
HOTWALL
{
type fixedGradient;
// 梯度值等于热流密度除以热导率
gradient uniform 710.2272;
}
INLET
{
type fixedValue;
value uniform 273;
}
OUTLET
{
type zeroGradient;

}
frontAndBackPlanes
{
type empty;
}
}

2.5 指定求解器参数

1、controlDict文件

文件内容如下所示。

FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object controlDict;
}
// * * * * * * * * * * * * * * //
application TsimpleFoam;
startFrom startTime;
startTime 0;
stopAt endTime;
endTime 1000;
deltaT 1;
writeControl timeStep;
writeInterval 100;
purgeWrite 2;
writeFormat ascii;
writePrecision 6;
writeCompression off;
timeFormat general;
timePrecision 6;
runTimeModifiable true;

2、fvSchemes文件

文件内容如下所示。

FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object fvSchemes;
}
// * * * * * * * * * * * * * * * //

ddtSchemes
{
default steadyState;
}

gradSchemes
{
default cellLimited Gauss linear 0.5;
grad(U) cellLimited Gauss linear 1;
}

divSchemes
{
default none;
div(phi,U) bounded Gauss linearUpwind grad(U);
div(phi,k) bounded Gauss limitedLinear 1;
div(phi,epsilon) bounded Gauss limitedLinear 1;
div(phi,omega) bounded Gauss limitedLinear 1;
div(phi,v2) bounded Gauss limitedLinear 1;
div((nuEff*dev2(T(grad(U))))) Gauss linear;
div(nonlinearStress) Gauss linear;

div((nuEff*dev(grad(U).T()))) Gauss linear;
div(phi,T) Gauss upwind;
}

laplacianSchemes
{
default Gauss linear corrected;
laplacian(DT,T) Gauss linear corrected;
}

interpolationSchemes
{
default linear;
}

snGradSchemes
{
default corrected;
}

wallDist
{
method meshWave;
}

3、fvSolution文件

文件内容如下所示。

FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object fvSolution;
}
// * * * * * * * * * * * * * * * * //

solvers
{
p
{
solver GAMG;
tolerance 1e-06;
relTol 0.1;
smoother GaussSeidel;
}

T
{
solver smoothSolver;
smoother GaussSeidel;
tolerance 1e-07;
relTol 0.01;
}

"(U|k|epsilon)"
{
solver smoothSolver;
smoother symGaussSeidel;
tolerance 1e-05;
relTol 0.1;
}
}

SIMPLE
{
nNonOrthogonalCorrectors 0;
consistent yes;

residualControl
{
p 1e-3;
U 1e-3;
"(k|epsilon|omega|f|v2)" 1e-3;
T 1e-6;
}
}

relaxationFactors
{
equations
{
T 0.9;
U 0.9;
".*" 0.9;
}
}

2.6 求解计算

利用命令TsimpleFoam进行求解。

注意:前提是已经改造并编译完成了TsimpleFoam,具体改造过程参见之前的文章。

3 计算结果

  • 速度分布
  • 湍动能
  • 温度

提取码:hw9u

本篇文章来源于微信公众号: CFD之道

赞(0) 打赏
版权声明:未经允许,请勿随意用于商业用途。
文章名称:《OpenFOAM|验证13 后向台阶湍流传热》
文章链接:https://www.topcfd.cn/12408/
本站资源仅供个人学习交流,请于下载后24小时内删除,不允许用于商业用途,否则法律问题自行承担。
分享到

说两句 抢沙发

评论前必须登录!

 

觉得文章有用就打赏一下文章作者吧

非常感谢你的打赏,我们将继续给力更多优质内容,让我们一起创建更加美好的网络世界!

支付宝扫一扫

微信扫一扫

登录

找回密码

注册