|
[Sponsors] |
DNS with random initial condition with initial energy spectrum |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
November 26, 2016, 16:40 |
DNS with random initial condition with initial energy spectrum
|
#1 |
Senior Member
Selig
Join Date: Jul 2016
Posts: 213
Rep Power: 10 |
Hi All,
I am writing a CFD code to simulate 2D turbulence via a Fourier spectral method, however am running into issues in terms of the initial condition. I am currently trying to implement McWilliams 2000 initial condition, however have 2 questions regarding setting up the initial condition. According to McWilliams, the initial condition is a "zero mean, Gaussian vorticity field with random Fourier Phases." The initial energy spectrum is defined as My interpretation of his initial condition is The "theta" represents a random Gaussian distribution. In terms of the code, I have implemented it as follows Code:
Lap_hat = sqrt(kx**2 + ky**2) Energy0 = C0*Lap_hat**6/(1+Lap_hat/60)**18 Vort0 = Energy0*exp(2*1j*np.random.normal(0,1)) + 1j*Energy0*exp(2*1j*np.random.normal(0,1)) Vort_hat = rfft2(Vort0) Vort_Temp = irfft(Vort0) Vort = Vort_Temp Paper of interesting: "Revisting Freely Decaiying two-dimensiona turbulence at millennial resolution," J. C. McWilliams, 2000, Physics of Fluids |
|
November 27, 2016, 04:31 |
|
#2 |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,768
Rep Power: 71 |
Quote:
Have you considered that E(k) is a kinetic energy and you are setting the intial vorticity field? Be careful of the dimensions. I suggest to reconstruct first a velocity field by means of the energy spectrum, if it works fine you should get the same energy spectra. Then you can compute the vorticity field. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Floating point exception error | lpz_michele | OpenFOAM Running, Solving & CFD | 53 | October 19, 2015 02:50 |
Cannot run the code properly: very large time step continuity error | crst15 | OpenFOAM Running, Solving & CFD | 9 | December 14, 2014 18:17 |
Moving mesh | Niklas Wikstrom (Wikstrom) | OpenFOAM Running, Solving & CFD | 122 | June 15, 2014 06:20 |
Unstabil Simulation with chtMultiRegionFoam | mbay101 | OpenFOAM Running, Solving & CFD | 13 | December 28, 2013 13:12 |
calculation stops after few time steps | sivakumar | OpenFOAM Running, Solving & CFD | 7 | March 17, 2013 06:37 |