CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

How to define the DNS parameters (deltaX)

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 3, 2016, 18:25
Default
  #21
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,768
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by juliom View Post
Dear Professor, I am running the case but in the mean time I wanted to take a look at the Energy spectrum of my initial condition, which basically is a harmonic function that I arbitrary defined (basically a combination of sin and cos). Thus, I computed the energy spectrum with the following pseudo code:
nodes = 62831;
dx = 0.0001;
formatspec='%f';
FileName='u_fluctuating.dat';
FileID = fopen(FileName,'r');
u_fluct=fscanf(FileID,formatspec);
fclose(FileID);

% Computing the Energy Spectrum (1D)
c = fft(u_fluct,nodes); %Discrete Fast Fourier Transform
c_shifted = fftshift(c);

%Computing the Energy Spectrum equation 6.103 Popes's Book
for q = 1:nodes;
E(q) =c_shifted(q)*conj(c_shifted(q));
end
fmax = pi/dx; % Maximum computed frecuency "Nyquist"
k = 2*pi*(-nodes/2:1:nodes/2-1)/(nodes*dx);
loglog(k,E);

However, the solution does not look even close to what I expected, based on my literature review for The 1D Burger Equation. Also, I compared with yours for the initial condition and what caught my attention was the tail of the spectrum attached the image:

What I did I compute the volume average of the initial condition and then the fluctuating velocity. Then was only running the script.
Professor, where do you think I made the mistake??

Image: https://picasaweb.google.com/lh/phot...eat=directlink

Very respectfully
Julio Mendez

Check the spectrum of the total velocity instead of using the fluctuation
FMDenaro is offline   Reply With Quote

Old   March 3, 2016, 19:02
Default
  #22
Senior Member
 
Julio Mendez
Join Date: Apr 2009
Location: Fairburn, GA. USA
Posts: 290
Rep Power: 18
juliom is on a distinguished road
Send a message via Skype™ to juliom
Professor;
I exactly the same spectrum, nothing changed...
At this point it does not matter the numerical method is purely the initial condition defined as:

U(:,1) = 0.2*sin(pi*x( : )/6) + 0.35*sin(pi*x( : )*0.075/6) + &
0.15*sin(pi*x( : )*(6.0/6)) + 0.1*sin(pi*x( : )*(20.0/6)) + &
0.01*exp(cos(pi*x( : )*(100.0/3.1)))

Last edited by juliom; March 3, 2016 at 19:05. Reason: typo
juliom is offline   Reply With Quote

Old   March 4, 2016, 03:20
Default
  #23
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,768
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by juliom View Post
Professor;
I exactly the same spectrum, nothing changed...
At this point it does not matter the numerical method is purely the initial condition defined as:

U(:,1) = 0.2*sin(pi*x( : )/6) + 0.35*sin(pi*x( : )*0.075/6) + &
0.15*sin(pi*x( : )*(6.0/6)) + 0.1*sin(pi*x( : )*(20.0/6)) + &
0.01*exp(cos(pi*x( : )*(100.0/3.1)))


that means that the average velocity is zero...the peaks in the spectrum are due to your initial condition, you could use an initial spectrum E(k) and then construct the velocity field
FMDenaro is offline   Reply With Quote

Old   March 4, 2016, 12:17
Default
  #24
Senior Member
 
Julio Mendez
Join Date: Apr 2009
Location: Fairburn, GA. USA
Posts: 290
Rep Power: 18
juliom is on a distinguished road
Send a message via Skype™ to juliom
Thank you very much professor. Your help is very important for me. I tried to follow your recommendation but I did not know how to do it. Thus, I used another approach, that at least will help me to introduce you the issue.
I used the John Hopkins Turbulence Data Base. I extracted the velocity of the a channel flow data base. My domain is 2*pi and I have 62931 points. So I used the same properties to fetch the data from the database. Then I computed the energy spectrum which looks like: https://goo.gl/photos/ajE3JoFUeybfZ2X6A

Then I run my code with that initial condition and at time steps = 5000 I computed the energy spectrum again and it looks like:
https://goo.gl/photos/iJrqZn1vAvjZ7rEB6

What is very surprising is the tail of the spectrum at the cut-off wavenumber (pi/dx). Professor, I already talked to my advisor and we do not have an answer for this question and unfortunately there are no other people in the department working on Turbulence.

My conclusion is that my cut-off frequency (Nyquist) is way up of the Kolmogorov "wave number". In other words my dx is way small to the kolmogoroov scale and there is no more energy to dissipate... This is my conclusion that could be very wrong. If so, please accept my apologize.

I really appreciate your thoughts and ideas.

Very Respectfully
Julio Mendez
juliom is offline   Reply With Quote

Old   March 4, 2016, 12:23
Default
  #25
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,768
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by juliom View Post
Thank you very much professor. Your help is very important for me. I tried to follow your recommendation but I did not know how to do it. Thus, I used another approach, that at least will help me to introduce you the issue.
I used the John Hopkins Turbulence Data Base. I extracted the velocity of the a channel flow data base. My domain is 2*pi and I have 62931 points. So I used the same properties to fetch the data from the database. Then I computed the energy spectrum which looks like: https://goo.gl/photos/ajE3JoFUeybfZ2X6A

Then I run my code with that initial condition and at time steps = 5000 I computed the energy spectrum again and it looks like:
https://goo.gl/photos/iJrqZn1vAvjZ7rEB6

What is very surprising is the tail of the spectrum at the cut-off wavenumber (pi/dx). Professor, I already talked to my advisor and we do not have an answer for this question and unfortunately there are no other people in the department working on Turbulence.

My conclusion is that my cut-off frequency (Nyquist) is way up of the Kolmogorov "wave number". In other words my dx is way small to the kolmogoroov scale and there is no more energy to dissipate... This is my conclusion that could be very wrong. If so, please accept my apologize.

I really appreciate your thoughts and ideas.

Very Respectfully
Julio Mendez

you started from a fully developed spectrum but when you run the non-forced case, your energy will decay... As a consequence, the relevant characteristic scales (Taylor micri-scale, Kolmogorov) will increase the lenght so decreasing their wavelenght.
Your computed spectrum shows this issue, the tail you see is nothing else that zero energy content at double precision. Your Nyquist frequency is fixed and dictated by the extension of frequencies in the initial condition, but during the time the Kolmogorov wavelenght will move to left as it increases. In other words, without forcing, you Re number will diminuish in time due to the dissipation of kinetic energy.
In my JCP paper, you can see a figure with the DNS spectra for several times.
FMDenaro is offline   Reply With Quote

Old   March 4, 2016, 18:01
Default
  #26
Senior Member
 
Julio Mendez
Join Date: Apr 2009
Location: Fairburn, GA. USA
Posts: 290
Rep Power: 18
juliom is on a distinguished road
Send a message via Skype™ to juliom
Thank you very much professor. I read the papers JCP and I found the same trend, however, the plot cuts the horizontal axis. Did you reduced the range from the "Y" axis professor. ? I am having very problems defining the initial conditions. I tried to follow your papers but I was not ale to understand.
Thank you very much professor, for your kindness relying to my questions!
juliom is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
HELP----Surface Reaction UDF Ashi Fluent UDF and Scheme Programming 1 May 19, 2020 21:13
Pro/E to ANSYS Parameterization Guide Trues ANSYS 4 April 18, 2018 05:52
Dimensionless parameters titio OpenFOAM Programming & Development 4 December 10, 2016 07:06
UDF compiling problem epc1 Fluent UDF and Scheme Programming 0 September 25, 2012 19:36
Free surface boudary conditions with SOLA-VOF Fan Main CFD Forum 10 September 9, 2006 12:24


All times are GMT -4. The time now is 20:06.