Defining Random, Isotropic Fields.





METHOD 1.

I have written a Fortran program that uses 2 random numbers (spherical angles theta and phi) to create a 3-component unit vector called k.
It similarly creates another 2 vectors, j and l.
It then calculates A which is defined as k x j and then B which is defined as k x l.
(It is a well known result that the cross product of 2 vectors creates a third vector which will be perpendicular to both original vectors.
Thus both A and B will be at 90 degrees to k.)

This process is repeated 5,000 times and each time we use our 3 main vectors, (k, A and B) to create a velocity field, u, following the method of Malik and Vassilicos.


In order to have a visual check that my flow field is randomly distributed, I have written an IDL program to plot the co-ordinates of my flow. I have chosen to plot 2d slices of my field, as this makes the results easier to understand.

Here are the results for the xy-plane, and also the xz-plane.

My fortran program also calculates the dot product of k and A and also of k and B.
If each pair are truely perpendicular, their dot products should be zero.
The average of these 5,000 quantities was of the order of -19 for each, so both are very close to zero.






METHOD 2

I have written an alternative Fortran program that uses 2 random numbers to create a 3-component unit vector called k.
We can then use k to define a new z-axis. We then set up new x and y axes such that they are perpendicular to our new z-axis.

We can then define a plane in our new co-ordinate system that will have k as its normal.
Once we have our plane, we need only 1 random number to define a new vector A, and similarly for B.

We then re-express A and B in terms of our original co-ordinate system.

Thus A and B are random vectors subject to the constraint that they are both perpendicular to k.

This process is repeated 5,000 times, and as with METHOD 1, I have created graphs of the co-ordinates in the xy-plane, and in the xz-plane.

This fortran program also calculated the dot product of k and A and also k and B. The average of these 5,000 quantities was of the order of -19, so is very close to zero, as we would hope for!




Home