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
8 帖子 4 发布者 5.8k 浏览
  • 从旧到新
  • 从新到旧
  • 最多赞同
回复
  • 在新帖中回复
登录后回复
此主题已被删除。只有拥有主题管理权限的用户可以查看。
  • 热 离线
    热 离线
    热爱CFD的卡卡
    写于 最后由 编辑
    #1

    在网上找了一个学习open foam的算例学习文件,完全按照算例画网格和编写边界条件,最终结果与算例结果有很大的不同,对照例子找了半天没找到原因,希望各位大佬能帮忙看一下,感谢!

    自己的曲线结果
    !!自己结果.jpg
    例子的曲线
    例子曲线.jpg
    教程图
    34cfe050-4cc6-46aa-b128-f20a9eaad9aa-image.png
    61481554-507d-46df-bcda-8f5f9ca63ed0-image.png
    我的程序文件

    /*--------------------------------*- C++ -*----------------------------------*\
    | =========                 |                                                 |
    | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
    |  \\    /   O peration     | Version:  5                                     |
    |   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
    |    \\/     M anipulation  |                                                 |
    \*---------------------------------------------------------------------------*/
    FoamFile
    {
        version     2.0;
        format      ascii;
        class       dictionary;
        location    "constant";
        object      turbulenceProperties;
    }
    // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
    
    simulationType laminar;
    
    /*RAS
    {
        // Tested with kEpsilon, realizableKE, kOmega, kOmegaSST, v2f,
        // ShihQuadraticKE, LienCubicKE.
        RASModel        kEpsilon;
    
        turbulence      on;
    
        printCoeffs     on;
    }*/
    
    
    // ************************************************************************* //
    
    
    /*--------------------------------*- C++ -*----------------------------------*\
    | =========                 |                                                 |
    | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
    |  \\    /   O peration     | Version:  5                                     |
    |   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
    |    \\/     M anipulation  |                                                 |
    \*---------------------------------------------------------------------------*/
    FoamFile
    {
        version     2.0;
        format      ascii;
        class       dictionary;
        location    "constant";
        object      turbulenceProperties;
    }
    // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
    
    simulationType laminar;
    
    // ************************************************************************* //
    
    
    /*--------------------------------*- C++ -*----------------------------------*\
    | =========                 |                                                 |
    | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
    |  \\    /   O peration     | Version:  5                                     |
    |   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
    |    \\/     M anipulation  |                                                 |
    \*---------------------------------------------------------------------------*/
    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           uniform (1 0 0);
        }
    
        outlet
        {
            type            zeroGradient;
        }
    
        top
        {
            type            symmetryPlane;
        }
    
        bottom
        {
            type           fixedValue;
            value          uniform (0 0 0);
        }
    
        frontAndBack
        {
            type            empty;
        }
    }
    
    // ************************************************************************* //
    
    /*--------------------------------*- C++ -*----------------------------------*\
    | =========                 |                                                 |
    | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
    |  \\    /   O peration     | Version:  5                                     |
    |   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
    |    \\/     M anipulation  |                                                 |
    \*---------------------------------------------------------------------------*/
    FoamFile
    {
        version     2.0;
        format      ascii;
        class       volScalarField;
        object      p;
    }
    // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
    
    dimensions      [0 2 -2 0 0 0 0];
    
    internalField   uniform 0;
    
    boundaryField
    {
        inlet
        {
            type            zeroGradient;
        }
    
        outlet
        {
            type            fixedValue;
            value           uniform 0;
        }
    
        top
        {
            type            symmetryPlane;
        }
    
        bottom
        {
            type            zeroGradient;
        }
    
    /*--------------------------------*- C++ -*----------------------------------*\
    | =========                 |                                                 |
    | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
    |  \\    /   O peration     | Version:  5                                     |
    |   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
    |    \\/     M anipulation  |                                                 |
    \*---------------------------------------------------------------------------*/
    FoamFile
    {
        version     2.0;
        format      ascii;
        class       dictionary;
        location    "system";
        object      fvSolution;
    }
    // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
    
    solvers
    {
        p
        {
            solver          GAMG;
            tolerance       1e-06;
            relTol          0.1;
            smoother        GaussSeidel;
        }
    
        U
        {
            solver          smoothSolver;
            smoother        symGaussSeidel;
            tolerance       1e-05;
            relTol          0.1;
        }
    }
    
    SIMPLE
    {
        nNonOrthogonalCorrectors 0;
        consistent      yes;
    
        residualControl
        {
            p               1e-5;
            U               1e-5;
        }
    }
    
    relaxationFactors
    {
        equations
        {
            U               0.9; // 0.9 is more stable but 0.95 more convergent
            ".*"            0.9; // 0.9 is more stable but 0.95 more convergent
        }
    }
    
    
    // ************************************************************************* //
    
    1 条回复 最后回复
  • S 离线
    S 离线
    shepherd
    写于 最后由 编辑
    #2

    关注一下,也等一个回复:xiezuoye:

    1 条回复 最后回复
  • 热 离线
    热 离线
    热爱CFD的卡卡
    写于 最后由 编辑
    #3

    例子用的openfoam3.0,我用的5.0,应该和版本没有问题吧
    我自己看曲线的感觉是考虑粘滞力的设置问题,但是不知道在程序中哪一块出了问题,

    1 条回复 最后回复
  • V 离线
    V 离线
    veen
    写于 最后由 编辑
    #4

    今天刚好跑了一个,可以试试这个:Hagen_Poiseuille_flow.zip
    你的案例中
    fvSolution 的U final和p final没有定义
    p文件中frontAndBack粘漏了?

    热 1 条回复 最后回复
  • 热 离线
    热 离线
    热爱CFD的卡卡
    在 中回复了 veen 最后由 编辑
    #5

    @veen 是的,p文件中frontAndBack粘漏了,现在就下载例子,试一试,感谢

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

    把你的粘度调高试试

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

    热 1 条回复 最后回复
  • 热 离线
    热 离线
    热爱CFD的卡卡
    写于 最后由 编辑
    #7

    找到错误了,网格尺度与例子不符,因为例子设置的流体粘度偏低,所以只有在毫米尺度的网格观察才会是抛物线,而我的网格是0.1m的,所以看上去就像是一条陡峭的直线。
    图中就是网格尺度,我错误写成0.1了。
    85960c09-b854-48b0-822e-e38bf1af5154-image.png

    1 条回复 最后回复
  • 热 离线
    热 离线
    热爱CFD的卡卡
    在 中回复了 李东岳 最后由 编辑
    #8

    @东岳 是的,粘度调高也可以出现抛物线,感谢 感谢。我把网格尺度变小了,也能观察到。

    1 条回复 最后回复

  • 登录

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