LoginSignup
0
0

More than 3 years have passed since last update.

古くないOpenFOAMに乱流モデルを追加する

Last updated at Posted at 2020-04-22

古くないOpenFOAM

OpenFOAM 3.0より新しいバージョンでの乱流モデルの追加の仕方。3より古いとやりかたが違う。

参考

How to add a turbulence model in OpenFOAM-3.0.0
http://hassankassem.me/posts/newturbulencemodel/
ここのやり方は自分の作業ディレクトリにソースを置く前提。src/TurbulenceModelsにソースを置く方法が以下。

乱流モデルのソースの場所

  • src/TurbulenceModels/turbulenceModels/RAS にモデルがいっぱいある。
  • src/TurbulenceModels/compressible/RAS にはbuoyantKEpsilonがある。

乱流モデルの名前はどこに書くか

incompressibleは
src/TurbulenceModels/incompressible/turbulentTransportModels/turbulentTransportModels.C

compressibleは
src/TurbulenceModels/compressible/turbulentFluidThermoModels/turbulentFluidThermoModels.C

乱流モデルの追加

compressibleの乱流モデルを追加するとします。src/TurbulenceModels/compressible/turbulentFluidThermoModels/turbulentFluidThermoModels.Cに

#include "mySpalartAllmaras.H"
makeRASModel(mySpalartAllmaras);

等として新しいモデルの情報を記載。新しい乱流モデルのソースファイル(.Hと.C)は/src/TurbulenceModels/compressible/RASにいれておきます。

** その後,src/TurbulenceModels/compressible/のlnIncludeを削除してから,srcの中のAllwmakeを実行する。**

lnIncludeディレクトリを削除しないと,追加したモデルのヘッダーファイルが見つからないって怒られます。ここ重要。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0