Navigation

    CFD中文网

    CFD中文网

    • Login
    • Search
    • 最新

    使用OpenFoam1906,软件自带的造波工具包造波,如何提取波面曲线(surfaceElevation)

    OpenFOAM
    4
    7
    1266
    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.
    • DY大世界
      DY大世界 last edited by

      我是使用OpenFOAM1906版本,使用自带的造波工具包“tutorials-multiphase-interfoam-laminar-waves”造波,造出来的波如何提取波浪自由面的波高曲线呢?如下图所示:
      surfaceElevation.png
      使用了如下的代码,但不知为啥就不对

      functions
      {
      freeSurface
         {   
             type            surfaces;
             functionObjectLibs
             (   
                 "libsampling.so" 
             );  
      //        writeControl    timeStep;
      //        writeInterval   10;
      //       outputControl   outputTime;
      //       outputInterval  1;  
             writeControl    writeTime;
             surfaceFormat  vtk;
             fields
             (   
                 alpha.water
             );  
             surfaces
             (   
                 freeSurface
                 {   
                     type        isoSurfaceCell;
                     isoField    alpha.water;
                     isoValue    0.5;
                     interpolate false;
                     regularise  false;
                 }   
             );  
             interpolationScheme cell;
         }
      

      请老师们给予指点,巨谢!

      L 1 Reply Last reply Reply Quote
      • L
        leilei @DY大世界 last edited by

        @DY大世界
        hi, amigo,
        只想和你一起探讨:
        你这方法要请教下这的各位老师。。。
        只我个人观点,好像你的case里应该没有“surfaces”,只有2 fluids间的 “interface”

        waves2foam里好像有你需要的

        说的不对您原谅

        DY大世界 1 Reply Last reply Reply Quote
        • DY大世界
          DY大世界 @leilei last edited by

          @leilei 嗯嗯,好的,谢谢您的回复。这个问题还在努力解决中,我用的是1906版本,里面没有wave2foam工具包,准备把这个问题解决以后再用wave2foam去造波,wave2foam还是很成熟、很方便很、专业的。

          L 1 Reply Last reply Reply Quote
          • L
            leilei @DY大世界 last edited by

            @DY大世界
            hi,

            读过waves2foam手册,它有wave gauge,probes提取surface

            但1906里,两fluids间的interface是个过渡。。。那此时:
            1.1906里runtime提取液面的code怎么写
            2.在定义液面时,是否人为设个alpha值(不然不是一条线,而是一个”带“)

            其实您的问题,我也感兴趣,但一直没老师回

            还有,您把1906的结果导入paraview,试试用glyph作个U的矢量场。。。应该不行吧?:)

            1 Reply Last reply Reply Quote
            • yuno
              yuno last edited by

              在1912自带的造波算例里的controlDict中有如下代码。是用来提取自由液面的。

              functions
              {
                  line
                  {
                      type            sets;
                      libs            (sampling);
                      enabled         true;
                      writeControl    writeTime;
                      writeInterval   1;
              
                      interpolationScheme cellPoint;
                      setFormat       raw;
                      sets
                      (
                          line1
                          {
                              type    uniform;
                              axis    distance;
                              start   ( 1.0 0.02 0.0 );
                              end     ( 1.0 0.02 0.55 );
                              nPoints 1001;
                          }
                          line2
                          {
                              type    uniform;
                              axis    distance;
                              start   ( 2.0 0.02 0.0 );
                              end     ( 2.0 0.02 0.55 );
                              nPoints 1001;
                          }
                          line3
                          {
                              type    uniform;
                              axis    distance;
                              start   ( 3.0 0.02 0.0 );
                              end     ( 3.0 0.02 0.55 );
                              nPoints 1001;
                          }
                          line4
                          {
                              type    uniform;
                              axis    distance;
                              start   ( 5.0 0.02 0.0 );
                              end     ( 5.0 0.02 0.55 );
                              nPoints 1001;
                      );
              
                      fixedLocations  false;
                      fields
                      (
                          U alpha.water
                      );
                  }
              }
              

              但是提取出来的值是按照时间步给出line上所有点的alpha值。跟waves2Foam中的波高计数据不一样。

              DY大世界 1 Reply Last reply Reply Quote
              • DY大世界
                DY大世界 @yuno last edited by

                @yuno 好的,感谢回复指导!

                1 Reply Last reply Reply Quote
                • 五好青年
                  五好青年 last edited by

                  可以分享一个OpenFOAM-v1906的虚拟机吗?

                  I am a CFD machine with no emotions. Welcome to browse my Bilibili, search: seeeeeeeeeeer

                  1 Reply Last reply Reply Quote
                  • First post
                    Last post

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