境界条件設定方法について(pisoFoam気流解析)

5,243 views
Skip to first unread message

natsuki

unread,
Feb 9, 2012, 7:07:06 PM2/9/12
to OpenFOAM
こんにちは。
openfoam初心者の竹内と申します。

現在気流の解析を実施しようとしています。
ソルバはpisoFoamで乱流モデルはk-εの使用を考えています。

周期境界を使用したいのですが設定方法がわからず困っております。
過去の書き込みを参考にさせて頂いたのですが私のOpenFOAMの知識が
足りず設定できませんでした。

状況と設定ファイルを載せさせて頂きます。

OpenFOAM Ver 2.0.1
モデル くさび型
【上面の一部『inlet』より-Z方向に速度が発生。周期境界は側面に設定し『cylic3』→『cylic2』としたい。
 また、inletを支える『wall_1』はwall,その他のくさび型の上面、下面、側面は圧力境界としたい。】
モデル作成方法 STAR-CDにて作成しstar4ToFoamにて変換
メッシュ ヘキサ
状態  paraFoamにて形状確認の為、pisoFoam-cavityを元に設定
    周期境界設定無しでpisoFoamを実行したところ流れたので
    メッシュには問題が無いと考えています。

設定ファイル
【boundary】
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* * * //
7
(
wall_1
{
type wall;
nFaces 3923;
startFace 832110;
}
cylic_1
{
type wall;
nFaces 30881;
startFace 836033;
}
cylic_2
{
type wall;
nFaces 31010;
startFace 866914;
}
pre_top
{
type wall;
nFaces 382;
startFace 897924;
}
pre_bottom
{
type wall;
nFaces 523;
startFace 898306;
}
pre_side
{
type wall;
nFaces 2376;
startFace 898829;
}
inlet
{
type wall;
nFaces 126;
startFace 901205;
}
)
//
************************************************************************* //


【R】
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* * * //
dimensions [0 2 -2 0 0 0 0];

internalField uniform (0 0 0 0 0 0);

boundaryField
{
wall_1
{
type kqRWallFunction;
value uniform ( 0 0 0 0 0 0 );
}

cylic_1
{
type kqRWallFunction;
value uniform ( 0 0 0 0 0 0 );
}

cylic_2
{
type kqRWallFunction;
value uniform ( 0 0 0 0 0 0 );
}

pre_top
{
type kqRWallFunction;
value uniform ( 0 0 0 0 0 0 );
}

pre_bottom
{
type kqRWallFunction;
value uniform ( 0 0 0 0 0 0 );
}

pre_side
{
type kqRWallFunction;
value uniform ( 0 0 0 0 0 0 );
}

inlet
{
type kqRWallFunction;
value uniform ( 0 0 0 0 0 0 );
}
}
//
************************************************************************* //


【epsilon】
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* * * //
dimensions [0 2 -3 0 0 0 0];

internalField uniform 0.000765;

boundaryField
{
wall_1
{
type epsilonWallFunction;
value uniform 0.000765;
}
cylic_1
{
type epsilonWallFunction;
value uniform 0.000765;
}
cylic_2
{
type epsilonWallFunction;
value uniform 0.000765;
}
pre_top
{
type epsilonWallFunction;
value uniform 0.000765;
}
pre_bottom
{
type epsilonWallFunction;
value uniform 0.000765;
}
pre_side
{
type epsilonWallFunction;
value uniform 0.000765;
}
inlet
{
type epsilonWallFunction;
value uniform 0.000765;
}
}
//
************************************************************************* //

【k】
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* * * //
dimensions [0 2 -2 0 0 0 0];

internalField uniform 0.00325;

boundaryField
{
wall_1
{
type kqRWallFunction;
value uniform 0.00325;
}
cylic_1
{
type kqRWallFunction;
value uniform 0.00325;
}
cylic_2
{
type kqRWallFunction;
value uniform 0.00325;
}
pre_top
{
type kqRWallFunction;
value uniform 0.00325;
}
pre_bottom
{
type kqRWallFunction;
value uniform 0.00325;
}
pre_side
{
type kqRWallFunction;
value uniform 0.00325;
}
inlet
{
type kqRWallFunction;
value uniform 0.00325;
}
}
//
************************************************************************* //

【nuSgs】
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* * * //
dimensions [0 2 -1 0 0 0 0];

internalField uniform 0;

boundaryField
{
wall_1
{
type zeroGradient;
}

cylic_1
{
type zeroGradient;
}

cylic_2
{
type zeroGradient;
}

pre_top
{
type zeroGradient;
}

pre_bottom
{
type zeroGradient;
}

pre_side
{
type zeroGradient;
}

inlet
{
type zeroGradient;
}
}
//
************************************************************************* //

【nuTilda】
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* * * //
dimensions [0 2 -1 0 0 0 0];

internalField uniform 0;

boundaryField
{
wall_1
{
type zeroGradient;
}
cylic_1
{
type zeroGradient;
}
cylic_2
{
type zeroGradient;
}
pre_top
{
type zeroGradient;
}
pre_bottom
{
type zeroGradient;
}
pre_side
{
type zeroGradient;
}
inlet
{
type zeroGradient;
}
}
//
************************************************************************* //

【nut】
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* * * //
dimensions [0 2 -1 0 0 0 0];

internalField uniform 0;

boundaryField
{
wall_1
{
type nutkWallFunction;
value uniform 0;
}
cylic_1
{
type nutkWallFunction;
value uniform 0;
}
cylic_2
{
type nutkWallFunction;
value uniform 0;
}
pre_top
{
type nutkWallFunction;
value uniform 0;
}
pre_bottom
{
type nutkWallFunction;
value uniform 0;
}
pre_side
{
type nutkWallFunction;
value uniform 0;
}
inlet
{
type nutkWallFunction;
value uniform 0;
}
}
//
************************************************************************* //

【U】
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* * * //
dimensions [0 1 -1 0 0 0 0];

internalField uniform (0 0 0);

boundaryField
{
wall_1
{
type fixedValue;
value uniform (0 0 0);
}

cylic_1
{
type fixedValue;
value uniform (0 0 0);
}

cylic_2
{
type fixedValue;
value uniform (0 0 0);
}

pre_top
{
type fixedValue;
value uniform (0 0 0);
}

pre_bottom
{
type fixedValue;
value uniform (0 0 0);
}

pre_side
{
type fixedValue;
value uniform (0 0 0);
}

inlet
{
type fixedValue;
value uniform (0 0 -100);
}
}
//
************************************************************************* //

【p】
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* * * //
dimensions [0 2 -2 0 0 0 0];

internalField uniform 0;

boundaryField
{
wall_1
{
type zeroGradient;
}
cylic_1
{
type zeroGradient;
}
cylic_2
{
type zeroGradient;
}
pre_top
{
type fixedValue;
value uniform 0;
}
pre_bottom
{
type zeroGradient;
value uniform 0;
}
pre_side
{
type zeroGradient;
value uniform 0;
}
inlet
{
type zeroGradient;
}
}
//
************************************************************************* //

知識不足の為、どの様にすれば良いかわかりません。
ご教授いただけると幸いです。

長くなってしまい申し訳ありません。
以上、よろしくお願い致します。





nakagawa

unread,
Feb 9, 2012, 8:25:46 PM2/9/12
to OpenFOAM
中川です。

> 【上面の一部『inlet』より-Z方向に速度が発生。周期境界は側面に設定し『cylic3』→『cylic2』としたい。
 ファイルでは,cylic_1 とcylic_2 になっているようです。この2つを周期境界にするのでしょうか?
 周期境界のtypeはcyclicにするべきではないでしょうか。ファイルではwallとなっているようです。
 cylic_1のnFacesは30881,cylic_2のnFacesは31010で,同じではありません。 面の数が異なりますが,よろしいで
すか?両者を統一しておいた方がよいと思います。

 マニュアルの5.2.2にcyclicの使い方について記述があります。
http://www.openfoam.org/docs/user/boundaries.php#x24-1390005.2.2
cyclic
Enables two patches to be treated as if they are physically
connected; used for repeated geometries, e.g. heat exchanger tube
bundles. One cyclic patch is linked to another through a
neighbourPatch keyword in the boundary file. Each pair of connecting
faces must have similar area to within a tolerance given by the
matchTolerance keyword in the boundary file. Faces do not need to be
of the same orientation.

 boundary ファイルの中で,どのパッチ同士をペアにするのかを記述しなければなりません。
 neighbourPatchキーワードを使って記述します。
 もし,ペアにする面で競るの面積が異なるなら,許容する範囲をmatchTolerance で指定する必要があります。

 チュートリアルの中からcyclicを使ったものを探し出し,使用方法を調べると良いと思います。できるだけシンプルなモデル(簡単な形状,少ないセ
ル数,層流etc.)で,知りたい機能の使い方を先に把握されると良いのではないでしょうか。
 下記コマンドを実行すれば,探せます。
find $FOAM_RUN -type f -name "boundary" | xargs grep cyclic

 少しでもお役に立つことを祈っています。
 もし解決できた場合には,ぜひ,その方法をまとめて投稿してください。他の方々への参考になりますので。

natsuki

unread,
Feb 10, 2012, 12:07:30 AM2/10/12
to OpenFOAM
中川様

申し訳ありません。
書き間違えました。
テキストが正しく,下記の『cylic3』は『cylic2』,『cylic2』は『cylic1』です。

誤: 【上面の一部『inlet』より-Z方向に速度が発生。周期境界は側面に設定し『cylic3』→『cylic2』としたい。
正: 【上面の一部『inlet』より-Z方向に速度が発生。周期境界は側面に設定し『cylic2』→『cylic1』としたい。

cylic_1 とcylic_2 を周期境界にしたいと考えています。

同一の面にしたかったのですができませんでした。
cyclicにしたい面同士の面数やVrtexの位置は同一にしなければならないのでしょうか?
neighbourPatchもmatchToleranceもわからないので調べてみます。

有難うございます。
教えて頂いた方法でcyclicについて調べたいと思います。

そうですね。
他の方に参考してもらえるような投稿ができる様にがんばります。

nakagawa

unread,
Feb 10, 2012, 1:56:41 AM2/10/12
to OpenFOAM

> cyclicにしたい面同士の面数やVrtexの位置は同一にしなければならないのでしょうか?
厳密に一致していなくても大丈夫なはずです。
matchToleranceで,許容する範囲を設定することになります。


cylic_1
{
type wall;
nFaces 30881;
startFace 836033;

}
cylic_2
{
type wall;
nFaces 31010;
startFace 866914;
}


nakagawa

unread,
Feb 10, 2012, 2:02:55 AM2/10/12
to OpenFOAM
中川です。

先ほど,作成途中のメールを送ってしまいました。
申し訳ございません。

> cyclicにしたい面同士の面数やVrtexの位置は同一にしなければならないのでしょうか?
厳密に一致していなくても大丈夫なはずです。
matchToleranceで,許容する範囲を設定することになります。

boundaryファイルは次の様な記述になるようです。
cylic_1
{
type wall;
nFaces 30881;
startFace 836033;
matchTolerance 0.0001;
neighbourPatch cylic_2;
}
cylic_2
{
type wall;
nFaces 31010;
startFace 866914;
matchTolerance 0.0001;
neighbourPatch cylic_1;
}

他の物理量のファイルでは,単純にcyclicとすればOKです。
cylic_1
{
type cyclic;
}
cylic_2
{
type cyclic;
}

うまく設定できれば,面のずれに関するエラー等が表示されるようになると思います。
そのメッセージを見ながら,matchToleranceの値を調整してはいかがでしょうか。

さらに詳しい方のアドバイスもお待ちしています。



On 2月10日, 午後2:07, natsuki <natsuki....@gmail.com> wrote:

ohbuchi

unread,
Feb 11, 2012, 3:55:28 AM2/11/12
to OpenFOAM
横から失礼します。
パッチのセル分割が異なる場合だと、OpenFOAM-2.1で導入されたAMIを利用する方が良いと思います。
tutorials/incompressible/simpleFoam/pipeCyclic
が参考になると思います。

natsuki

unread,
Feb 13, 2012, 11:31:39 PM2/13/12
to OpenFOAM
中川様

ありがとうございます。
これから実施してみたいと思います。

物理量ファイルですが【U】と【p】のみ
教えて頂いた様に変更しようと思っているのですが
合っていますでしょうか?


ohbuchi様

申し訳ありません。
せっかく教えて頂いたのですが、
諸事情によりOpenFOAMの更新が難しい為、
AMIを使用する事ができそうにもありません。

AMIについて少し調べたのですが
使用できたら便利そうな機能ですね。
ありがとうございました。


nakagawa

unread,
Feb 14, 2012, 7:18:40 PM2/14/12
to OpenFOAM
竹内様

> 物理量ファイルですが【U】と【p】のみ
 他の全ての変数も,同様にcyclicにすると思います。何かエラーが出ますか?
 私自身は乱流モデルでcyclicを使った経験はないのですが。


ohbuchi様
 いつも適切なアドバイスをいただき,ありがとうございます。
 AMIは,とても魅力的ですね。機会があれば,挑戦してみます。

natsuki

unread,
Feb 14, 2012, 9:49:24 PM2/14/12
to OpenFOAM
中川様

ご回答ありがとうございます。

エラーは出なかったのですが全てcyclicに変更して良いか
わからなかったのでお聞きしてしまいました。

他の物理量も全てcyclicにして実行してみたところ、
おっしゃられていた面のずれの様なエラーが出ました。

-----------------<Error message>-----------------------
--> FOAM FATAL ERROR:
For patch cylic_1 there are 30881 face centres, for the neighbour
patch cylic_2 there are 31010

From function cyclicPolyPatch::calcTransforms()
in file meshes/polyMesh/polyPatches/constraint/cyclic/
cyclicPolyPatch.C at line 160.
--------------------------------------------------------------

matchToleranceの調整方法がわからず
現在0.0001と入っているのですが
0.00001、0.001、0.01、0.1、1,10,100と複数試したのですが
同じエラーメッセージが出てしまいました。

matchToleranceの調整方法を教えて頂けませんでしょうか。
> > ありがとうございました。- 引用テキストを表示しない -
>
> - 引用テキストを表示 -

nakagawa

unread,
Feb 14, 2012, 10:19:26 PM2/14/12
to OpenFOAM
竹内様

残念です。
 良く考えると,faceの数が違うので,matchToleranceで調整が効かないのではないでしょうか。
 点の位置が多少ずれているとかではないですよね。

解決策としては,
・周期境界面のパッチが同一になるようにモデルを作成する。
・ohbuchi様からの情報にあったAMIを使える環境に移行する。
ぐらいでしょうか?

 Star-CDでモデル作成されているということですが,周期境界面は非構造格子なのでしょうか?同一にならないということは,非構造格子ですよ
ね?
 その場合,周期境界面近傍だけに,構造格子を使ってはどうでしょうか?構造格子なら,全く同じ格子を作れると思うのですが。

他に良い対策をご存じの方がいらっしゃいましたら,ぜひ,教えてください。

natsuki

unread,
Feb 15, 2012, 4:04:26 AM2/15/12
to OpenFOAM
中川様

はい。face数自体が違います。
matchToleranceはface数が同じでないと使用できない様です。

教えて頂いた解決策の『ohbuchi様からの情報にあったAMIを使える環境に移行する。』は
諸事情によりバージョンUPが難しい為、実施できそうにありません。
なので『周期境界面のパッチが同一になるようにモデルを作成する。』の方を実施させて
頂こうと思います。

周期境界面は非構造格子になっています。
壁面近傍のみ構造格子ですか。調べてやってみます。
少なくともface数だけは一致するモデルを作ります。

ありがとうございます。
> > > - 引用テキストを表示 -- 引用テキストを表示しない -
>
> - 引用テキストを表示 -
Message has been deleted

natsuki

unread,
Feb 16, 2012, 12:55:41 AM2/16/12
to OpenFOAM
竹内です。

周期境界にしたい2つの面のface数を同じにした
モデルを作成し計算を実行したところ以下の
エラーメッセージがでました。


------FOAM FATAL ERROR--------------------
face 20 area does not match neighbour by 0.501315% -- possible face
ordering problem.
patch:cyclic_2 my area:6.92698e-06 neighbour area:6.96179e-06
matching
tolerance:0.0001
Mesh face:108894 fc:(0.148974 -0.0104173 -0.331854)
Neighbour fc:(0.148976 0.0104174 -0.331847)
If you are certain your matching is correct you can increase the
'matchTolerance' setting in the patch dictionary in the boundary
file.
Rerun with cyclic debug flag set for more information.
--------------------------------------------------------


面ズレの許容値に関するメッセージの様なので
match Toleranceの値を変更し再度試してみたのですが
全く同じエラーメッセージが出ました。


0/polyMesh内のboundaryのmatch Toleranceのみ変更したのですが
他にも変更すべき場所があるのでしょうか?


それともエラーメッセージのpatch:・・から始まる行の末尾の数字0.0001が
変わっていなかったので変更が反映されていないのでしょうか?


ご存じの方がいらっしゃいましたら、お教え頂けませんでしょうか。

nakagawa

unread,
Feb 16, 2012, 5:33:37 AM2/16/12
to OpenFOAM
竹内様

> それともエラーメッセージのpatch:・・から始まる行の末尾の数字0.0001が
> 変わっていなかったので変更が反映されていないのでしょうか?
 変更したはずの数値が反映されないのは問題ですね。

 並列計算を実施されているのでしょうか?
 その場合,ケースディレクトリ/constant/polyMesh/boundaryファイルを変更し
た後に,decomposeParを再実行していますか?
 もし,再実行していなければ,各processorディレクトリに入った
古い情報が使われていると思います。

 思いつくのは,これぐらいです。

中川

ohbuchi

unread,
Feb 16, 2012, 6:48:17 AM2/16/12
to OpenFOAM
こんばんは。
ところで周期境界は周方向の様ですが、createPatchは使いましたか?

natsuki

unread,
Feb 16, 2012, 6:55:47 AM2/16/12
to OpenFOAM
中川様

変更した数値が反映されない原因がわかりました。
テキストの記述ミスでした。

×:match Tolerance
○:matchTolerance

余計なスペースを入れてしまっていました。
エラーとして出て来なかった為、
気付くのに時間がかかってしまいました。
記述のミスがあると0.0001(デフォルト?)が
使用されるみたいです。

お騒がせ致しました。
また、現在並列計算は実施しておりません。
並列計算の際は教えて頂いたコマンドを
忘れない様にしたいと思います。
ありがとうございます。




On 2月16日, 午後7:33, nakagawa <snakagawa....@gmail.com> wrote:

natsuki

unread,
Feb 16, 2012, 7:05:08 AM2/16/12
to OpenFOAM
ohbuchi様

createPatchは使用しておりません。
モデル作成(boundary分け)を他のソフトにて
実施しており、またcreatePatchの使い方が
わかっていない為、境界条件設定は
テキスト編集にて実施しています。

createPatchは手動でテキストを編集する
手間を省く物と認識しているのですが
合っていますでしょうか?

知識が浅くて申し訳ございません。

ohbuchi

unread,
Feb 16, 2012, 8:04:11 AM2/16/12
to OpenFOAM
問題解決して何よりです。
私もスペースの有無で動かないことがよくあります。
下記に注意すると良さそうです。
  ・キーワード中にはスペースを入れない
  ・キーワードと数値や()の間にはスペースを入れる

natsuki

unread,
Feb 16, 2012, 6:55:23 PM2/16/12
to OpenFOAM
ohbuchi様

ありがとうございます。
記述、または不具合発生の際は
教えて頂いた2点に注意したいと思います。

natsuki

unread,
Feb 17, 2012, 2:57:07 AM2/17/12
to OpenFOAM
度々申し訳ありません。
竹内です。

中川様、ohbuchi様にご指導頂き
計算が開始できるところまで
来たのですがすぐに計算が落ちてしまいます。

計算開始のログを載せさせていただきます。
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* * * //
Create time

Create mesh for time = 0

Reading field p

Reading field U

Reading/calculating face flux field phi

Selecting incompressible transport model Newtonian
Selecting turbulence model type LESModel
Selecting LES turbulence model oneEqEddy
oneEqEddyCoeffs
{
ce 1.048;
ck 0.094;
}


Starting time loop

Time = 1e-07

Courant Number mean: 1.15033e-08 max: 1.04624
DILUPBiCG: Solving for Ux, Initial residual = 1, Final residual =
1.4379e-07, No Iterations 1
DILUPBiCG: Solving for Uy, Initial residual = 1, Final residual =
1.43791e-07, No Iterations 1
DILUPBiCG: Solving for Uz, Initial residual = 1, Final residual =
1.4379e-07, No Iterations 1
DICPCG: Solving for p, Initial residual = 1, Final residual = 209635,
No Iterations 1001
time step continuity errors : sum local = 0.00498898, global =
-0.00287789, cumulative = -0.00287789
DICPCG: Solving for p, Initial residual = 0.0424048, Final residual =
0.120292, No Iterations 1001
time step continuity errors : sum local = 0.0176893, global =
-0.00224258, cumulative = -0.00512047
DILUPBiCG: Solving for k, Initial residual = 1, Final residual =
6.12297, No Iterations 1001
bounding k, min: -5.45388e+06 max: 4.53841e+06 average: -406.522
ExecutionTime = 5.2 s ClockTime = 5 s

Time = 2e-07

Courant Number mean: 0.0837298 max: 947.183
DILUPBiCG: Solving for Ux, Initial residual = 0.340435, Final
residual = 0.0274714, No Iterations 1001
DILUPBiCG: Solving for Uy, Initial residual = 0.0534779, Final
residual = 0.0718693, No Iterations 1001
DILUPBiCG: Solving for Uz, Initial residual = 0.0731924, Final
residual = 0.248744, No Iterations 1001
DICPCG: Solving for p, Initial residual = 0.65333, Final residual =
3.358, No Iterations 1001
time step continuity errors : sum local = 1.02944, global = 0.0184672,
cumulative = 0.0133467
DICPCG: Solving for p, Initial residual = 0.385836, Final residual =
1.77759, No Iterations 1001
time step continuity errors : sum local = 99.2172, global = -15.3872,
cumulative = -15.3738
DILUPBiCG: Solving for k, Initial residual = 1, Final residual =
2.00005e+08, No Iterations 1001
bounding k, min: -2.21269e+28 max: 6.16764e+26 average: -2.07838e+24
ExecutionTime = 18.83 s ClockTime = 19 s

Time = 3e-07

Courant Number mean: 451.453 max: 2.89777e+10
DILUPBiCG: Solving for Ux, Initial residual = 0.99838, Final residual
= 0.00908984, No Iterations 1001
DILUPBiCG: Solving for Uy, Initial residual = 0.998995, Final
residual = 75.7606, No Iterations 1001
DILUPBiCG: Solving for Uz, Initial residual = 0.998881, Final
residual = 0.0640041, No Iterations 1001
DICPCG: Solving for p, Initial residual = 0.999904, Final residual =
82.3255, No Iterations 1001
time step continuity errors : sum local = 3.84874e+09, global =
2.02127e+09, cumulative = 2.02127e+09
DICPCG: Solving for p, Initial residual = 2.35578e-07, Final residual
= 0.0102584, No Iterations 1001
time step continuity errors : sum local = 1.28972e+15, global =
5.26392e+13, cumulative = 5.26412e+13
#0 Foam::error::printStack(Foam::Ostream&) in "/opt/openfoam201/
platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#1 Foam::sigFpe::sigHandler(int) in "/opt/openfoam201/platforms/
linux64GccDPOpt/lib/libOpenFOAM.so"
#2 in "/lib/x86_64-linux-gnu/libc.so.6"
#3 Foam::LimitedScheme<double,
Foam::limitedLinearLimiter<Foam::NVDTVD>,
Foam::limitFuncs::magSqr>::limiter(Foam::GeometricField<double,
Foam::fvPatchField, Foam::volMesh> const&) const in "/opt/openfoam201/
platforms/linux64GccDPOpt/lib/libfiniteVolume.so"
#4
Foam::limitedSurfaceInterpolationScheme<double>::weights(Foam::GeometricField<double,
Foam::fvPatchField, Foam::volMesh> const&) const in "/opt/openfoam201/
platforms/linux64GccDPOpt/lib/libfiniteVolume.so"
#5
Foam::fv::gaussConvectionScheme<double>::fvmDiv(Foam::GeometricField<double,
Foam::fvsPatchField, Foam::surfaceMesh> const&,
Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>
const&) const in "/opt/openfoam201/platforms/linux64GccDPOpt/lib/
libfiniteVolume.so"
#6 Foam::tmp<Foam::fvMatrix<double> >
Foam::fvm::div<double>(Foam::GeometricField<double,
Foam::fvsPatchField, Foam::surfaceMesh> const&,
Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>
const&, Foam::word const&) in "/opt/openfoam201/platforms/
linux64GccDPOpt/lib/libincompressibleRASModels.so"
#7 Foam::tmp<Foam::fvMatrix<double> >
Foam::fvm::div<double>(Foam::GeometricField<double,
Foam::fvsPatchField, Foam::surfaceMesh> const&,
Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>
const&) in "/opt/openfoam201/platforms/linux64GccDPOpt/lib/
libincompressibleRASModels.so"
#8
Foam::incompressible::LESModels::oneEqEddy::correct(Foam::tmp<Foam::GeometricField<Foam::Tensor<double>,
Foam::fvPatchField, Foam::volMesh> > const&) in "/opt/openfoam201/
platforms/linux64GccDPOpt/lib/libincompressibleLESModels.so"
#9 Foam::incompressible::LESModel::correct() in "/opt/openfoam201/
platforms/linux64GccDPOpt/lib/libincompressibleLESModels.so"
#10
in "/opt/openfoam201/platforms/linux64GccDPOpt/bin/pisoFoam"
#11 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#12
in "/opt/openfoam201/platforms/linux64GccDPOpt/bin/pisoFoam"
Floating point exception
administrator@administrator-HP-Z800-Workstation:~/takeuchi/cyclic1/poly
$
------------------------------------------

Time = 3e-07、Courant Number max: 2.89777e+10となっている為、
△tを1/1000にしてみたのですが破綻してしまいました。
発散の原因がわかりません。
こちらもご教授頂けないでしょうか。
Message has been deleted

natsuki

unread,
Feb 17, 2012, 3:01:23 AM2/17/12
to OpenFOAM
竹内です。

連続の書き込み申し訳ありません。
先程の発散した計算の設定ファイルを
載せさせて頂きます。

最初の書き込みで載せさせて頂いた
ファイルとはモデルが違う為
boundaryの順番が異なります。

----------<boundary>----------
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* * * //

7
(
wall_1
{
type wall;
nFaces 3100;
startFace 105021;
}
pre_top
{
type wall;
nFaces 180;
startFace 108121;
}
pre_side
{
type wall;
nFaces 459;
startFace 108301;
}
pre_bottom
{
type wall;
nFaces 114;
startFace 108760;
}
cyclic_2
{
type cyclic;
nFaces 4139;
startFace 108874;
matchTolerance 10;
neighbourPatch cyclic_1;
}
cyclic_1
{
type cyclic;
nFaces 4139;
startFace 113013;
matchTolerance 6;
neighbourPatch cyclic_2;
}
inlet
{
type wall;
nFaces 83;
startFace 117152;
}
)
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* * * //


----------<epsilon>----------
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* * * //

dimensions [0 2 -3 0 0 0 0];

internalField uniform 0.000765;

boundaryField
{
wall_1
{
type epsilonWallFunction;
value uniform 0.000765;
}
pre_top
{
type epsilonWallFunction;
value uniform 0.000765;
}
pre_side
{
type epsilonWallFunction;
value uniform 0.000765;
}
pre_bottom
{
type epsilonWallFunction;
value uniform 0.000765;
}
cyclic_2
{
type cyclic;
}
cyclic_1
{
type cyclic;
}
inlet
{
type epsilonWallFunction;
value uniform 0.000765;
}
}
//
************************************************************************* //


----------<k>----------
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* * * //

dimensions [0 2 -2 0 0 0 0];

internalField uniform 0.00325;

boundaryField
{
wall_1
{
type kqRWallFunction;
value uniform 0.00325;
}
pre_top
{
type kqRWallFunction;
value uniform 0.00325;

}
pre_side
{
type kqRWallFunction;
value uniform 0.00325;
}
pre_bottom
{
type kqRWallFunction;
value uniform 0.00325;
}
cyclic_2
{
type cyclic;
}
cyclic_1
{
type cyclic;
}
inlet
{
type kqRWallFunction;
value uniform 0.00325;
}
}
//
************************************************************************* //

----------<nuSgs>----------
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* * * //

dimensions [0 2 -1 0 0 0 0];

internalField uniform 0;

boundaryField
{
wall_1
{
type zeroGradient;
}

pre_top
{
type zeroGradient;
}

pre_side
{
type zeroGradient;
}

pre_bottom
{
type zeroGradient;
}

cyclic_2
{
type cyclic;
}

cyclic_1
{
type cyclic;
}

inlet
{
type zeroGradient;
}
}
//
************************************************************************* //

----------<nut>----------
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* * * //

dimensions [0 2 -1 0 0 0 0];

internalField uniform 0;

boundaryField
{
wall_1
{
type nutkWallFunction;
value uniform 0;
}
pre_top
{
type nutkWallFunction;
value uniform 0;
}
pre_side
{
type nutkWallFunction;
value uniform 0;
}
pre_bottom
{
type nutkWallFunction;
value uniform 0;
}
cyclic_2
{
type cyclic;
}
cyclic_1
{
type cyclic;
}
inlet
{
type nutkWallFunction;
value uniform 0;
}
}
//
************************************************************************* //


----------<nuTilda>----------
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* * * //

dimensions [0 2 -1 0 0 0 0];

internalField uniform 0;

boundaryField
{
wall_1
{
type zeroGradient;
}
pre_top
{
type zeroGradient;
}
pre_side
{
type zeroGradient;
}
pre_bottom
{
type zeroGradient;
}
cyclic_2
{
type cyclic;
}
cyclic_1
{
type cyclic;
}
inlet
{
type zeroGradient;
}
}
//
************************************************************************* //

----------<p>----------
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* * * //

dimensions [0 2 -2 0 0 0 0];

internalField uniform 0;

boundaryField
{
wall_1
{
type zeroGradient;
}
pre_top
{
type fixedValue;
value uniform 0;
}
pre_side
{
type fixedValue;
value uniform 0;
}
pre_bottom
{
type fixedValue;
value uniform 0;
}
cyclic_2
{
type cyclic;
}
cyclic_1
{
type cyclic;
}
inlet
{
type zeroGradient;
}
}
//
************************************************************************* //

----------<R>----------
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* * * //

dimensions [0 2 -2 0 0 0 0];

internalField uniform (0 0 0 0 0 0);

boundaryField
{
wall_1
{
type kqRWallFunction;
value uniform ( 0 0 0 0 0 0 );
}

pre_top
{
type kqRWallFunction;
value uniform ( 0 0 0 0 0 0 );
}

pre_side
{
type kqRWallFunction;
value uniform ( 0 0 0 0 0 0 );
}

pre_bottom
{
type kqRWallFunction;
value uniform ( 0 0 0 0 0 0 );
}

cyclic_2
{
type cyclic;
}

cyclic_1
{
type cyclic;
}

inlet
{
type kqRWallFunction;
value uniform ( 0 0 0 0 0 0 );
}
}
//
************************************************************************* //

----------<U>----------
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* * * //

dimensions [0 1 -1 0 0 0 0];

internalField uniform (0 0 0);

boundaryField
{
wall_1
{
type zeroGradient;
}

pre_top
{
type fixedValue;
value uniform (0 0 0);
}

pre_side
{
type fixedValue;
value uniform (0 0 0);
}

pre_bottom
{
type fixedValue;
value uniform (0 0 0);
}

cyclic_2
{
type cyclic;
}

cyclic_1
{
type cyclic;
}

inlet
{
type fixedValue;
value uniform (0 0 -100);
}
}
//
************************************************************************* //

長々と申し訳ありません。
お手数ですが何かお気づきの事があれば
お教え頂けないでしょうか。
よろしくお願い致します。
> Foam::limitedSurfaceInterpolationScheme<double>::weights(Foam::GeometricFie-ld<double,
> Foam::fvPatchField, Foam::volMesh> const&) const in "/opt/openfoam201/
> platforms/linux64GccDPOpt/lib/libfiniteVolume.so"
> #5
> Foam::fv::gaussConvectionScheme<double>::fvmDiv(Foam::GeometricField<double-,
> Foam::fvsPatchField, Foam::surfaceMesh> const&,
> Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>
> const&) const in "/opt/openfoam201/platforms/linux64GccDPOpt/lib/
> libfiniteVolume.so"
> #6 Foam::tmp<Foam::fvMatrix<double> >
> Foam::fvm::div<double>(Foam::GeometricField<double,
> Foam::fvsPatchField, Foam::surfaceMesh> const&,
> Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>
> const&, Foam::word const&) in "/opt/openfoam201/platforms/
> linux64GccDPOpt/lib/libincompressibleRASModels.so"
> #7 Foam::tmp<Foam::fvMatrix<double> >
> Foam::fvm::div<double>(Foam::GeometricField<double,
> Foam::fvsPatchField, Foam::surfaceMesh> const&,
> Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>
> const&) in "/opt/openfoam201/platforms/linux64GccDPOpt/lib/
> libincompressibleRASModels.so"
> #8
> Foam::incompressible::LESModels::oneEqEddy::correct(Foam::tmp<Foam::Geometr-icField<Foam::Tensor<double>,
> ...
>
> もっと読む ≫- 引用テキストを表示しない -
>
> - 引用テキストを表示 -

ohbuchi

unread,
Feb 17, 2012, 5:24:45 AM2/17/12
to OpenFOAM
境界条件の設定が不適切なために乱流モデルの計算が発散しています。
まず、boundaryファイルで流入、流出境界はwallでなくpatchにしてください。
また、流入・流出境界ではWallFunctionは使えません。
以上の点に注意して、boundaryファイルと0ディレクトリのファイルを見なおして
ください。cavity以外のチュートリアル(流入、流出含むもの)と見比べれば
わかると思います。
また、ユーザーガイドの5.2節を読んでみてください。
OpenCAE学会のHPに行くと和訳版がダウンロードできます。

以上、ご参考まで。
> ...
>
> もっと読む ≫

natsuki

unread,
Feb 20, 2012, 3:04:41 AM2/20/12
to OpenFOAM
ohbuchi様

ありがとうございます。
境界設定を見直したら計算が
進む様になりました。
勉強不足で申し訳ありません。

しかし、しばらくすると突然クーラン数が増大し
発散してしまいます。
緩和係数変更やモデル変更で
対応してみたいと思います。

ohbuchi

unread,
Feb 20, 2012, 4:12:35 AM2/20/12
to OpenFOAM
controlDictでadjustTimeStepをyesにし、maxCoで最大クーラン数を
指定すれば自動的に時間刻みが小さくなって計算が継続できるかも
しれません。しかし、途中で不安定になるケースは大抵の場合境界
条件が不適切だったりメッシュに問題があるケースが多いです。
checkMeshでメッシュに問題が見つからなければ、境界条件の設定
を疑ってみてください。
> ...
>
> もっと読む ≫

natsuki

unread,
Feb 21, 2012, 7:01:02 AM2/21/12
to OpenFOAM
ohbuchi様

教えて頂いたcontrolDictの操作等で
3000ステップほど計算を流す事ができました。
ありがとうございます。

しかし、急にクーラン数が増大し破綻してしまいます。
破綻の度に時間刻みを細かくしてリスタートしています。

checkMeshで問題は無さそうなので
やはり境界条件ではないかと思っています。

現在、境界条件は色んなチュートリアルを参考にし
設定していますが自信が無いです・・・。
もう少しがんばってみます。

ohbuchi

unread,
Feb 21, 2012, 6:26:05 PM2/21/12
to OpenFOAM
メッシュに問題ないのでしたら、やはり境界条件でしょうね。その方向で頑張ってください。
どうしてもわからなければ、境界条件の設定ファイルをアーカイブして添付して頂ければ
チェックできると思います。
> ...
>
> もっと読む ≫

natsuki

unread,
Feb 23, 2012, 12:48:57 AM2/23/12
to OpenFOAM
ohbuchi様

ありがとうございます。
その時はお手数ですがよろしくお願い致します。

現在、境界条件確認の為、モデルを極端に
単純化して同じ境界条件で計算を流そうとしています。
その結果が出ましたらまた書き込ませて頂きます。

natsuki

unread,
Feb 24, 2012, 3:46:06 AM2/24/12
to OpenFOAM
何度も申し訳ございません。
竹内です。

色々トライしてみたのですが
うまく計算が流せません。

ある程度の10000ステップ程は計算できるのですが
発散してしまいます。
また、流速はコンタで見る事ができるのですが
圧力がなぜか0のままで見る事ができません。

ちょっと知識不足の私では手に負えないので
わかる方がいらっしゃいましたら
お手数ですがご教授願えませんでしょうか。
(ohbuchi様 申し訳ありません。アーカイブの方法がわかりませんでした。)

メッシュを変更しておりますので
前に載せさせて頂いたものと
名前が若干異なりますが
細かく分けただけです。


----------<boundary>----------
11
(
inlet
{
type patch;
nFaces 25;
startFace 54305;
}
cyclic_2
{
type cyclic;
nFaces 3704;
startFace 54330;
matchTolerance 2;
neighbourPatch cyclic_1;
}
cyclic_1
{
type cyclic;
nFaces 3704;
startFace 58034;
matchTolerance 2;
neighbourPatch cyclic_2;
}
bell
{
type wall;
nFaces 384;
startFace 61738;
}
cup_1
{
type wall;
nFaces 526;
startFace 62122;
}
pre_side_in
{
type patch;
nFaces 216;
startFace 62648;
}
cup_2
{
type wall;
nFaces 139;
startFace 62864;
}
nozul
{
type wall;
nFaces 260;
startFace 63003;
}
pre_side_out
{
type patch;
nFaces 158;
startFace 63263;
}
pre_top
{
type patch;
nFaces 83;
startFace 63421;
}
pre_bottom
{
type patch;
nFaces 131;
startFace 63504;
}
)

----------<cellTable>----------
1
(
1
{
Label cellTable_1;
MaterialType fluid;
}

)


----------<controlDict>----------
application pisoFoam;

startFrom startTime;

startTime 0;

stopAt endTime;

endTime 0.01;

deltaT 0.00000001;

writeControl timeStep;

writeInterval 100;

purgeWrite 0;

writeFormat ascii;

writePrecision 6;

adjustTimeStep yes;

maxCo 30;

writeCompression off;

timeFormat general;

timePrecision 6;

runTimeModifiable true;


----------<fvSchemes>----------
ddtSchemes
{
default steadyState;
}

gradSchemes
{
default Gauss linear;
grad(p) Gauss linear;
grad(U) Gauss linear;
}

divSchemes
{
default none;
div(phi,U) Gauss upwind;
div(phi,k) Gauss upwind;
div(phi,epsilon) Gauss upwind;
div(phi,R) Gauss upwind;
div(R) Gauss linear;
div(phi,nuTilda) Gauss upwind;
div((nuEff*dev(T(grad(U))))) Gauss linear;
}

laplacianSchemes
{
default none;
laplacian(nuEff,U) Gauss linear corrected;
laplacian((1|A(U)),p) Gauss linear corrected;
laplacian(DkEff,k) Gauss linear corrected;
laplacian(DepsilonEff,epsilon) Gauss linear corrected;
laplacian(DREff,R) Gauss linear corrected;
laplacian(DnuTildaEff,nuTilda) Gauss linear corrected;
}

interpolationSchemes
{
default linear;
interpolate(U) linear;
}

snGradSchemes
{
default corrected;
}

fluxRequired
{
default no;
p ;
}

----------<fvSolution>----------
solvers
{
p
{
solver PCG;
preconditioner DIC;
tolerance 1e-08;
relTol 0.05;
}

pFinal
{
solver PCG;
preconditioner DIC;
tolerance 1e-07;
relTol 10;
}

U
{
solver PBiCG;
preconditioner DILU;
tolerance 1e-06;
relTol 10;
}

k
{
solver PBiCG;
preconditioner DILU;
tolerance 1e-06;
relTol 10;
}

epsilon
{
solver PBiCG;
preconditioner DILU;
tolerance 1e-06;
relTol 10;
}

R
{
solver PBiCG;
preconditioner DILU;
tolerance 1e-06;
relTol 10;
}

nuTilda
{
solver PBiCG;
preconditioner DILU;
tolerance 1e-06;
relTol 10;
}
}

PISO
{
nCorrectors 2;
nNonOrthogonalCorrectors 0;
pRefCell 1000;
pRefValue 0;
}

relaxationFactors
{
p 0.1;
U 0.3;
k 0.3;
epsilon 0.3;
R 0.3;
nuTilda 0.3;
}

----------<transportProperties>----------
transportModel Newtonian;

nu nu [ 0 2 -1 0 0 0 0 ] 1e-05;

CrossPowerLawCoeffs
{
nu0 nu0 [ 0 2 -1 0 0 0 0 ] 1e-06;
nuInf nuInf [ 0 2 -1 0 0 0 0 ] 1e-06;
m m [ 0 0 1 0 0 0 0 ] 1;
n n [ 0 0 0 0 0 0 0 ] 1;
}

BirdCarreauCoeffs
{
nu0 nu0 [ 0 2 -1 0 0 0 0 ] 1e-06;
nuInf nuInf [ 0 2 -1 0 0 0 0 ] 1e-06;
k k [ 0 0 1 0 0 0 0 ] 0;
n n [ 0 0 0 0 0 0 0 ] 1;
}

----------<epsilon>----------
dimensions [0 2 -3 0 0 0 0];

internalField uniform 0.000765;

boundaryField
{
inlet
{
type fixedValue;
value uniform 0.000765;
}
cyclic_2
{
type cyclic;
}
cyclic_1
{
type cyclic;
}
bell
{
type epsilonWallFunction;
value uniform 0.000765;
}
cup_1
{
type epsilonWallFunction;
value uniform 0.000765;
}
pre_side_in
{
type zeroGradient;
}
cup_2
{
type epsilonWallFunction;
value uniform 0.000765;
}
nozul
{
type epsilonWallFunction;
value uniform 0.000765;
}
pre_side_out
{
type zeroGradient;
}
pre_top
{
type zeroGradient;
}
pre_bottom
{
type zeroGradient;
}
}

----------<k>----------
dimensions [0 2 -2 0 0 0 0];

internalField uniform 0.00325;

boundaryField
{
inlet
{
type fixedValue;
value uniform 0.00325;
}
cyclic_2
{
type cyclic;
}
cyclic_1
{
type cyclic;
}
bell
{
type kqRWallFunction;
value uniform 0.00325;
}
cup_1
{
type kqRWallFunction;
value uniform 0.00325;
}
pre_side_in
{
type inletOutlet;
inletValue uniform 0;
value uniform 0;
}
cup_2
{
type kqRWallFunction;
value uniform 0.00325;
}
nozul
{
type kqRWallFunction;
value uniform 0.00325;
}
pre_side_out
{
type inletOutlet;
inletValue uniform 0;
value uniform 0;
}
pre_top
{
type inletOutlet;
inletValue uniform 0;
value uniform 0;
}
pre_bottom
{
type inletOutlet;
inletValue uniform 0;
value uniform 0;
}
}

----------<nuSgs>----------
dimensions [0 2 -1 0 0 0 0];

internalField uniform 0;

boundaryField
{
inlet
{
type zeroGradient;
}
cyclic_2
{
type cyclic;
}
cyclic_1
{
type cyclic;
}
bell
{
type zeroGradient;
}
cup_1
{
type zeroGradient;
}
pre_side_in
{
type zeroGradient;
}
cup_2
{
type zeroGradient;
}
nozul
{
type zeroGradient;
}
pre_side_out
{
type zeroGradient;
}
pre_top
{
type zeroGradient;
}
pre_bottom
{
type zeroGradient;
}
}

----------<nut>----------
dimensions [0 2 -1 0 0 0 0];

internalField uniform 0;

boundaryField
{
inlet
{
type calculated;
value uniform 0;
}
cyclic_2
{
type cyclic;
}
cyclic_1
{
type cyclic;
}
bell
{
type nutkWallFunction;
value uniform 0;
}
cup_1
{
type nutkWallFunction;
value uniform 0;
}
pre_side_in
{
type calculated;
value uniform 0;
}
cup_2
{
type nutkWallFunction;
value uniform 0;
}
nozul
{
type nutkWallFunction;
value uniform 0;
}
pre_side_out
{
type calculated;
value uniform 0;
}
pre_top
{
type calculated;
value uniform 0;
}
pre_bottom
{
type calculated;
value uniform 0;
}
}

----------<nuTilda>----------
dimensions [0 2 -1 0 0 0 0];

internalField uniform 0;

boundaryField
{
inlet
{
type fixedValue;
value uniform 0;
}
cyclic_2
{
type cyclic;
}
cyclic_1
{
type cyclic;
}
bell
{
type zeroGradient;
}
cup_1
{
type zeroGradient;
}
pre_side_in
{
type zeroGradient;
}
cup_2
{
type zeroGradient;
}
nozul
{
type zeroGradient;
}
pre_side_out
{
type zeroGradient;
}
pre_top
{
type zeroGradient;
}
pre_bottom
{
type zeroGradient;
}
}

----------<p>----------
dimensions [0 2 -2 0 0 0 0];

internalField uniform 0;

boundaryField
{
inlet
{
type fixedValue;
value uniform 150000;
}
cyclic_2
{
type cyclic;
}
cyclic_1
{
type cyclic;
}
bell
{
type zeroGradient;
}
cup_1
{
type zeroGradient;
}
pre_side_in
{
type fixedValue;
value uniform 0;
}
cup_2
{
type zeroGradient;
}
nozul
{
type zeroGradient;
}
pre_side_out
{
type fixedValue;
value uniform 0;
}
pre_top
{
type fixedValue;
value uniform 0;
}
pre_bottom
{
type fixedValue;
value uniform 0;
}
}

----------<R>----------
dimensions [0 2 -2 0 0 0 0];

internalField uniform (0 0 0 0 0 0);

boundaryField
{
inlet
{
type zeroGradient;
}
cyclic_2
{
type cyclic;
}
cyclic_1
{
type cyclic;
}
bell
{
type kqRWallFunction;
value uniform ( 0 0 0 0 0 0 );
}
cup_1
{
type kqRWallFunction;
value uniform ( 0 0 0 0 0 0 );
}
pre_side_in
{
type zeroGradient;
}
cup_2
{
type kqRWallFunction;
value uniform ( 0 0 0 0 0 0 );
}
nozul
{
type kqRWallFunction;
value uniform ( 0 0 0 0 0 0 );
}
pre_side_out
{
type zeroGradient;
}
pre_top
{
type zeroGradient;
}
pre_bottom
{
type zeroGradient;
}
}

----------<U>----------
dimensions [0 1 -1 0 0 0 0];

internalField uniform (0 0 0);

boundaryField
{
inlet
{
type fixedValue;
value uniform (0 0 0);
}
cyclic_2
{
type cyclic;
}
cyclic_1
{
type cyclic;
}
bell
{
type zeroGradient;
}
cup_1
{
type zeroGradient;
}
pre_side_in
{
type zeroGradient;
}
cup_2
{
type zeroGradient;
}
nozul
{
type zeroGradient;
}
pre_side_out
{
type zeroGradient;
}
pre_top
{
type zeroGradient;
}
pre_bottom
{
type zeroGradient;
}
}

以上です。
よろしくお願い致します。

On 2月22日, 午前8:26, ohbuchi <ohbu...@amber.plala.or.jp> wrote:

nakagawa

unread,
Feb 24, 2012, 7:46:11 AM2/24/12
to OpenFOAM
 モデルの全体像を把握していませんので,適切なアドバイスではないかと思いますが,
気になったことをお知らせします。

 この計算は,定常 or 非定常?
 ddtSchemesは定常のようです。定常計算では,controlDicのdeltaTを1として計算することが多いと思います。時間ではなく,
あくまで繰り返し数なので。
----------<fvSchemes>----------
ddtSchemes
{
default steadyState
}

Uの境界条件で,流入口らしき名前のところで,速度が0に固定されている。
これは,意図された条件でしょうか?
inlet
{
type fixedValue;
value uniform (0 0 0);
}

圧力pが,2カ所で規定されている。その内1カ所は,速度を0に固定している。
 圧力差が決まると,流量が決まってしまいます。
それに対応した速度を与えていないと,計算が破綻するのでは?

アーカイブするには,linuxのtarコマンドをつかいます。
デスクトップ環境を利用するなら,右クリックで圧縮とか選べるかも。
どちらの場合にも,必要なファイルを一つのフォルダにコピーして,そのフォルダを圧縮すると良いのでは。

 より具体的なアドバイスが,詳しい方々から寄せられることを祈っています。

 すでにご存じかもしれませんが,下記サイトの「境界条件の基礎と決定法」などが参考になると思います。
http://accc.riken.jp/HPC/lecture.html

PS:
ぜひ,一連のやりとりでマスターされたcyclic境界条件の使い方をまとめていただけませんか?
先日も,他の方から,cyclic境界の使い方に関する質問が寄せられていましたので。

Masashi Imano

unread,
Feb 24, 2012, 10:49:12 PM2/24/12
to open...@googlegroups.com
今野です.

こんにちは.
小生も気付いたことをいくつか書いておきます.

>> ----------<fvSolution>----------


>> pFinal
>> {
>> solver PCG;
>> preconditioner DIC;
>> tolerance 1e-07;
>> relTol 10;
>> }
>>
>> U
>> {
>> solver PBiCG;
>> preconditioner DILU;
>> tolerance 1e-06;
>> relTol 10;
>> }

relTolは,p,U,k,epsilonなどに関する線型方程式の相対残差(=最終残差/初期残差)
の収束判定条件ですから,これが1以上ですと,線型ソルバーが反復せずに
終了していまい,線型方程式を解くことになりません.
よって,通常は0.1(pやpFinalについては0.01)などと1より小さい値にします
(pFinalやU以外も同様).

>> PISO
>> {
>> nCorrectors 2;
>> nNonOrthogonalCorrectors 0;
>> pRefCell 1000;
>> pRefValue 0;
>>
>> }

pRefCellが指定されていますが,これは通常チュートリアルのCavityのように,
圧力のディレクレ型境界条件が無い時に指定するものです.
しかし,今回は

>> ----------<p>----------


>> pre_side_in
>> {
>> type fixedValue;
>> value uniform 0;
>> }

などと,圧力のディレクレ型境界条件があるので,指定は不要かと思います.

あと,inletのUやpの条件がおかしいのはnakagawaさんの書かれた通りです.

かなり長丁場のやりとりになっていますので、どのような問題を解きたいと思っているのか,
境界面の名前と共に絵を書いて示されたほうが解決が早いと思います(Google グループから
来ているメールに返信するようにして、そのメールに図を添付する).

2012年2月24日21:46 nakagawa <snakag...@gmail.com>:

> --
> このメールは Google グループのグループ「OpenFOAM」の登録者に送られています。
> このグループに投稿するには、open...@googlegroups.com にメールを送信してください。
> このグループから退会するには、openfoam+u...@googlegroups.com にメールを送信してください。
> 詳細については、http://groups.google.com/group/openfoam?hl=ja からこのグループにアクセスしてください。
>

--
IMANO Masashi, Ph.D.
Assistant Professor
Department of Architecture, Graduate School of Engineering,
The University of Tokyo
7-3-1, Hongo, Bunkyo-ku, Tokyo, Japan, 113-8656
E-mail:im...@arch.t.u-tokyo.ac.jp
Phone:+81-3-5841-6164(direct), +81-3-5841-6179(Laboratory)
Facsimile:+81-3-5841-8511

ohbuchi

unread,
Feb 24, 2012, 11:27:05 PM2/24/12
to OpenFOAM
気づいた点をいくつか申し上げます。
中川先生もご指摘ですが、pisoFoamを使うならddtSchemeが不適切です。
Eulerなどにして下さい。

また、boundary/cyclicのmatchTolerance=2は大きすぎると思います。
もしかしたら、メッシュそのものはOKでもcyclic設定がうまくいっていない
可能性がありますね。

また、乱流モデルに標準k-εをお使いならばnuSgsは不要です(LES用)。

また、kとεの境界値をCavityと同じ値にしている様ですが、例えば次の様に
指定した方が良いと思います。
 系の特性長さ L
 渦スケールLe=0.07L
 平均流速 U
 乱れ強さ I(=u/U)
 k=1.5(U*I)^2
 ε=0.1643k^1.5/Le


On 2月24日, 午後5:46, natsuki <natsuki....@gmail.com> wrote:
> ...
>
> もっと読む ≫

ohbuchi

unread,
Feb 24, 2012, 11:31:50 PM2/24/12
to OpenFOAM
U,pの設定にも問題があります。
通常、自由流出境界は系に1つだけ許されると思います。
UのzeroGradientが複数あるのは問題です。
また、普通は流入境界で有限の速度ベクトルを指定し、そこではpをzeroGradientに
指定し、流出境界ではpをfixedValueで規定して、UはzeroGradientにすると思います。
複数の流入流出があるのであれば、なるべく流量を規定してUをfixedValueにし
pをfixedValueで定義する境界は1つにすると計算が安定すると思います。



On 2月24日, 午後5:46, natsuki <natsuki....@gmail.com> wrote:

natsuki

unread,
Mar 2, 2012, 5:38:09 AM3/2/12
to OpenFOAM
中川様

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

計算は非定常です。

流入口はinletのみで、nozulはただの管です。
紛らわしくて申し訳ございません。


Uの境界条件ですが圧力を加え流速が発生すると考え、
pに数値を入れ、Uは0としました。
簡易的(cavityを少し変更)に試したところ大丈夫そうだったので
設定してみました。

圧力や境界条件の勉強が全く足りていませんでした。
教えて頂いたサイトで勉強させていただきます。

ご丁寧にありがとうございます。

ここで学んだ事は計算がうまく行き確かな事が
確認できましたらまとめて投稿させて頂きます。

natsuki

unread,
Mar 2, 2012, 5:45:14 AM3/2/12
to OpenFOAM
今野様

初めまして。
返信が遅くなり申し訳ございません。

relTolは何の許容値なのかわからず
困っておりました。
有難うございます。

pRefCellも使い方がわからないまま設定し
たまたま計算が開始されたのでそのままにしていました。

>> PISO
>> {
>> nCorrectors 2;
>> nNonOrthogonalCorrectors 0;
>> }
とするのが正しいのでしょうか?
もしかしたら圧力境界の設定が原因なのかもしれません。


そうですね。
計算概要とモデル図を作成します。

ありがとうございます。
> 2012年2月24日21:46 nakagawa <snakagawa....@gmail.com>:
> ...
>
> もっと読む ≫- 引用テキストを表示しない -
>
> - 引用テキストを表示 -- 引用テキストを表示しない -
>
> - 引用テキストを表示 -

natsuki

unread,
Mar 2, 2012, 5:54:18 AM3/2/12
to OpenFOAM
ohbuchi様

いつも有難うございます。
返信が遅くなり申し訳ございません。

boundary/cyclicのmatchToleranceですが
1以下ではズレでエラーをなりました。
最初は1.00=100%と考えていたのですが
ズレ2%とエラーメッセージが出て設定を2と
したところ計算が開始されたので1.00=1%と
考えていました。

ご指摘いただいた様にcyclicの設定が
怪しいです。
またstar4ToMesh自体がうまくいっていないの
かもしれません。
極端な簡易形状で試して見たいと思います。

kとεの境界値の算出方法がわからなかった為、Cavityと同じ値に
しておりました。
有益な情報有難うございます。
Message has been deleted

natsuki

unread,
Mar 21, 2012, 4:53:47 AM3/21/12
to OpenFOAM
いつも大変お世話になっております。
竹内です。

報告が遅くなり申し訳ございません。
困っていた計算ですが一応それらしい解を
得る事ができました。
(圧力境界からの逆流や大きな渦が発生等
課題はまだまだありますが・・・。)
ありがとうございました。


計算が流れなかった原因はメッシュの様です。
もしかしたらstar4ToFoamにはバグがあったり
何か後処理が必要だったりするのかもしれません。
今後調べたいと思います。


--------------------------------------------
ここで教えて頂いた周期境界の設定は以下の通りです。

・ 前提として2つの面はface数が同じでなければならない。
・設定は『constant』と『0』のみで行う。

・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・
『constant』→boundaryファイル
※周期境界にしたい2つの面をwall1,wall2とする。

matchToleranceとneighbourPatchを追加する。

matchToleranceは接点のズレの許容値。
面ズレのエラーが出た場合この数値を少しずつ
大きく調整。
注意:matchとToleranceの間にスペースがあると
数値を変更しても(おそらく)デフォルトの0.001と
認識されます。

neighbourPatchはペアとなる境界を指定。
下記の様に設定します。

wall1
{
type cyclic;
nFaces 1000;
startFace xxxxxx;
matchTolerance  0.001;
neighbourPatch  wall2;
}
wall2
{
type cyclic;
nFaces 1000;
startFace xxxxxx;
matchTolerance  0.001;
neighbourPatch  wall1;
}
・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・
『0』→フォルダ内にあるすべてのファイル

typeをcyclicとする。
wall1
{
type cyclic;
}
wall2
{
type cyclic;
}

・ ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・

以上、私が教えて頂き実際に使用したcyclic境界の設定です。
(間違っていたら申し訳ありません。)

ありがとうございました。
Reply all
Reply to author
Forward
0 new messages