用codeStream
Samuel-Tu
帖子
-
-
自从bluecfd更新后,现在很喜欢用bluecfd,原因在于可以在windows上面使用。没办法windows系统上word,ppt需要用的太多了,用同一个系统比较方便。。就是发现Bluecfd编译太慢了,如果我用codedFixedValue这样的边界条件,bluecfd就得编译个一分钟才开始算。而在ubuntu上面,也就十秒多。。哎,这一点还挺让人不爽的。。
-
@cccrrryyy 现在没用ECS了。。回课题组有电脑咯。。。感觉还是得找天河这类专业的超算来算东西。。
-
由于OpenFOAM 2D网格实际是伪三维网格,有empty边界。而fluent网格就是真的2D网格。。。能不能把OF的伪三维网格,直接转换成fluent能够识别的2D网格呢?
-
@oitocfd 最近有参加第一届涡激振动前沿国际学术研讨会吗
-
@五好青年 我参考的文献:Ji C, Munjiza A, Williams J J R. A novel iterative direct-forcing immersed boundary method and its finite volume applications[J]. Journal of Computational Physics, 2012, 231(4): 1797-1821.
代码暂不开源。。
QQ就不用加了。。现在不做这块了。。 -
@samuel-tu 用Ubuntu系统,四个物理核心,8个超线程。开四核并行计算的时候,cpu利用率是50%,开8核并行的时候,CPU利用率是96%。但是八核比四核还慢了一点点。。。搞不懂了。。
-
@李东岳 我在双系统Ubuntu上面试了一下,那台电脑物理核心是4核,算上超线程是8核,还真能用8核并行。。。看来是我记错了。。
-
@oitocfd 哎,看起来bluecfd还挺好用的,可惜的是我的习惯是com版本的。bluecfd是根据org版本开发的。。有时候命令不一样,用起来挺难受的
-
@五好青年 of1806,of1912,of2006都写过。。enxtend好像是隐式的浸入边界法,直接力-浸入边界法是属于显式的。。
-
@李东岳 你是用的ubuntu 系统吗?
-
@船只 如果网格不同可以用MapField先映射,然后读取F场
-
我是自己在of里写的直接力--浸入边界法。。浸入边界内部的速度都是非物理速度。。一般保证浸入边界上速度为0就行。。OF-EXTEND里的浸入边界法原理好像有点不一样。。
-
然后我又做了一个对比,使用wsl上的openfoam进行并行计算,发现分成6块时可以计算,CPU利用率为65%。但是分成10块就算不了了,告诉我没有足够的slot。。。
难道说Bluecfd对windows系统上的并行有优化?? -
最近bluecfd不是出新版本了吗,试用了一下,感觉很不错。不过发现一个问题,我得电脑是6个物理核心,12的超线程。在开并行计算的时候,我不小心设置成了分成10块,但是竟然能算,而且比我分成4块的时候算的还要快。分成10块计算时,我打开任务监视器,竟然发现CPU利用率接近了100%
在学习OF的时候就有资料说,OF并行分块是不能超过物理核心数的。。但是看起来Bluecfd似乎可以超过物理核心数??可以使用超线程?? -
@cccrrryyy 我搜索后也发现有人用这个文献,后来我就直接引用的这篇了。。
-
论文里面说采用了OpenFOAM,一般引用哪篇文章呀,有无大佬知道。。
尊重知识,还是要引用一下的。 -
@bestucan 后来我也是这么解决的。。相当于直接安了新的Paraview
-
paraview有个transform功能,可以缩放的
-
检查下网格边界条件吧。感觉有点问题。。
-
@leilei 没用过python调用gmsh
-
查到了一个类似的问题,是fluent用tecplot处理的时候也发现壁面速度不为0:
出现这样问题的原因为:fluent的计算数据是存储在每个单元的中心位置,而tecplot的云图显示是按照节点来显示的。如果是直接导入fluent的.cas文件和.dat文件的话,那么在tecplot中,节点上的值会通过单元中心点的值插值得到,从而造成壁面速度不为0的情况。
不知道OF这面有无特殊处理方式 -
我用paraview和tecplot分别对OF结果的一个wall边界计算均值,其中k,epsilon,包括我用这两个后处理软件计算的压力系数Cp这种变量,两个软件结果都几乎一样。
但是算速度平均值时,paraview为0,tecplot为7.5。按理说OF的wall边界就是设置了速度为0的。但是tecplot的结果不对,不知道是为什么。
然后我又打开contour云图,发现在tecplot里wall边界上的速度还真不是0,不知道tecplot是咋处理边界上的速度的。我确实是在OF里对该边界设置的无滑移边界条件。 -
自从安了of1912后,后处理paraview就没有用过python shell。今天忽然要用参数化后处理了,才发现python shell竟然打不开。。直接提示python support not available。。有无大佬知道是咋回事啊
-
紧接着,由于gmsh网格转换时是没有empty边界的,我又把gmsh网格里改成empty。果然shm的时候耗时110秒。因此我的结论是:
SHM疑似在发现使用了二维网格后,会做一个额外的计算,这个额外的计算消耗了大量的时间。
另外我觉得这个额外计算是不必要的,因为本来二维网格就是厚度方向只有一层,不用细分的。。。 -
@李东岳 有一个很大的发现,blockMesh的时候我设置了empty边界。然后shm的时候 "correcting 2-D motion"这个信息运算了很久。然后我把blockMesh里面的empty边界改成了patch,瞬间治愈!!!!!!!!!!现在blockMesh的shm时间也是3秒了。。。
原来用gmsh的时候是没法定义empty的,默认是patch边界!所以gmsh的shm信息里没有"correcting 2-D motion"这个信息,也没有相应的计算。
现在看来shm似乎面对2D网格(尽管是伪三维网格,厚度方向只有一层网格)的时候出现了一些问题。因此我建议shm的时候先不要设置empty,画完网格后再改边界类型。 -
@李东岳 链接:
https://pan.baidu.com/s/13TAxxBcLouq7SGAj5kdtOw
提取码:zkmi
解压缩后有两个文件夹,一个叫gmsh,一个叫blockMesh,constant里面的网格是用两种方法分别生成好的背景网格,只需运行snappyHexMesh即可。snappyHexMesh里面只打开了addlayers,是给down边界加一个十层的边界层。gmsh和blockMesh的shm文件完全一样。checkMesh应该可以发现gmsh和blockMesh网格计算域,网格数量,最小最大尺寸是差不多的。
但是根据我的shm处理时间,gmsh的只用了3秒,而blockMesh的用了110秒。。差距很大 -
@cresendo gmsh建模还是比较方便的。当时觉得blockMesh要找各个点,面的序号很麻烦。
-
@李东岳 我想发,但是有20MB,发不上来了。。分卷压缩上传提示格式后缀不对。。我留个百度网盘的连接吧
-
@李东岳 我后来比较严格控制了gmsh和blockMesh的网格数量,膨胀率一样,生成的网格几乎一样了,11万的网格总量,差了3千个网格左右。gmsh的网格shm用时3s左右,blockMesh的网格shm用啥110s。差的也太多了,完全想不通为什么。。
-
用diff比较了差异,选取了主要的差异出来。<是blockMesh的,>是gmsh的。
Gmsh的背景网格比BlockMesh的还要多,但是shm用时却少了很多。如果需要的话。我可以严格控制两套网格基本一致,提供给大家用于shm试验44c35 < Number of edges : 246036 --- > Number of edges : 406712 48,49c39,40 < Number of edges : 246036 < Number of edges to retest : 246036 --- > Number of edges : 406712 > Number of edges to retest : 406712 51c42 < Calculated surface intersections in = 0.16 s --- > Calculated surface intersections in = 0.28 s 53c44 < Initial mesh : cells:61380 faces:246036 points:123794 --- > Initial mesh : cells:101504 faces:406712 points:204402 55c46 < 0 61380 --- > 0 101504 65c56 < Number of edges : 246036 --- > Number of edges : 406712 128c119 < dupNonManifoldPoints : Found : 0 non-manifold points (out of 123794) --- > dupNonManifoldPoints : Found : 0 non-manifold points (out of 204402) 149c140 < down 330 10 0.0298 0.544 --- > down 488 10 0.03 0.547 216,217c207,208 < Extruding 330 out of 330 faces (100%). Removed extrusion at 0 faces. < Added 3300 out of 3300 cells (100%). --- > Extruding 488 out of 488 faces (100%). Removed extrusion at 0 faces. > Added 4880 out of 4880 cells (100%). 219c210 < Number of edges : 259246 --- > Number of edges : 426242 226c217 < down 330 10 0.544 100 --- > down 488 10 0.547 100 228,229c219,220 < Writing 3300 added cells to cellSet addedCells < Writing 2970 faces inside added layer to faceSet layerFaces --- > Writing 4880 added cells to cellSet addedCells > Writing 4392 faces inside added layer to faceSet layerFaces 236c227 < Layer mesh : cells:64680 faces:259246 points:130414 --- > Layer mesh : cells:106384 faces:426242 points:214182 238,241c229,232 < 0 64680 < Writing mesh to time constant < Wrote mesh in = 30.25 s. < Layers added in = 30.25 s. --- > 0 106384 > Writing mesh to time 0.01 > Wrote mesh in = 2.52 s. > Layers added in = 2.52 s. 254c245,246 < Finished meshing in = 30.82 s. \ 文件尾没有换行符 --- > Finished meshing in = 3.49 s. > End \ 文件尾没有换行符
-
gmsh生成的背景网格用snappyHexMesh添加边界层的信息如下,用时3s
Create time Create mesh for time = 0 Read mesh in = 0.41 s Using #calc at line 24 in file "/home/saumuel/OpenFOAM/saumuel-v1912/run/flatSnowDrift/blockMesh0copy/system/snappyHexMeshDict" Using #codeStream with "/home/saumuel/OpenFOAM/saumuel-v1912/run/flatSnowDrift/blockMesh0copy/dynamicCode/platforms/linux64GccDPInt32Opt/lib/libcodeStream_144513f76453493486a3a7dac85dde895435431d.so" Overall mesh bounding box : (0 0 0) (192 1 90) Relative tolerance : 1e-06 Absolute matching distance : 0.00021205 Reading refinement surfaces. --> FOAM Warning : From function Foam::refinementSurfaces::refinementSurfaces(const Foam::searchableSurfaces&, const Foam::dictionary&, Foam::label, bool) in file refinementSurfaces/refinementSurfaces.C at line 418 Reading "/home/saumuel/OpenFOAM/saumuel-v1912/run/flatSnowDrift/blockMesh0copy/system/snappyHexMeshDict.castellatedMeshControls.refinementSurfaces" Not all entries in refinementSurfaces dictionary were used. The following entries were not used : 1(roof) Read refinement surfaces in = 0 s Reading refinement shells. Read refinement shells in = 0 s Setting refinement level of surface to be consistent with shells. Checked shell refinement in = 0 s Reading features. Read features in = 0 s Determining initial surface intersections ----------------------------------------- Edge intersection testing: Number of edges : 406712 Number of edges to retest : 0 Number of intersected edges : 0 Edge intersection testing: Number of edges : 406712 Number of edges to retest : 406712 Number of intersected edges : 0 Calculated surface intersections in = 0.28 s Initial mesh : cells:101504 faces:406712 points:204402 Cells per refinement level: 0 101504 Adding patches for surface regions ---------------------------------- Patch Type Region ----- ---- ------ Added patches in = 0 s Edge intersection testing: Number of edges : 406712 Number of edges to retest : 0 Number of intersected edges : 0 Selecting decompositionMethod none [1] Layer thickness specified as first layer and expansion ratio. Shrinking and layer addition phase ---------------------------------- Using mesh parameters { maxNonOrtho 65; maxBoundarySkewness 20; maxInternalSkewness 4; maxConcave 80; 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; } Merging all faces of a cell --------------------------- - which are on the same patch - which make an angle < 120 degrees (cos:-0.5) - as long as the resulting face doesn't become concave by more than 90 degrees (0=straight, 180=fully concave) Merging 0 sets of faces. No faces merged ... Merging all points on surface that - are used by only two boundary faces and - make an angle with a cosine of more than -0.5. No straight edges simplified and no points removed ... Checking mesh manifoldness ... Checking initial mesh ... Checking faces in error : non-orthogonality > 65 degrees : 0 faces with face pyramid volume < 1e-13 : 0 faces with face-decomposition tet quality < 1e-15 : 0 faces with concavity > 80 degrees : 0 faces with skewness > 4 (internal) or 20 (boundary) : 0 faces with interpolation weights (0..1) < 0.02 : 0 faces with volume ratio of neighbour cells < 0.01 : 0 faces with face twist < 0.02 : 0 faces on cells with determinant < 0.001 : 0 Detected 0 illegal faces (concave, zero area or negative cell pyramid volume) Duplicating 0 points on faceZones of type boundary Handling points with inconsistent layer specification ... dupNonManifoldPoints : Found : 0 non-manifold points (out of 204402) Adding in total 0 inter-processor patches to handle extrusion of non-manifold processor boundaries. Handling points with inconsistent layer specification ... Handling non-manifold points ... Checking patch manifoldness ... Outside of local patch is multiply connected across edges or points at 0 points. Set displacement to zero for all 0 non-manifold points Handling feature edges (angle < 120) ... Set displacement to zero for points on 0 feature edges Handling cells with warped patch faces ... Set displacement to zero on 0 warped faces since layer would be > 0.5 of the size of the bounding box. patch faces layers avg thickness[m] near-wall overall ----- ----- ------ --------- ------- down 488 10 0.03 0.547 Selecting externalDisplacementMeshMover displacementMedialAxis displacementMedialAxis : Calculating distance to Medial Axis ... --> FOAM IOWarning : Found [v1712] 'minMedianAxisAngle' entry instead of 'minMedialAxisAngle' in dictionary "/home/saumuel/OpenFOAM/saumuel-v1912/run/flatSnowDrift/blockMesh0copy/system/snappyHexMeshDict.addLayersControls" This keyword is deemed to be 24 months old. fieldSmoother : Smoothing normals ... Iteration 0 residual 1.06709e-17 displacementMedialAxis : Inserting points on patch frontAndBack if angle to nearest layer patch > 30 degrees. displacementMedialAxis : Inserting points on patch inlet if angle to nearest layer patch > 30 degrees. displacementMedialAxis : Inserting points on patch outlet if angle to nearest layer patch > 30 degrees. displacementMedialAxis : Inserting points on patch up if angle to nearest layer patch > 30 degrees. fieldSmoother : Smoothing normals in interior ... Iteration 0 residual 1.55283e-17 Layer addition iteration 0 -------------------------- Determining displacement for added points according to pointNormal ... Detected 0 points with point normal pointing through faces. Reset displacement at 0 points to average of surrounding points. displacementMedialAxis : Smoothing using Medial Axis ... displacementMedialAxis : Reducing layer thickness at 0 nodes where thickness to medial axis distance is large displacementMedialAxis : Removing isolated regions ... - if partially extruded faces make angle < 60 - if exclusively surrounded by non-extruded faces displacementMedialAxis : Number of isolated points extrusion stopped : 0 fieldSmoother : Smoothing field ... Iteration 0 residual 1.24872e-17 displacementMedialAxis : Moving mesh ... displacementMedialAxis : Iteration 0 Moving mesh using displacement scaling : min:1 max:1 Checking faces in error : non-orthogonality > 65 degrees : 0 faces with face pyramid volume < 1e-13 : 0 faces with face-decomposition tet quality < 1e-15 : 0 faces with concavity > 80 degrees : 0 faces with skewness > 4 (internal) or 20 (boundary) : 0 faces with interpolation weights (0..1) < 0.02 : 0 faces with volume ratio of neighbour cells < 0.01 : 0 faces with face twist < 0.02 : 0 faces on cells with determinant < 0.001 : 0 displacementMedialAxis : Successfully moved mesh displacementMedialAxis : Finished moving mesh ... truncateDisplacement : Unextruded 0 faces due to non-consecutive vertices being extruded. truncateDisplacement : Unextruded 0 faces due to stringed edges with inconsistent extrusion. Setting up information for layer truncation ... Detected 0 baffles across faceZones of type internal Checking mesh with layer ... Checking faces in error : non-orthogonality > 65 degrees : 0 faces with face pyramid volume < 1e-13 : 0 faces with face-decomposition tet quality < 1e-15 : 0 faces with concavity > 80 degrees : 0 faces with skewness > 4 (internal) or 20 (boundary) : 0 faces with interpolation weights (0..1) < 0.02 : 0 faces with volume ratio of neighbour cells < 0.01 : 0 faces with face twist < 0.02 : 0 faces on cells with determinant < 0.001 : 0 Detected 0 illegal faces (concave, zero area or negative cell pyramid volume) Extruding 488 out of 488 faces (100%). Removed extrusion at 0 faces. Added 4880 out of 4880 cells (100%). Edge intersection testing: Number of edges : 426242 Number of edges to retest : 0 Number of intersected edges : 0 patch faces layers overall thickness [m] [%] ----- ----- ------ --- --- down 488 10 0.547 100 Writing 4880 added cells to cellSet addedCells Writing 4392 faces inside added layer to faceSet layerFaces Writing fields with layer information: nSurfaceLayers : actual number of layers thickness : overall layer thickness thicknessFraction : overall layer thickness (fraction of desired thickness) Layer mesh : cells:106384 faces:426242 points:214182 Cells per refinement level: 0 106384 Writing mesh to time 0.01 Wrote mesh in = 2.52 s. Layers added in = 2.52 s. Checking final mesh ... Checking faces in error : non-orthogonality > 65 degrees : 0 faces with face pyramid volume < 1e-13 : 0 faces with face-decomposition tet quality < 1e-15 : 0 faces with concavity > 80 degrees : 0 faces with skewness > 4 (internal) or 20 (boundary) : 0 faces with interpolation weights (0..1) < 0.02 : 0 faces with volume ratio of neighbour cells < 0.01 : 0 faces with face twist < 0.02 : 0 faces on cells with determinant < 0.001 : 0 Finished meshing without any errors Finished meshing in = 3.49 s. End
-
blockMesh生成的背景网格用snappyHexMesh添加边界层的信息如下,用时30s
Create time Create mesh for time = 0 Read mesh in = 0.24 s Using #calc at line 24 in file "/home/saumuel/OpenFOAM/saumuel-v1912/run/flatSnowDrift/blockMesh0/system/snappyHexMeshDict" Using #codeStream with "/home/saumuel/OpenFOAM/saumuel-v1912/run/flatSnowDrift/blockMesh0/dynamicCode/platforms/linux64GccDPInt32Opt/lib/libcodeStream_144513f76453493486a3a7dac85dde895435431d.so" Could not load "/home/saumuel/OpenFOAM/saumuel-v1912/run/flatSnowDrift/blockMesh0/dynamicCode/platforms/linux64GccDPInt32Opt/lib/libcodeStream_144513f76453493486a3a7dac85dde895435431d.so" /home/saumuel/OpenFOAM/saumuel-v1912/run/flatSnowDrift/blockMesh0/dynamicCode/platforms/linux64GccDPInt32Opt/lib/libcodeStream_144513f76453493486a3a7dac85dde895435431d.so: cannot open shared object file: No such file or directory Creating new library in "dynamicCode/_144513f76453493486a3a7dac85dde895435431d/platforms/linux64GccDPInt32Opt/lib/libcodeStream_144513f76453493486a3a7dac85dde895435431d.so" Invoking wmake libso /home/saumuel/OpenFOAM/saumuel-v1912/run/flatSnowDrift/blockMesh0/dynamicCode/_144513f76453493486a3a7dac85dde895435431d wmake libso /home/saumuel/OpenFOAM/saumuel-v1912/run/flatSnowDrift/blockMesh0/dynamicCode/_144513f76453493486a3a7dac85dde895435431d ln: ./lnInclude dep: codeStreamTemplate.C Ctoo: codeStreamTemplate.C ld: /home/saumuel/OpenFOAM/saumuel-v1912/run/flatSnowDrift/blockMesh0/dynamicCode/_144513f76453493486a3a7dac85dde895435431d/../platforms/linux64GccDPInt32Opt/lib/libcodeStream_144513f76453493486a3a7dac85dde895435431d.so Overall mesh bounding box : (0 0 0) (192 1 90) Relative tolerance : 1e-06 Absolute matching distance : 0.00021205 Reading refinement surfaces. --> FOAM Warning : From function Foam::refinementSurfaces::refinementSurfaces(const Foam::searchableSurfaces&, const Foam::dictionary&, Foam::label, bool) in file refinementSurfaces/refinementSurfaces.C at line 418 Reading "/home/saumuel/OpenFOAM/saumuel-v1912/run/flatSnowDrift/blockMesh0/system/snappyHexMeshDict.castellatedMeshControls.refinementSurfaces" Not all entries in refinementSurfaces dictionary were used. The following entries were not used : 1(roof) Read refinement surfaces in = 0 s Reading refinement shells. Read refinement shells in = 0 s Setting refinement level of surface to be consistent with shells. Checked shell refinement in = 0 s Reading features. Read features in = 0 s Determining initial surface intersections ----------------------------------------- Edge intersection testing: Number of edges : 246036 Number of edges to retest : 0 Number of intersected edges : 0 Edge intersection testing: Number of edges : 246036 Number of edges to retest : 246036 Number of intersected edges : 0 Calculated surface intersections in = 0.16 s Initial mesh : cells:61380 faces:246036 points:123794 Cells per refinement level: 0 61380 Adding patches for surface regions ---------------------------------- Patch Type Region ----- ---- ------ Added patches in = 0 s Edge intersection testing: Number of edges : 246036 Number of edges to retest : 0 Number of intersected edges : 0 Selecting decompositionMethod none [1] Layer thickness specified as first layer and expansion ratio. Shrinking and layer addition phase ---------------------------------- Using mesh parameters { maxNonOrtho 65; maxBoundarySkewness 20; maxInternalSkewness 4; maxConcave 80; 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; } Merging all faces of a cell --------------------------- - which are on the same patch - which make an angle < 120 degrees (cos:-0.5) - as long as the resulting face doesn't become concave by more than 90 degrees (0=straight, 180=fully concave) Merging 0 sets of faces. No faces merged ... Merging all points on surface that - are used by only two boundary faces and - make an angle with a cosine of more than -0.5. No straight edges simplified and no points removed ... Checking mesh manifoldness ... Checking initial mesh ... Checking faces in error : non-orthogonality > 65 degrees : 0 faces with face pyramid volume < 1e-13 : 0 faces with face-decomposition tet quality < 1e-15 : 0 faces with concavity > 80 degrees : 0 faces with skewness > 4 (internal) or 20 (boundary) : 0 faces with interpolation weights (0..1) < 0.02 : 0 faces with volume ratio of neighbour cells < 0.01 : 0 faces with face twist < 0.02 : 0 faces on cells with determinant < 0.001 : 0 Detected 0 illegal faces (concave, zero area or negative cell pyramid volume) Duplicating 0 points on faceZones of type boundary Handling points with inconsistent layer specification ... dupNonManifoldPoints : Found : 0 non-manifold points (out of 123794) Adding in total 0 inter-processor patches to handle extrusion of non-manifold processor boundaries. Handling points with inconsistent layer specification ... Handling non-manifold points ... Checking patch manifoldness ... Outside of local patch is multiply connected across edges or points at 0 points. Set displacement to zero for all 0 non-manifold points Handling feature edges (angle < 120) ... Set displacement to zero for points on 0 feature edges Handling cells with warped patch faces ... Set displacement to zero on 0 warped faces since layer would be > 0.5 of the size of the bounding box. patch faces layers avg thickness[m] near-wall overall ----- ----- ------ --------- ------- down 330 10 0.0298 0.544 Selecting externalDisplacementMeshMover displacementMedialAxis displacementMedialAxis : Calculating distance to Medial Axis ... --> FOAM IOWarning : Found [v1712] 'minMedianAxisAngle' entry instead of 'minMedialAxisAngle' in dictionary "/home/saumuel/OpenFOAM/saumuel-v1912/run/flatSnowDrift/blockMesh0/system/snappyHexMeshDict.addLayersControls" This keyword is deemed to be 24 months old. fieldSmoother : Smoothing normals ... Iteration 0 residual 1.17395e-17 displacementMedialAxis : Inserting points on patch inlet if angle to nearest layer patch > 30 degrees. displacementMedialAxis : Inserting points on patch up if angle to nearest layer patch > 30 degrees. displacementMedialAxis : Inserting points on patch outlet if angle to nearest layer patch > 30 degrees. fieldSmoother : Smoothing normals in interior ... Iteration 0 residual 1.72658e-17 Layer addition iteration 0 -------------------------- Determining displacement for added points according to pointNormal ... Detected 0 points with point normal pointing through faces. Reset displacement at 0 points to average of surrounding points. displacementMedialAxis : Smoothing using Medial Axis ... displacementMedialAxis : Reducing layer thickness at 0 nodes where thickness to medial axis distance is large displacementMedialAxis : Removing isolated regions ... - if partially extruded faces make angle < 60 - if exclusively surrounded by non-extruded faces displacementMedialAxis : Number of isolated points extrusion stopped : 0 fieldSmoother : Smoothing field ... Iteration 0 residual 1.07333e-17 displacementMedialAxis : Moving mesh ... displacementMedialAxis : Iteration 0 Moving mesh using displacement scaling : min:1 max:1 Correcting 2-D mesh motion ...done Checking faces in error : non-orthogonality > 65 degrees : 0 faces with face pyramid volume < 1e-13 : 0 faces with face-decomposition tet quality < 1e-15 : 0 faces with concavity > 80 degrees : 0 faces with skewness > 4 (internal) or 20 (boundary) : 0 faces with interpolation weights (0..1) < 0.02 : 0 faces with volume ratio of neighbour cells < 0.01 : 0 faces with face twist < 0.02 : 0 faces on cells with determinant < 0.001 : 0 displacementMedialAxis : Successfully moved mesh displacementMedialAxis : Finished moving mesh ... truncateDisplacement : Unextruded 0 faces due to non-consecutive vertices being extruded. truncateDisplacement : Unextruded 0 faces due to stringed edges with inconsistent extrusion. Setting up information for layer truncation ... Detected 0 baffles across faceZones of type internal Checking mesh with layer ... Checking faces in error : non-orthogonality > 65 degrees : 0 faces with face pyramid volume < 1e-13 : 0 faces with face-decomposition tet quality < 1e-15 : 0 faces with concavity > 80 degrees : 0 faces with skewness > 4 (internal) or 20 (boundary) : 0 faces with interpolation weights (0..1) < 0.02 : 0 faces with volume ratio of neighbour cells < 0.01 : 0 faces with face twist < 0.02 : 0 faces on cells with determinant < 0.001 : 0 Detected 0 illegal faces (concave, zero area or negative cell pyramid volume) Extruding 330 out of 330 faces (100%). Removed extrusion at 0 faces. Added 3300 out of 3300 cells (100%). Edge intersection testing: Number of edges : 259246 Number of edges to retest : 0 Number of intersected edges : 0 patch faces layers overall thickness [m] [%] ----- ----- ------ --- --- down 330 10 0.544 100 Writing 3300 added cells to cellSet addedCells Writing 2970 faces inside added layer to faceSet layerFaces Writing fields with layer information: nSurfaceLayers : actual number of layers thickness : overall layer thickness thicknessFraction : overall layer thickness (fraction of desired thickness) Layer mesh : cells:64680 faces:259246 points:130414 Cells per refinement level: 0 64680 Writing mesh to time constant Wrote mesh in = 30.25 s. Layers added in = 30.25 s. Checking final mesh ... Checking faces in error : non-orthogonality > 65 degrees : 0 faces with face pyramid volume < 1e-13 : 0 faces with face-decomposition tet quality < 1e-15 : 0 faces with concavity > 80 degrees : 0 faces with skewness > 4 (internal) or 20 (boundary) : 0 faces with interpolation weights (0..1) < 0.02 : 0 faces with volume ratio of neighbour cells < 0.01 : 0 faces with face twist < 0.02 : 0 faces on cells with determinant < 0.001 : 0 Finished meshing without any errors Finished meshing in = 30.82 s. End
-
还是不太对,时间差的太多了,gmsh的网格能3秒就画好,blockMesh的网格总量还少一些,要用30s。太奇怪了
-
目前发现可能跟边界层法向上计算域网格数量有关。。我用blockMesh在高度方向上的网格比gmsh密一些。。我在blockMesh上改稀疏之后,shm时间变少了一些了
-
遇到一个很奇怪的事情。我用gmsh画了一个背景网格,然后gmshToFoam转成OF网格,用shm添加边界层,处理时间很快,就40秒。
但是如果我用blockMesh生成差不多的背景网格(计算域大小,最小网格尺寸一致),用相同的shm文件控制,添加边界层,处理时间慢的多,用了300秒。
两种差不多的网格,只是生成方法不同,为何shm处理计算有这么大的差异。
想不明白 -
@cccrrryyy 后来查了一下GAMA可以算非对称矩阵。忘了当时怎么设置的了,现在改成我记得的边界条件GAMG可以算几步,但是算着算着就报错了,应该是发散报错。我现在感觉可能当时是一开始计算就发散了。。
-
最近有个新发现,我自己写的求解器,刚开始用GAMG能算,但是后来改了一下边界条件,用GAMG算就直接报错了,然后改成用PBiCGStab又可以成功计算了。。。暂时没精力研究原因。
我瞎猜原因是边界条件的改变导致矩阵不是对称了???难道GAMG只能算对称矩阵?? -
@xpqiu 后来改进了壁面网格尺寸,用了渐变加密。。保证y+的值在150内,结果还是跟文献不同。。我问了原作者同一个课题组的博士,他的结果和我类似。。但是对那篇文章也没有评价什么。。我只能怀疑当时原作者确实设置的不太合理了。。
-
@李东岳 正想到用WSL跑一下看看。。以前自己用WSL跑of并行发现好像更慢了,我一直认为WSL开了并行也不管用,还是只能调用一个核心。。现在看来可能是没配置好。。
-
感觉是不是fluent有什么黑科技,在fluent里能算,在of里发散了。。
-
似乎是网格尺寸的原因,我把速度缩小10倍,能算了,说明以前的Y+可能有问题
-
遇到一个奇怪的事情,在做模拟的时候,用足尺模型计算可以正常算,做缩尺模型的时候就会发散
我做的二维模拟,厚度方向只有一层网格,边界条件按论文设置的,论文用fluent算的缩尺模型,我放大到足尺模型算没有问题,但是按论文的尺寸算,第一步Uz就是solution singularity,算着算着epsilon就发散了,很奇怪。我用的simpleFoam,大家有啥建议吗,按理说应该能算啊。。。RAS { RASModel realizableKE; turbulence on; printCoeffs on; A0 4; C2 1.9; sigmak 1; sigmaEps 1.2; } No MRF models present No finite volume options present Starting time loop wallShearStress wallShearStress: processing all wall patches Time = 0.01 DILUPBiCGStab: Solving for Ux, Initial residual = 1, Final residual = 9.02931e-11, No Iterations 5 DILUPBiCGStab: Solving for Uz: solution singularity GAMG: Solving for p, Initial residual = 1, Final residual = 0.0511143, No Iterations 14 GAMG: Solving for p, Initial residual = 9.35553e-05, Final residual = 7.3953e-06, No Iterations 2 time step continuity errors : sum local = 5.93648e-05, global = -2.24242e-05, cumulative = -2.24242e-05 DILUPBiCGStab: Solving for epsilon, Initial residual = 0.141893, Final residual = 1.91784e-12, No Iterations 5 DILUPBiCGStab: Solving for k, Initial residual = 1, Final residual = 2.77584e-10, No Iterations 5 ExecutionTime = 1.25 s ClockTime = 2 s Time = 0.02 DILUPBiCGStab: Solving for Ux, Initial residual = 0.527912, Final residual = 5.42646e-12, No Iterations 5 DILUPBiCGStab: Solving for Uz, Initial residual = 0.587444, Final residual = 1.93572e-11, No Iterations 5 GAMG: Solving for p, Initial residual = 0.0040408, Final residual = 0.000253175, No Iterations 4 GAMG: Solving for p, Initial residual = 0.00119141, Final residual = 0.000118566, No Iterations 6 time step continuity errors : sum local = 0.000903519, global = 0.000115926, cumulative = 9.35023e-05 DILUPBiCGStab: Solving for epsilon, Initial residual = 0.00632051, Final residual = 4.41338e-13, No Iterations 5 DILUPBiCGStab: Solving for k, Initial residual = 0.93484, Final residual = 9.44193e-11, No Iterations 5 ExecutionTime = 1.75 s ClockTime = 2 s Time = 0.03 DILUPBiCGStab: Solving for Ux, Initial residual = 0.296853, Final residual = 3.58872e-10, No Iterations 5 DILUPBiCGStab: Solving for Uz, Initial residual = 0.358972, Final residual = 3.93449e-10, No Iterations 5 GAMG: Solving for p, Initial residual = 0.0399261, Final residual = 0.00208552, No Iterations 1 GAMG: Solving for p, Initial residual = 0.00341154, Final residual = 0.000273619, No Iterations 7 time step continuity errors : sum local = 0.00196847, global = 0.0002969, cumulative = 0.000390402 DILUPBiCGStab: Solving for epsilon, Initial residual = 0.0295801, Final residual = 9.2042e-13, No Iterations 5 DILUPBiCGStab: Solving for k, Initial residual = 0.171095, Final residual = 5.49745e-10, No Iterations 5 ExecutionTime = 2.22 s ClockTime = 3 s Time = 0.04 DILUPBiCGStab: Solving for Ux, Initial residual = 0.136215, Final residual = 5.49597e-11, No Iterations 5 DILUPBiCGStab: Solving for Uz, Initial residual = 0.31202, Final residual = 1.31588e-10, No Iterations 5 GAMG: Solving for p, Initial residual = 0.130254, Final residual = 0.00470188, No Iterations 1 GAMG: Solving for p, Initial residual = 0.00639474, Final residual = 0.000576745, No Iterations 8 time step continuity errors : sum local = 0.00159515, global = 0.000184109, cumulative = 0.000574511 DILUPBiCGStab: Solving for epsilon, Initial residual = 0.0325781, Final residual = 7.34046e-12, No Iterations 5 DILUPBiCGStab: Solving for k, Initial residual = 0.150909, Final residual = 1.5092e-10, No Iterations 5 ExecutionTime = 2.72 s ClockTime = 3 s Time = 0.05 DILUPBiCGStab: Solving for Ux, Initial residual = 0.309871, Final residual = 7.73697e-11, No Iterations 5 DILUPBiCGStab: Solving for Uz, Initial residual = 0.461963, Final residual = 1.28081e-10, No Iterations 5 GAMG: Solving for p, Initial residual = 0.167412, Final residual = 0.00510895, No Iterations 1 GAMG: Solving for p, Initial residual = 0.00610619, Final residual = 0.000483956, No Iterations 7 time step continuity errors : sum local = 0.00101936, global = 5.21071e-05, cumulative = 0.000626618 DILUPBiCGStab: Solving for epsilon, Initial residual = 0.00882784, Final residual = 7.51562e-13, No Iterations 5 DILUPBiCGStab: Solving for k, Initial residual = 0.236641, Final residual = 6.08151e-11, No Iterations 5 ExecutionTime = 3.2 s ClockTime = 3 s Time = 0.06 DILUPBiCGStab: Solving for Ux, Initial residual = 0.341882, Final residual = 1.0659e-10, No Iterations 5 DILUPBiCGStab: Solving for Uz, Initial residual = 0.454444, Final residual = 1.41636e-10, No Iterations 5 GAMG: Solving for p, Initial residual = 0.132903, Final residual = 0.00323376, No Iterations 1 GAMG: Solving for p, Initial residual = 0.00381782, Final residual = 0.000236562, No Iterations 6 time step continuity errors : sum local = 0.000731669, global = -0.000105249, cumulative = 0.000521369 DILUPBiCGStab: Solving for epsilon, Initial residual = 0.0075595, Final residual = 4.3385e-12, No Iterations 5 DILUPBiCGStab: Solving for k, Initial residual = 0.192427, Final residual = 3.91865e-10, No Iterations 5 ExecutionTime = 3.68 s ClockTime = 4 s Time = 0.07 DILUPBiCGStab: Solving for Ux, Initial residual = 0.282586, Final residual = 2.67545e-10, No Iterations 5 DILUPBiCGStab: Solving for Uz, Initial residual = 0.35265, Final residual = 2.45834e-10, No Iterations 5 GAMG: Solving for p, Initial residual = 0.151323, Final residual = 0.00331011, No Iterations 1 GAMG: Solving for p, Initial residual = 0.00398265, Final residual = 0.000390266, No Iterations 5 time step continuity errors : sum local = 0.00105724, global = -8.7694e-05, cumulative = 0.000433675 DILUPBiCGStab: Solving for epsilon, Initial residual = 0.00759443, Final residual = 1.21657e-12, No Iterations 5 DILUPBiCGStab: Solving for k, Initial residual = 0.18612, Final residual = 3.54752e-11, No Iterations 5 ExecutionTime = 4.13 s ClockTime = 4 s Time = 0.08 DILUPBiCGStab: Solving for Ux, Initial residual = 0.213044, Final residual = 6.05622e-11, No Iterations 5 DILUPBiCGStab: Solving for Uz, Initial residual = 0.28304, Final residual = 9.67631e-11, No Iterations 5 GAMG: Solving for p, Initial residual = 0.189574, Final residual = 0.00373539, No Iterations 1 GAMG: Solving for p, Initial residual = 0.00463947, Final residual = 0.000336507, No Iterations 7 time step continuity errors : sum local = 0.000557299, global = -5.79127e-05, cumulative = 0.000375763 DILUPBiCGStab: Solving for epsilon, Initial residual = 0.00781571, Final residual = 1.93204e-12, No Iterations 5 DILUPBiCGStab: Solving for k, Initial residual = 0.138057, Final residual = 3.95958e-11, No Iterations 5 ExecutionTime = 4.62 s ClockTime = 5 s Time = 0.09 DILUPBiCGStab: Solving for Ux, Initial residual = 0.237589, Final residual = 2.96319e-11, No Iterations 5 DILUPBiCGStab: Solving for Uz, Initial residual = 0.243097, Final residual = 1.46831e-10, No Iterations 5 GAMG: Solving for p, Initial residual = 0.180488, Final residual = 0.00312019, No Iterations 1 GAMG: Solving for p, Initial residual = 0.00383925, Final residual = 0.00026896, No Iterations 7 time step continuity errors : sum local = 0.00035406, global = -2.62236e-05, cumulative = 0.000349539 DILUPBiCGStab: Solving for epsilon, Initial residual = 0.006831, Final residual = 3.72725e-13, No Iterations 5 DILUPBiCGStab: Solving for k, Initial residual = 0.126435, Final residual = 2.17405e-11, No Iterations 5 ExecutionTime = 5.09 s ClockTime = 5 s Time = 0.1 DILUPBiCGStab: Solving for Ux, Initial residual = 0.35012, Final residual = 3.04751e-11, No Iterations 5 DILUPBiCGStab: Solving for Uz, Initial residual = 0.30704, Final residual = 8.67602e-11, No Iterations 5 GAMG: Solving for p, Initial residual = 0.149198, Final residual = 0.00253316, No Iterations 1 GAMG: Solving for p, Initial residual = 0.00305357, Final residual = 0.000284755, No Iterations 5 time step continuity errors : sum local = 0.000375062, global = 2.83423e-05, cumulative = 0.000377881 DILUPBiCGStab: Solving for epsilon, Initial residual = 0.00611188, Final residual = 1.87536e-13, No Iterations 5 DILUPBiCGStab: Solving for k, Initial residual = 0.289974, Final residual = 2.50168e-11, No Iterations 5 ExecutionTime = 5.88 s ClockTime = 6 s wallShearStress wallShearStress write: writing field wallShearStress min/max(down) = (-2.87883 -3.63059e-22 -0.0927051), (0.461882 3.65848e-22 0.0998493) min/max(roof) = (-17.9474 -1.26777e-18 -3.09904), (-0.42612 1.16826e-18 6.57279) min/max(buildingWall) = (-6.27984 -1.34705e-19 -2.37151), (0.222287 1.01572e-19 6.15707) Time = 0.11 DILUPBiCGStab: Solving for Ux, Initial residual = 0.531763, Final residual = 2.03224e-12, No Iterations 5 DILUPBiCGStab: Solving for Uz, Initial residual = 0.56992, Final residual = 2.11653e-12, No Iterations 5 GAMG: Solving for p, Initial residual = 0.153026, Final residual = 0.00256444, No Iterations 1 GAMG: Solving for p, Initial residual = 0.00310925, Final residual = 0.000212052, No Iterations 7 time step continuity errors : sum local = 0.00026462, global = 1.89049e-05, cumulative = 0.000396786 DILUPBiCGStab: Solving for epsilon, Initial residual = 0.0049126, Final residual = 9.09796e-14, No Iterations 5 DILUPBiCGStab: Solving for k, Initial residual = 0.282556, Final residual = 9.72273e-13, No Iterations 5 ExecutionTime = 6.4 s ClockTime = 7 s Time = 0.12 DILUPBiCGStab: Solving for Ux, Initial residual = 0.23185, Final residual = 1.68742e-11, No Iterations 5 DILUPBiCGStab: Solving for Uz, Initial residual = 0.377097, Final residual = 1.61394e-11, No Iterations 5 GAMG: Solving for p, Initial residual = 0.175782, Final residual = 0.0040422, No Iterations 1 GAMG: Solving for p, Initial residual = 0.00486161, Final residual = 0.000340632, No Iterations 5 time step continuity errors : sum local = 0.000478204, global = 5.30041e-05, cumulative = 0.00044979 DILUPBiCGStab: Solving for epsilon, Initial residual = 0.00552237, Final residual = 1.23137e-13, No Iterations 5 DILUPBiCGStab: Solving for k, Initial residual = 0.394754, Final residual = 2.5363e-11, No Iterations 5 ExecutionTime = 6.84 s ClockTime = 7 s Time = 0.13 DILUPBiCGStab: Solving for Ux, Initial residual = 0.379743, Final residual = 1.63324e-11, No Iterations 5 DILUPBiCGStab: Solving for Uz, Initial residual = 0.230827, Final residual = 4.62169e-12, No Iterations 5 GAMG: Solving for p, Initial residual = 0.207157, Final residual = 0.00627811, No Iterations 1 GAMG: Solving for p, Initial residual = 0.00764946, Final residual = 0.000568072, No Iterations 7 time step continuity errors : sum local = 0.000345064, global = 3.01655e-05, cumulative = 0.000479956 DILUPBiCGStab: Solving for epsilon, Initial residual = 0.00351726, Final residual = 8.00546e-14, No Iterations 5 DILUPBiCGStab: Solving for k, Initial residual = 0.386289, Final residual = 1.57371e-13, No Iterations 5 ExecutionTime = 7.33 s ClockTime = 8 s Time = 0.14 DILUPBiCGStab: Solving for Ux, Initial residual = 0.649438, Final residual = 4.46392e-16, No Iterations 5 DILUPBiCGStab: Solving for Uz, Initial residual = 0.506957, Final residual = 1.07223e-16, No Iterations 5 GAMG: Solving for p, Initial residual = 0.156169, Final residual = 0.00375195, No Iterations 1 GAMG: Solving for p, Initial residual = 0.00165985, Final residual = 0.000160854, No Iterations 3 time step continuity errors : sum local = 0.00058144, global = 7.92418e-06, cumulative = 0.00048788 DILUPBiCGStab: Solving for epsilon, Initial residual = 0.00170993, Final residual = 2.94273e-17, No Iterations 5 DILUPBiCGStab: Solving for k, Initial residual = 0.329833, Final residual = 1.51244e-18, No Iterations 5 ExecutionTime = 7.77 s ClockTime = 8 s Time = 0.15 DILUPBiCGStab: Solving for Ux, Initial residual = 0.571959, Final residual = 3.32197e-16, No Iterations 5 DILUPBiCGStab: Solving for Uz, Initial residual = 0.458761, Final residual = 1.52795e-17, No Iterations 5 GAMG: Solving for p, Initial residual = 0.0452743, Final residual = 0.00151925, No Iterations 1 GAMG: Solving for p, Initial residual = 0.00267839, Final residual = 0.000230421, No Iterations 1 time step continuity errors : sum local = 0.00342145, global = -1.32423e-05, cumulative = 0.000474638 DILUPBiCGStab: Solving for epsilon, Initial residual = 0.000546564, Final residual = 2.02553e-17, No Iterations 5 DILUPBiCGStab: Solving for k, Initial residual = 0.130893, Final residual = 2.82138e-19, No Iterations 5 ExecutionTime = 8.17 s ClockTime = 8 s Time = 0.16 DILUPBiCGStab: Solving for Ux, Initial residual = 0.463509, Final residual = 1.57563e-17, No Iterations 5 DILUPBiCGStab: Solving for Uz, Initial residual = 0.509736, Final residual = 4.59172e-18, No Iterations 5 GAMG: Solving for p, Initial residual = 0.134174, Final residual = 0.00768087, No Iterations 2 GAMG: Solving for p, Initial residual = 0.00363852, Final residual = 0.000201176, No Iterations 4 time step continuity errors : sum local = 0.0210048, global = -0.000201257, cumulative = 0.000273381 DILUPBiCGStab: Solving for epsilon, Initial residual = 0.00400355, Final residual = 8.29593e-18, No Iterations 5 DILUPBiCGStab: Solving for k, Initial residual = 0.366453, Final residual = 1.20683e-18, No Iterations 5 ExecutionTime = 8.63 s ClockTime = 9 s Time = 0.17 DILUPBiCGStab: Solving for Ux, Initial residual = 0.267952, Final residual = 4.29013e-23, No Iterations 5 DILUPBiCGStab: Solving for Uz, Initial residual = 0.540221, Final residual = 5.71911e-22, No Iterations 5 GAMG: Solving for p, Initial residual = 0.123787, Final residual = 0.00286107, No Iterations 1 GAMG: Solving for p, Initial residual = 6.716e-05, Final residual = 3.30864e-06, No Iterations 6 time step continuity errors : sum local = 1172.79, global = -133.626, cumulative = -133.626 DILUPBiCGStab: Solving for epsilon, Initial residual = 0.00118844, Final residual = 9.31074e-18, No Iterations 5 DILUPBiCGStab: Solving for k, Initial residual = 0.43358, Final residual = 1.23182e-16, No Iterations 5 ExecutionTime = 9.1 s ClockTime = 9 s Time = 0.18 DILUPBiCGStab: Solving for Ux, Initial residual = 0.699964, Final residual = 2.85242e-22, No Iterations 5 DILUPBiCGStab: Solving for Uz, Initial residual = 0.654102, Final residual = 3.34865e-22, No Iterations 5 GAMG: Solving for p, Initial residual = 0.1765, Final residual = 8.0125e-05, No Iterations 1 GAMG: Solving for p, Initial residual = 0.332435, Final residual = 0.0152816, No Iterations 1 time step continuity errors : sum local = 7.41639e+18, global = 2.63517e+13, cumulative = 2.63517e+13 DILUPBiCGStab: Solving for epsilon, Initial residual = 2.32053e-07, Final residual = 1.76158e-19, No Iterations 5 bounding epsilon, min: -70.8119 max: 8.51758e+10 average: 6.33029e+06 DILUPBiCGStab: Solving for k, Initial residual = 1, Final residual = 4.21351e-16, No Iterations 5 ExecutionTime = 9.51 s ClockTime = 10 s
-
修改后边角处边界层也加上了:
但是在加密交界面网格很畸形:
这是什么导致的呢?有没有改进办法 -
找到解决办法了,在addLayersControls里把featureAngle从60改成90就行
-
我感觉的我模型其实不复杂,但是边界层生成的时候缺有点问题,请大家帮忙看一下如何改进比较好
下图是shm第二步snap后的图:
感觉吻合的还可以的。
然后加边界层后发现夹角处的边界层出了问题:
我shm中对边界层的控制如下:/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: v1806 | | \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object snappyHexMeshDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // Which of the steps to run castellatedMesh true; snap true; addLayers true; // Geometry. Definition of all surfaces. All surfaces are of class // searchableSurface. // Surfaces are used // - to specify refinement for any mesh cell intersecting it // - to specify refinement for any mesh cell inside/outside/near // - to 'snap' the mesh boundary to the surface geometry { flatRoof.stl { type triSurfaceMesh; name roof; } refinementBox { type searchableBox; min (20 0 0); max (80 1.0 8); } }; // Settings for the castellatedMesh generation. castellatedMeshControls { // Refinement parameters // ~~~~~~~~~~~~~~~~~~~~~ // If local number of cells is >= maxLocalCells on any processor // switches from from refinement followed by balancing // (current method) to (weighted) balancing before refinement. maxLocalCells 100000; // Overall cell limit (approximately). Refinement will stop immediately // upon reaching this number so a refinement level might not complete. // Note that this is the number of cells before removing the part which // is not 'visible' from the keepPoint. The final number of cells might // actually be a lot less. maxGlobalCells 2000000; // The surface refinement loop might spend lots of iterations refining just a // few cells. This setting will cause refinement to stop if <= minimumRefine // are selected for refinement. Note: it will at least do one iteration // (unless the number of cells to refine is 0) minRefinementCells 10; // Allow a certain level of imbalance during refining // (since balancing is quite expensive) // Expressed as fraction of perfect balance (= overall number of cells / // nProcs). 0=balance always. maxLoadUnbalance 0.10; // Number of buffer layers between different levels. // 1 means normal 2:1 refinement restriction, larger means slower // refinement. nCellsBetweenLevels 3; // Explicit feature edge refinement // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Specifies a level for any cell intersected by its edges. // This is a featureEdgeMesh, read from constant/triSurface for now. features ( ); // Surface based refinement // ~~~~~~~~~~~~~~~~~~~~~~~~ // Specifies two levels for every surface. The first is the minimum level, // every cell intersecting a surface gets refined up to the minimum level. // The second level is the maximum level. Cells that 'see' multiple // intersections where the intersections make an // angle > resolveFeatureAngle get refined up to the maximum level. refinementSurfaces { roof { // Surface-wise min and max refinement level level (1 1); // Optional specification of patch type (default is wall). No // constraint types (cyclic, symmetry) etc. are allowed. patchInfo { type wall; inGroups (roof); } } } // Resolve sharp angles resolveFeatureAngle 30; // Region-wise refinement // ~~~~~~~~~~~~~~~~~~~~~~ // Specifies refinement level for cells in relation to a surface. One of // three modes // - distance. 'levels' specifies per distance to the surface the // wanted refinement level. The distances need to be specified in // descending order. // - inside. 'levels' is only one entry and only the level is used. All // cells inside the surface get refined up to the level. The surface // needs to be closed for this to be possible. // - outside. Same but cells outside. refinementRegions { refinementBox { mode inside; levels ((1E15 1)); } } // Mesh selection // ~~~~~~~~~~~~~~ // After refinement patches get added for all refinementSurfaces and // all cells intersecting the surfaces get put into these patches. The // section reachable from the locationInMesh is kept. // NOTE: This point should never be on a face, always inside a cell, even // after refinement. locationInMesh (0.5 0.5 0.5); // Whether any faceZones (as specified in the refinementSurfaces) // are only on the boundary of corresponding cellZones or also allow // free-standing zone faces. Not used if there are no faceZones. allowFreeStandingZoneFaces true; } // Settings for the snapping. snapControls { //- Number of patch smoothing iterations before finding correspondence // to surface nSmoothPatch 3; //- Relative distance for points to be attracted by surface feature point // or edge. True distance is this factor times local // maximum edge length. tolerance 2.0; //- Number of mesh displacement relaxation iterations. nSolveIter 30; //- Maximum number of snapping relaxation iterations. Should stop // before upon reaching a correct mesh. nRelaxIter 5; // Feature snapping //- Number of feature edge snapping iterations. // Leave out altogether to disable. nFeatureSnapIter 10; //- Detect (geometric only) features by sampling the surface // (default=false). implicitFeatureSnap false; //- Use castellatedMeshControls::features (default = true) explicitFeatureSnap true; //- Detect points on multiple surfaces (only for explicitFeatureSnap) multiRegionFeatureSnap false; } // Settings for the layer addition. addLayersControls { // Are the thickness parameters below relative to the undistorted // size of the refined cell outside layer (true) or absolute sizes (false). relativeSizes true; // Per final patch (so not geometry!) the layer information layers { "roof" { nSurfaceLayers 2; } } // Expansion factor for layer mesh expansionRatio 1.2; // Wanted thickness of final added cell layer. If multiple layers // is the thickness of the layer furthest away from the wall. // Relative to undistorted size of cell outside layer. // See relativeSizes parameter. //finalLayerThickness 1.0; firstLayerThickness 0.5; // Minimum thickness of cell layer. If for any reason layer // cannot be above minThickness do not add layer. // Relative to undistorted size of cell outside layer. minThickness 0.3; // If points get not extruded do nGrow layers of connected faces that are // also not grown. This helps convergence of the layer addition process // close to features. // Note: changed(corrected) w.r.t 1.7.x! (didn't do anything in 1.7.x) nGrow 0; // Advanced settings // When not to extrude surface. 0 is flat surface, 90 is when two faces // are perpendicular featureAngle 60; // At non-patched sides allow mesh to slip if extrusion direction makes // angle larger than slipFeatureAngle. slipFeatureAngle 30; // Maximum number of snapping relaxation iterations. Should stop // before upon reaching a correct mesh. nRelaxIter 3; // Number of smoothing iterations of surface normals nSmoothSurfaceNormals 1; // Number of smoothing iterations of interior mesh movement direction nSmoothNormals 3; // Smooth layer thickness over surface patches nSmoothThickness 10; // Stop layer growth on highly warped cells maxFaceThicknessRatio 0.5; // Reduce layer growth where ratio thickness to medial // distance is large maxThicknessToMedialRatio 0.3; // Angle used to pick up medial axis points // Note: changed(corrected) w.r.t 1.7.x! 90 degrees corresponds to 130 // in 1.7.x. minMedianAxisAngle 90; // Create buffer region for new layer terminations nBufferCellsNoExtrude 0; // Overall max number of layer addition iterations. The mesher will exit // if it reaches this number of iterations; possibly with an illegal // mesh. nLayerIter 50; } // Generic mesh quality settings. At any undoable phase these determine // where to undo. meshQualityControls { #include "meshQualityDict" // Advanced //- Number of error distribution iterations nSmoothScale 4; //- Amount to scale back displacement at error points errorReduction 0.75; } // Advanced // Write flags writeFlags ( scalarLevels layerSets layerFields // write volScalarField for layer coverage ); // Merge tolerance. Is fraction of overall bounding box of initial mesh. // Note: the write tolerance needs to be higher than this. mergeTolerance 1e-6; // ************************************************************************* //
大家有什么建议么?提高一下边界层的质量
-
@cresendo 就叫OpenFOAM。。七个人在做,我的是周二发
初始速度场给定
bluecfd编译巨慢
阿里云ECS初体验
OpenFOAM的2D网格能够转成fluent2D网格吗
请教关于浸入边界法的问题,IBM方法的问题
请教关于浸入边界法的问题,IBM方法的问题
请教关于浸入边界法的问题,IBM方法的问题
blueCFD并行计算
blueCFD并行计算
blueCFD并行计算
请教关于浸入边界法的问题,IBM方法的问题
blueCFD并行计算
求问有什么思路,可以给流体添加一个持续的,自定义分布的外力场?
请教关于浸入边界法的问题,IBM方法的问题
blueCFD并行计算
blueCFD并行计算
OpenFOAM文章引用
OpenFOAM文章引用
of1912中paraview5.6.3无法打开Python shell
paraView调整显示比例
openfoam求解.msh网格问题
shm对于blockMesh和gmsh生成的背景网格计算时长不同
tecplot处理wall边界上的速度不为0
tecplot处理wall边界上的速度不为0
of1912中paraview5.6.3无法打开Python shell
shm对于blockMesh和gmsh生成的背景网格计算时长不同
shm对于blockMesh和gmsh生成的背景网格计算时长不同
shm对于blockMesh和gmsh生成的背景网格计算时长不同
shm对于blockMesh和gmsh生成的背景网格计算时长不同
shm对于blockMesh和gmsh生成的背景网格计算时长不同
shm对于blockMesh和gmsh生成的背景网格计算时长不同
shm对于blockMesh和gmsh生成的背景网格计算时长不同
shm对于blockMesh和gmsh生成的背景网格计算时长不同
shm对于blockMesh和gmsh生成的背景网格计算时长不同
shm对于blockMesh和gmsh生成的背景网格计算时长不同
shm对于blockMesh和gmsh生成的背景网格计算时长不同
shm对于blockMesh和gmsh生成的背景网格计算时长不同
GAMG和PBiCGStab
GAMG和PBiCGStab
gauss upwind和gauss linearUpwind grad(U)结果差异大
200万网格并行算力测试(OpenFOAM版本)
functionObject里面可以加自定义的程序吗
缩尺模型发散
缩尺模型发散
缩尺模型发散
shm生成边界层没有完全覆盖
shm生成边界层没有完全覆盖
shm生成边界层没有完全覆盖
functionObject里面可以加自定义的程序吗