How to load the initial solution field '[soln-ics]' from a .txt file?

Dear all,
I want to validate a benchmark example about vortex pairing [1] and it requires to initialize solution with the pressure and density obtained from Poisson equation. I would like to know about how to use the function of patch.patch to load the data for initialization?

Regards

Kiny

[1] Classification and sound generation of two-dimensional interaction of two Taylor vortices

There is no functionality for this. If you wish to restart from an initial solution field of your own specification you will need to write a .pyfrs file and then restart the simulation from this file.

Regards, Freddie.

Hi Freddie, thanks for your quick reply. I will look into the data structure of .pyfrs file.

Greetings. I encounter the same issue as former discussions. Would you like to share some experience on modifying such .pyfrs file? Thanks!

A pyfrs file is just an hdf5 file with a specific data layout. The best way to understand them is to run a simple test case and then use tools such as h5ls and h5dump to see what is being written.

For example, this is the output for a p=3, hex case with 32^3 elements in 3D for the Navier–Stokes equations.

config                   Dataset {SCALAR}
config-0                 Dataset {SCALAR}
mesh_uuid                Dataset {SCALAR}
soln_hex_p0              Dataset {64, 5, 32768}
stats                    Dataset {SCALAR}

So you can see the solution of the zeroth partition is in soln_hex_p0 with the first dimension being the solution points, the next being the variables and the last being the element.

You can then use h5dump -d stats which shows you that the variables are specifically:

[data]
fields = rho,rhou,rhov,rhow,E
prefix = soln
1 Like

Hi Will,

By using h5dump I managed to see the structure of .pyfrs file. Thank you for your swift reply!