dynamicsoar's log

主に研究関係のメモ

Fluent

ANSYS でライセンス認証に失敗するときの対処法(のひとつ)→ License Preferences で Reset to Default

問題の概要と対処 これまで 19.1 を使っていたのだけれど、そろそろ 2019R3 (19.5) に上げるかーと思ってやってみたら、インストール自体は完了したのになぜかライセンスがうまく取れずに失敗する。サーバとクライアントが同じマシンでも失敗するので、Firew…

ANSYS Fluent: you should probably not use hybrid initialisation for transient, if there are 2 or more outlets

Effect of the initialisation methods on streamlines. Where there are two outlets, and you are computing transient simulation with ANSYS Fluent, you should probably not use hybrid initialisation. Or at least you should be careful and check …

Fluent for System Coupling (FSI): MPI should be Intel (for my case at least)

The title says it all. Otherwise somehow Fluent can run only up to 9 cores parallel. Not even 10 or 12 or 14 but 9. Strange but true...

Fluent: VS Code で journal file の編集をする → Scheme の関連付けをする

journal file の拡張子をたとえば .jou などに統一しておいて、Scheme と関連付けすればよい。まずは Scheme の機能拡張を入れる(自分は適当に vscode-scheme を選んだ)。次に、settings.json に、 "files.associations": { "*.jou": "scheme" }, を追加す…

Fluent: journal file を複数に分割して include するには→ file/read-journal を使う

まえがき これ、できないと思いこんでたけど、よく見たら User's Guide に書いてあった。.set ファイルに頼らずに、なるべく journal file でやろうとすると、ファイルがどんどん長くなっていて、困っていたので、これができると非常に嬉しい。 方法 要は以…

UDF: cell thread に含まれる face thread にアクセスする

UDF において、ある cell thread tc(たとえば翼を含む空間)に含まれる face thread tf(たとえば翼表面)を求めるのに、次のようなことができた: begin_c_loop(c,tc); c_face_loop(c,tc,i) { if(C_FACE_THREAD(c,tc,i)==tf) { f=C_FACE(c,tc,i); f_node_l…

Fluent UDF: マクロ末尾の _M1 は「ひとつ前の時刻」の意味だった

UDF マニュアルより The _M1 suffix can be applied to some of the cell variable macros in Table 3.8: Macros for Cell Flow Variables Defined in mem.h or sg_mem.h (p. 262) to allow access to the value of the variable at the previous time step …

Fluent UDF: CURRENT_TIME はコール時点の現在時刻を示すが、DEFINE_GRID_MOTION の引数として渡される time は「メッシュ移動後の時刻」を示している(ぽい)

タイトルのとおり。まだ確証はないんだけどテストした結果おそらくこれ。確かに各時刻でメッシュ移動は流れ計算より先に行われるので、「流れ場にとっての時刻」はメッシュ移動「後」になる、と思えば理屈はわかる。しかしいつものとおりマニュアルでこのへ…

Fluent UDF: NODE_POS_UPDATED で付与された MOVED フラグは NODE_POS_MOVABLE コマンドでリセットできる

問題編 DEFINE_GRID_MOTION を使って板とかを曲げたりしたいとき、メッシュ内の各 node は複数の face にまたがっている可能性があるので、UDF マニュアルのサンプルにあるように、 #include "udf.h" DEFINE_GRID_MOTION(my_dyn_mesh, domain, dt, time, dti…

Fluent で dynamic mesh の motion preview を TUI (journal) からやるには → solve/mesh-motion

タイトルで完結。コマンド名に preview って入ってないから TUI マニュアルで検索かけても出てこない…

ANSYS Meshing と Fluent (or Fluent Meshing) の表示する maximum skewness や minimum orthogonal quality が微妙に違う(原因不明)

再現手順 ANSYS Meshing でメッシュを作成し、maximum skewness を確認する。今回は 0.944 くらいだった。まぁ < 0.95 だし、いけるかな、と。 Fluent 用に .msh を export する(Workbench で Update とするのと同じことだが、自分はこちらを好む)。 Fluen…

ANSYS Fluent の autosave 間隔 n は「計算開始(再開)時点から n ステップごと」ではなく「現在ステップ/n が割り切れたら出力」の仕様っぽい

たとえば、非定常計算で、 ;; Autosave Every (time step) file/auto-save/data-frequency 10 solve/set/time-step 0.02 solve/dual-time-iterate 50 30 として 1 s まで計算したとする。こうすると、タイムステップが 10, 20, 30, 40, 50 のときに autosave…

Fluent の SRS (e.g. LES) で入口境界の Vortex Method に 1000 を超える渦を与えたい → scheme コマンドが必要

LES などの SRS (scale-resolved simulation) を行う際、入口境界に変動を与えるための Fluctuating Velocity method として Vortex Method を使う場合、公式は資料で「最低でも入口の face 数の 1/4 以上の個数の渦を生成するように指定しろ」と言っている…

Fluent の TUI (journal) で Cell Zone Conditions の設定を変える (e.g. ELES) には → define/boundary-conditions/fluid にある

Fluent で、Cell Zone Conditions の設定を変えたいことがある。Mesh motion とか、embedded LES (ELES) とか。しかし TUI からこの設定を変える方法がなかなか見つからなかった。もうサポートに聞こうかな?と思ったところで見つけた。 define/boundary-con…

Fluent で、確実に gzip 圧縮されたデータを吐き出す → root-name に .gz を付ければいい

だいぶ前から悩んでいたこれだが、同僚に教えてもらった。まさかこんな方法とは…自分だけならずっと気づかなかった。ありがたい。 GUI の場合 Workbench から起動した Fluent ではそもそも root-name の記入欄がないので、GUI からは設定不能。TUI を使うし…

Standalone ANSYS Fluent launched directly from Windows is (slightly?) different from Fluent launched from WorkBench

English I've been thinking they are identical and have never launched the standalone Fluent, but no, they are not. At least in a few ways. I was doing a tutorial on VOF + dynamics + dynamic mesh (fl00392). And I stumbled upon that in Autos…

ANSYS Fluent の UDF についての自分用メモ

NB! Dynamic meshing については別の記事に分けている: Dynamic meshing in Fluent - dynamicsoar's log UDFマニュアル*1は基本的に version 19.2 を参照しているが、たまに18.1も見ている(あまり変わらないと思うが…)。 定義の確認 macro 個別の関数のこ…

Dynamic meshing in Fluent

NB! UDF全般に関する事項は別記事に分けている: ANSYS Fluent の UDF についての自分用メモ - dynamicsoar's log Dynamic Mesh Setup > General > Transient Setup > Dynamic Mesh > tick "Dynamic Mesh" Setup > Dynamic Mesh > "Create/Edit..." Smoothin…

Fluent: write-settings & read-settings are extremely useful

I'm pretty sure you're tired of repeating the same (or similar) settings for loads of computation cases. At some point you noticed that you can use "Duplicate" the Fluent module in workbench. Yes it's useful. But there's an even better way…

run Fluent, export .cas and .dat, and compress them after computation (on Linux)

I could not find the way to specify the auto-save .cas & .dat files in the format of .cas.gz & .dat.gz, and I gave up to compress them using the journal file. Instead, I decided to compress them in the script file after the computation, if…

Fluent 18.1 で、定常RANS で予備計算 → LES で本番計算

だいぶ古いなーこれ…(2019-02-27) 定常 RANS の計算を普通にやる。ここでは(Workbench ではなく)スパコンでやったとする。ある程度収束した時点での .cas[.gz] と .dat[.gz] を保存しておく。 Workbench に、新しい Fluent モジュールをドロップして起動…