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

    本文在使用compressibleInterIsoFoam进行过膨胀喷管的水下射流计算。开始计算较为稳定无异常情况发生。但是在换个电脑(从另一个电脑copy算例到其他电脑上)进行计算的时候出现了不正常的现象。在射流出口出现了不正常的局部高压,导致计算不稳定,报错内容是计算出现负温度。
    这是报错内容
    f0a69df5d2f3c3d876782c92597e161.png
    这是出现局部高压过程的压力云图。
    ac0f8dbefdfcd3cfab2b3b50083103e.png
    6da789e0e19b09313f9c86d0b18916d.png
    1ba8596f031bff975d8310433d5f705.png
    时间分别是21.2ms,21.25ms,21.3ms
    该算例的fvScheme文件和fvSolution文件如下。

    /*--------------------------------*- C++ -*----------------------------------*\
    | =========                 |                                                 |
    | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
    |  \\    /   O peration     | Version:  v2212                                 |
    |   \\  /    A nd           | Website:  www.openfoam.com                      |
    |    \\/     M anipulation  |                                                 |
    \*---------------------------------------------------------------------------*/
    FoamFile
    {
        version     2.0;
        format      ascii;
        class       dictionary;
        object      fvSchemes;
    }
    // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
    
    ddtSchemes
    {
        default         Euler;
    }
    
    gradSchemes
    {
        default         Gauss linear;
    limited         cellLimited Gauss linear 1;
        grad(U)         $limited;
        grad(k)         $limited;
        grad(omega)     $limited;
    }
    
    divSchemes
    {
        div(phi,alpha)  Gauss vanLeer;
        div(phirb,alpha) Gauss upwind;
      div(phi,thermo:rho.water) Gauss upwind;
        div(phi,thermo:rho.air) Gauss upwind;
    div(Phirb,alpha)  Gauss interfaceCompression;
        div(rhoPhi,U)  Gauss limitedLinearV 1;
        div(rhoPhi,T)  Gauss upwind;
        div(rhoPhi,K)  Gauss upwind;
    
        div(phi,p)      Gauss upwind;
        div(phi,k)      Gauss upwind;
    
        div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear;
    default         Gauss upwind;
    
        div(phi,U)      Gauss linearUpwind limited;
    
        energy          Gauss linearUpwind limited;
        div(phi,e)      $energy;
        div(phi,K)      $energy;
        div(phi,Ekp)    $energy;
    
        turbulence      Gauss linearUpwind limited;
        div(phi,k)      $turbulence;
        div(phi,omega)  $turbulence;
        div(rhoPhi,omega)  $turbulence;
    div(rhoPhi,k)  $turbulence;
    
    
        div(phiv,p)     Gauss upwind;
        div((phi|interpolate(rho)),p) Gauss upwind;
    
    
    
    
    
    }
    
    laplacianSchemes
    {
        default         Gauss linear corrected;
    }
    
    interpolationSchemes
    {
        default         linear;
    }
    
    snGradSchemes
    {
        default         corrected;
    }
    
    wallDist
    {
        method          meshWave;
    }
    
    
    // ************************************************************************* //
    
    

    这是fvSolution文件

    /*--------------------------------*- C++ -*----------------------------------*\
    | =========                 |                                                 |
    | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
    |  \\    /   O peration     | Version:  v2212                                 |
    |   \\  /    A nd           | Website:  www.openfoam.com                      |
    |    \\/     M anipulation  |                                                 |
    \*---------------------------------------------------------------------------*/
    FoamFile
    {
        version     2.0;
        format      ascii;
        class       dictionary;
        object      fvSolution;
    }
    // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
    
    solvers
    {
        "alpha.water.*"
        {
             nAlphaCorr      1;
            nAlphaSubCycles 5;
            cAlpha          1;
     
            reconstructionScheme isoAlpha;
    
            
            
            vof2IsoTol 1e-8;
            surfCellTol 1e-8;
            nAlphaBounds    3;
            snapTol         1e-12;
            clip            true;
            minIter         1;
            
                        
        }
    
        "pcorr.*"
        {
            solver          GAMG;
            preconditioner
            {
                preconditioner  GAMG;
                tolerance       1e-12;
                relTol          0.00001;
            nSweeps         4;
                smoother        DICGaussSeidel;
            }
            tolerance       1e-12;
            relTol          0.00001;
            nSweeps         2;
            maxIter         100;
            smoother        GaussSeidel;
            minIter         1;
        }
    
        ".*(rho|rhoFinal)"
        {
            solver          diagonal;
            minIter         1;
        }
    
        p_rgh
        {
            solver          GAMG;
            tolerance       1e-14;
            relTol          0.00000001;
            nSweeps         4;
            smoother        GaussSeidel;
            minIter         2;
        }
    
        p_rghFinal
        {
            solver          GAMG;
            preconditioner
            {
                preconditioner  GAMG;
                tolerance       1e-14;
                relTol          0.0000001;
                nSweeps         4;
                nVcycles        2;
                smoother        DICGaussSeidel;
                nPreSweeps      2;
            }
            tolerance       1e-14;
            relTol          0.0000001;
            nSweeps         3;
            smoother        GaussSeidel;
            maxIter         100;
            minIter         2;
        }
    
        U
        {
            solver          smoothSolver;
            smoother        GaussSeidel;
            tolerance       1e-10;
            relTol          0.00001;
            nSweeps         2;
            minIter         1;
        }
    
    UFinal
        {
            solver          smoothSolver;
            smoother        GaussSeidel;
            tolerance       1e-10;
            relTol          0.00001;
            nSweeps         2;
            minIter         1;
        }
        
        
        "(T|k|B|nuTilda).*"
        {
            solver          smoothSolver;
            smoother        symGaussSeidel;
            tolerance       1e-12;
            relTol          0.00001;
            nsweeps         2;
            limit           10.0;
            maxIter         100;
            minIter         1;
        }
    
    
    
    
    p
        {
            solver          GAMG;
            smoother        GaussSeidel;
            tolerance       1e-10;
            relTol          0.0000001;
            nsweeps         2;
          
            minIter         1;
        }
        
        
    "(U|e).*"
        {
            $p;
            tolerance       1e-9;
        }
    
        "(k|epsilon).*"
        {
            $p;
            tolerance       1e-10;
        }
    
        pFinal
        {
            $p;
            
            relTol          0.000001;
            nSweeps         2;
            minIter         1;
        }
    
        "(rho|U|k|omega|e)"
        {
            solver          PBiCGStab;
            preconditioner  DILU;
            tolerance       1e-10;
            relTol          0.001;
            nSweeps         2;
            minIter         1;
        }
    
        "(rho|U|k|omega|e)Final"
        {
            $U;
            relTol          0.00001;
            nSweeps         2;
            minIter         1;
        }
    
    
    
    
    
    }
    
    
    SIMPLE
    {
        residualControl
        {
            p               1e-8;
            U               1e-8;
            "(k|omega|e)"   1e-8;
        }
    
        nNonOrthogonalCorrectors 1;
        pMinFactor      0.3;
        pMaxFactor      1;
    }
    
    
    
    
    
    
    PIMPLE
    {
          momentumPredictor yes;
        transonic       yes;
    
        nOuterCorrectors 10;
        nCorrectors     6;
        nNonOrthogonalCorrectors 5;
    nAlphaCorr 1;
        nAlphaSubCycles 3;
        CAlpha 1;
     pMin      10000;
        pMax      1000000;
    
    }
    relaxationFactors
    {
        equations
        {
            ".*"     0.1;
        }
    }
    
    
    
    // ************************************************************************* //
    
    
    1 条回复 最后回复
  • 李东岳李 在线
    李东岳李 在线
    李东岳 管理员
    写于 最后由 编辑
    #2

    这个可压缩算例的负温负压不太好处理,没有一个方法说只要改一个东西就能解决的。openfoam有一些limitTemp,limitP的作用也有限。大概率只能你自己去调试。不过你瞬态为什么加松弛?然而反过来如果你不加松弛可能会更早就发散了。

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

    H 1 条回复 最后回复
  • H 离线
    H 离线
    HIT_lly
    在 中回复了 李东岳 最后由 编辑
    #3

    @李东岳 谢谢东岳老师的回复,我再重新调试调试

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

    您好,发散问题您解决了吗,我也遇到了这个问题,这个求解器一直发散

    H 1 条回复 最后回复
  • H 离线
    H 离线
    HIT_lly
    在 中回复了 15735420621 最后由 编辑
    #5

    @15735420621 没有调试成功,我换了入口的边界调节入口由之前的零梯度换成了固定值,这样好像会好一点,但是也不知道会在什么时候发散,感觉很神奇。

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

    非涉密算例可以上传上来我可以调一下。但是网格要小。

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

    H 1 条回复 最后回复
  • H 离线
    H 离线
    HIT_lly
    在 中回复了 李东岳 最后由 编辑
    #7

    非常感谢东岳老师的回复,这个算例可能有点大,现在换成固定值入口条件了,到现在还没挂,还正在计算,还算稳定没有出现局部异常情况。

    1 条回复 最后回复
  • 1 离线
    1 离线
    15735420621
    在 中回复了 HIT_lly 最后由 编辑
    #8

    @HIT_lly 是将温度改为固定值了吗,还是入口的其他条件呢

    H 1 条回复 最后回复
  • H 离线
    H 离线
    HIT_lly
    在 中回复了 15735420621 最后由 编辑
    #9

    @15735420621 把入口温度条件改成固定温度了,如果用zerogradien的话会在入口边界上产生巨大的温度梯度,导致算例崩溃,但是改成固定值后会稍微好点,但是也会产生负温度,但是将库郎数调整到0.75以下就可以算过去。

    1 1 条回复 最后回复
  • 1 离线
    1 离线
    15735420621
    在 中回复了 HIT_lly 最后由 编辑
    #10

    @HIT_lly 好的,谢谢!我试试

    1 条回复 最后回复

  • 登录

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