CFD中文网

    CFD中文网

    • 登录
    • 搜索
    • 最新

    uniformFixedValue边界条件失效?

    OpenFOAM
    1
    2
    622
    正在加载更多帖子
    • 从旧到新
    • 从新到旧
    • 最多赞同
    回复
    • 在新帖中回复
    登录后回复
    此主题已被删除。只有拥有主题管理权限的用户可以查看。
    • Y
      yfclark 讲师 最后由 编辑

      在模拟两相流时,为了模拟准确的入注过程入口采取了uniformFixedValue边界条件,但是计算过程中只是入口边界的速度随着时间改变,但是液体并没有入注成功,改成固定速度入注后没有这个问题,有使用过过这个边界条件的老哥帮忙看看哪里设置错误了。
      平台:OpenFOAM5.x
      求解器:自己改的多相流求解器
      测试:恒定速度入射,没有问题,uniformFixedValue随时间变化的入注,计算过程中入口速度随着时间而改变,但是没有液体入注
      入注速度曲线图:
      3d27c45a-e397-453a-8e1b-fb50844d65cd-image.png
      入口速度边界:

      boundaryField
      {
          outlet
          {
              type               pressureInletOutletVelocity;
              phi                phi;
              value              $internalField;
          }
          inlet 
          { 
              type uniformFixedValue; 
              uniformValue
              {
                type             tableFile;
                file             "$FOAM_CASE/0/velocity.txt";
              }
          }
          chamber
          {
              type        fixedValue;
              value       uniform (0 0 0);
          }
          chamber_front
          {
              type        fixedValue;
              value       uniform (0 0 0);
          }
      }
      

      入口k和epsilon

      #include "$FOAM_CASE/0/INLET"
      dimensions      [0 2 -2 0 0 0 0];
      
      internalField   uniform $kgas;
      //kgas is small value 
      
      boundaryField
      {
          outlet
          {
      	//type 		zeroGradient;
              
      	    type            inletOutlet;
              phi             phi;
              inletValue      $internalField;
              value           $internalField;
      	
          }
          inlet 
          { 
              type                    uniformFixedValue; 
              uniformValue
              {
                type             tableFile;
                file             "$FOAM_CASE/0/k.txt";
              }
          }
          chamber
          {
              type            kqRWallFunction;
              value           $internalField;
          }
          chamber_front
          {
              type            kqRWallFunction;
              value           $internalField;
          }
      }
      
      #include "$FOAM_CASE/0/INLET"
      dimensions      [0 2 -3 0 0 0 0];
      
      internalField   uniform $egas;
      //egas is a small value 
      
      boundaryField
      {
          outlet
          {
              type            inletOutlet;
              phi             phi;
              inletValue      $internalField;
              value           $internalField;
          }
          inlet 
          { 
              type                    uniformFixedValue; 
              uniformValue
              {
                type             tableFile;
                file             "$FOAM_CASE/0/epsilon.txt";
              }
              
          }
          chamber
          {
              type            epsilonWallFunction;
              value           $internalField;
          }
          chamber_front
          {
              type            epsilonWallFunction;
              value           $internalField;
          }  
      }
      
      

      入口速度条件文件为:

      (
       (0.0 (0.00022339136111871466 0 0))
       (2.0000000000000002e-07 (9.078922321072735 0 0))
       (4.0000000000000003e-07 (18.157322020200688 0 0))
       (6e-07 (27.235203017589505 0 0))
      ...
      );
      

      入口速度沿着x方向,和网格上的入口方向一致
      k和epsilon的入口按照cfd-online提供的公式结合变入口的速度估算

      1 条回复 最后回复 回复 引用
      • Y
        yfclark 讲师 最后由 编辑

        解决了,边界条件设置的问题,

        inlet
            {
                type uniformFixedValue;
            	uniformValue table
            	(
                	(0 (1 0 0))
                	(1000 (2 0 0))
                	(2000 (3 0 0))
            	);
                value           $internalField;
            }
        

        少设置了 value $internalField;
        结果没有生效

        1 条回复 最后回复 回复 引用
        • First post
          Last post