OpenFoam边界网格生成设置

对于一个既有网格已经保存在constant/polyMesh中,使用snappyHexMesh进行 边界层加密 需要的设置。

一,在system 下创建 snappyHexMeshDict 文件

FoamFile   
{   
 version  4.0;
 format  ascii;
 class  dictionary;
 location system; 
 object  snappyHexMeshDict;
}   

castellatedMesh     no;
snap                no;
addLayers           yes;

keepPatches     yes; // yes
//singleRegionName  yes
//mergePatchFaces yes; // no


geometry
{
}

castellatedMeshControls
{
    maxLocalCells           1000000;
    maxGlobalCells          10000000;
    minRefinementCells      10;
    maxLoadUnbalance        0.10;
    nCellsBetweenLevels     3; 
    resolveFeatureAngle     45; 
    allowFreeStandingZoneFaces     true;
    locationInMesh          (3 3 3);
	
    features        
    (
    );
	
    refinementSurfaces
   {
    }
    
    refinementRegions
   {
    }
}


snapControls
{
        nSmoothPatch  3;
        tolerance     1;
        nSolveIter    1;
        nRelaxIter    1;
        nFeatureSnapIter  5;
        extractFeaturesRefineLevel  on;
        explicitFeatureSnap  on;
        implicitFeatureSnap  off;
}


addLayersControls  
{
        relativeSizes  off;
        expansionRatio  1;
        finalLayerThickness  0.02;
        minThickness  0.01;
        featureAngle  130;
	
        layers
	{ 
	    bottom               {nSurfaceLayers  3;}
	    inner_bottom         {nSurfaceLayers  3;}
	    bldg                 {nSurfaceLayers  3;}
	    //outer_interface    {nSurfaceLayers  3;}
	    //inner_interface    {nSurfaceLayers  3;}
    }
	
    nGrow  1;
    
    slipFeatureAngle 30;
    
    nRelaxIter  5;
  
    nSmoothSurfaceNormals  1;
  
    nSmoothThickness  10;
  
    nSmoothNormals  1;
  
    maxFaceThicknessRatio  0.5;
  
    maxThicknessToMedialRatio  0.3;
  
    minMedianAxisAngle  90;
  
    nBufferCellsNoExtrude  0;
  
    nLayerIter  50;
  
    nRelaxedIter  30;
  
}  
  
meshQualityControls  
{  
  
    maxNonOrtho  70;
  
    maxBoundarySkewness  20;
  
    maxInternalSkewness  4;
  
    maxConcave  80;
  
    minFlatness  0.5;
  
    minVol  1e-13;
  
    minTetQuality  1e-15;
  
    minArea  -1;
  
    minTwist  0.02;
  
    minDeterminant  0.001;
  
    minFaceWeight  0.02;
  
    minVolRatio  0.01;
  
    minTriangleTwist  -1;
  
    nSmoothScale  4;
  
    errorReduction  0.75;
  
    relaxed  
    {  
        maxNonOrtho  75;
    }  
  
}  
  
debug     0; //0

debugFlags
(
    //layerInfo
);
  
 writeFlags
(
    //scalarLevels
    //layerSets
    //layerFields     // write volScalarField for layer coverage
);

mergeTolerance  1E-6;
}


二,修改参数

使得 addLayer 为 yes,不进行 castellatedMesh 和 snap 动作,只进行边界加密。

castellatedMesh      no;
snap                        no;
addLayers               yes;

找到计算域内的一点,修改 locationInMesh    (3 3 3); 的坐标值 

根据constant/polyMesh/boundary 文件中的 patch 名字,修改参数确定边界层层数,每一层厚度等

  relativeSizes  off;
  expansionRatio  1;
  finalLayerThickness  0.02;
  minThickness  0.01;
  featureAngle  130;

    layers
    { 
        bottom                      {nSurfaceLayers  3;}
        inner_bottom            {nSurfaceLayers  3;}
        bldg                           {nSurfaceLayers  3;}
    }

三,执行命令,生成边界层

snappyHexMesh -overwrite

四,检查边界层网格质量

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值