0
$\begingroup$

I am trying to generate initial velocity field which satisfies incompressible flows condition. To formulate this I am using Rogallo's procedure formulation which is given by $$ \tilde{u}(k) = \frac{\alpha k k_2 + \beta k_1 k_3}{k \sqrt {k_1^2 + k_2^2}} \hat{k_1} + \frac{\beta k_2 k_3 - \alpha k_1 k}{k \sqrt {k_1^2 + k_2^2}}\hat{k_2} - \frac{\beta \sqrt {k_1^2 + k_2^2}}{k}\hat{k_3} $$ where $\alpha$ and $\beta$ are given by $$ \alpha = \sqrt{\frac{E_0(k)}{4\pi k^2}} e^{i \theta_1} \cos \phi,\hspace{0.5cm} \beta = \sqrt{\frac{E_0(k)}{4\pi k^2}} e^{i \theta_1} \sin \phi $$ in which $E_0(k)$ is the assumed energy spectrum in my case its $$ E_0(k) = A k^4 e^{-0.14 k^2}, \hspace{1cm} k \in [k_a,k_b] $$ My doubt is what are the terms $k , k_1,k_2,k_3$ in this formulation? Secondly, after substituting these terms and obtaining the velocities in fourier space what is the procedure to enforce conjugate symmetry so that real velocities are obtained in the physical space for simulation?

$\endgroup$
1
$\begingroup$

The method produces a velocity field in Fourier space, where $k_1,k_2,k_3$ are the components of the wave vector $k \in {\mathbb R}^3$. In order to get a velocity field in physical space, you need to do an inverse Fourier transform. This typically done via the inverse Fast Fourier Transform (iFFT).

$\endgroup$
  • $\begingroup$ Thank you Wolfgang for the reply. My doubt is if I apply inverse Fast Fourier Transform (iFFT) for the values obtained from this procedure I am ending up with complex numbers again in the real space instead of real values? Is there anything which I need to do before applying iFFT? $\endgroup$ – verito Aug 26 '16 at 11:24
  • $\begingroup$ I think you ought to be able to just take the real part, but must admit that I don't know for sure. $\endgroup$ – Wolfgang Bangerth Aug 27 '16 at 13:23
  • $\begingroup$ I don't think we can just neglect imaginary parts with this we will loose crucial information in the complex space which might induce more errors. Anyways thank you :) $\endgroup$ – verito Aug 27 '16 at 14:05
  • $\begingroup$ The question to answer is whether $\text{Re}(iFFT(\tilde u(k)))$ has the same power spectrum as $iFFT(\tilde u(k))$. I don't know the answer to this question, though. $\endgroup$ – Wolfgang Bangerth Aug 29 '16 at 16:29
0
$\begingroup$

FFTW has real-to-complex, real-to-real, and complex-to-real plans. For example, in 1d to take a complex fft result and get a real data result you call the function "fftw_plan_dft_c2r_1d" where the c2r means complex-to-real.

In 3d the function is "fftw_plan_dft_c2r_3d" which does the same thing I describe above but in 3D.

Check out the documentation here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.