首页-湖茂兴机场有限公司

首页-湖茂兴机场有限公司

新闻资讯 你的位置:首页-湖茂兴机场有限公司 > 新闻资讯 > 为热传导总共;为定压比热容

为热传导总共;为定压比热容

发布日期:2024-06-21 16:23    点击次数:109

为热传导总共;为定压比热容

simpleFoam是一个稳态流动求解器,不错求解层流与湍流流动问题。但该求解器中并不包含温度场的讨论。本文描述在simpleFoam求解器基础上中添加温度场求解功能,将其转换为新求解器TsimpleFoam的基本经过。

骨子参考:https://www.cfd-online.com/Forums/openfoam-programming-development/84480-adding-temperature-simplefoam.html
1 求解器转换运用底下的敕令拷贝icoFoam源代码
cd $FOAM_SOLVERS/incompressiblemkdir -p $WM_PROJECT_USER_DIR/applications/solverscp -r icoFoam $WM_PROJECT_USER_DIR/applications/solvers/TsimpleFoamcd $WM_PROJECT_USER_DIR/applications/solvers/TsimpleFoam# 删除饱和的求解器文献rm -r SRFSimpleFoam porousSimpleFoam/mv simpleFoam.C TsimpleFoam.C

治理达成后,icoTempFoam文献夹中的文献组织结构如下图所示。

图片

修改Make/files文献

文献骨子修改为:

TsimpleFoam.CEXE = $(FOAM_APPBIN)/TsimpleFoam
修改createFields.H文献

在createFields.H文献中添加必须的场数据读取。这里需要添加热扩散总共DT与温度场T。

添加以下代码加多DT:

// 添加热扩散总共DTdimensionedScalar DT{    "DT",    dimViscosity,    transportProperties.lookup("DT")};

添加以下代码加多温度场T的读写:

//===加多温度场T===================Info<< "Reading field T\n" << endl;volScalarField T(    IOobject    (        "T",        runTime.timeName(),        mesh,        IOobject::MUST_READ,        IOobject::AUTO_WRITE    ),    mesh);//==============================
修改TsimpleFoam.C文献

加多以下温度场求解功能。

//============加多温度求解功能====fvScalarMatrix TEqn(    fvm::ddt(T)+ fvm::div(phi,T)- fvm::laplacian(DT,浙江卡罗特工贸有限公司T));TEqn.relax();TEqn.solve();//===============================
编译求解器
wmake

如下图所示编译经过中莫得出现乌有提醒的话, 安达市嘉户烹饪有限公司即示意编译得手。

图片

2 测试求解器

运用simpleFoam官方算例pitzDaily进行测试。

runcp -r $FOAM_TUTORIALS/incompressible/simpleFoam/pitzDaily .mv pitzDaily testCasecd testCase/

删除饱和的文献, 首页-湖名兴仓储有限公司最终剩下的文献结构如下所示。

图片

2.1 修改constant文献夹修改transportProperties文献

文献骨子修改为:

FoamFile{    version     2.0;    format      ascii;    class       dictionary;    location    "constant";    object      transportProperties;}// * * * * * * * * * * * * * * * * * * // transportModel  Newtonian; nu              [0 2 -1 0 0 0 0] 1e-05;DT              [0 2 -1 0 0 0 0] 3e-6;

这里的DT为热扩散总共:

其中,为热传导总共;为定压比热容。

修改momentumTransport文献

接受层流讨论。

FoamFile{    version     2.0;    format      ascii;    class       dictionary;    location    "constant";    object      momentumTransport;}// * * * * * * * * * * * * * * * * * //// 接受层流讨论simulationType laminar; RAS{    // Tested with kEpsilon, realizableKE,美容美发    // kOmega, kOmegaSST, v2f,    // ShihQuadraticKE, LienCubicKE.    model           kEpsilon;    turbulence      off;    printCoeffs     on;}
2.2 缔造0文献夹

在0文献夹下加多一个T文献。

cp 0/p 0/T

修改T文献骨子,如下所示。

FoamFile{    version     2.0;    format      ascii;    class       volScalarField;    object      T;}// * * * * * * * * * * * * * * * * * * * //// 刺眼修改温度的单元dimensions      [0 0 0 1 0 0 0];internalField   uniform 300; boundaryField{    inlet    {        type            fixedValue;        value           uniform 300;    }     outlet    {        type            zeroGradient;    }     upperWall    {        type            fixedValue;        value           uniform 350;    }     lowerWall    {        type            fixedValue;        value           uniform 320;    }     frontAndBack    {        type            empty;    }}
2.3 修改system文献夹

运用敕令foamGet residuals往system文献夹中添加residuals文献。

residuals文献

在residuals文献中添加温度T的输出。

fields (p U T);
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      0;writeFormat     ascii;writePrecision  6;writeCompression off;timeFormat      general;timePrecision   6;runTimeModifiable true;functions{    #includeFunc residuals}
fvSchemes文献

fvSchemes文献中指定破裂要领。文献骨子如下所示。

FoamFile{    version     2.0;    format      ascii;    class       dictionary;    location    "system";    object      fvSchemes;}// * * * * * * * * * * * * * * * * * * * // ddtSchemes{    default         steadyState;} gradSchemes{    default         Gauss linear;} 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;}
fvSolutions文献

该文献修改为:

FoamFile{    version     2.0;    format      ascii;    class       dictionary;    location    "system";    object      fvSolution;}// * * * * * * * * * * * * * * * * * * * // solvers{    p    {        solver          GAMG;        tolerance       1e-06;        relTol          0.01;        smoother        GaussSeidel;    }     T    {        solver          smoothSolver;        smoother        GaussSeidel;        tolerance       1e-07;        relTol          0.01;    }     U    {        solver          smoothSolver;        smoother        symGaussSeidel;        tolerance       1e-05;        relTol          0.01;    }} SIMPLE{    nNonOrthogonalCorrectors 1;    consistent      yes;     residualControl    {        p               1e-3;        U               1e-3;        T               1e-6;        }} relaxationFactors{    equations    {        T               0.9;        U               0.7; // 0.9 is more stable but 0.95 more convergent        p               0.3; // 0.9 is more stable but 0.95 more convergent    }}
2.4 迭代讨论

使用前边编译的求解器TsimpleFoam进行讨论。

blockMeshTsimpleFoam

讨论迭代869次后达到不息。

图片

讨论时不错稽察残差。

foamMonitor -l postProcessing/residuals/0/residuals.dat

残差如下图所示。

图片

2.5 讨论效果温度场散布

图片

速率场散布

图片

相干文献下载:美容美发

本站仅提供存储劳动,扫数骨子均由用户发布,如发现存害或侵权骨子,请点击举报。

下一篇:没有了

Powered by 首页-湖茂兴机场有限公司 @2013-2022 RSS地图 HTML地图

Copyright 365站群 © 2013-2024 <"SSWL"> 版权所有