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

Implementing Boundary conditions for a LES simulation

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 22, 2013, 12:05
Default Implementing Boundary conditions for a LES simulation
  #1
Member
 
Join Date: Oct 2012
Posts: 46
Rep Power: 14
samurai_01 is on a distinguished road
Hi everyone!!

I am trying to write a code in C for 2 fluids flowing adjacent to each other(2d mixing layer flow) as shown in figure.
velocity_1_0000.jpeg
where the above velocity is 2m/sec and lower fluid flows with 1 m/sec.

I have successfully solved the case for 2d laminar and turbulent cases(1 equation, 2 equation model) and verified the results with FLUENT.

Now i have been trying to implement the code for Large eddy simulation, and i've got the results for FLUENT simulation(thanks to online CFD ref: http://www.cfd-online.com/Forums/flu...past-cube.html)

I am not able to give perturbation to inlet boundary condition in my code, can some one help me in giving the function that can be imposed on the inlet BC for giving some perturbation.
OR can some tell me how to give inlet boundary condition for LES for such cases??
crazzy.pirate43 likes this.
samurai_01 is offline   Reply With Quote

Old   May 22, 2013, 12:23
Default
  #2
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,896
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
your LES simulation should develop instability even without perturbation, have you tried to run for long time?
then your case should be turned in 3D
FMDenaro is offline   Reply With Quote

Old   May 22, 2013, 14:40
Default
  #3
Member
 
Join Date: Oct 2012
Posts: 46
Rep Power: 14
samurai_01 is on a distinguished road
Thank you for the reply.

how much long should be long enough.
The real world time that i have let it run is about 12 seconds, equivalent to 2 days on GPU
samurai_01 is offline   Reply With Quote

Old   May 22, 2013, 15:14
Default
  #4
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,896
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by samurai_01 View Post
Thank you for the reply.

how much long should be long enough.
The real world time that i have let it run is about 12 seconds, equivalent to 2 days on GPU

The onset of instability depends on several factors: perturbed initial conditions or not, perturbed inlet velocity or not, eddy viscosity model or not, dissipative scheme or not...
what about your setting in the LES case? Have you tried the dynamic modelling with centred scheme?
samurai_01 likes this.
FMDenaro is offline   Reply With Quote

Old   May 22, 2013, 16:03
Smile
  #5
Member
 
Join Date: Oct 2012
Posts: 46
Rep Power: 14
samurai_01 is on a distinguished road
Quote:
Originally Posted by FMDenaro View Post
The onset of instability depends on several factors: perturbed initial conditions or not,perturbed inlet velocity or not, eddy viscosity model or not, dissipative scheme or not...
No i did not perturbate IC, inlet velocity, eddy viscosity model, dissipative scheme, as i am not able to determine the function that can help me in doing that.

Some reference in this direction will be helpful ^__^

What i am doing is:
1. wrote the code on k-e model using RANS .
2. now i modified the code according to Smagorinsky model, which more or less affects my turbulent viscosity.
3. and i've let all other variables in my k-e formulation using navier stokes remain as is as they more or less remain same, even if we are not solving the RANS.

now how do i introduce fluctuations in my mean velocity profile? that's the problem.... i've been reading few papers but they all point in different directions.
They talk about the gaussian function, but perhaps due to my poor maths(yes,unfortunately!!) i am not able to decode the direction.
All i am asking is for a proper direction .



Quote:
Originally Posted by FMDenaro View Post
what about your setting in the LES case? Have you tried the dynamic modelling with centred scheme?
No. Some reference in this direction will be helpful ^__^
samurai_01 is offline   Reply With Quote

Old   May 22, 2013, 17:03
Default
  #6
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,896
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
what about the discretization of your RANS code? You must use at least a second order time-space discretization without artificial dissipation. Then, the static Smagorinsky model must be properly tuned by means of a suitable value for the constant. What value have you fixed?
FMDenaro is offline   Reply With Quote

Old   May 23, 2013, 13:47
Default
  #7
Member
 
Join Date: Oct 2012
Posts: 46
Rep Power: 14
samurai_01 is on a distinguished road
Yes i've used 2nd ordr spatial discretization, with Cs=0.7

Can you tell me something about perturbation in inet boundary conditions
samurai_01 is offline   Reply With Quote

Old   May 23, 2013, 14:01
Default
  #8
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,896
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by samurai_01 View Post
Yes i've used 2nd ordr spatial discretization, with Cs=0.7

Can you tell me something about perturbation in inet boundary conditions
I suggest using a much smaller value for Cs ... generating an inflow condition for LES is not simple and is one of the issues you can find in research papers.
Have you the book of Sagaut?
FMDenaro is offline   Reply With Quote

Old   May 27, 2013, 11:48
Default
  #9
Member
 
Join Date: Oct 2012
Posts: 46
Rep Power: 14
samurai_01 is on a distinguished road
I obtained the book and have been reading it

Can you tell me something about random number generator to implement the turbulent inlet boundary condition?
samurai_01 is offline   Reply With Quote

Old   May 28, 2013, 05:23
Default
  #10
Senior Member
 
sbaffini's Avatar
 
Paolo Lampitella
Join Date: Mar 2009
Location: Italy
Posts: 2,195
Blog Entries: 29
Rep Power: 39
sbaffini will become famous soon enoughsbaffini will become famous soon enough
Send a message via Skype™ to sbaffini
A (somehow) recent review on inflow method for LES is:

Baba-Ahmadi, Tabor: Inlet conditions for large eddy simulation: A review

http://www.sciencedirect.com/science...45793009001601

Most of these methods rely on some random number generator. The family of vortex methods need it to distribute the vortices on the inflow plane; synthetic turbulence methods need it to properly approximate the resulting spectral distribution for the velocity fluctuations. No method is actually based on straight random velocity fluctuations as it is well known it is not well suited (it is just cited for the sake of completeness).
sbaffini is offline   Reply With Quote

Old   October 14, 2014, 07:03
Default Problem with F22 spectrum for Synthetically generated Isotropic turbulence
  #11
New Member
 
sandy
Join Date: Aug 2011
Posts: 13
Rep Power: 15
vishwakarma is on a distinguished road
I am using openFOAM to simulate the decay of isotropic turbulence in a box. For which I have imposed a time varying perturbed velocity value at the inlet of a box. These perturbed value are generated using Davidson 2007 method of generating turbulence using Fourier series (USING ISOTROPIC SYNTHETIC FLUCTUATIONS AS INLET BOUNDARY CONDITIONS FOR UNSTEADY SIMULATIONS).
So for given urms, integral length sclae and time scale , perturbed velocity field was generated at the inlet and it was imposed in computational domain ,using timevaryingMappedfield of OpenFOAM on the Box.

At different location downstream of the flow, probes are located to capture the velocity field. Using these velocity field, the 1D energy Spectrum i.e. F11 and F22 (Tenekkus and Lumley nomenclature) are derived (based on autocorrelation). Probes are kept at mid axis of the box, starting from inlet to outlet at certain interval. So at each probe location spectrum was calculated. ( An experiment has been conducted for similar situation at my institute which provide the F11 and F22 spectrum for inlet and at a point 20 cm downstream of the flow)

Now the spectrum calculated at inlet match well with the experimental finding (Below Fig. 1) but as I go downstream I find that F22 spectrum has big deviation from experimental finding at higher wave number (Below Fig 2). F11 more or less remain near to experimental finding. this means that turbulence started as isotropic but as it progress inside the domain it become anisotropic downstream even though threre is not agent to induce anisotropy.

I am not able to find the reason for this deviation since all the faces of box except inlet and outlet is cyclic in nature with as timeVaryingMapped field for velocity and outlet as fixed pressure outlet.

I speculated that oultet BC may be creating this problem so I changed outlet BC for pressure from fixed pressure = 0 to fixedMean = 0. I could not find any changes.
Then I changed the outlet BC to advective BC and the nature remains the same.

I also thought the dimension of Comutational domain may create a problem so I calculated the spatial correlation and found that all spatial correlation value a touching zero well within the domain.

I think I have tried most of the option and could not found the reason for this abnormal behaviour. I earnestly request for any suggestion on this if possible.

Thanks for reading
sandip

( White is F11, Red is F22 and green is F33)



Figure 1.




Figure 2
vishwakarma is offline   Reply With Quote

Old   October 14, 2014, 07:45
Default
  #12
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,896
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
I'm not sure to understand correctly your problem but while fixing inlet/outlet planes you have no longer a fully homogeneous/isotropic case.

However, for some reason I cannot see your figures
FMDenaro is offline   Reply With Quote

Old   October 14, 2014, 09:18
Default
  #13
New Member
 
sandy
Join Date: Aug 2011
Posts: 13
Rep Power: 15
vishwakarma is on a distinguished road
Hi Filippo,

Thanks a lot for your reply.
Here I shall elaborate the situation.
As mentioned earlier I am simulating decay of homogenous Isotropic turbulence in a box of dimension (0.6X0.6X0.6)m using LES Smagorinsky model in OpenFOAM. Each side of the box is divided into 150 hex element. So the total mesh count = 150^3 hex element. The mesh is isotropic with mesh size=0.004m which corresponds to the Taylor microscale length of the turbulence. SO I am attemping to resolve upto taylor microscale level.

The BC for inlet patch is timevaryingMappedfield and for outlet I have used advective BC. Rest all lateral faces are cyclic.

At the intel patch I am imposing the velocity field at each and every time step which I have generated using Davidson approach. So the inlet velocity field is as follows:
Ux = Umean + u`
Vx= v'
Wx=w'

with Umean = 10.97 m/s and u'= 0.8709 m/s.
I have generated 20,000 time steps entry of perturbed velocity field with time-step = 0.0004s. So I am simulating the flow for 8 sec.

Along the axis of the box, I have placed 20 probe points starting from inlet to outlet and once flow happen for 8 sec I extract the velocity time series for U,V and W at all the probe points and using autocorrelation technique, I have created the F11,F22 and F33 spectrum for respective velocity components.

The probe point description is given in the attached pp_3_details.png with probe A at inlet plane and probe B inside the domain

The F11,F22 and F33 spectrum at probe A ,B and probe point near the oulet are shown in attached file F11F22F33.pdf.zip

Please let me know where i am going wrong becaus eI am starting as isotropic Turbulence in the domain but it get lost downstream of teh flow.

Once again
Thanks a lot for reading

Sandy
Attached Images
File Type: png pp_3_details.png (7.7 KB, 22 views)
Attached Files
File Type: zip F11F22F33.pdf.zip (65.7 KB, 8 views)
vishwakarma is offline   Reply With Quote

Old   October 14, 2014, 09:31
Default
  #14
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,896
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
If you have a fixed inlet velocity at a plane, that means you are providing kinetic energy at that plane, which does not permit to simulate an energy decaying...
what you can do is to let a tri-periodic box and using some constant pressure gradient to substain the flow to some constant energy level. This will be a situation of energy equilibrium.
Otherwise you must simply set an initial velocity field in the periodic box and follow its decaying
FMDenaro is offline   Reply With Quote

Old   October 14, 2014, 10:09
Default
  #15
New Member
 
sandy
Join Date: Aug 2011
Posts: 13
Rep Power: 15
vishwakarma is on a distinguished road
Quote:
Originally Posted by FMDenaro View Post
If you have a fixed inlet velocity at a plane, that means you are providing kinetic energy at that plane, which does not permit to simulate an energy decaying...
what you can do is to let a tri-periodic box and using some constant pressure gradient to substain the flow to some constant energy level. This will be a situation of energy equilibrium.
Otherwise you must simply set an initial velocity field in the periodic box and follow its decaying
Hi Filipo,

Thanks for your replying and pardon me if I did not present my case properly.
The idea of my simualtion is same as that done in experiment where active grid or passive grid (honeycoumb) are kept at the inlet which generate the turbulence and then we investigate the behaviour of turbulence downstream of the flow. One of the invesitgation in this situation can be the decay of turbulence in the space downstream.
Actually one friend of mine who is an experimentalist as extracted the F11 and F22 spectrum for above mentioned situation from his experimental set up and he has supplied me the integral length scales, time scales and urms of the flow as well as F11 and F22 spectrum at two location which are separated by 20 cm in downstream direction.

I am using the experimental F11 spectrum at first probe point converting into 3D spectrum and using it in generating the turbulence field at the inlet which is isotropic and then 20 cm downstream I have put probe points using whose data I am calculating the F11 and F22 and comparing it with the experimental F11 and F22. F11 remain very close to the experimental finding but F22 takes a sudden dip at about 400 Hz frequency and breaks the isotropic behaviour of the turbulence.

I am not able to find out the reason for this discrepancy.
Please let me know if I am missing something in the whole process.

Once again Thanks a lot for reply
Sandy
vishwakarma is offline   Reply With Quote

Old   October 14, 2014, 10:12
Default
  #16
New Member
 
sandy
Join Date: Aug 2011
Posts: 13
Rep Power: 15
vishwakarma is on a distinguished road
Quote:
Originally Posted by vishwakarma View Post
Hi Filipo,

Thanks for your replying and pardon me if I did not present my case properly.
The idea of my simualtion is same as that done in experiment where active grid or passive grid (honeycoumb) are kept at the inlet which generate the turbulence and then we investigate the behaviour of turbulence downstream of the flow. One of the invesitgation in this situation can be the decay of turbulence in the space downstream.
Actually one friend of mine who is an experimentalist as extracted the F11 and F22 spectrum for above mentioned situation from his experimental set up and he has supplied me the integral length scales, time scales and urms of the flow as well as F11 and F22 spectrum at two location which are separated by 20 cm in downstream direction.

I am using the experimental F11 spectrum at first probe point converting into 3D spectrum and using it in generating the turbulence field at the inlet which is isotropic and then 20 cm downstream I have put probe points using whose data I am calculating the F11 and F22 and comparing it with the experimental F11 and F22. F11 remain very close to the experimental finding but F22 takes a sudden dip at about 400 Hz frequency and breaks the isotropic behaviour of the turbulence.

I am not able to find out the reason for this discrepancy.
Please let me know if I am missing something in the whole process.

Once again Thanks a lot for reply
Sandy
Hi Filippo,

Extremely sorry for misspelling the name.

Regards
Sandy
vishwakarma is offline   Reply With Quote

Old   October 14, 2014, 11:11
Default
  #17
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,896
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by vishwakarma View Post
Hi Filipo,

Thanks for your replying and pardon me if I did not present my case properly.
The idea of my simualtion is same as that done in experiment where active grid or passive grid (honeycoumb) are kept at the inlet which generate the turbulence and then we investigate the behaviour of turbulence downstream of the flow. One of the invesitgation in this situation can be the decay of turbulence in the space downstream.
Actually one friend of mine who is an experimentalist as extracted the F11 and F22 spectrum for above mentioned situation from his experimental set up and he has supplied me the integral length scales, time scales and urms of the flow as well as F11 and F22 spectrum at two location which are separated by 20 cm in downstream direction.

I am using the experimental F11 spectrum at first probe point converting into 3D spectrum and using it in generating the turbulence field at the inlet which is isotropic and then 20 cm downstream I have put probe points using whose data I am calculating the F11 and F22 and comparing it with the experimental F11 and F22. F11 remain very close to the experimental finding but F22 takes a sudden dip at about 400 Hz frequency and breaks the isotropic behaviour of the turbulence.

I am not able to find out the reason for this discrepancy.
Please let me know if I am missing something in the whole process.

Once again Thanks a lot for reply
Sandy

Ok, immagine that behind the grid in the experiment you have a box travelling along the streamwise axis at the average value. What you see in a travelling reference system is only the three components of the fluctuations u',v',w'. The fluctuations are periodic in the three directions and you can simulate that case in a three-periodical box (no inlet, no outlet) starting form an initial velocity field v'(x) having the energy level and the spectra computed from the experiment (at some time).

This is a very classical test-cases used to simulate homogeneous turbulence.

Just the last observation, if your grid is so fine to solve up to the Taylor microscale, you are actaully resolving a quasi-DNS, the filter lenght of your LES does not lie in the inertial region....
FMDenaro is offline   Reply With Quote

Old   October 15, 2014, 12:01
Default
  #18
New Member
 
sandy
Join Date: Aug 2011
Posts: 13
Rep Power: 15
vishwakarma is on a distinguished road
Quote:
Originally Posted by FMDenaro View Post
Ok, immagine that behind the grid in the experiment you have a box travelling along the streamwise axis at the average value. What you see in a travelling reference system is only the three components of the fluctuations u',v',w'. The fluctuations are periodic in the three directions and you can simulate that case in a three-periodical box (no inlet, no outlet) starting form an initial velocity field v'(x) having the energy level and the spectra computed from the experiment (at some time).

This is a very classical test-cases used to simulate homogeneous turbulence.

Just the last observation, if your grid is so fine to solve up to the Taylor microscale, you are actaully resolving a quasi-DNS, the filter lenght of your LES does not lie in the inertial region....
Hi Filippo,

Thanks a lot again for your reply.

I understand the method suggested by you and in-fact I have earlier carried out the simulation using the same technique and to mention here, turbulence was really isotropic in that case. But the reason following this technique is that I will have to extend this study to LES of wall bounded flow subjected to high free stream turbulence. In that case periodic BC will be of no help. I will have to bank on inlet and outlet BC.

So I was wondering if this behavior depicts the limitation of outflow BC or something else. Presently I am carrying out a simulation in which I have kept my outlet of the domain about 1.5 m away from the probe point. I shall let you know the finding by tomorrow.

Sir, I request you to let me know if the set up I am looking for is attainable in numerical simualtion or am I missing sth.

Thanks again for taking interest in this.

Request for your input.

Sandy

P.S. - As you mention, that in the periodic box at t=0 I can start with velocity fluctuation calculated at certain time instant in experiment, I would like to know if the decay of this turbulence will produce the same spectrum for 20 cm separated probe in the domain or will it be different.
crazzy.pirate43 likes this.
vishwakarma is offline   Reply With Quote

Old   October 15, 2014, 12:23
Default
  #19
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,896
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
You can stil study wall turbulence using the test-case of the plane channel flow which is periodic in streamwise and spanwise directions. This is the very used test-case for wall turbulence and several database exist.

Finally, the decayng after the grid must be measured behind a distance that depends on many factors.
I suggest this reading
http://ftp.rta.nato.int/public//PubF...ARD-AR-345.pdf

Where you will find many useful infos
FMDenaro is offline   Reply With Quote

Old   October 16, 2014, 12:37
Default
  #20
New Member
 
sandy
Join Date: Aug 2011
Posts: 13
Rep Power: 15
vishwakarma is on a distinguished road
Quote:
Originally Posted by FMDenaro View Post
You can stil study wall turbulence using the test-case of the plane channel flow which is periodic in streamwise and spanwise directions. This is the very used test-case for wall turbulence and several database exist.

Finally, the decayng after the grid must be measured behind a distance that depends on many factors.
I suggest this reading
http://ftp.rta.nato.int/public//PubF...ARD-AR-345.pdf

Where you will find many useful infos
Hi Filippo,

Thanks for your reply and the document. The document is very useful.
The problem definition which I am working on need to study the effect of Free stream turbulence on the flat plate so it means to extract the BL and compare it with well know turbulent boundary layer.

So for this case since this is not a periodic problem I need to use inflow and outlet BC. (using periodic BC would have reduced my effort substantially but alas I am not that lucky)

Sir, is there any other way to tackle this problem. Because I tried numerous way to get rid of the anisotrpy in spectrum downstream as mentioned in my first thread. But all failed.
To name few, of the way, i tried:
  1. extending the outlet and keeping it far from the probe point
  2. Putting sponge at the outlet
  3. Using different numerical discretization method
  4. trying all the BC (advective,fixed mean and fixed for pressure)
  5. Working with different courant number
  6. Working at different residual tolerance level upto 10e-8
I would like to know if I can perform this test in the present set up in OpenFOAM
Request for your suggestion

Thanks and Regards
Sandy
vishwakarma 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
non reflective boundary conditions for incompresible flow Pascal_doran OpenFOAM Programming & Development 16 August 25, 2015 06:35
CFX simulation with many different boundary conditions zhaoym2006 CFX 3 March 13, 2012 12:31
Internal flow simulation boundary conditions Kishore FLUENT 1 July 10, 2007 12:42
Outlet Boundary Conditions for LES garni FLUENT 1 November 29, 2006 14:52
New topic on same subject - Flow around race car Tudor Miron CFX 15 April 2, 2004 07:18


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