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. pointwise划分了地形网格计算域为3000*3000*1000 ,用openFoam中simpleFoam求解计算错误?

pointwise划分了地形网格计算域为3000*3000*1000 ,用openFoam中simpleFoam求解计算错误?

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

    我在这个问题这儿卡了2个月了,我用pointwise划分了一个复杂地型网格,计算域300030001000,最小网格长宽为30*30,第一层网格高度为50cm,我计算的时候出现如下现象,到最后一行,算例自动停止。
    我最初的想法是将of自带的一个例子里的网格替换成用pointwise生成的网格,进行计算,不知道出了什么问题,希望能得到各位老师的帮助,谢谢!

    /*---------------------------------------------------------------------------*\
      =========                 |
      \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
       \\    /   O peration     | Website:  https://openfoam.org
        \\  /    A nd           | Version:  6
         \\/     M anipulation  |
    \*---------------------------------------------------------------------------*/
    Build  : 6-e29811f5dff8
    Exec   : simpleFoam
    Date   : Jun 07 2019
    Time   : 18:39:08
    Host   : "DESKTOP-K2TDLI2"
    PID    : 434
    I/O    : uncollated
    Case   : /home/dyb/turbineSiting
    nProcs : 1
    sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
    fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 10)
    allowSystemOperations : Allowing user-supplied system call operations
    
    // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
    Create time
    
    Create mesh for time = 0
    
    
    SIMPLE: Convergence criteria found
            p: tolerance 0.001
            U: tolerance 0.0001
            "(k|epsilon)": tolerance 0.0001
    
    Reading field p
    
    Reading field U
    
    Reading/calculating face flux field phi
    
    Selecting incompressible transport model Newtonian
    Selecting turbulence model type RAS
    Selecting RAS turbulence model kEpsilon
    kEpsilonCoeffs
    {
        Cmu             0.09;
        C1              1.44;
        C2              1.92;
        sigmaEps        1.11;
        C3              0;
        sigmak          1;
    }
    
    No MRF models present
    
    No finite volume options present
    
    Starting time loop
    
    Time = 0.5
    
    smoothSolver:  Solving for Ux, Initial residual = 1, Final residual = 0.130925946068, No Iterations 1000
    smoothSolver:  Solving for Uy, Initial residual = 1, Final residual = 0.305787562946, No Iterations 1000
    smoothSolver:  Solving for Uz, Initial residual = 1, Final residual = 1.18059515052, No Iterations 1000
    

    如下是我的一些设置
    fvSolution

    /*--------------------------------*- C++ -*----------------------------------*\
      =========                 |
      \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
       \\    /   O peration     | Website:  https://openfoam.org
        \\  /    A nd           | Version:  6
         \\/     M anipulation  |
    \*---------------------------------------------------------------------------*/
    FoamFile
    {
        version     2.0;
        format      ascii;
        class       dictionary;
        object      fvSolution;
    }
    // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
    
    solvers
    {
        p
        {
            solver           GAMG;
            tolerance        1e-7;
            relTol           0.1;
            smoother         GaussSeidel;
        }
    
        U
        {
            solver           smoothSolver;
            smoother         GaussSeidel;
            tolerance        1e-8;
            relTol           0.1;
            nSweeps          1;
        }
    
        k
        {
            solver           smoothSolver;
            smoother         GaussSeidel;
            tolerance        1e-8;
            relTol           0.1;
            nSweeps          1;
        }
    
        epsilon
        {
            solver           smoothSolver;
            smoother         GaussSeidel;
            tolerance        1e-8;
            relTol           0.1;
            nSweeps          1;
        }
    }
    
    SIMPLE
    {
        nNonOrthogonalCorrectors 0;
    
        residualControl
        {
            p               1e-3;
            U               1e-4;
            "(k|epsilon)"   1e-4;
        }
    }
    
    relaxationFactors
    {
        fields
        {
            p               0.3;
        }
        equations
        {
            U               0.7;
            k               0.7;
            epsilon         0.7;
        }
    }
    
    cache
    {
        grad(U);
    }
    
    // ************************************************************************* //
    
    

    fvSchemes

    /*--------------------------------*- C++ -*----------------------------------*\
      =========                 |
      \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
       \\    /   O peration     | Website:  https://openfoam.org
        \\  /    A nd           | Version:  6
         \\/     M anipulation  |
    \*---------------------------------------------------------------------------*/
    FoamFile
    {
        version     2.0;
        format      ascii;
        class       dictionary;
        object      fvSchemes;
    }
    // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
    
    ddtSchemes
    {
        default             steadyState;
    }
    
    gradSchemes
    {
        default             Gauss linear;
    }
    
    divSchemes
    {
        default             none;
    
        div(phi,U)          bounded Gauss upwind;
        div(phi,epsilon)    bounded Gauss upwind;
        div(phi,k)          bounded Gauss upwind;
    
        div((nuEff*dev2(T(grad(U)))))    Gauss linear;
    }
    
    laplacianSchemes
    {
        default             Gauss linear limited corrected 0.33;
    }
    
    interpolationSchemes
    {
        default             linear;
    }
    
    snGradSchemes
    {
        default             limited corrected 0.33;
    }
    
    
    // ************************************************************************* //
    
    

    controlDict

    /*--------------------------------*- C++ -*----------------------------------*\
      =========                 |
      \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
       \\    /   O peration     | Website:  https://openfoam.org
        \\  /    A nd           | Version:  6
         \\/     M anipulation  |
    \*---------------------------------------------------------------------------*/
    FoamFile
    {
        version     2.0;
        format      ascii;
        class       dictionary;
        object      controlDict;
    }
    // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
    
    application     simpleFoam;
    
    startFrom       latestTime;
    
    startTime       0;
    
    stopAt          endTime;
    
    endTime         1000;
    
    deltaT          0.5;
    
    writeControl    timeStep;
    
    writeInterval   50;
    
    purgeWrite      0;
    
    writeFormat     binary;
    
    writePrecision  12;
    
    writeCompression off;
    
    timeFormat      general;
    
    timePrecision   6;
    
    runTimeModifiable yes;
    
    libs ("libatmosphericModels.so");
    
    // ************************************************************************* //
    
    
    1 条回复 最后回复
  • 李东岳李 在线
    李东岳李 在线
    李东岳 管理员
    写于 最后由 李东岳 编辑
    #2

    \

    看起来像是边界条件设置有问题

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

    1 条回复 最后回复
  • dybD 离线
    dybD 离线
    dyb
    写于 最后由 李东岳 编辑
    #3

    李老师,我把我的边界条件发过来,您帮忙看一下。大概是压力项可能出错了

    epsilon

    /*--------------------------------*- C++ -*----------------------------------*\
      =========                 |
      \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
       \\    /   O peration     | Website:  https://openfoam.org
        \\  /    A nd           | Version:  6
         \\/     M anipulation  |
    \*---------------------------------------------------------------------------*/
    FoamFile
    {
        version     2.0;
        format      ascii;
        class       volScalarField;
        location    "0";
        object      epsilon;
    }
    // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
    
    dimensions      [0 2 -3 0 0 0 0];
    
    #include        "include/initialConditions"
    
    internalField   uniform $turbulentEpsilon;
    
    boundaryField
    {
        terrain
        {
            type            epsilonWallFunction;
            Cmu             0.09;
            kappa           0.4;
            E               9.8;
            value           $internalField;
        }
    
        outlet
        {
            type            inletOutlet;
            inletValue      uniform $turbulentEpsilon;
            value           $internalField;
        }
    
        inlet
        {
            type            atmBoundaryLayerInletEpsilon;
            #include        "include/ABLConditions"
        }
    
        ground
        {
            type            zeroGradient;
        }
    
        top
        {
            type            slip;
        }
        sides   
        {
            type            slip;
        }
    }
    
    
    // ************************************************************************* //
    

    k

    /*--------------------------------*- C++ -*----------------------------------*\
      =========                 |
      \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
       \\    /   O peration     | Website:  https://openfoam.org
        \\  /    A nd           | Version:  6
         \\/     M anipulation  |
    \*---------------------------------------------------------------------------*/
    FoamFile
    {
        version     2.0;
        format      ascii;
        class       volScalarField;
        object      k;
    }
    // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
    
    #include        "include/initialConditions"
    
    dimensions      [0 2 -2 0 0 0 0];
    
    internalField   uniform $turbulentKE;
    
    boundaryField
    {
        outlet
        {
            type            inletOutlet;
            inletValue      uniform $turbulentKE;
            value           $internalField;
        }
    
        inlet
        {
            type            atmBoundaryLayerInletK;
            #include        "include/ABLConditions"
        }
    
        terrain
        {
            type            kqRWallFunction;
            value           uniform 0.0;
        }
    
        ground
        {
            type            zeroGradient;
        }
    
        top
        {
            type            slip;
        }
        sides   
        {
            type            slip;
        }
    }
    
    
    // ************************************************************************* //
    nut
    /*--------------------------------*- C++ -*----------------------------------*\
      =========                 |
      \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
       \\    /   O peration     | Website:  https://openfoam.org
        \\  /    A nd           | Version:  6
         \\/     M anipulation  |
    \*---------------------------------------------------------------------------*/
    FoamFile
    {
        version     2.0;
        format      ascii;
        class       volScalarField;
        location    "0";
        object      nut;
    }
    // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
    
    dimensions      [0 2 -1 0 0 0 0];
    
    internalField   uniform 0;
    
    boundaryField
    {
        #include "include/ABLConditions"
    
        inlet
        {
            type            calculated;
            value           uniform 0;
        }
    
        outlet
        {
            type            calculated;
            value           uniform 0;
        }
    
        terrain
        {
            type            nutkAtmRoughWallFunction;
            z0              $z0;
            value           uniform 0.0;
        }
    
        ground
        {
            type            calculated;
            value           uniform 0;
        }
    
        top
        {
            type            slip;
        }
        sides   
        {
            type            slip;
        }
    }
    
    
    // ************************************************************************* //
    

    P

    /*--------------------------------*- C++ -*----------------------------------*\
      =========                 |
      \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
       \\    /   O peration     | Website:  https://openfoam.org
        \\  /    A nd           | Version:  6
         \\/     M anipulation  |
    \*---------------------------------------------------------------------------*/
    FoamFile
    {
        version     2.0;
        format      ascii;
        class       volScalarField;
        object      p;
    }
    // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
    
    #include        "include/initialConditions"
    
    dimensions      [0 2 -2 0 0 0 0];
    
    internalField   uniform $pressure;
    
    boundaryField
    {
        inlet
        {
            type            zeroGradient;
        }
    
        outlet
        {
            type            uniformFixedValue;
            uniformValue    $internalField;
        }
    
        terrain
        {
            type            zeroGradient;
        }
    
        ground
        {
            type            zeroGradient;
        }
        top
        {
            type            slip;
        }
        sides   
        {
            type            slip;
        }
        
    }
    
    // ************************************************************************* //
    
    

    u

    /*--------------------------------*- C++ -*----------------------------------*\
      =========                 |
      \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
       \\    /   O peration     | Website:  https://openfoam.org
        \\  /    A nd           | Version:  6
         \\/     M anipulation  |
    \*---------------------------------------------------------------------------*/
    FoamFile
    {
        version     2.0;
        format      ascii;
        class       volVectorField;
        location    "0";
        object      U;
    }
    // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
    
    #include        "include/initialConditions"
    
    dimensions      [0 1 -1 0 0 0 0];
    
    internalField   uniform $flowVelocity;
    
    boundaryField
    {
        outlet
        {
            type            inletOutlet;
            inletValue      uniform (0 0 0);
            value           $internalField;
        }
    
        inlet
        {
            type            atmBoundaryLayerInletVelocity;
            #include        "include/ABLConditions"
        }
    
        terrain
        {
            type            uniformFixedValue;
            uniformValue    (0 0 0);
            value           uniform (0 0 0);
        }
    
        ground
        {
            type            uniformFixedValue;
            value           uniform (0 0 0);
            uniformValue    constant (0 0 0);
        }
    
        top
        {
            type            slip;
        }
        sides   
        {
            type            slip;
        }
    }
    
    
    // ************************************************************************* //
    
    

    说明文件ABL

      =========                 |
      \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
       \\    /   O peration     | Website:  https://openfoam.org
        \\  /    A nd           | Version:  6
         \\/     M anipulation  |
    \*---------------------------------------------------------------------------*/
    
    Uref                 10.0;
    Zref                 20;
    zDir                 (0 0 1);
    flowDir              (1 0 0);
    z0                   uniform 0.1;
    zGround              uniform 0;
    
    // ************************************************************************* //
    
    
    

    initialConditions

    /*--------------------------------*- C++ -*----------------------------------*\
      =========                 |
      \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
       \\    /   O peration     | Website:  https://openfoam.org
        \\  /    A nd           | Version:  6
         \\/     M anipulation  |
    \*---------------------------------------------------------------------------*/
    
    flowVelocity         (0 0 0);
    pressure             0;
    turbulentKE          1.3;
    turbulentEpsilon     0.01;
    
    // ************************************************************************* //
    
    

    fixedInlet

    inlet
    {
        type  fixedValue;
        value $internalField;
    }
    
    1 条回复 最后回复
  • dybD 离线
    dybD 离线
    dyb
    写于 最后由 编辑
    #4

    解决了,不同尺度的网格对应压力求解方法的平滑smoother有问题,初始条件也没有错,

    1 条回复 最后回复
  • W 离线
    W 离线
    wsy11
    写于 最后由 编辑
    #5

    @dyb 在 pointwise划分了地形网格计算域为3000*3000*1000 ,用openFoam中simpleFoam求解计算错误? 中说:
    大佬您好,
    我最近也在学习复杂地形上风场的模拟,使用的也是turbinesiting这个算例,请问这个算例有没有比较好的教程?
    目前还是小白,总是会报错

    dybD 1 条回复 最后回复
  • dybD 离线
    dybD 离线
    dyb
    在 中回复了 wsy11 最后由 李东岳 编辑
    #6

    @wsy11 你好,我最初用的方法比较笨,你可以之直接用pointwise绘制计算域,把边界层加大一些,我最初近地1m高,这个我没有制作教程,一般你只需要改fvSolution,我的主要是这样的,再就是时间步长要小

    code_textsolvers
    {
        p
        {
            solver           GAMG;
            tolerance        1e-8;
            relTol           0.01;
            smoother         DIC;
        }
    
        pFinal
        {
            $p;
            smoother        DIC;
            tolerance       1e-06;
            relTol          0;
        }
    
        "(U|k|nuTilda)"
        {
            solver          smoothSolver;
            smoother        DILU;
            tolerance       1e-05;
            relTol          0.1;
        }
    
        "(U|k|nuTilda)Final"
        {
            $U;
            tolerance       1e-05;
            relTol          0;
        }
    }
    
    PIMPLE
    {
        nOuterCorrectors 1;
        nCorrectors     2;
        nNonOrthogonalCorrectors 0;
        pRefCell        1001;
        pRefValue       0;
    }
    
    
    W 2 条回复 最后回复
  • W 离线
    W 离线
    wsy11
    在 中回复了 dyb 最后由 编辑
    #7

    @dyb 好的好的,谢谢大佬。
    我目前的网格划分还比较简单,是用GlobalMapper裁剪ASTER GDEM地形高程数据,然后用snappyHexMesh工具自动划分网格的,还没学过pointwise,等我尝试一下您的方法再来请教。

    1 条回复 最后回复
  • W 离线
    W 离线
    wsy11
    在 中回复了 dyb 最后由 编辑
    #8

    @dyb 在 pointwise划分了地形网格计算域为3000*3000*1000 ,用openFoam中simpleFoam求解计算错误? 中说:

    pointwise绘制计算域,把边界层加大一些

    大佬您好,我想再请教一个问题
    turbinesiting算例中的地形的stl文件是怎么生成的?我用自己的stl文件(用GlobalMapper裁剪ASTER GDEM地形高程数据)时,会存在两个底面,terrian面和ground面都会存在。

    B 1 条回复 最后回复
  • B 离线
    B 离线
    Banbor
    在 中回复了 wsy11 最后由 编辑
    #9

    @wsy11 那就是你的blockmesh 设置 把底面 ground 在设置低一些

    1 条回复 最后回复

  • 登录

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