On 13/11/2018 02:56, Jian Yu wrote: > 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: > 1. 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. > 2. 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 averaging plugin: <https://github.com/vincentlab/PyFR/blob/develop/pyfr/plugins/tavg.py#L55> Regards, Freddie. -- You received this message because you are subscribed to the Google Groups "PyFR Mailing List" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send an email to [email protected]. Visit this group at https://groups.google.com/group/pyfrmailinglist. For more options, visit https://groups.google.com/d/optout.
