Radom function in the ini file

Hello, everyone.

I want to set the solenoidal velocity field as the initial value, but I know the radom function which makes up the velocity field is not included ini file. How do I achieve this?

Thanks a lot.

Solenoidal velocity fields are simply those which are divergence free (i.e., can be expressed as the curl of another function). This is not itself related to any ‘random’ function.

Regards, Freddie.

Did you simulate the three-dimensional isotropic compressible turbulence decay by pyfr? To get the correct result, the initial field needs to be read externally as the initial condition. Obviously, pyfr can’t do it. I don’t know if I understand correctly. If not, how could I set the initial value of the velocity? It bothers me a lot. I’m not sure this is the place to ask that question.

I have tried this in the past, but didn’t get around to finishing. Put simply, what you need to do is create a pyfrs file of the relevant initial condition for a given mesh.

Thanks, I have data file which contains initial value i,j,k,rho,u,v,w,p, then how to create a pyfrs file?