Navigation

    CFD中文网

    CFD中文网

    • Login
    • Search
    • 最新

    of2006的setExprBoundaryFields似乎很好用

    OpenFOAM
    1
    2
    479
    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.
    • S
      Samuel-Tu last edited by

      大家有用过of2006的setExprBoundaryFields吗,可以通过expression控制边界条件,我找了一下tutorials里的文件,只有两个

      /*--------------------------------*- C++ -*----------------------------------*\
      | =========                 |                                                 |
      | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
      |  \\    /   O peration     | Version:  v2006                                 |
      |   \\  /    A nd           | Website:  www.openfoam.com                      |
      |    \\/     M anipulation  |                                                 |
      \*---------------------------------------------------------------------------*/
      FoamFile
      {
          version     2.0;
          format      ascii;
          class       dictionary;
          object      setExprBoundaryFieldsDict;
      }
      // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
      
      pattern
      {
          field   T;
      
          expressions
          (
              {
                  patch   bottom;
                  target  theta0;
                  expression #{ (pos().x() < 1e-4 ? 60 : 120) #};
              }
          );
      
          keepPatches  true;
      }
      
      /*--------------------------------*- C++ -*----------------------------------*\
      | =========                 |                                                 |
      | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
      |  \\    /   O peration     | Version:  v2006                                 |
      |   \\  /    A nd           | Website:  www.openfoam.com                      |
      |    \\/     M anipulation  |                                                 |
      \*---------------------------------------------------------------------------*/
      FoamFile
      {
          version     2.0;
          format      ascii;
          class       dictionary;
          object      setExprBoundaryFieldsDict;
      }
      // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
      
      pattern
      {
          field   T;
      
          expressions
          (
              {
                  patch   outlet2;
                  target  something;
                  expression #{ (pos().x() < 1e-4 ? 60 : 120) #};
              }
          );
      }
      

      没啥解释,看起来有点费劲。。。target是干啥的呀。。。

      1 Reply Last reply Reply Quote
      • S
        Samuel-Tu last edited by

        链接文本,研究了一下用法,大家可以看看:chouchou:

        1 Reply Last reply Reply Quote
        • First post
          Last post

        CFD中文网 | 东岳流体 | 京ICP备15017992号-2