0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

OpenFOAM9のデータ出力のタイミング

Last updated at Posted at 2024-06-27

データ出力のタイミングが古いバージョンと違う

OpenFOAM9では,出力のタイミングが変わりました。

具体例をいうと,0.1sのデータを出力して,それ以降5秒おきにデータ出そうとすると前なら
5.1
10.1
15.1
と0.1sから5秒おきに出てました。

OpenFOAM9だと
5
10
15
と出るようになりました。

リリースにちゃんとかいてありました。 https://openfoam.org/release/9/

Data Output: When a case is stopped and restarted, results are now written to subsequent time directories referenced to the original start time of the case rather than the restart time [ commit 7aca9b ].

すっきりした。

問題は

これはこれで良かったんですが,adjustableRunTime使ってて問題が出ました。OpenFOAM9なのに
5.1, 10.1, 15.1とデータが出ることが発生しました。

OpenFOAM9では,beginTimeとstartTimeがあって,この2つをつかって,データ出力のタイミングをコントロールしています。

beginTimeは各時刻のデータのディレクトリのなかのuniform/timeにあります。普通これが0になっています。これだとリスタートしても,時刻0s基準で,データが出力されます。

今回問題がおきた計算では,0.1sのbeginTimeがなぜか0.1になっていました。なので,0.1sから5秒おきにデータが出力されたようです。

まとめ

OpenFOAM9より前のバージョンと同じように,データ出力の時刻を設定したいときは,uniform/timeのbeginTimeを調整すれば,可能です。

(自分でbeginTimeを変更した覚えがないのに,なんで変わったのか。。。)

補足

ちなみにwriteIntervalを時間帯によって変えられるようにもなったみたいです。

Time: The setTimeStep function object allows the user to configure a writeInterval which changes over time [ commit bae95b ].

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?