Groups
Groups
Sign in
Groups
Groups
OpenFOAM
Conversations
About
Send feedback
Help
物理量の関数で表される境界条件(p = u・v)に関して
480 views
Skip to first unread message
nozaki
unread,
Feb 21, 2011, 8:30:19 AM
2/21/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to OpenFOAM
野崎と申します。
物理量の関数で表現されるような境界条件を扱えるツールはあるのでしょうか?
考えている境界条件の例は、outletにおいて
p = u・v (圧力pが二つの速度場u、vの内積で表現される)
といったものです。
無い場合には自分で実装しようと考えているのですが、以下の点に関しまして、
参考となりそうなコード等どんなことでも何かご存知の方がいらっしゃいました
ら、ご教授お願いします。因みにsimpleFoamを使用した定常計算を考えています。
・何らかの方法(自分の場合は関数式)で得られた境界値を境界条件として設定
(OpenFOAMではboundaryFieldが境界値であると理解していますが、この値を他
の物理量の計算結果から計算し、境界条件として与えるという機能はどのファイル
を参照すればよいでしょうか?)
以上宜しくお願いします。
ohbuchi
unread,
Feb 21, 2011, 3:31:17 PM
2/21/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to OpenFOAM
groovyBCはご存知でしょうか?
http://openfoamwiki.net/index.php/Contrib_groovyBC
(1.5用)
ソルバで定義されているフィールド変数やメトリクスを使って数式(Expression)で境界条件を指定できます。
1.7用は、swak4Foamに含まれています。
http://openfoamwiki.net/index.php/Contrib/swak4Foam
以上、ご参考まで。
nozaki
unread,
Feb 25, 2011, 12:09:49 AM
2/25/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to OpenFOAM
ご回答ありがとうございます。
早速、groovyBCを使用して、outletにおけるp = U・V
という境界条件を
outlet
{
type groovyBC;
valueExpression "U&V";
}
と記述して計算を行ってみました。この計算の出力ファイル
pのboundaryFieldの値とoutletパッチにおいて
label ID = mesh.boundaryMesh().findPatchID("outlet")として、
U.boundaryField()[ID][i]&V.boundaryField()[ID][i]により計算
した値とを比較したところ、値が異なっていたのですが、groovyBC
の設定は上記のもので正しいでしょうか?
因みに、outletではUにノイマン境界条件を与えています。
以上宜しくお願いします。
ohbuchi
unread,
Feb 27, 2011, 5:35:00 AM
2/27/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to OpenFOAM
こんばんは。
エラーが発生せず計算ができたのであれば、表現に問題はないのだと思います。
境界値が結果のUから求めた値と異なるのは、ソルバにもよりますが
p方程式に境界条件を課すときの値が最終結果と違うからではないでしょうか?
PISO系ソルバなら、前回のTimeStepの値を使っているのではないかと思います。
あやふやなコメントで申し訳ありません。
nozaki
unread,
Mar 7, 2011, 11:39:18 PM
3/7/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to OpenFOAM
ご回答ありがとうございます。
この点に関しましては更に調査を続けようと思います。
境界条件に関して追加で質問なのですが、
ベクトル場に関する境界条件で、
--境界条件----------------------------------------
境界面の法線方向成分:ノイマン境界条件
境界面上成分:ロビン境界条件(A・dT/dn + B・T = C)
ここでA、B、Cは定数ではなく変数
--------------------------------------------------
のような境界条件を課す方法はございますでしょうか?
groovyBCを使用した場合には"fractionExpression"がス
カラー値であるため、成分毎に同じ条件が課されてしま
います。
何かご存知の方がいらっしゃいましたら些細なことでも
教えていただけると非常にありがたいです。
以上宜しくお願いします。
ohbuchi
unread,
Mar 10, 2011, 12:01:25 AM
3/10/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to OpenFOAM
groovyBCFvPatchFieldがmixedFvPatchFieldを継承しているので、directionMappedの様に
fractionを
テンソルで定義できないためnozakiさんのやりたいことはgroovyBCでは難しいと思います。
基本型のdirectionMappedを使って対応できれば良いのですが、それはノイマン条件とディリクレ条件に
かかる変数係数がどんなものかに依存すると思います。
nozaki
unread,
Mar 10, 2011, 4:34:19 AM
3/10/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to OpenFOAM
ohbuchi様、ご回答ありがとうございます。
考えているのは速度場に対する次のような境界条件です。
・速度場Uの境界面成分(Ut=U-(U・n)n)に対して
ロビン境界条件:
0=Vn(Ut-Vt)+νdUt/dn
・速度場Uの境界面の法線方向成分(Un=U・n)に対して
ノイマン0境界条件:
dUn/dn=0
ここで、νは動粘性係数、Vは他の計算から得られる速度場です。
directionMappedというのはdirectionMixedのことでしょうか?
この境界条件に関して調べた結果、ベクトル場に対する
directionMixed境界条件は
type directionMixed;
refValue uniform (Ux Uy Uz);
refGradient uniform (dUx dUy dUz);
valueFraction uniform (XX XY XZ YY YZ ZZ);
というフォーマットをとり、境界値を以下の関係式
[境界値]=[valueFraction][refValue]+[I-valueFraction][gradValue]
から計算していることを確認しました。上記の境界条件を設定し
ようとすると、valueFractionのある成分に
1.0/(1.0 + nu/(mag(delta())*Un))
という関係式が必要になると思います。groovyBCでは、ここで使用
されているmag(delta())といった表現が使用できましたが、
directionMixed境界条件ではこのような表現は使用できないように
思います。
自分の境界条件を作成するしか方法はないでしょうか?
以上宜しくお願いします。
ohbuchi
unread,
Mar 10, 2011, 9:34:59 AM
3/10/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to OpenFOAM
directionMixedです。失礼しました。
これを継承してgroovyBCのようなものを作るのが
良いと思います。大変そうですが。
式のパーサなどはgroovyBC のものが使えるのでは
ないでしょうか。
Reply all
Reply to author
Forward
0 new messages