# Obtain velocity from imposed energy spectrum using the inverse FFT

I am trying to obtain the spatial representation of $$u(x)$$ (e.g. velocity) from its energy spectrum $$E(k)=k^4\exp(-(k/k_0)^2)$$, which is given in the frequency domain, provided $$|u(k)|=\sqrt{2E(k)}$$. I need a real $$u(x)$$ to use it as initial condition for a simulation using FV.

How can I obtain a real $$u(x)$$ using the inverse FFT applied to $$E(k)$$?

I have seen that a phase perturbation is sometimes added as $$|u(k)|=\sqrt{2E(k)}\exp(i2\pi p(k))$$, where $$p(k)$$ is a random number that satisfies $$p(k)=-p(-k)$$. However, this does not work for me.

I recommend you first read answer here to find out why $$\tilde{E}(\mathbf{k}) \neq \frac{1}{2} \tilde{\mathbf{u}}(\mathbf{k}) \cdot \tilde{\mathbf{u}}(\mathbf{k})$$. In order to find velocity profile from Fourier transform ($$\mathscr{F}$$) of kinetic energy ($$E(\mathbf{r}) = \frac{1}{2} \mathbf{u}(\mathbf{r}) \cdot \mathbf{u}(\mathbf{r})$$), you could obtain it like this:

$$\mathscr{F} \{E(\mathbf{r}) \} = \tilde{E}(\mathbf{k}) = \int_{\Omega} E(\mathbf{r}) e^{-i\mathbf{k}\cdot \mathbf{r}} d^{3} \mathbf{r}$$

$$\mathscr{F}^{-1} \{ \tilde{E}(\mathbf{k}) \} = E(\mathbf{r}) = (\frac{1}{\sqrt{2\pi}})^{3} \int_{\Omega_{\mathbf{k}}} \tilde{E}(\mathbf{k}) e^{i\mathbf{k} \cdot \mathbf{r}} d^{3} \mathbf{k}$$

Where $$E$$ is kinetic energy and its Fourier transform is $$\tilde{E}$$, $$\Omega$$ is your computational domain and $$\Omega_{\mathbf{k}}$$ is the computational domain in Fourier space. Finally:

$$|\mathbf{u}(\mathbf{r})| = \sqrt{2 \mathscr{F}^{-1} \{ \tilde{E} (\mathbf{k}) \}}$$

So, the procedure would be taking inverse Fourier transform ($$\mathscr{F}^{-1}$$) from $$\tilde{E}$$ and then calculate the magnitude of the velocity from it. But, you need to know that it just gives you the magnitude of the velocity and not full 3D vector of the velocity due to the fact that there is no unique inverse of dot product operator.

For your special case where the $$\Omega$$ is a 1D line and $$E(k) = k^4 \exp(-(\frac{k}{k_{0}})^2)$$:

$$\mathscr{F}^{-1} \{ E(k) \} = E(x) = \frac{k_{0}^{4} |k_{0}|}{16 \sqrt{2}}e^{-\frac{1}{4} k_{0}^2 x^2} (k_{0}^4 x^4 - 12 k_{0}^2 x^2 + 12)$$

$$u(x) = \pm \sqrt{2 E(x)} = \pm \frac{k_{0}^{2}}{2}\sqrt{\frac{|k_{0}|}{2 \sqrt{2}} e^{-\frac{1}{4} k_{0}^2 x^2} (k_{0}^4 x^4 - 12 k_{0}^2 x^2 + 12)}$$

Note that this solution is valid only for $$0 < x < \frac{\sqrt{6-2\sqrt{2}}}{|k_{0}|}$$ or $$x > \frac{\sqrt{6+2\sqrt{2}}}{|k_{0}|}$$ (I assumed your $$x$$ is positive!).

For $$\frac{\sqrt{6-2\sqrt{2}}}{|k_{0}|} < x < \frac{\sqrt{6+2\sqrt{2}}}{|k_{0}|}$$, you should take the real part of this expression as the solution:

$$u(x) = \pm \frac{k_{0}^{2}}{2} \sqrt{\frac{|k_{0}|}{2 \sqrt{2}} e^{-\frac{1}{4} k_{0}^2 x^2}} \Re \Big\{ \sqrt{(k_{0}^4 x^4 - 12 k_{0}^2 x^2 + 12)} \Big\}$$

These two expressions are positive roots of the fourth-order polynomial in the inverse Fourier transform ($$k_{0}^{4} x^{4} - 12k_{0}^{2} x^{2} + 12$$). The plot of solution for variable $$x$$ and $$k_{0}$$ are shown here:




• Thank you very much for your very detailed explanation! – Adr Oct 2 '19 at 6:55