|
[Sponsors] |
February 25, 2016, 18:21 |
How to define the DNS parameters (deltaX)
|
#1 |
Senior Member
|
Dear Colleagues;
Everyone know very well the limitations and restriction for DNS computations. So, I will straight to the point without to much explanation. I would like to know how to define deltax based on the primitive variables and problem description. I am trying to setup a DNS simulation of the Burger equation. My final goal is to test the SGS model for a LES version of the Burger equation. I only have nu and the initial velocity field (sinusoidal velocity with peak at u=1) According to Pope, once I get the Kolmogorov scale everything else is readily set. I have other ideas but they are very time consuming and not efficient at all!! What do you usually do?? |
|
February 26, 2016, 04:08 |
|
#2 |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,849
Rep Power: 73 |
A very rapid assumption for DNS: cell Reynolds number = O(1)
|
|
February 26, 2016, 08:25 |
|
#3 |
Senior Member
|
Thank you very much professor for your time.
Indeed this is how I started assuming that my ell Reynolds number = 2. Since I am using centered difference scheme, The cell Reynolds number cannot be greater than 2. However, I have also read that deltax has to be at least 0.5 of the Kolmogorov scale, which depend on epsilon and nu. but for epsilon I need to compute the the rate of the strain tensor. Then I see this as a trial and error. Also, I have difficulties defining the length of the domain. Regarding Pope he claims that for isotropic turbulence the length of the box has to be at least 8 times the integral length scale. How can I define the integral length scales?? At this moment I am using L=2*pi since It forces the lowest wave number to be equal to 1 but I am not confident with this approach. Then, I am planning to compute the power spectrum and see if the spectrum rolls down as other DNS spectrum but this is not efficient nor technical doing visual comparisons. Te bottom line is , once I defined deltax so that the Reynolds Number is below 2 how can I define the length of the domain to contain the largest energy containing eddy? Thanks |
|
February 26, 2016, 14:19 |
|
#4 |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,849
Rep Power: 73 |
Dear Julio,
if you consider the initial condition u0(x), you can take the maximum of the velocity and set dx=1*mu/umax. This would for sure allow to solve in DNS condition for any time as the Nyquist cut-off will lie over the Kologorov scale (Note that, depending on the initial condition and forced/not-forced flow, the Kolmogorov scale could be time-dependent, see for example https://www.researchgate.net/publica...dy_simulations). As the lenght scales are concerned, the period L defines the integral scale. But You could consider a Reynolds number based on the Taylor micro-scale, similarily to the 3D hogeoneous isotropic turbulence. I don't know if you have the the Love paper: http://journals.cambridge.org/action...ine&aid=375437 |
|
February 26, 2016, 14:23 |
|
#5 |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,849
Rep Power: 73 |
PS: if you use the non-dimensional form, your non-dimensional domain lenght can be set to 1 but, as a consequence, you must use the Reynolds number based on the lenght of the domain.
|
|
February 26, 2016, 20:29 |
|
#6 |
Senior Member
|
Professor:
Thank you very much professor. I ordered the Love's paper. From your last explanation I understand that the Reynolds number at the cell is forced to be equals 1. Am I right? That is why the Kolmogorv scale will overlap the cut-off frequency of the mesh? Finally, If I consider the Reynodls based on the Taylor micro-scale, then this will be somehow a trial an error procedure, because I need to compute epsilon and the turbulent kinetic energy. Am I right?? Thanks professor, for the paper you recommended me. |
|
February 26, 2016, 22:11 |
|
#7 | |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,849
Rep Power: 73 |
Quote:
If you are solving a viscous Burger equation without forcing term, you will have a decay (rapid or long depending on the viscosity value) in the energy during the time Evolution. That drives to increase the viscous lenght scales, forexample see the figure with the spectra in my paper. |
||
February 27, 2016, 12:09 |
|
#8 |
Senior Member
|
Professor;
I would liek to back my claims or assumptions for my computations. I remember from a Lecture from professor C J Cheng that at Reynolds = 1 the energy is dissipated by viscous forces. Hence, I assume that this is the main reason why at Reh= 1 we ensure that all the scales are considered in the computation. However, I have not found this in my textbooks to back my claims. Where can I get it? On the other hand, I was thinking on your comment about the Burger's dimensionless equation. If I substitute nu by 1/Re; then I render the equation to dimensionless. However, my doubt is about that Reynolds number. Is that Re the grid Reynolds number (Reh, where h is deltaX) or is this Re based on the length of the domain as you suggested (ReL)? If so, how do I link the Reh with ReL to obtain the final deltaX. At this moment I am focus on the forced Burger Equation, since I am trying to implement the filtering proposed by professor Pruett. Also, I got a book by A.A Aldama (filtering Techniques for turbulent flow simulations) and the author claimed that is required to use the forged Burger equation due to the high turbulent kinetic energy that is obtained by the forced term. Thanks for your valuable time!! Respectfully JM |
|
February 27, 2016, 12:40 |
|
#9 | |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,849
Rep Power: 73 |
Quote:
the reasoning is that the Re number is a ratio between two homogeneous quantities that can be the diffusive and convectiv fluxes of the momentum but also two lenght scales or two time scales. For example, if you consider the ratio of two time scales and this ratio is = 1, then at that lenght you have the diffusion and convection acting at the same instant. Therefore, you could consider the Kolmogorov scale the lenght for which the Re=1. For making the equation non dimensional, you must use a reference time Tr, lenght Lr and velocity Ur. Generally, Tr=Lr/Ur. (Ur/Tr) d u*/dt* + (Ur^2/Lr) d(u*^2/2)/dx* = (ni Ur/Lr^2) d u*/dx*^2 d u*/dt* + d(u*^2/2)/dx* = ni/ (Ur Lr) d u*/dx*^2 If your physical domain is L, the lenght of your non-dimensional domain is L*=L/Lr. Now, depending on the choice for Lr you will get different values L* and Re_Lr = (Ur Lr )/ni. Of course, if you use a forcing term be careful to give the correct non-dimensional ratio |
||
February 27, 2016, 19:43 |
|
#10 |
Senior Member
|
Thank you very much professor;
Now, I have another questions in regards of the turbulent kinetic energy and the dissipation. I am writing the code to compute K and E at each time step. But, to do so I need the mean of the velocity. What I am thinking is that at the very beginning the mean velocity can blow up because the dt is very small. Are all these parameters computed in the post processing stage once I have all the instantaneous velocity computed? where subtracting the mean is just "coding" or can I compute them during the time marching. Also, professor. I remember when you mention about averaging over the homogeneous direction for computing the spectrum. If I perform time average and then spatial average, I will end-up with only one number rather than an array of values (i.e: the value of kappa and epsilon at each node). What I am trying to compute are the other scales to make sure that I am considering all the scales. As usually, thank very much for your valuable time!!! Respectfully JM |
|
February 27, 2016, 20:02 |
|
#11 | |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,849
Rep Power: 73 |
Quote:
I am not sure about your question...the velocity can not blow up for a small time, for the viscous Burgers equation the solution is regular and the DNS velocity field allows you to get any quantity you want. Depending on your computational resources you can save the solutions and then performing any statistical analysis in a post-processing stage. The fields can be saved even at each time-step, I think you do not have memory problems for this 1d case. As the spectral analysis is concerned, you simply use the FFT at a given time to get the spectrum. Using the forced case, after the numerical transient is finished you can compute several spectra sampled in time and then performing the time averaging of them. No spatial averaging is required in 1d. |
||
February 27, 2016, 20:08 |
|
#12 |
Senior Member
|
Excuse me professor; I was not clear enough in my question.
What I wanted to say is that I am computing the turbulent kinetic energy and dissipation in the fly " while I am integrating the equation in time". Thus, when I am computing the time averaged of the velocity at each time I need to divide the time averaged by (t*dt) since I am computing the time averaged velocity. Once I have that value, I subtracted it from the instantaneous velocity and get the fluctuating component. This is the subroutine: SUBROUTINE FLUCTUATING(t) integer:: t_inner do i = 2, imax - 1 !Computing the time averaged of the velocity umean = 0 do t_inner = 1, t umean (i) = umean (i) + u(i,t_inner) end do ufluct(i,t) = u(i,t) - umean(i)/(t*dt) kap(i,t) = 0.5*ufluct(i,t)**2 end do END SUBROUTINE FLUCTUATING(t) This subroutine is called at each time step once the velocity field is computed. Does it make sense professor? or do you recommend me to compute kappa and epsilon in the post processing stage once I have computed all the instantaneous velocity. Thanks JM |
|
February 28, 2016, 04:35 |
|
#13 | |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,849
Rep Power: 73 |
Quote:
I suggest performing all the statistical analyses in a post-processing stage as in a 1D case you can save all fields on a hard drive without problems. However, as I already wrote, you need to save the velocity fields only after the numerical transient, before that the average has no meaning. |
||
February 28, 2016, 11:37 |
|
#14 |
Senior Member
|
Thanks professor for your reply and your valuable time.
I really find your explanation very illustrative and they help a lot. However, I am confused because you said that the velocity field needs to be saved only after the numerical transient. I have read papers with statistics from t=0 all the way to the final time. i.e: Pruett, plotted u'rms from t=0 to t = 250. On the other hand professor; I am confused with two different ideas. The ensamble average and the time averaged. I have the physical definition clear though, but the implementation is what is causing me troubles, since I have read that people usually computes the mean directly from the time-history solution computing the mean directly. This mean is the ensemble average, while by definition it has to be the time average. To be more precise; computing the mean from the 5000 time-steps solution, is ensemble average because is u(i,t=1:Tsteps)/Tsteps. If I want the time averaged then it will be u(i,t=1:Tsteps)/(dt*Tsteps). Yet, will this procedure make a difference? I think it will. However, I do not have clear if the appropiate approach is ensemble or time. Wilcox uses the time averaged definition, but Pope defines the turbulent kinetic energy as the mean or expectation, in other words the mean as an ensemble average. Regarding the computation; I am doing DNS of the Burger equation with forces and without force. Without the force, the initial condition results in a velocity field that is constant for all time and space. Moreover, any perturbation of that field decay toward zero. Hence, the other case with force will help me to have a high-intensity fluctuation. So, I want to compare both cases under a LES formulation (second stage of my work). Both cases will have different time - history solution. So, I think that I might do the statistics (turbulent kinetic energy, dissipation of the turbulent kinetic energy, mean, fluctuation, u'rms and so forth) using the whole dataset. Am I right? most of these questions are due to my lack of experience on LES and DNS. what do you recommend me. Thanks JM |
|
February 28, 2016, 12:01 |
|
#15 | ||
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,849
Rep Power: 73 |
Quote:
Quote:
Formally, ensemble and time averaging are different operations ... however, under some hypothesis, they are interchangeable http://www.cfd-online.com/Forums/cfx...e-average.html |
|||
February 28, 2016, 21:11 |
|
#16 |
Senior Member
|
Thank you very much professor. I found that the property that allow to interchange the time average with ensemble average is the ergodicity. But this is only valid for periodic problems.
Professor; I was looking for information for non-stationary problems (my case without force). Since I have only periodic boundary condition and I have no force, the initial condition will be dissipated by the viscous forces. Hence, the solution will never converge to a stationary condition and the fluid flow will tend to zero if time is very big. How can I compute the statistics (mean and fluctuating) in this case where the turbulence is not stationary?? Thank you very much! |
|
February 29, 2016, 05:11 |
|
#17 |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,849
Rep Power: 73 |
For a non-equilibrium case, you need to do a real ensemble average, therefore you can do several computations starting from t=0 with different perturbation in the initial condition. For example, given an initial spectrum you can prescribe different u0(x) by assignin a random phase
|
|
March 1, 2016, 15:22 |
|
#18 |
Senior Member
|
Thank yu very much professor; your help is very useful for me. I will run 40 different case (love used 32 cases). I am using normal distribution for the random number...
Thanks!!! |
|
March 1, 2016, 15:31 |
|
#19 |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,849
Rep Power: 73 |
Good work!
|
|
March 3, 2016, 19:07 |
|
#20 |
Senior Member
|
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 Last edited by juliom; March 3, 2016 at 19:08. Reason: It was missing the link for the image |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
HELP----Surface Reaction UDF | Ashi | Fluent UDF and Scheme Programming | 1 | May 19, 2020 22:13 |
Pro/E to ANSYS Parameterization Guide | Trues | ANSYS | 4 | April 18, 2018 06:52 |
Dimensionless parameters | titio | OpenFOAM Programming & Development | 4 | December 10, 2016 08:06 |
UDF compiling problem | epc1 | Fluent UDF and Scheme Programming | 0 | September 25, 2012 20:36 |
Free surface boudary conditions with SOLA-VOF | Fan | Main CFD Forum | 10 | September 9, 2006 13:24 |