I am trying to repeat the Taylor Green vortex with v1.8.0. The codes now runs well. But I am stuck with the extraction of statistics such as kinetic energy or enstropy.
In general, there are two possible ways:
- Export vtu files at intemediate steps, and extract data from these files to obtain statistics. However, this might require a lot of files , and might cause heavy burden for the hard disk.
- Write a plugin. I am trying this way. It seems not quite easy for a beginner. I have mannaged to compute kinetic energy. But I still have no idea how to compute the enstropy, which requires gradients.
Can any of you share some suggestions or code segament? Thank you in advance!
With regards to the .vtu based approach one option is to make use of the
post-action feature of PyFR. This allows PyFR to execute a script every
time a .pyfrs file is written to disk. The called script can then
convert the .pyfrs file to a .vtu file and perform the appropriate
processing on the file before subsequently deleting it. This avoids the
issue of a large number of files on disk.
The plugin approach is more desirable. However, as you note it does
require the evaluation of gradients. This is somewhat more involved due
to the fact that PyFR works in transformed space as opposed to physical
space. Code for this can be found in the current version of the time
Thank you so much for your reply!
These are very good suggestions! I think with the tavg.py, the gradients are ready for extraction.
在 2018年11月13日星期二 UTC+8下午4:43:10，Freddie Witherden写道：