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. 用rhoPimpleFoam计算T型管冷热流混合,计算几步就停掉

用rhoPimpleFoam计算T型管冷热流混合,计算几步就停掉

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

    各位老师,大家好,我在使用rhoPimpleFoam求解器计算一个T型管冷热空气掺混算例的时候,总是计算几步就停止掉了。之前从来没有计算过这种和热有关的算例,我感觉有可能是边界条件设置的问题,烦请有经验的老师给指导一下。
    这是T型管算例的大概示意图
    边界条件.jpg
    这是0/p文件:

    dimensions      [1 -1 -2 0 0 0 0];
    internalField   uniform 101325;
    boundaryField
    {
        INLET_HOT
        {
            type            fixedValue;
            value           uniform 101550;
        }
        INLET_COLD
        {
            type            zeroGradient;
        }
        OUTLET
        {
            type            fixedValue;
            value           uniform 101350;
        }
        WALL_HOT
        {
            type            zeroGradient;
        }
        WALL_MID
        {
            type            zeroGradient;
        }
    }
    

    这是0/T文件:

    dimensions      [0 0 0 1 0 0 0];
    internalField   uniform 300;
    boundaryField
    {
        INLET_HOT
        {
            type            fixedValue;
            value           uniform 1673.15;
        }
        INLET_COLD
        {
            type            fixedValue;
            value           uniform 438.15;
        }
        OUTLET
        {
            type            inletOutlet;
            value           $internalField;
            inletValue      $internalField;
        }
        WALL_HOT
        {
            type            zeroGradient;
        }
        WALL_MID
        {
            type            zeroGradient;
        }
    }
    

    这是0/U文件:

    dimensions      [0 1 -1 0 0 0 0];
    internalField   uniform (0 0 0);
    boundaryField
    {
        INLET_HOT
        {
            type            pressureInletVelocity;
            value           uniform (0 0 0); 
        }
        INLET_COLD
        {
            type            pressureInletVelocity;
            value           uniform (0 0 0);
        }
        OUTLET
        {
            type            pressureInletOutletVelocity;
            value           uniform (0 0 0);
        }
        WALL_HOT
        {
            type            noSlip;
        }
        WALL_MID
        {
            type            noSlip;
        }
    }
    

    这是0/alphat文件:

    dimensions      [1 -1 -1 0 0 0 0];
    internalField   uniform 1e-3;
    boundaryField
    {
        INLET_HOT
        {
            type            calculated;
            value           $internalField;
        }
        INLET_COLD
        {
            type            calculated;
            value           $internalField;
        }
        OUTLET
        {
            type            calculated;
            value           $internalField;
        }
        WALL_HOT
        {
            type            compressible::alphatWallFunction;
            value           $internalField;
        }
        WALL_MID
        {
            type            compressible::alphatWallFunction;
            value           $internalField;
        } 
    }
    

    这是0/epsilon文件:

    dimensions      [0 2 -3 0 0 0 0];
    internalField   uniform 2.2667;
    boundaryField
    {
        INLET_HOT
        {
            type            turbulentMixingLengthDissipationRateInlet;
            mixingLength    0.005;
            value           uniform 2.2667;
        }
        INLET_COLD
        {
            type            turbulentMixingLengthDissipationRateInlet;
            mixingLength    0.005;
            value           uniform 2.2667;
        }
        OUTLET
        {
            type            inletOutlet;
            inletValue      uniform 2.2667;
            value           uniform 2.2667;
        }
        WALL_HOT
        {
            type            epsilonWallFunction;
            value           uniform 2.2667;
        }
        WALL_MID
        {
            type            epsilonWallFunction;
            value           uniform 2.2667;
        }
    }
    

    这是0/k文件:

    dimensions      [0 2 -2 0 0 0 0];
    internalField   uniform 0.054;
    boundaryField
    {
        INLET_HOT
        {
            type            turbulentIntensityKineticEnergyInlet;
            intensity       0.05;
            value           uniform 0.054;
        }
        INLET_COLD
        {
            type            turbulentIntensityKineticEnergyInlet;
            intensity       0.05;
            value           uniform 0.054;
        }
        OUTLET
        {
            type            inletOutlet;
            inletValue      uniform 0.054;
            value           uniform 0.054;
        }
        WALL_HOT
        {
            type            kqRWallFunction;
            value           uniform 0.054;
        }
        WALL_MID
        {
            type            kqRWallFunction;
            value           uniform 0.054;
        }
    }
    

    这是0/nut文件:

    dimensions      [0 2 -1 0 0 0 0];
    internalField   uniform 0;
    boundaryField
    {
        INLET_HOT
        {
            type            calculated;
            value           uniform 0;
        }
        INLET_COLD
        {
            type            calculated;
            value           uniform 0;
        }
        OUTLET
        {
            type            calculated;
            value           uniform 0;
        }
        WALL_HOT
        {
            type            nutkWallFunction;
            value           uniform 0;
        }
        WALL_MID
        {
            type            nutkWallFunction;
            value           uniform 0;
        }
    }
    

    这是constant/thermophysicalProperties文件:

    thermoType
    {
        type            hePsiThermo;
        mixture         pureMixture;
        transport       sutherland;
        thermo          hConst;
        equationOfState perfectGas;
        specie          specie;
        energy          sensibleInternalEnergy;
    }
    
    mixture
    {
        specie
        {
            molWeight   28.9;
        }
        thermodynamics
        {
            Cp          1007;
            Hf          0;
        }
        transport
        {
            As          1.4792e-06;
            Ts          116;
        }
    }
    

    这是system/fvScheme文件:

    ddtSchemes
    {
        default         Euler;
    }
    gradSchemes
    {
        default         Gauss linear;
    }
    divSchemes
    {
        default         none;
        div(phi,U)      Gauss upwind;
        div(phid,p)     Gauss upwind;
        div(phiv,p)     Gauss linear;
        div(phi,K)      Gauss linear;
        div(phi,e)      Gauss upwind;
        div(phi,k)      Gauss upwind;
        div(phi,epsilon) Gauss upwind;
        div(phi,R)      Gauss upwind;
        div(phi,omega)  Gauss upwind;
        div((rho*R))    Gauss linear;
        div(R)          Gauss linear;
        div(U)          Gauss linear;
        div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear;
    }
    laplacianSchemes
    {
        default         Gauss linear corrected;
    }
    interpolationSchemes
    {
        default         linear;
    }
    snGradSchemes
    {
        default         corrected;
    }
    

    这是system/fvSolution文件:

    solvers
    {
        p
        {
            solver          PCG;
    	preconditioner
    	    {
    		preconditioner  	GAMG;
    		tolerance       	1e-05;
    		relTol          	0;
    		smoother        	GaussSeidel;
    		cacheAgglomeration	true;
    	    }
    	tolerance       1e-05;
            relTol          0.1;
        }
        pFinal
        {
    	solver          PCG;
    	preconditioner
    	    {
    		preconditioner          GAMG;
    		tolerance               1e-06;
    		relTol                  0;
    		smoother                GaussSeidel;
    		cacheAgglomeration      true;
    	    }
    	tolerance       1e-06;
    	relTol          0.1;
        }
        "(rho|U|e|k|epsilon|omega)"      
        {
            solver          PBiCGStab;
            preconditioner  DILU;
            tolerance       1e-06;
            relTol          0;
        }
        "(rho|U|e|k|epsilon|omega)Final"
        {
            $U;
            relTol          0;
        }
    }
    
    PIMPLE
    {
        momentumPredictor   yes;
        transonic           no;
        nOuterCorrectors    50;
        nCorrectors         1;
        nNonOrthogonalCorrectors 0;
        consistent          yes;
        SIMPLErho           yes;
    
        pMaxFactor          1.5;
        pMinFactor          0.9;
    
        residualControl
        {
            "(U|k|epsilon)"
            {
                relTol          0;
                tolerance       0.00001;
            }
        }
    
        turbOnFinalIterOnly no;
    }
    
    relaxationFactors
    {
        fields
        {
            "p.*"           0.5;
            "rho.*"         1;
        }
        equations
        {
            "U.*"           0.9;
            "e.*"           0.7;
            "(k|epsilon|omega).*" 0.8;
        }
    }
    

    然后,这是运行rhoPimpleFoam时保存的log文件,看不出非常明显的报错信息:

    PIMPLE: iteration 25
    DILUPBiCGStab:  Solving for Ux, Initial residual = 0.188633, Final residual = 6.22293e-07, No Iterations 4
    DILUPBiCGStab:  Solving for Uy, Initial residual = 0.108362, Final residual = 3.91435e-07, No Iterations 4
    DILUPBiCGStab:  Solving for Uz, Initial residual = 0.36688, Final residual = 5.86313e-07, No Iterations 4
    DILUPBiCGStab:  Solving for e, Initial residual = 0.170771, Final residual = 1.74252e-07, No Iterations 3
    -------------------------------------------------------
    Primary job  terminated normally, but 1 process returned
    a non-zero exit code. Per user-direction, the job has been aborted.
    -------------------------------------------------------
    

    这是在集群上计算停止后保存的errput文件,不知道是否有用,先放上:136: :

    --------------------------------------------------------------------------
    [[18352,1],4]: A high-performance Open MPI point-to-point messaging module
    was unable to find any relevant network interfaces:
    
    Module: OpenFabrics (openib)
      Host: c01n02
    
    Another transport will be used instead, although this may result in
    lower performance.
    
    NOTE: You can disable this warning by setting the MCA parameter
    btl_base_warn_component_unused to 0.
    --------------------------------------------------------------------------
    [c01n02:275299] 31 more processes have sent help message help-mpi-btl-base.txt / btl:no-nics
    [c01n02:275299] Set MCA parameter "orte_base_help_aggregate" to 0 to see all help / error messages
    [16] #0  Foam::error::printStack(Foam::Ostream&)[15] #0  Foam::error::printStack(Foam::Ostream&) at ??:?
     at ??:?
    [15] #1  Foam::sigFpe::sigHandler(int)[16] #1  Foam::sigFpe::sigHandler(int) at ??:?
    [15] #2  ? at ??:?
    [16] #2  ? in /usr/lib64/libpthread.so.0
    [15] #3  Foam::hePsiThermo<Foam::psiThermo, Foam::pureMixture<Foam::sutherlandTransport<Foam::species::thermo<Foam::hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleInternalEnergy> > > >::calculate(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>&, bool) in /usr/lib64/libpthread.so.0
    [16] #3  Foam::hePsiThermo<Foam::psiThermo, Foam::pureMixture<Foam::sutherlandTransport<Foam::species::thermo<Foam::hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleInternalEnergy> > > >::calculate(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>&, bool) at ??:?
    [15] #4  Foam::hePsiThermo<Foam::psiThermo, Foam::pureMixture<Foam::sutherlandTransport<Foam::species::thermo<Foam::hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleInternalEnergy> > > >::correct() at ??:?
    [16] #4  Foam::hePsiThermo<Foam::psiThermo, Foam::pureMixture<Foam::sutherlandTransport<Foam::species::thermo<Foam::hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleInternalEnergy> > > >::correct() at ??:?
    [15] #5   at ??:?
    [16] #5  ?? at ??:?
    [15] #6  __libc_start_main at ??:?
    [16] #6  __libc_start_main in /usr/lib64/libc.so.6
    [15] #7   in /usr/lib64/libc.so.6
    [16] #7  ?? at ??:?
    [c01n02:275348:0:275348] Caught signal 8 (Floating point exception: tkill(2) or tgkill(2))
     at ??:?
    [c01n02:275349:0:275349] Caught signal 8 (Floating point exception: tkill(2) or tgkill(2))
    ==== backtrace ====
     0 0x000000000000f4ab raise()  ???:0
     1 0x000000000000f5e0 _L_unlock_13()  funlockfile.c:0
     2 0x00000000002addcf Foam::hePsiThermo<Foam::psiThermo, Foam::pureMixture<Foam::sutherlandTransport<Foam::species::thermo<Foam::hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleInternalEnergy> > > >::calculate()  ???:0
     3 0x00000000002aea19 Foam::hePsiThermo<Foam::psiThermo, Foam::pureMixture<Foam::sutherlandTransport<Foam::species::thermo<Foam::hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleInternalEnergy> > > >::correct()  ???:0
     4 0x00000000004255e6 main()  ???:0
     5 0x0000000000021c05 __libc_start_main()  ???:0
     6 0x000000000042d711 _start()  ???:0
    ===================
    ==== backtrace ====
     0 0x000000000000f4ab raise()  ???:0
     1 0x000000000000f5e0 _L_unlock_13()  funlockfile.c:0
     2 0x00000000002addcf Foam::hePsiThermo<Foam::psiThermo, Foam::pureMixture<Foam::sutherlandTransport<Foam::species::thermo<Foam::hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleInternalEnergy> > > >::calculate()  ???:0
     3 0x00000000002aea19 Foam::hePsiThermo<Foam::psiThermo, Foam::pureMixture<Foam::sutherlandTransport<Foam::species::thermo<Foam::hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleInternalEnergy> > > >::correct()  ???:0
     4 0x00000000004255e6 main()  ???:0
     5 0x0000000000021c05 __libc_start_main()  ???:0
     6 0x000000000042d711 _start()  ???:0
    ===================
    --------------------------------------------------------------------------
    mpirun noticed that process rank 16 with PID 0 on node c01n02 exited on signal 8 (Floating point exception).
    --------------------------------------------------------------------------
    

    烦请有时间、有经验的老师给提一下建议:135:

    李东岳李 1 条回复 最后回复
  • 李东岳李 在线
    李东岳李 在线
    李东岳 管理员
    在 中回复了 希望先生 最后由 编辑
    #2

    @希望先生 网格数量多少?有对比的sci数据么?

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

    希 1 条回复 最后回复
  • 希 离线
    希 离线
    希望先生
    在 中回复了 李东岳 最后由 希望先生 编辑
    #3

    @李东岳 李老师,你好。我上面画的T型管的网格数量大概为360万。现在没有sci数据,原本是需要计算一个类似于T型管的掺合阀,那个掺合阀的模型比这个T型管要复杂的多。:135: 因为一直计算不下去,开始以为是掺合阀用的是非结构网格的原因,于是就先计算一个这样比较简单的T型管,划分了结构网格,试了一下还是计算不下去。现在感觉可能是边界条件的原因,或者是什么其他的原因。:136:

    李东岳李 1 条回复 最后回复
  • 李东岳李 在线
    李东岳李 在线
    李东岳 管理员
    在 中回复了 希望先生 最后由 编辑
    #4

    @希望先生 不太好判断哪里出问题。能把网格数量调节到几十万的话,我可以给你调试一下。

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

    希 1 条回复 最后回复
  • 希 离线
    希 离线
    希望先生
    在 中回复了 李东岳 最后由 希望先生 编辑
    #5

    @李东岳 李老师,你好。我已经将网格数量调到了77万,但是上传不到这上面来,我发送到您的邮箱里面去了,不知道符合不符合您的要求。:135:
    我是废物.jpg

    李东岳李 1 条回复 最后回复
  • 李东岳李 在线
    李东岳李 在线
    李东岳 管理员
    在 中回复了 希望先生 最后由 李东岳 编辑
    #6

    @希望先生 收到,我给你看一下。弄好了之后在论坛里给你连接。现在服务器在跑算例。估计得下周能给你

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

    希 1 条回复 最后回复
  • 希 离线
    希 离线
    希望先生
    在 中回复了 李东岳 最后由 编辑
    #7

    @李东岳 :142: 感谢李老师,我不着急的

    1 条回复 最后回复
  • hurricane007H 离线
    hurricane007H 离线
    hurricane007
    写于 最后由 编辑
    #8

    我记得我有段时间算流化床,卡住的原因是连接处的网格问题,就像你这个小管子和大管子连接处,有没有做过渡啊。。。如果太尖锐了就可能卡住的。。。

    希 1 条回复 最后回复
  • W 离线
    W 离线
    wangfei9088 大神
    写于 最后由 wangfei9088 编辑
    #9

    @希望先生 0/p中INLET_COLD为啥设置成zeroGradient?OUTLET的压力值也和图中不一样。
    这俩边界条件写反了?
    :134:

    INLET_HOT
    {
        type            fixedValue;
        value           uniform 101550;
    }
    INLET_COLD
    {
        type            zeroGradient;
    }
    OUTLET
    {
        type            fixedValue;
        value           uniform 101350;
    }
    
    希 1 条回复 最后回复
  • 希 离线
    希 离线
    希望先生
    在 中回复了 hurricane007 最后由 编辑
    #10

    @hurricane007 多谢老师提醒,我这里并没有特别地去做一些明显的过渡,我去试一下看能不能解决问题。:xiexie:

    1 条回复 最后回复
  • 希 离线
    希 离线
    希望先生
    在 中回复了 wangfei9088 最后由 编辑
    #11

    @wangfei9088 多谢老师提醒,这个地方确实是把INLET_COLD和OUTLET的边界条件写反了,我尝试改了过来,但是仍旧没有解决问题。:xinlei:

    Z 1 条回复 最后回复
  • Z 离线
    Z 离线
    zhouxu
    在 中回复了 希望先生 最后由 编辑
    #12

    试一下把压力入口边界换成速度入口边界

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

    这个算例是openfoam几的,我用openfoam78都运行不了

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

    希 2 条回复 最后回复
  • 希 离线
    希 离线
    希望先生
    在 中回复了 李东岳 最后由 编辑
    #14

    @李东岳 李老师,不好意思,没有及时关注回复。我这个算例使用OpenFOAM-5.x,因为需要使用CFDEM,所以一直没有编译安装新版本的OpenFOAM。

    1 条回复 最后回复
  • 希 离线
    希 离线
    希望先生
    在 中回复了 李东岳 最后由 编辑
    #15

    @李东岳 李老师,会不会还是网格的原因?有可能是我网格划分的有问题:xinlei:

    李东岳李 1 条回复 最后回复
  • 李东岳李 在线
    李东岳李 在线
    李东岳 管理员
    在 中回复了 希望先生 最后由 编辑
    #16

    @希望先生 你这个有对照实验值么,目前有一些结果出来,等下周我把算例更新在这里 http://dyfluid.com/rhoPimpleFoam.html

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

    希 1 条回复 最后回复
  • 希 离线
    希 离线
    希望先生
    在 中回复了 李东岳 最后由 编辑
    #17

    @李东岳 感谢李老师:xiexie: ,但是没有T型管的试验数据。原本是要计算一个掺合阀的,原理类似于T型管,但是那个掺合阀模型比这个T型管要复杂很多,尤其在小口径管和大口径管结合的地方,那个模型一直计算不下去就画了个简单的T型管。这个T型管的边界条件,是我按照厂子里面测试掺合阀的实验条件放上的,如果按照他们的试验的话,热流进口是应该大概是在930-1600摄氏度范围内,冷流大概是160-170摄氏度,掺合阀调控的混合流出口温度大概在220-260摄氏度。李老师,厂子里面实验条件非常简陋,仅作小小参考:136: 只要结果不太一样,那就勇敢地相信是他们试验做得不对:tishizi:

    李东岳李 1 条回复 最后回复
  • 李东岳李 在线
    李东岳李 在线
    李东岳 管理员
    在 中回复了 希望先生 最后由 编辑
    #18

    @希望先生 你这个其实不需要这个小圆管,直接画一个大圆管,然后在侧面用topoSet做一个进口就行。这样网格数10万以下足够了。

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

    希 1 条回复 最后回复
  • 希 离线
    希 离线
    希望先生
    在 中回复了 李东岳 最后由 编辑
    #19

    @李东岳 谢谢李老师提醒,我去尝试一下

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

    http://dyfluid.com/rhoPimpleFoam.html

    :haqi:

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

    希 1 条回复 最后回复

  • 登录

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