耦合换热求解器chtMultiRegionBoussinesqPimpleFoam



  • 最近因写论文需要正在改写chtMultiRegionFoam为Boussinesq假设的chtMultiRegionBoussinesqPimpleFoam,现在遇到的问题是 关于每次求解过程中的上一次迭代出来的的变量存储以便亚松弛问题,也就是 #include "storeOldFluidFields.H"语句(见/******/内部分)

    在官方求解器chtMultiRegionFoam中

    int main(int argc, char *argv[])
     {
         #define NO_CONTROL
         #define CREATE_MESH createMeshesPostProcess.H
         #include "postProcess.H"
     
         #include "setRootCase.H"
         #include "createTime.H"
         #include "createMeshes.H"
         #include "createFields.H"
         #include "initContinuityErrs.H"
         #include "createTimeControls.H"
         #include "readSolidTimeControls.H"
         #include "compressibleMultiRegionCourantNo.H"
         #include "solidRegionDiffusionNo.H"
         #include "setInitialMultiRegionDeltaT.H"
     
         while (runTime.run())
         {
             #include "readTimeControls.H"
             #include "readSolidTimeControls.H"
             #include "readPIMPLEControls.H"
     
             #include "compressibleMultiRegionCourantNo.H"
             #include "solidRegionDiffusionNo.H"
             #include "setMultiRegionDeltaT.H"
     
             runTime++;
     
             Info<< "Time = " << runTime.timeName() << nl << endl;
    /***********************????**************************************************************** 
             if (nOuterCorr != 1)
             {
                 forAll(fluidRegions, i)
                 {
                     #include "storeOldFluidFields.H"
                 }
             }
    /***********************?????******************************************************************** 
             bool allRegionsConverged = false;
             bool finalIter = false;
     
             // --- PIMPLE loop
             for (int oCorr=0; oCorr<nOuterCorr; oCorr++)
             {
                 Info<< "Pimple iteration " << oCorr << "\n";
     
                 if (oCorr == nOuterCorr-1 || allRegionsConverged)
                 {
                     finalIter = true;
                 }
     
                 forAll(fluidRegions, i)
                 {
                     Info<< "\nSolving for fluid region "
                         << fluidRegions[i].name() << endl;
                     #include "setRegionFluidFields.H"
                     #include "readFluidMultiRegionPIMPLEControls.H"
                     #include "readFluidMultiRegionResidualControls.H"
                     #include "solveFluid.H"
                     #include "residualControlsFluid.H"
                 }
     
                 forAll(solidRegions, i)
                 {
                     Info<< "\nSolving for solid region "
                         << solidRegions[i].name() << endl;
                     #include "setRegionSolidFields.H"
                     #include "readSolidMultiRegionPIMPLEControls.H"
                     #include "readSolidMultiRegionResidualControls.H"
                     #include "solveSolid.H"
                     #include "residualControlsSolid.H"
                 }
     
                 #include "checkResidualControls.H"
             }
     
             runTime.write();
     
             Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
                 << "  ClockTime = " << runTime.elapsedClockTime() << " s"
                 << nl << endl;
         }
     
         Info<< "End\n" << endl;
     
         return 0;
     }
    

    可以看出官方求解器在每个时间步内存储一下 (见上段程序/********/内)

    但是!!!!!!在buoyantBoussinesqPimpleFoam中,却是在每次外循环,也就是pimple.loop()中存储 上一次循环的变量

    那么,问题来了:mihu: 我应该在我的chtMultiRegionBoussinesqPimpleFoam求解器中到底该把

    /***********************????**************************************************************** 
             if (nOuterCorr != 1)
             {
                 forAll(fluidRegions, i)
                 {
                     #include "storeOldFluidFields.H"
                 }
             }
    /***********************?????******************************************************************** 
    

    这段话应该放在哪???????



  • 为啥贴的代码不全高亮啊??



  • @麦迪文耦合换热求解器chtMultiRegionBoussinesqPimpleFoam 中说:

    最近因写论文需要正在改写chtMultiRegionFoam为Boussinesq假设的chtMultiRegionBoussinesqPimpleFoam,

    你用的什么版本?openfoam-6里面boussinesq已经被整合到状态方程里面去了不需要单独拎出来了



  • :shangxue: 啥。。。。。。。我用5.0,由于我是从fluent转过来所以对算法了解不多,不过用我可怜的有限的知识也觉得pimple算法中#include "storeOldFluidFields.H"位置不一样,连续性方程亚松弛就会受到影响,那么对结果岂不影响很大?


  • OpenFOAM教授

    @麦迪文 理论上来说,你用pimple算瞬态问题不应该加任何亚松弛(当然为了稳定可以加一点)。



  • @dzw05 哦哦,感谢您的回答,我看之前版本说明,之前以为pimple算法要先经历一段亚松弛,最后一步用下PISO标准求解,新版本好像变思路了哦。。。。。。。。。不知东岳老师OKSS课上会不会简介下pimple的求解思路



  • @麦迪文耦合换热求解器chtMultiRegionBoussinesqPimpleFoam 中说:

    之前以为pimple算法要先经历一段亚松弛,最后一步用下PISO标准求解,

    @dzw05 说的 可以不加松弛,:duang:



  • @麦迪文 你好,其实openfoam-5.x就可以在状态方程中直接使用boussinesq,亲测可以,因为我最近也在用。我有一个疑惑,请问chtMultiRegionFoam共轭传热边界的换热原理是什么?(关于这个问题,我写了个求租贴,在这里),该原理在求解器中好像没有说明,也不知道这个原理是放到哪个头文件中去了,若你知道的话,请不吝赐教,谢谢!
    另外,祝你五一快乐!


Log in to reply
 

CFD中文网 2016 - 2020 | 京ICP备15017992号-2