Navigation

    CFD中文网

    CFD中文网

    • Login
    • Search
    • 最新

    关于提取一个面的温度场

    OpenFOAM
    2
    7
    2441
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • C
      ctt-twophase last edited by

      各位老师,如果我对图中heatwall面的边界设置为温度梯度,计算1.5s后,想提取heatwall面上各个cell的温度,请问该如何办?如果用paraview提取的话,只能提取出一个excel表格,但是不知道哪个cell对应哪个温度,我想得到严格的一个cell对应一个温度这种结果。示意图如下:0_1526906041596_heatwall.jpg

      1 Reply Last reply Reply Quote
      • 李东岳
        李东岳 管理员 last edited by

        严格的一个cell对应一个温度这种结果

        你需要植入代码,获得cell编号和对应的温度

        forAll(patches, patch)
        {
            const fvPatch& currPatch = patches[patch];
            forAll(patches[patch], face)
            {
                label faceCelli = currPatch.faceCells()[face];
                Info<< "边界相邻网格单元编号" << faceCelli << nl;
                Info<< T[faceCelli] << nl;//输出边界相邻网格单元的温度	
            }
        }
        

        线上CFD课程 7月1日报名截止 http://dyfluid.com/class.html
        CFD高性能服务器 http://dyfluid.com/servers.html

        C 1 Reply Last reply Reply Quote
        • C
          ctt-twophase @李东岳 last edited by

          @东岳 李老师,您好!我现在对icoFoam这个求解器提取速度场时发生了一些错误,望指教。
          描述:用您给我的代码,写入到creatFields.H文件内,如图0_1526977187187_2018-05-20 16-16-39屏幕截图.png
          然后编译时候出现了如下错误:0_1526977389514_2018-05-20 16-03-00屏幕截图.png
          能不能提点一下,谢谢李老师。

          1 Reply Last reply Reply Quote
          • 李东岳
            李东岳 管理员 last edited by

            把你的代码wclean一下然后打包上传一下,我给你改一下

            线上CFD课程 7月1日报名截止 http://dyfluid.com/class.html
            CFD高性能服务器 http://dyfluid.com/servers.html

            C 1 Reply Last reply Reply Quote
            • C
              ctt-twophase @李东岳 last edited by

              @东岳 谢谢李老师。我的求解器是v1706的interCondensatingEvaporatingFoam,若版本不合适的话,就在icoFoam(4.0版本)上编写一个提取速度场的代码,我再照着您的思路修改自己的东西。再次感谢。
              1_1527062815835_interCondensingEvaporatingFoam.zip
              0_1527062815815_icoFoam.zip

              1 Reply Last reply Reply Quote
              • 李东岳
                李东岳 管理员 last edited by

                https://coding.net/u/dyfluid/p/Solvers_DYFLUID/git/tree/master/boundaryCellValue?public=true

                试试这个

                线上CFD课程 7月1日报名截止 http://dyfluid.com/class.html
                CFD高性能服务器 http://dyfluid.com/servers.html

                1 Reply Last reply Reply Quote
                • C
                  ctt-twophase last edited by

                  @东岳 谢谢李老师,依照您的方法我已成功编译,但是log文件内输出的是所有边界的数据(例如icofoam-cavity这个算例输出的是靠近fixedwall和movingwall那一层的网格的速度),有没有方法对只输出靠近fixedwall那一层网格的速度。

                  1 Reply Last reply Reply Quote
                  • First post
                    Last post

                  CFD中文网 | 东岳流体 | 京ICP备15017992号-2
                  论坛登录问题反馈可联系 li.dy@dyfluid.com