snappyHexMeshの設定について

1,746 views
Skip to first unread message

naoya

unread,
Jul 26, 2011, 1:06:04 AM7/26/11
to OpenFOAM
お世話になっております、OpenFOAM初心者のnaoyaと申します。

現在、snappyHexMeshを用いてメッシュ作成に取り組んでいます。
モデルをFreeCADを用いて作成したのちに、Netgenでstlの形式にしたものを用いてsnappyHexMeshを試しているのですが、う

くいきません。

snappyHexMeshを実行してparaFoamで確認すると、作成したモデルが領域内に反映されていませんでした。
また、snappyHexMeshを実行後、checkMeshで確認するとstlのSurfaseがemptyとなっていました。

わかりづらい説明で申し訳ありませんが、ご教示いただけると幸いです。

kaji

unread,
Jul 26, 2011, 5:45:45 AM7/26/11
to OpenFOAM
初めまして。梶川と申します。

> snappyHexMeshを実行してparaFoamで確認すると、作成したモデルが領域内に反映されていませんでした。

とのことですが、

1. snappyHexMeshDictで、stlファイルがきちんと指定できているか。(よくある失敗ですが、patch名とstl名を混同してい
ませんか)

2. blockMeshで作成した基本メッシュの中にstlモデルが入っているか(blockMehs実行後、paraFoamでメッシュを確認時に
追加でstlファイルを読み込んで確認)

3. snappyHexMeshDictのlocationInMeshはメッシュを生成したい体積内にあるか(これも上と同じようにして確認)

と、状況がよくわからないので今はこれくらいしかわかりません。

もしよろしければblockMesh実行後、foamJob snappyHexMeshと打ち、作成されるlogファイルを見せてもらえませんか。

梶川

naoya

unread,
Jul 28, 2011, 1:52:31 AM7/28/11
to OpenFOAM
梶川様

ご回答ありがとうございます。
梶川様のご指摘のポイントは一応確認して実行したのですが、メッシュは生成されませんでした。
長いのですが、snappyHexMeshのlogを貼らせていただきます。
よろしくお願い致します。

Build : 1.7.x-6ed0927a82be
Exec : /home/fusyoku/OpenFOAM/OpenFOAM-1.7.x/applications/bin/
linux64GccDPOpt/snappyHexMesh
Date : Jul 28 2011
Time : 14:47:45
Host : fusyoku-desktop
PID : 2061
Case : /home/fusyoku/OpenFOAM/fusyoku-1.7.x/run/tutorials/
incompressible/icoFoam/snaEnto
nProcs : 1
SigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* * * //
Create time

Create mesh for time = 0

Read mesh in = 0.21 s

Overall mesh bounding box : (-5 -5 -5) (5 5 5)
Relative tolerance : 1e-06
Absolute matching distance : 1.73205e-05

Reading refinement surfaces.
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


Determining initial surface intersections
-----------------------------------------

Edge intersection testing:
Number of edges : 138900
Number of edges to retest : 138900
Number of intersected edges : 0
Calculated surface intersections in = 0.26 s

Initial mesh : cells:45000 faces:138900 points:49011
Cells per refinement level:
0 45000

Adding patches for surface regions
----------------------------------

Patch Region
----- ------
ento:

4 ento_solid

Added patches in = 0 s

Selecting decompositionMethod hierarchical

Refinement phase
----------------

Found point (0 0 -1) in cell 17564 on processor 0
Reading external feature lines.
Read feature lines in = 0.03 s


Surface refinement iteration 0
------------------------------

Marked for refinement due to surface intersection : 0 cells.
Marked for refinement due to curvature/regions : 0 cells.
Determined cells to refine in = 0 s
Selected for refinement : 0 cells (out of 45000)
Stopping refining since too few cells selected.


Removing mesh beyond surface intersections
------------------------------------------

Found point (0 0 -1) in cell 17564 in global region 0 out of 1
regions.
Keeping all cells in region 0 containing point (0 0 -1)
Selected for keeping : 45000 cells.
Edge intersection testing:
Number of edges : 138900
Number of edges to retest : 0
Number of intersected edges : 0

Shell refinement iteration 0
----------------------------

Marked for refinement due to refinement shells : 0 cells.
Determined cells to refine in = 0.17 s
Selected for internal refinement : 0 cells (out of 45000)
Stopping refining since too few cells selected.


Splitting mesh at surface intersections
---------------------------------------

Introducing baffles for 0 faces that are intersected by the surface.

Edge intersection testing:
Number of edges : 138900
Number of edges to retest : 0
Number of intersected edges : 0
Created baffles in = 0.12 s


After introducing baffles : cells:45000 faces:138900 points:49011
Cells per refinement level:
0 45000

Introducing baffles to block off problem cells
----------------------------------------------

markFacesOnProblemCells : marked 0 additional internal faces to be
converted into baffles.
Analyzed problem cells in = 0.09 s


Introducing baffles to delete problem cells.

Edge intersection testing:
Number of edges : 138900
Number of edges to retest : 0
Number of intersected edges : 0
Created baffles in = 0.12 s


After introducing baffles : cells:45000 faces:138900 points:49011
Cells per refinement level:
0 45000

Remove unreachable sections of mesh
-----------------------------------

Keeping all cells in region 0 containing point (0 0 -1)
Selected for keeping : 45000 cells.
Edge intersection testing:
Number of edges : 138900
Number of edges to retest : 0
Number of intersected edges : 0
Split mesh in = 0.12 s


After subsetting : cells:45000 faces:138900 points:49011
Cells per refinement level:
0 45000

Handling cells with snap problems
---------------------------------

Introducing baffles for 0 faces that are intersected by the surface.

Edge intersection testing:
Number of edges : 138900
Number of edges to retest : 0
Number of intersected edges : 0
Created baffles in = 0.12 s


After introducing baffles : cells:45000 faces:138900 points:49011
Cells per refinement level:
0 45000

Introducing baffles to block off problem cells
----------------------------------------------

markFacesOnProblemCells : marked 0 additional internal faces to be
converted into baffles.
Analyzed problem cells in = 0.08 s


Introducing baffles to delete problem cells.

Edge intersection testing:
Number of edges : 138900
Number of edges to retest : 0
Number of intersected edges : 0
Created baffles in = 0.12 s


After introducing baffles : cells:45000 faces:138900 points:49011
Cells per refinement level:
0 45000

Remove unreachable sections of mesh
-----------------------------------

Keeping all cells in region 0 containing point (0 0 -1)
Selected for keeping : 45000 cells.
Edge intersection testing:
Number of edges : 138900
Number of edges to retest : 0
Number of intersected edges : 0
Split mesh in = 0.13 s


After subsetting : cells:45000 faces:138900 points:49011
Cells per refinement level:
0 45000
dupNonManifoldPoints : Found : 0 non-manifold points (out of 49011)
Edge intersection testing:
Number of edges : 138900
Number of edges to retest : 0
Number of intersected edges : 0
getDuplicateFaces : found 0 pairs of duplicate faces.

Detected unsplittable baffles : 0

Merge refined boundary faces
----------------------------

mergePatchFaces : Merging 0 sets of faces.
Removing 0 straight edge points.
Refined mesh : cells:45000 faces:138900 points:49011
Cells per refinement level:
0 45000
Writing mesh to time 1
Written mesh in = 0.38 s.
Mesh refined in = 1.48 s.

Morphing phase
--------------

Constructing mesh displacer ...
Using mesh parameters
{
maxNonOrtho 65;
maxBoundarySkewness 20;
maxInternalSkewness 4;
maxConcave 80;
minFlatness 0.5;
minVol 1e-13;
minArea -1;
minTwist 0.02;
minDeterminant 0.001;
minFaceWeight 0.02;
minVolRatio 0.01;
minTriangleTwist -1;
nSmoothScale 4;
errorReduction 0.75;
}


Checking initial mesh ...
Checking faces in error :
non-orthogonality > 65 degrees : 0
faces with face pyramid volume < 1e-13 : 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)
Checked initial mesh in = 0.14 s


Smoothing patch points ...
Smoothing iteration 0
Found 0 non-mainfold point(s).

Scaling iteration 0
Moving mesh using diplacement scaling : min:1 max:1
Checking faces in error :
non-orthogonality > 65 degrees : 0
faces with face pyramid volume < 1e-13 : 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
Successfully moved mesh

Smoothing iteration 1
Found 0 non-mainfold point(s).

Scaling iteration 0
Moving mesh using diplacement scaling : min:1 max:1
Checking faces in error :
non-orthogonality > 65 degrees : 0
faces with face pyramid volume < 1e-13 : 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
Successfully moved mesh

Smoothing iteration 2
Found 0 non-mainfold point(s).

Scaling iteration 0
Moving mesh using diplacement scaling : min:1 max:1
Checking faces in error :
non-orthogonality > 65 degrees : 0
faces with face pyramid volume < 1e-13 : 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
Successfully moved mesh

Patch points smoothed in = 0.61 s


Calculating patchDisplacement as distance to nearest surface point ...
Calculated surface displacement in = 0 s


Moving mesh ...

Iteration 0
Moving mesh using diplacement scaling : min:1 max:1
Checking faces in error :
non-orthogonality > 65 degrees : 0
faces with face pyramid volume < 1e-13 : 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
Successfully moved mesh
Moved mesh in = 0.2 s


Repatching faces according to nearest surface ...
Repatched 0 faces in = 0 s


Edge intersection testing:
Number of edges : 138900
Number of edges to retest : 29476
Number of intersected edges : 0
Snapped mesh : cells:45000 faces:138900 points:49011
Cells per refinement level:
0 45000
Writing mesh to time 2
Written mesh in = 0.33 s.
Mesh snapped in = 1.28 s.
Finished meshing in = 3.23 s.
End

kaji

unread,
Jul 28, 2011, 4:31:25 AM7/28/11
to OpenFOAM
naoya様

拝見しましたが、Surface refinement iteration 0の段階で 細分化をすべきメッシュは無いと判断しているようです。

思いつくところは

1. 基準メッシュの1セルの半分以上の体積をstlモデルが満たしているものがない(わかりにくい表現ですが、少なくともblockMeshで作成し
たメッシュの1セルについて、その体積の半分以上をstlモデルの一部が満たさなければ細分化はされないようです)

2. blockMeshで作成した基準メッシュが立方体のメッシュではない(できるだけセルがx, y, z=1:1:1のほうがよいと
userguideにあります。)

blockMeshで作成した基準メッシュの1セルのサイズに対し、stlモデルが小さいのではないかと思います。
一度blockMeshをとても細かく切り、snappyHexMeshを実行してみてください(あまり細かく切るとメモリが厳しいですが)。その際
は、snappyの細分化レベルを1にして様子を見てください。

梶川

naoya

unread,
Jul 29, 2011, 10:39:21 PM7/29/11
to OpenFOAM
梶川様

ご返信ありがとうございます。
梶川様に指摘して頂いたポイントを修正したところ、無事にメッシュ生成することができました。
わかりづらい質問にも関わらず丁寧にご教示して頂きありがとうございました。

naoya
Reply all
Reply to author
Forward
0 new messages