質量流量の計算2015年10月9日 | |
はじめに質量流量の計算について。 使用バージョンOpenFOAM 2.4.0 質量流量の計算ParaViewParaView で体積流量を計算することができる。"Extract Block" フィルタで流量を計算したい面を抽出し、"Surface Flow" フィルタを適用する。スプレッドシート表示をすれば、値 ("Surface Flow") が得られる。 ちなみに、確認のために面の面積が欲しい場合は、"Integrate Variables" フィルタの結果をスプレッドシート表示し、"Attribute" で "Cell Data" を選択すればよい。 fieldFunctionObjectsfieldFunctionObjects を使うと、計算しながら質量流量 (あるいは体積流量) を得ることができる。 system/controlDict に以下のように設定する。
functions
(
inletMassFlow
{
type faceSource;
functionObjectLibs ("libfieldFunctionObjects.so");
fields (phi);
valueOutput false;
source patch;
operation sum;
sourceName inlet;
outputControl timeStep;
outputInterval 1;
}
);
パッチ上で phi が合計される。その結果がログに表示され、上記の場合は "inletMassFlow" というディレクトリの中に履歴が出力される。 | |
| PENGUINITIS | |