snappyhexmeshで作成したメッシュの計算について

497 views
Skip to first unread message

カガヤリョウジ

unread,
Sep 29, 2015, 2:17:18 AM9/29/15
to OpenFOAM
初めて投稿させてもらいます。openFoam初心者の加賀谷と申します。

snappyhexmeshで作成したメッシュを,icoFoamで計算したところ、以下のようなエラーメッセージがでました。

--> FOAM FATAL ERROR:
Continuity error cannot be removed by adjusting the outflow.
Please check the velocity boundary conditions and/or run potentialFoam to initialise the outflow.
Total flux              : 1.27388e+07
Specified mass inflow   : 41440.7
Specified mass outflow  : 0
Adjustable mass outflow : 0


    From function adjustPhi(surfaceScalarField&, const volVectorField&,volScalarField&)
    in file cfdTools/general/adjustPhi/adjustPhi.C at line 118.

FOAM exiting


この原因がわかりません。どなたかお教えいただけないでしょうか?
不躾な質問で恐縮ですが、よろしくお願いします。

ohbuchi

unread,
Sep 29, 2015, 3:23:29 AM9/29/15
to OpenFOAM
こんにちは。
流入、流出境界パッチは正しく定義されていますか?
boundaryファイルの各パッチのnFacesは0でない有限値になっているでしょうか?
paraFoamでパッチを可視化してチェックすると良いでしょう。

パッチが正しいのに、このエラーが出るとすれば、入口と出口の間のメッシュが繋がっていない(複数領域
に分断されている)可能性があると思います。
まずは、checkMeshでメッシュのチェックをし、patch定義が正しいことを確認することをお勧めします。


2015年9月29日火曜日 15時17分18秒 UTC+9 カガヤリョウジ:

カガヤリョウジ

unread,
Sep 29, 2015, 4:03:43 AM9/29/15
to OpenFOAM
ohbuchiさん、御回答ありがとうございます。

checkMeshを実行したところ以下のエラーがでました。やはりメッシュがつながっていませんでした。
この場合どのような修正をすればよいか教えていただけないでしょうか?

引き続きご教授お願いいたします。

Time = 0

Mesh stats
    points:           10132
    faces:            25091
    internal faces:   22062
    cells:            7519
    faces per cell:   6.27118
    boundary patches: 6
    point zones:      0
    face zones:       0
    cell zones:       0

Overall number of cells of each type:
    hexahedra:     6628
    prisms:        71
    wedges:        0
    pyramids:      0
    tet wedges:    0
    tetrahedra:    0
    polyhedra:     820
    Breakdown of polyhedra by number of faces:
        faces   number of cells
            5   69
            6   267
            9   295
           10   1
           12   135
           15   52
           18   1

Checking topology...
    Boundary definition OK.
 ***Total number of faces on empty patches is not divisible by the number of cells in the mesh. Hence this mesh is not 1D or 2D.
    Cell to face addressing OK.
    Point usage OK.
    Upper triangular ordering OK.
    Face vertices OK.
    Number of regions: 1 (OK).

Checking patch topology for multiply connected surfaces...
                   Patch    Faces   Points                  Surface topology
            frontAndBack      532      623  ok (non-closed singly connected)
                   inlet       64       81  ok (non-closed singly connected)
                  outlet       64       81  ok (non-closed singly connected)
               lowerWall      923     1023  ok (non-closed singly connected)
               upperWall      200      234  ok (non-closed singly connected)
                untitled     1246     1278  ok (non-closed singly connected)

Checking geometry...
    Overall domain bounding box (-100 -40 0) (150 40 80)
    Mesh (non-empty, non-wedge) directions (1 0 1)
    Mesh (non-empty) directions (1 0 1)
 ***Number of edges not aligned with or perpendicular to non-empty directions: 6755
  <<Writing 8772 points on non-aligned edges to set nonAlignedEdges
    Boundary openness (-4.64519e-17 -2.29028e-18 1.0497e-17) OK.
    Max cell openness = 2.47999e-16 OK.
    Max aspect ratio = 17.834 OK.
    Minimum face area = 0.0330505. Maximum face area = 101.756.  Face area magnitudes OK.
    Min volume = 0.404866. Max volume = 1016.29.  Total volume = 1.56776e+06.  Cell volumes OK.
    Mesh non-orthogonality Max: 59.5462 average: 10.6414
    Non-orthogonality check OK.
    Face pyramids OK.
    Max skewness = 2.0196 OK.
    Coupled point location match (average 0) OK.

Failed 1 mesh checks.

blockMeshDictを添付します。

2015年9月29日火曜日 16時23分29秒 UTC+9 ohbuchi:
blockMeshDict

ohbuchi

unread,
Sep 29, 2015, 11:51:26 PM9/29/15
to OpenFOAM
snappyHexMeshでメッシュが繋がらなかったのは、分解能不足によるものです。
繋がらなかった部分を、refinementRegionsで再分割すると良いと思います。
snappyHexMeshDictの記述方法については、下記サイトが参考になります。
http://openfoamwiki.net/index.php/SnappyHexMesh
https://sites.google.com/site/snappywiki/snappyhexmesh/snappyhexmeshdict


2015年9月29日火曜日 17時03分43秒 UTC+9 カガヤリョウジ:

カガヤリョウジ

unread,
Nov 10, 2015, 2:52:38 AM11/10/15
to OpenFOAM

ohbuchiさん返信遅くなり申し訳ございません。

結果を申しますと前回のsnappyでの問題は解決できませんでした、お力添え感謝いたします。

 只今、stlデータの外部流れをcfmeshで計算に取り組んでおり、最終的には物体表面の抵抗値を求めたいとがんがえております。

表面は壁の条件としているので、sampleDictで表面の一つ上のセルデータを取り出したいのですが、どのように設定したらよいでしょうか。

ご教授よろしくおねがいします。


ohbuchi

unread,
Nov 10, 2015, 8:17:25 AM11/10/15
to OpenFOAM
こんにちは。
壁面に接するセルでなく、その隣(2層目)を選ぶということでしょうか?
topoSetユーティリティでセルを選択し、セルセットやセルゾーンにしておくと
後処理やfunctionObjectで利用できます。

例えば、パッチ”lowerWall"から2層目のセルを選択するには、下記の様なtopoSetDict
を使います。

actions
(
    {
        name     lowerWallFaces;   パッチlowerWallのフェースセット
        type        faceSet;
        action     new;
        source    patchToFace;
        sourceInfo
        {
            name    lowerWall;
        }
    }
    {
        name     lowerWallCells;   lowerWallに接するセルセット
        type       cellSet;
        action    new;
        source   faceToCell;
        sourceInfo
        {
            set     lowerWallFaces;
            option   any;
        }
    }
ここまでで、第1層目のセルがセルセットlowerWallCellsに記録されます
    {
        name lowerWallCellPoints;   lowerWallCellsに含まれるポイントセット
        type    pointSet;
        action  new;
        source  cellToPoint;
        sourceInfo
        {
            set    lowerWallCells;
            option    all;
        }
    }
    {
        name    secondCells;   lowerWallCellPointsを含むセルセット
        type      cellSet;
        action    new;
        source   pointToCell;
        sourceInfo
        {
            set     lowerWallCellPoints;
            option   any;
        }
    }
    {
        name    secondCells;  secondCellsからlowerWallCellsを削除し第二層のみ残す
        type      cellSet;
        action    delete;
        source   cellToCell;
        sourceInfo
        {
            set     lowerWallCells;
        }
    }
ここまでで、第2層がセルセットに記録されます。
    {
        name    secondCellZone;   第2層セルのセルゾーン
        type      cellZoneSet;
        action    new;
        source   setToCellZone;
        sourceInfo
        {
            set    secondCells;
        }
    }
);

ご参考まで。


2015年11月10日火曜日 16時52分38秒 UTC+9 カガヤリョウジ:
Reply all
Reply to author
Forward
0 new messages