钝体建筑扰流的大涡模拟
-
@hitsc30
y+ 的理解不复杂,看code需要一点点的耐心就可以。我给你贴一下yPlusLES。if (isA<wallFvPatch>(currPatch)) { yPlus.boundaryField()[patchi] = d[patchi] *sqrt ( nuEff.boundaryField()[patchi] *mag(U.boundaryField()[patchi].snGrad()) ) /nuLam.boundaryField()[patchi]; const scalarField& Yp = yPlus.boundaryField()[patchi]; Info<< "Patch " << patchi << " named " << currPatch.name() << " y+ : min: " << gMin(Yp) << " max: " << gMax(Yp) << " average: " << gAverage(Yp) << nl << endl; }
![公式]( 1)
![公式2]( 2)
![替代文字]( 3)我写的,你可以输出来看看每一个量的大小
if (isA<wallFvPatch>(currPatch)) { frictionvelocityLES.boundaryField()[patchi] = sqrt ( nuEff.boundaryField()[patchi] *mag(U.boundaryField()[patchi].snGrad()) ); const scalarField& Yp = frictionvelocityLES.boundaryField()[patchi]; Info<< "Patch " << patchi << " named " << currPatch.name() << " friction velocity u* : min: " << gMin(Yp) << " max: " << gMax(Yp) << " average: " << gAverage(Yp) << nl << endl; Info<< "Patch " << patchi << " named " << currPatch.name() << "nuLam : min: " << gMin(nuLam) << " max: " << gMax(nuLam) << " average: " << gAverage(nuLam) << nl << endl; Info<< "Patch " << patchi << " named " << currPatch.name() << "d : min: " << gMin(d) << " max: " << gMax(d) << " average: " << gAverage(d) << nl << endl; }
近壁面第一层网格的话 ,d= 0.5* 第一个cell的长度. du/dy = (u_infty - 0)/ (d-0)
nuefff = nu (层流 laminar) + nut(wall 上 nut =0 或者是你给的壁面模型的值)我给的nut在壁面上就是0.
object nuSgs; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [ 0 2 -1 0 0 0 0 ]; internalField uniform 0; boundaryField { bottomWall { type fixedValue; value uniform 0; }
-
@gtian 在 钝体建筑扰流的大涡模拟 中说:
@hitsc30
y+ 的理解不复杂,看code需要一点点的耐心就可以。我给你贴一下yPlusLES。if (isA<wallFvPatch>(currPatch)) { yPlus.boundaryField()[patchi] = d[patchi] *sqrt ( nuEff.boundaryField()[patchi] *mag(U.boundaryField()[patchi].snGrad()) ) /nuLam.boundaryField()[patchi]; const scalarField& Yp = yPlus.boundaryField()[patchi]; Info<< "Patch " << patchi << " named " << currPatch.name() << " y+ : min: " << gMin(Yp) << " max: " << gMax(Yp) << " average: " << gAverage(Yp) << nl << endl; }
![公式]( 1)
![公式2]( 2)
![替代文字]( 3)我写的,你可以输出来看看每一个量的大小
if (isA<wallFvPatch>(currPatch)) { frictionvelocityLES.boundaryField()[patchi] = sqrt ( nuEff.boundaryField()[patchi] *mag(U.boundaryField()[patchi].snGrad()) ); const scalarField& Yp = frictionvelocityLES.boundaryField()[patchi]; Info<< "Patch " << patchi << " named " << currPatch.name() << " friction velocity u* : min: " << gMin(Yp) << " max: " << gMax(Yp) << " average: " << gAverage(Yp) << nl << endl; Info<< "Patch " << patchi << " named " << currPatch.name() << "nuLam : min: " << gMin(nuLam) << " max: " << gMax(nuLam) << " average: " << gAverage(nuLam) << nl << endl; Info<< "Patch " << patchi << " named " << currPatch.name() << "d : min: " << gMin(d) << " max: " << gMax(d) << " average: " << gAverage(d) << nl << endl; }
近壁面第一层网格的话 ,d= 0.5* 第一个cell的长度. du/dy = (u_infty - 0)/ (d-0)
nuefff = nu (层流 laminar) + nut(wall 上 nut =0 或者是你给的壁面模型的值)我给的nut在壁面上就是0.
object nuSgs; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [ 0 2 -1 0 0 0 0 ]; internalField uniform 0; boundaryField { bottomWall { type fixedValue; value uniform 0; }
非常感谢!
-
@李东岳 李老师我上点图给您和各位老师看一下。我们使用了fluent和openfoam进行平均风剖面的模拟。下图是我们得到的结果
下述是平均风剖面对比:
而后是我用脉动算出来的结果,分别是平均风压和脉动风压
下述是我的实验数据迎风面风压和模拟的迎风面风压
误差有点离谱
当前是按照tamura教授的设置帮边界条件、离散格式、求解器、亚格子模型全换了。就是采用的网格和他们的有所区别(他们采用的snappyhexmesh),准备搞个和他们一样的网格试一试。实在不行就只能放弃了
主要现在用foam用了半年,从一个啥都不知道的小白在师兄和论坛的各位前辈带着下,慢慢的进步对这个东西用习惯了,人菜瘾大。就想证实到底是我设置什么的不行,还是foam可能这方面存在改进。就是最后放弃foam改用fluent算也不让自己后悔。 -
@hitsc30 在 钝体建筑扰流的大涡模拟 中说:
当前是按照tamura教授的设置帮边界条件、离散格式、求解器、亚格子模型全换了。就是采用的网格和他们的有所区别(他们采用的snappyhexmesh),准备搞个和他们一样的网格试一试。实在不行就只能放弃了
方便把建筑物的详细参数,以及对标的那篇实验分享一下吗?我跑一下看看。压力系数就是一个静压,如果这个都对不上,高阶统计量就能不可能了,那LES的作用就被完完全全浪费。 就算一个建筑物的话,这个已经属于10多年的范畴了,2006年就能跑DNS了。
https://www.sciencedirect.com/science/article/pii/S0142727X06000476 -
@hitsc30 在 钝体建筑扰流的大涡模拟 中说:
@gtian 您好,我研究的对象是基于东京工艺大学TPU数据库的1:1:4模型的模拟(在和风洞同样缩尺1:400后,模型的尺寸为0.1m0.1m0.4m。α为0.25,计算域按照cost732推荐为长8m宽4m高度为1.6m)。TPU数据库参见下述链接:
http://www.wind.arch.t-kougei.ac.jp/system/eng/contents/code/w_it
对标的就是该风压数据库提供数据处理得到的平均风压系数和脉动风压系数。当前我的平均风压系数一直偏小了0.1;迎风向缩尺后尺寸为0.1m,顺风向缩尺后尺寸为0.1m,竖向的尺寸为0.4m。指数选取为0.25
-
@gtian 有一篇类似的文章,该文章研究的模型是1:1:5模型。我研究的是1:1:4模型,在TPU数据库上实际有四百个个测点,每个面各有一百个测点。
下述链接是1:1:5模型的文件,链接如下,国内有人做过1:1:4模型,基于fluent平台进行的模拟,结果还未见刊。
https://www.sciencedirect.com/science/article/pii/S0167610520303202
雷诺数,在建筑高度处大约30w。计算高度处模型高度0.4m(对应实际高度160m),风速11m/s。风洞数据库参见链接:
http://www.wind.arch.t-kougei.ac.jp/system/eng/contents/code/w_it
祝大家五四青年节快乐! -
更新一下,跑了几天。
- 两个时间尺度,
timestep \delta T , 控制Co < 2.
总运行时长: 第一阶段250个大涡turnover time : 250 * (0.4(H) / 0.5 (friction velocity); 第二阶段100个大涡turnover time .
2.
4. Mesh stats points: 3520103 faces: 10396800 internal faces: 10234752 cells: 3438592 faces per cell: 6 boundary patches: 23 point zones: 0 face zones: 0 cell zones: 0 Overall number of cells of each type: hexahedra: 3438592 prisms: 0 wedges: 0 pyramids: 0 tet wedges: 0 tetrahedra: 0 polyhedra: 0 Checking topology... Boundary definition OK. Cell to face addressing OK. Point usage OK. Upper triangular ordering OK. Face vertices OK. Number of regions: 1 (OK). Checking patch topology for multiply connected surfaces... Patch Faces Points Surface topology bottomWall 49088 49552 ok (non-closed singly connected) topWall 49152 49601 ok (non-closed singly connected) sides1_half0 12288 12593 ok (non-closed singly connected) sides1_half1 12288 12593 ok (non-closed singly connected) sides2_half0 3072 3341 ok (non-closed singly connected) sides2_half1 3072 3341 ok (non-closed singly connected) sides3_half0 1536 1799 ok (non-closed singly connected) sides3_half1 1536 1799 ok (non-closed singly connected) sides4_half0 768 1028 ok (non-closed singly connected) sides4_half1 768 1028 ok (non-closed singly connected) sides5_half0 256 514 ok (non-closed singly connected) sides5_half1 256 514 ok (non-closed singly connected) out1_half0 9216 9457 ok (non-closed singly connected) in1_half1 9216 9457 ok (non-closed singly connected) out2_half0 2304 2509 ok (non-closed singly connected) in2_half1 2304 2509 ok (non-closed singly connected) out3_half0 1152 1351 ok (non-closed singly connected) in3_half1 1152 1351 ok (non-closed singly connected) out4_half0 576 772 ok (non-closed singly connected) in4_half1 576 772 ok (non-closed singly connected) out5_half0 192 386 ok (non-closed singly connected) in5_half1 192 386 ok (non-closed singly connected) building 1088 1105 ok (non-closed singly connected) Checking geometry... Overall domain bounding box (0 0 0) (3.2 1.6 2.4) Mesh (non-empty, non-wedge) directions (1 1 1) Mesh (non-empty) directions (1 1 1) Boundary openness (8.71455e-17 -4.51544e-16 -4.1172e-16) OK. Max cell openness = 1.73472e-16 OK. Max aspect ratio = 12.6864 OK. Minimum face area = 0.00015625. Maximum face area = 0.00198225. Face area magnitudes OK. Min volume = 1.95312e-06. Max volume = 2.47781e-05. Total volume = 12.284. Cell volumes OK. Mesh non-orthogonality Max: 0 average: 0 Non-orthogonality check OK. Face pyramids OK. Max skewness = 3.18096e-13 OK. Coupled point location match (average 0) OK. Mesh OK. End
- 两个时间尺度,
-
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.4.0 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; location "0"; object p; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [ 0 2 -2 0 0 0 0 ]; internalField uniform 0; boundaryField { bottomWall { type zeroGradient; } topWall { type symmetryPlane; } sides1_half0 { type symmetryPlane; } sides2_half0 { type symmetryPlane; } sides3_half0 { type symmetryPlane; } sides4_half0 { type symmetryPlane; } sides5_half0 { type symmetryPlane; } out1_half0 { type fixedValue; value uniform 0; } out2_half0 { type fixedValue; value uniform 0; } out3_half0 { type fixedValue; value uniform 0; } out4_half0 { type fixedValue; value uniform 0; } out5_half0 { type fixedValue; value uniform 0; } sides5_half1 { type symmetryPlane; } sides4_half1 { type symmetryPlane; } sides3_half1 { type symmetryPlane; } sides2_half1 { type symmetryPlane; } sides1_half1 { type symmetryPlane; } in1_half1 { type zeroGradient; } in2_half1 { type zeroGradient; } in3_half1 { type zeroGradient; } in4_half1 { type zeroGradient; } in5_half1 { type zeroGradient; } building { type zeroGradient; } } // ************************************************************************* //
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.4.0 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volVectorField; location "0"; object U; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [ 0 1 -1 0 0 0 0 ]; internalField uniform ( 0.01335 0 0 ); boundaryField { bottomWall { type fixedValue; value uniform ( 0 0 0 ); } topWall { type symmetryPlane; } sides1_half0 { type symmetryPlane; } sides2_half0 { type symmetryPlane; } sides3_half0 { type symmetryPlane; } sides4_half0 { type symmetryPlane; } sides5_half0 { type symmetryPlane; } out1_half0 { type inletOutlet; inletValue uniform (0 0 0); value uniform (0 0 0); } out2_half0 { type inletOutlet; inletValue uniform (0 0 0); value uniform (0 0 0); } out3_half0 { type inletOutlet; inletValue uniform (0 0 0); value uniform (0 0 0); } out4_half0 { type inletOutlet; inletValue uniform (0 0 0); value uniform (0 0 0); } out5_half0 { type inletOutlet; inletValue uniform (0 0 0); value uniform (0 0 0); } sides5_half1 { type symmetryPlane; } sides4_half1 { type symmetryPlane; } sides3_half1 { type symmetryPlane; } sides2_half1 { type symmetryPlane; } sides1_half1 { type symmetryPlane; } in1_half1 { type turbulentInlet; referenceField uniform (9 0 0); fluctuationScale (0.02 0.01 0.01); value uniform (9 0 0); } in2_half1 { type turbulentInlet; referenceField uniform (9 0 0); fluctuationScale (0.02 0.01 0.01); value uniform (9 0 0); } in3_half1 { type turbulentInlet; referenceField uniform (9 0 0); fluctuationScale (0.02 0.01 0.01); value uniform (9 0 0); } in4_half1 { type turbulentInlet; referenceField uniform (9 0 0); fluctuationScale (0.02 0.01 0.01); value uniform (9 0 0); } in5_half1 { type turbulentInlet; referenceField uniform (9 0 0); fluctuationScale (0.02 0.01 0.01); value uniform (9 0 0); } building { type fixedValue; value uniform ( 0 0 0 ); } } // ************************************************************************* //
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.4.0 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; location "0"; object nuSgs; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [ 0 2 -1 0 0 0 0 ]; internalField uniform 0; boundaryField { bottomWall { type nutUSpaldingWallFunction; value uniform 0.0; } topWall { type symmetryPlane; } sides1_half0 { type symmetryPlane; } sides2_half0 { type symmetryPlane; } sides3_half0 { type symmetryPlane; } sides4_half0 { type symmetryPlane; } sides5_half0 { type symmetryPlane; } out1_half0 { type inletOutlet; inletValue uniform 0; value uniform 0; } out2_half0 { type inletOutlet; inletValue uniform 0; value uniform 0; } out3_half0 { type inletOutlet; inletValue uniform 0; value uniform 0; } out4_half0 { type inletOutlet; inletValue uniform 0; value uniform 0; } out5_half0 { type inletOutlet; inletValue uniform 0; value uniform 0; } sides5_half1 { type symmetryPlane; } sides4_half1 { type symmetryPlane; } sides3_half1 { type symmetryPlane; } sides2_half1 { type symmetryPlane; } sides1_half1 { type symmetryPlane; } in1_half1 { type fixedValue; value uniform 0.0; } in2_half1 { type fixedValue; value uniform 0.0; } in3_half1 { type fixedValue; value uniform 0.0; } in4_half1 { type fixedValue; value uniform 0.0; } in5_half1 { type fixedValue; value uniform 0.0; } building { type nutUSpaldingWallFunction; value uniform 0.0; } } // ************************************************************************* //
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.4.0 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; location "0"; object k; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [ 0 2 -2 0 0 0 0 ]; internalField uniform 0; boundaryField { bottomWall { type fixedValue; value uniform 0; } topWall { type symmetryPlane; } sides1_half0 { type symmetryPlane; } sides2_half0 { type symmetryPlane; } sides3_half0 { type symmetryPlane; } sides4_half0 { type symmetryPlane; } sides5_half0 { type symmetryPlane; } out1_half0 { type inletOutlet; inletValue uniform 0; value uniform 0; } out2_half0 { type inletOutlet; inletValue uniform 0; value uniform 0; } out3_half0 { type inletOutlet; inletValue uniform 0; value uniform 0; } out4_half0 { type inletOutlet; inletValue uniform 0; value uniform 0; } out5_half0 { type inletOutlet; inletValue uniform 0; value uniform 0; } sides5_half1 { type symmetryPlane; } sides4_half1 { type symmetryPlane; } sides3_half1 { type symmetryPlane; } sides2_half1 { type symmetryPlane; } sides1_half1 { type symmetryPlane; } in1_half1 { type fixedValue; value uniform 0; } in2_half1 { type fixedValue; value uniform 0; } in3_half1 { type fixedValue; value uniform 0; } in4_half1 { type fixedValue; value uniform 0; } in5_half1 { type fixedValue; value uniform 0; } building { type fixedValue; value uniform 0; } } // ************************************************************************* //```
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.4.0 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; location "0"; object cS; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [ 0 0 0 0 0 0 0 ]; internalField uniform 0; boundaryField { bottomWall { type zeroGradient; } topWall { type symmetryPlane; } sides1_half0 { type symmetryPlane; } sides2_half0 { type symmetryPlane; } sides3_half0 { type symmetryPlane; } sides4_half0 { type symmetryPlane; } sides5_half0 { type symmetryPlane; } out1_half0 { type zeroGradient; } out2_half0 { type zeroGradient; } out3_half0 { type zeroGradient; } out4_half0 { type zeroGradient; } out5_half0 { type zeroGradient; } sides5_half1 { type symmetryPlane; } sides4_half1 { type symmetryPlane; } sides3_half1 { type symmetryPlane; } sides2_half1 { type symmetryPlane; } sides1_half1 { type symmetryPlane; } in1_half1 { type zeroGradient; } in2_half1 { type zeroGradient; } in3_half1 { type zeroGradient; } in4_half1 { type zeroGradient; } in5_half1 { type zeroGradient; } building { type zeroGradient; } } // ************************************************************************* //
solid flange facet normal 0 0 -1 outer loop vertex 1.35 0.00 1.25 vertex 1.35 0.40 1.25 vertex 1.45 0.40 1.25 endloop endfacet facet normal 0 0 -1 outer loop vertex 1.35 0.00 1.25 vertex 1.45 0.40 1.25 vertex 1.45 0.00 1.25 endloop endfacet facet normal -1 0 0 outer loop vertex 1.35 0.00 1.25 vertex 1.35 0.00 1.15 vertex 1.35 0.40 1.15 endloop endfacet facet normal -1 0 0 outer loop vertex 1.35 0.00 1.25 vertex 1.35 0.40 1.15 vertex 1.35 0.40 1.25 endloop endfacet facet normal 0 -1 0 outer loop vertex 1.35 0.00 1.25 vertex 1.45 0.00 1.15 vertex 1.45 0.00 1.25 endloop endfacet facet normal 0 -1 0 outer loop vertex 1.35 0.00 1.25 vertex 1.45 0.00 1.15 vertex 1.35 0.00 1.15 endloop endfacet facet normal 0 0 1 outer loop vertex 1.35 0.00 1.15 vertex 1.45 0.00 1.15 vertex 1.45 0.40 1.15 endloop endfacet facet normal 0 0 1 outer loop vertex 1.35 0.00 1.15 vertex 1.45 0.40 1.15 vertex 1.35 0.40 1.15 endloop endfacet facet normal 1 0 0 outer loop vertex 1.45 0.00 1.25 vertex 1.45 0.40 1.25 vertex 1.45 0.40 1.15 endloop endfacet facet normal 1 0 0 outer loop vertex 1.45 0.00 1.25 vertex 1.45 0.40 1.15 vertex 1.45 0.00 1.15 endloop endfacet facet normal 0 1 0 outer loop vertex 1.35 0.40 1.25 vertex 1.35 0.40 1.15 vertex 1.45 0.40 1.15 endloop endfacet facet normal 0 1 0 outer loop vertex 1.35 0.40 1.25 vertex 1.45 0.40 1.25 vertex 1.45 0.40 1.15 endloop endfacet endsolid flange