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中文网

  1. CFD中文网
  2. OpenFOAM
  3. openfoam动网格加密后 计算很慢

openfoam动网格加密后 计算很慢

已定时 已固定 已锁定 已移动 OpenFOAM
5 帖子 2 发布者 1.4k 浏览
  • 从旧到新
  • 从新到旧
  • 最多赞同
回复
  • 在新帖中回复
登录后回复
此主题已被删除。只有拥有主题管理权限的用户可以查看。
  • E 离线
    E 离线
    Emrys
    写于 最后由 Emrys 编辑
    #1

    各位老师好,我在计算三维多相流流动时采用界面局部加密的动网格,发现时间步长特别小,界面局部加密后的网格67w时间步长1e-7 1e-8左右;
    而在全场加密1000w网格情况下计算是正常的时间步长1e-5;
    请问是局部加密非结构化网格的原因导致步长很小? 四面是周期性边界条件,因此采用了cyclicAMI的边界。
    27a2a7a0-e252-42a9-a7dc-41adeccd9e4c-image.png

    /*--------------------------------*- C++ -*----------------------------------*\
      =========                 |
      \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
       \\    /   O peration     | Website:  https://openfoam.org
        \\  /    A nd           | Version:  8
         \\/     M anipulation  |
    \*---------------------------------------------------------------------------*/
    FoamFile
    {
        version     2.0;
        format      ascii;
        class       dictionary;
        location    "constant";
        object      dynamicMeshDict;
    }
    // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
    
    dynamicFvMesh   dynamicRefineFvMesh;
    
    // How often to refine
    refineInterval  1;
    
    // Field to be refinement on
    field           alpha.water;
    
    // Refine field in between lower..upper
    lowerRefineLevel 0.001;
    upperRefineLevel 0.999;
    
    // If value < unrefineLevel unrefine
    unrefineLevel   10;
    
    // Have slower than 2:1 refinement
    nBufferLayers   1;
    
    // Refine cells only up to maxRefinement levels
    maxRefinement   2;
    
    // Stop refinement if maxCells reached
    maxCells        20000000;
    
    // Flux field and corresponding velocity field. Fluxes on changed
    // faces get recalculated by interpolating the velocity. Use 'none'
    // on surfaceScalarFields that do not need to be reinterpolated.
    correctFluxes
    (
        (phi none)
        (nHatf none)
        (rhoPhi none)
        (alphaPhi0.water none)
        (ghf none)
    );
    
    // Write the refinement level as a volScalarField
    dumpLevel       true;
    
    
    // ************************************************************************* //
    
    /*--------------------------------*- C++ -*----------------------------------*\
    | =========                 |                                                 |
    | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
    |  \\    /   O peration     | Version:  2212                                     |
    |   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
    |    \\/     M anipulation  |                                                 |
    \*---------------------------------------------------------------------------*/
    FoamFile
    {
        version     2.0;
        format      ascii;
        class       dictionary;
        object      blockMeshDict;
    }
    // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
    
    convertToMeters 1;
    
    
    hN  1.01e-4;
    
    L   #calc "100*$hN";
    D   #calc "1.0*$hN";
    H   #calc "3.0*$hN";
    z   #calc "M_PI*$L";
    
    nX  100; 
    nY  50;
    nZ  100;
    
    vertices
    (
        (0  0  0) //0 
        ($L 0  0) //1
        ($L $H 0) //2
        (0  $H 0) //3
    
        (0  0  $z) //4
        ($L 0  $z) //5
        ($L $H $z) //6
        (0  $H $z) //7
    );
    
    blocks
    (
        hex (0 1 2 3 4 5 6 7) ($nX $nY $nZ) simpleGrading (1 1 1)
    );
    
    edges
    (
    );
    
    
    boundary
    (
        movingWall
        {
            type wall;
            faces
            (
                (0 1 5 4)
            );
        }
        inlet
        {
            type                  cyclicAMI;
            neighbourPatch        outlet;
            transform       translational;
            separationVector ($L 0 0);
            faces
            (
                (0 4 7 3)
            );
        }
        outlet
        {
            type                  cyclicAMI;
            neighbourPatch        inlet;
            transform       translational;
            separationVector (-$L 0 0);
            faces
            (
                (1 5 6 2)
            );
        }
          atmosphere
        {
            type patch;
            faces
            (
                (3 2 6 7)
            );
        }
        front
        {
            type cyclicAMI;
            neighbourPatch        back;
            transform       translational;
            separationVector (0 0 $z);
            faces
            (
                (0 1 2 3)
            );
        }
        back
        {
            type cyclicAMI;
            neighbourPatch        front;
            transform       translational;
            separationVector (0 0 -$z);
            faces
            (
                (4 5 6 7)
            );
        }
    );
    
    mergePatchPairs
    (
    );
    
    // ************************************************************************* //
    
    1 条回复 最后回复
  • E 离线
    E 离线
    Emrys
    写于 最后由 编辑
    #2

    网格是需要接近1:1:1加密吗?整个区域尺寸的比例约为1:300:100

    1 条回复 最后回复
  • 李东岳李 在线
    李东岳李 在线
    李东岳 管理员
    写于 最后由 编辑
    #3

    加密之后时间步长变小是必然的。网格变小,为了保证库朗数小,只能减小时间步长

    http://dyfluid.com/index.html
    需要帮助debug算例的看这个 https://cfd-china.com/topic/8018

    E 1 条回复 最后回复
  • E 离线
    E 离线
    Emrys
    在 中回复了 李东岳 最后由 编辑
    #4

    @李东岳 谢谢李老师回复,可是全场加密下1000w网格跑的比局部加密67w网格快是不是不太合理:135:

    1 条回复 最后回复
  • 李东岳李 在线
    李东岳李 在线
    李东岳 管理员
    写于 最后由 编辑
    #5

    那是不太合理,可能你67万的要发散了

    http://dyfluid.com/index.html
    需要帮助debug算例的看这个 https://cfd-china.com/topic/8018

    1 条回复 最后回复

  • 登录

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