Skip to content
  • 最新
  • 版块
  • 东岳流体
  • 随机看[请狂点我]
皮肤
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • 默认(不使用皮肤)
  • 不使用皮肤
折叠
CFD中文网

CFD中文网

G

gtian

@gtian
关于
帖子
20
主题
1
群组
0
粉丝
2
关注
0

帖子

最新

  • 使用A100和V100GPU运行RapidCFD
    G gtian

    @李东岳

    李老师,
    测试结果,只能作为一个简单的参考用,而且都是针对不可压绕流的问题。

    加速的问题,之前论坛上就有过讨论,关于GAMG和PCG在多进程下的速度问题。我的个人观察是GAMG在OpenFoam框架下更加适合且稳定。RenumberMesh其实我了解的不多,但是个人观察发现加速程度不明显。
    关于求解Ax=b的问题,那一定是有最优方法的,并且是在不断更新进步的,比如PBiCGStab 就非常快。
    我个人不是做算法的,所以,只能是做一下应用。A100是组里买来给深度学习用的,我就是借着人工智能的光,测试一下。还有一个发现就是并行GPU A100 2块运算目前并没有给我带来想要的加速效果(1400W case)。短期来看,基于CPU 的集群上跑CFD 可能还是主流。但是,价格决定市场,如果GPU价格能够降到可以接受的程度,就不一定了。
    以上都是自己跑着试试看的,仅供参考.


  • 使用A100和V100GPU运行RapidCFD
    G gtian

    @gtian

    有时候,我脑子一热,重启了电脑,就会出现找不到显卡的情况: nvidia-smi报错:command not found.

    gpu重启以后,是默认关闭的,解决方法,在root下执行:
    nvidia-smi -pm 1.


  • 使用A100和V100GPU运行RapidCFD
    G gtian

    @李东岳
    谢谢李老师,问题已经解决了,就是这个问题。
    在/etc/config/settings.sh中这个位置是可以修改一下的.

    export FOAM_MPI=openmpi-2.1.1
        # optional configuration tweaks:
    

    之后,可以还会出现bug:

    opal_shmem_base_select failed
    --> Returned value -1 instead of OPAL_SUCCESS
    

    按照 链接文本
    修改既可.

    现在可以同时并行2块A100了,我在测试一下8块V100的效果.
    分享一下目前的测试结果,都是LES的结果, 都是不可压缩的绕流和壁湍流问题。6000w网格的时候,一块A100都可以顶的上320个cpu进程了.
    6000W.jpg 1400W.jpg 600W.jpg 70W.jpg


  • 使用A100和V100GPU运行RapidCFD
    G gtian

    @gtian 李老师,如果是比较老的版本呢? openfoam 2.3.0,
    这个文件在什么位置啊?


  • 使用A100和V100GPU运行RapidCFD
    G gtian

    @李东岳

    李老师,这个动态链接库是怎么设置的啊?还有一个小问题就是当我source etc/bashrc之后,这个$MPI_ARCH_PATH总是指向一个固定的openmpi的位置,比如:

    /RapidCFD/ThirdParty-dev/platforms/linux64Nvcc/openmpi-4.0.2: No such file or directory
    

    但是,实际上我想用的是openmpi-2.1.1, 这个$MPI_ARCH_PATH 应该怎么弄可以调整一下路径呢?


  • 使用A100和V100GPU运行RapidCFD
    G gtian

    最近尝试使用GPU来跑OpenFOAM,我本人也不是擅长代码,选了simflow的RapidCFD 来跑,从结果(LES)来看,
    100万网格点以内,因为大部分单个节点的CPU线程数量已经足够应付,GPU的优势不够明显。
    100万网格点-1000万网格点,我的结果是A100 > V100 ~ 1.5张 Xeon Gold 6148 (20核,40进程) .
    大于1000万网格点, 单核V100(16G)已经出现内存不足了,单核A100(80G)可以。
    我现在的想法是并行跑GPU,但问题是,在编译openmpi 的时候总是报错,总在调用一个不存在的openmpi版本。

    UOPwrite.C:29:17: fatal error: mpi.h: No such file or directory
     #include "mpi.h"
                     ^
    compilation terminated.
    make: *** [Make/linux64NvccDPOptOPENMPI/UOPwrite.o] Error 1
    
    

    大家有遇到类似的情况的吗?


  • LES介绍的文章的一个公式
    G gtian

    @一二 在 LES介绍的文章的一个公式 中说:

    嗯,下面是我推的
    \begin{equation}
    \overline{\mathbf{S}}:\mathbf{\tau}+C_{e}\frac{k_{sgs}^{1.5}}{\Delta}=0 \
    left = \overline{\mathbf{S}}:[\frac{2}{3}k_{sgs}\mathbf{I}-2\mu_{sgs}\mathbf{dev}(\overline{\mathbf{S}})]+k_{sgs}^{1.5}\frac{C_{\epsilon}}{\Delta}
    \end{equation}
    因为
    \begin{equation}
    \mu_{sgs}=C_{k}\Delta\sqrt{k_{sgs}} \
    = \overline{\mathbf{S}}:[\frac{2}{3}k_{sgs}\mathbf{I}-2C_{k}\Delta\sqrt{k_{sgs}}]+k_{sgs}^{1.5}\frac{C_{\epsilon}}{\Delta} \
    = \sqrt{k_{sgs}}(\frac{C_{\epsilon}}{\Delta}k_{sgs}+\frac{2}{3}\mathbf{tr}(\overline{\mathbf{S}})\sqrt{k_{sgs}}-2C_{k}(\mathbf{dev}(\overline{\mathbf{S}}):\overline{\mathbf{S}})) \
    = ak_{sgs}+b\sqrt{k_{sgs}}-c\
    = right = 0
    \end{equation}
    其中
    \begin{equation}
    a=\frac{C_{\epsilon}}{\Delta} \
    b=\frac{2}{3}tr(\overline{\mathbf{S}}) \
    c=2 \Delta C_{k}(\mathbf{dev}(\overline{\mathbf{S}}):\overline{\mathbf{S}} \
    \sqrt{k_{sgs}}=\frac{-b+\sqrt{b^2+4ac}}{2a}
    \end{equation}
    当为不可压缩流体时$tr{\overline{\mathbf{S}}}=0$,那么$b=0$、$c=2 \Delta C_{k} (\mathbf{dev}(\overline{\mathbf{S}}):\overline{\mathbf{S}})$,就可以得到$k_{sgs}=\frac{c}{a}=\frac{2C_{k}||\overline{\mathbf{S}}||^{2}{}\Delta^2}{C_{\epsilon}}$


  • 钝体建筑扰流的大涡模拟
    G gtian

    @coolhhh 还有一个问题是关于inlet边界条件的。一般认为入口处是一条大气边界层的速度型曲线。比如:https://www.openfoam.com/documentation/guides/latest/doc/guide-bcs-inlet-atm-atmBoundaryLayer.html。 为什么入口的速度是一个指数型呢?


  • 钝体建筑扰流的大涡模拟
    G gtian

    @coolhhh 什么是脉动风?怎么加的?


  • 钝体建筑扰流的大涡模拟
    G gtian

    @coolhhh 还有,尽量不要用smagorinsky做亚格子模型,因为这个亚格子模型中的系数C是个定值。他会有两个问题,1.边界上,会overestimate边界附近的粘度。2. 是全场是一个固定系数的话,会忽视掉能量的反级串backscatter现象。one-equation或者dynamic的亚格子模型都比smagorinsky要好一些。对于静压力,我试一下你给的那个边界条件跑一下看看。还有就是关于总用时的。我一般分成两部分,一部分是从初识态到流场稳定(200-300个t*)。第二阶段,统计过程,100-300个t*。t*=特征长度/特征速度。比如H/u*,摩擦速度可以用sqrt(压差阻力/横面积)得到。


  • 钝体建筑扰流的大涡模拟
    G gtian

    @coolhhh 我之前没有算过风压这类问题,还挺有兴趣的。我对这个u_h,也是非常疑惑。我用的u_h是柱体中心横截面上(u_h)_max。之所以有疑惑,是关于这个u_h的选择位置的,因为我们一般算cp用到是远场处的速度(我之前做过3900圆柱绕流,https://doi.org/10.1063/5.0012358)。事实上,柱体上方会有一个强剪切区,流动分离后会形成回流区。柱体侧边同理。因此,我很疑惑的是u_h 是如何定义的? 是 h高度处的最大速度吗?如果有流动分离,即使在初始边界上设置了u_h,那么这个u_h也会发生变化啊。反倒是都用,2/3高度处的流场数据(pmean-0)/ (0.5* u_0.667 ^2),我觉得更合理。因为不可压流p就是p/rho,可以看一下文件的量纲,所以就不需要在除密度了。


  • 钝体建筑扰流的大涡模拟
    G gtian

    @coolhhh 先回答一下,不可压下得到的p是p/rho。
    这个非常好确定,你看一下p文件的量纲就能确定。


  • 钝体建筑扰流的大涡模拟
    G gtian
    /*--------------------------------*- 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
    

  • 钝体建筑扰流的大涡模拟
    G gtian

    更新一下,跑了几天。

    1. 两个时间尺度,
      timestep \delta T , 控制Co < 2.
      总运行时长: 第一阶段250个大涡turnover time : 250 * (0.4(H) / 0.5 (friction velocity); 第二阶段100个大涡turnover time .

    2.Plot_Cpmean_compare.png

    1. mesh.png
    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
    

  • 钝体建筑扰流的大涡模拟
    G gtian

    @hitsc30 雷诺数大概是多少呢?这个实验有发过什么文章吗?压力系数只是迎风面上的吗?


  • 钝体建筑扰流的大涡模拟
    G gtian

    @hitsc30 在 钝体建筑扰流的大涡模拟 中说:

    当前是按照tamura教授的设置帮边界条件、离散格式、求解器、亚格子模型全换了。就是采用的网格和他们的有所区别(他们采用的snappyhexmesh),准备搞个和他们一样的网格试一试。实在不行就只能放弃了

    方便把建筑物的详细参数,以及对标的那篇实验分享一下吗?我跑一下看看。压力系数就是一个静压,如果这个都对不上,高阶统计量就能不可能了,那LES的作用就被完完全全浪费。 就算一个建筑物的话,这个已经属于10多年的范畴了,2006年就能跑DNS了。
    https://www.sciencedirect.com/science/article/pii/S0142727X06000476


  • 钝体建筑扰流的大涡模拟
    G 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;
                }
    

    ![公式](349ba7f5-68a8-4581-94cb-e665d7b9d7b3-image.png 1)
    ![公式2](9660629f-e67b-49c6-b99d-b4832451b5bb-image.png 2)
    ![替代文字](f2cc961e-d7cc-408e-af53-4fe7bb4cf229-image.png 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;
        }
    

  • 钝体建筑扰流的大涡模拟
    G gtian

    @hitsc30 如果你提到的边界层指的是wall周围的对数区以下的粘性子层和buffer layer的话。可以有两种方式,一种是wall model LES,通过壁面模型来调nut,这时第一层网格在y+=30 即可。另一种是wall resolved LES,这种情况只能加密网格。blockmesh和shm都可以加密网格,blockmesh可以控制aspect ratio来加密,shm是4等分加密。这种情况下如果要resolve到粘性子层(viscous sublayer),需要在y+<5 以内至少有三个点,也就是第一点y+<1.


  • 钝体建筑扰流的大涡模拟
    G gtian

    @hitsc30

    snappyHexMeshDict 中把snap 和 add 关掉,就会生成结构化的六面体网格,网格质量会号很多, 只需要有stl文件即可.

    // Which of the steps to run
    castellatedMesh true;
    snap            false;
    addLayers       false;
    geometry
    {
        flange11.stl
        {
            type triSurfaceMesh;
            name flange11;
        }
    

    stl文件如下:

     solid flange
      facet normal 0 0 -1
        outer loop
          vertex 0.170 0.000 0.230
          vertex 0.170 0.020 0.230
          vertex 0.190 0.020 0.230
        endloop
      endfacet
      facet normal 0 0 -1
        outer loop
          vertex 0.170 0.000 0.230
          vertex 0.190 0.020 0.230
          vertex 0.190 0.000 0.230
        endloop
      endfacet
    
      facet normal -1 0 0
        outer loop
          vertex 0.170 0.000 0.230
          vertex 0.170 0.000 0.210
          vertex 0.170 0.020 0.210
        endloop
      endfacet
      facet normal -1 0 0
        outer loop
          vertex 0.170 0.000 0.230
          vertex 0.170 0.020 0.210
          vertex 0.170 0.020 0.230
        endloop
      endfacet
      facet normal 0 -1 0
        outer loop
          vertex 0.170 0.000 0.230
          vertex 0.190 0.000 0.210
          vertex 0.190 0.000 0.230
        endloop
      endfacet
      facet normal 0 -1 0
        outer loop
          vertex 0.170 0.000 0.230
          vertex 0.190 0.000 0.210
          vertex 0.170 0.000 0.210
        endloop
      endfacet
     
      facet normal 0 0 1
        outer loop
          vertex 0.170 0.000 0.210
          vertex 0.190 0.000 0.210
          vertex 0.190 0.020 0.210
        endloop
      endfacet
      facet normal 0 0 1
        outer loop
          vertex 0.170 0.000 0.210
          vertex 0.190 0.020 0.210
          vertex 0.170 0.020 0.210
        endloop
      endfacet
      facet normal 1 0 0
        outer loop
          vertex 0.190 0.000 0.230
          vertex 0.190 0.020 0.230
          vertex 0.190 0.020 0.210
        endloop
      endfacet  
      facet normal 1 0 0
        outer loop
          vertex 0.190 0.000 0.230
          vertex 0.190 0.020 0.210
          vertex 0.190 0.000 0.210
        endloop
      endfacet
      facet normal 0 1 0
        outer loop
          vertex 0.170 0.020 0.230
          vertex 0.170 0.020 0.210
          vertex 0.190 0.020 0.210
        endloop
      endfacet
      facet normal 0 1 0
        outer loop
          vertex 0.170 0.020 0.230
          vertex 0.190 0.020 0.230
          vertex 0.190 0.020 0.210
        endloop
     endfacet 
     endsolid flange
    

  • 钝体建筑扰流的大涡模拟
    G gtian

    @hitsc30 什么类型的建筑物?
    https://link.springer.com/article/10.1007/s10546-020-00574-1
    这是我之前做的,openfoam + 小方块。有什么需要可以邮件联系。tiang@sustech.edu.cn

  • 登录

  • 登录或注册以进行搜索。
  • 第一个帖子
    最后一个帖子
0
  • 最新
  • 版块
  • 东岳流体
  • 随机看[请狂点我]