Navigation

    CFD中文网

    CFD中文网

    • Login
    • Search
    • 最新

    均一的边界条件如何设置?

    OpenFOAM
    5
    8
    4310
    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.
    • 搬
      搬运工不好当 last edited by

      有没有人了解OF中非均一的边界条件如何设置?比如有一个竖直的壁面,壁面低端温度300K, 顶端温度800K, 壁面上温度线性变化,这种边界条件该如何设置呢?

      zhanghan 1 Reply Last reply Reply Quote
      • zhanghan
        zhanghan @搬运工不好当 last edited by

        @搬运工不好当
        我想设置通道表面热损失边界条件,和您的线性变化是一样的吗???该怎么设置呢??

        赵 1 Reply Last reply Reply Quote
        • 赵
          赵一铭 @zhanghan last edited by

          @zhanghan 在 均一的边界条件如何设置? 中说:

          通道表面热损失边界条件

          这个具体值得是什么边界条件?固定热通量流出?

          zhanghan 1 Reply Last reply Reply Quote
          • zhanghan
            zhanghan @赵一铭 last edited by

            @赵一铭
            CFX中是 通道表面热损失单位是W/m2

            赵 1 Reply Last reply Reply Quote
            • 赵
              赵一铭 @zhanghan last edited by

              @zhanghan

              可以试试turbulentHeatFlux边界条件:

              Fixed heat boundary condition to specify temperature gradient. Input heat source either specified in terms of an absolute power [W], or as a flux [W/m2].
              
              Example usage:
              
                      hotWall
                      {
                          type            compressible::turbulentHeatFluxTemperature;
                          heatSource      flux;        // power [W]; flux [W/m2]
                          q               uniform 10;  // heat power or flux
                          kappa           fluidThermo; // calculate kappa=alphaEff*thermo.Cp
                          Qr              none;        // name of the radiative flux
                          value           uniform 300; // initial temperature value
                      }
              
              
              zhanghan 1 Reply Last reply Reply Quote
              • zhanghan
                zhanghan @赵一铭 last edited by

                @赵一铭
                感谢您,我打算试试!!

                1 Reply Last reply Reply Quote
                • 程
                  程迪 last edited by

                  @搬运工不好当

                  如果是OpenFOAM和OpenFOAM+,用codedFixedValue最方便:

                      wall
                      {
                          type            codedFixedValue;
                          value           uniform 300; //default value
                          redirectType    linearTBC; //name of new BC type
                          code
                          #{
                          const vectorField& Cf = patch().Cf(); // get face center coordinate;
                          //assume the wall is a vertical wall       
                          scalar ymax = max(Cf&vector(0,1,0)); // `&` is dot product
                          scalar ymin = min(Cf&vector(0,1,0));
                          // Info<<"ymax="<<ymax<<",ymin="<<ymin<<nl;
                          
                          vectorField& vf = *this; // get the boundary field (List of vectors defined at face centers) to fill.
                          //temporal coordinate, type: scalar
                          scalar t =this->db().time().value(); // get time
                          // temporal term
                          // scalar tt = 1+0.1*sin(5*t);
                          scalar tt = 1.0;
                          forAll(Cf,faceI)
                          {
                          	//spatial coordinates, type: scalar
                          	//scalar x = Cf[faceI].x();
                          	scalar y = Cf[faceI].y(); 
                          	//scalar z = Cf[faceI].z();
                          
                          	vf[faceI] = ((y-ymin)/(ymax-ymin)*500+300)*tt; 
                          }
                          #};
                          
                          //I do not know why I need to add those things
                          //codeInclude
                          //#{
                          //    #include "fvCFD.H"
                          //#};
                          
                          //codeOptions
                          //#{
                          //    -I$(LIB_SRC)/finiteVolume/lnInclude
                          //#};
                      }
                  
                  

                  github: chengdi123000
                  网站:chengdi123000.github.io
                  本作品采用知识共享署名-非商业性使用-相同方式共享 4.0 国际许可协议进行许可。

                  A 1 Reply Last reply Reply Quote
                  • A
                    anzhenhua @程迪 last edited by

                    @程迪 scalar t 没有用到?

                    1 Reply Last reply Reply Quote
                    • First post
                      Last post

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