
[Sponsors] 
September 23, 2013, 13:27 
Lund Recycled Method for LES (flat plate)

#1 
Senior Member
Joachim
Join Date: Mar 2012
Location: Atlanta
Posts: 140
Rep Power: 6 
Hey all!
I recently implemented Lund's boundary condition in OpenFOAM. The BC seems to work just fine, but for some reason, my velocity profile is not that great. Initially, I used exactly the parameters described in the original paper (same mesh, (y+=1.2, ...) second order accuracy), but I got pretty bad results (see Fig. 1). Then, I decided to refine the mesh (basically refine the mesh in each direction by a factor 2 > y+=0.5, ...), and obtained the results shown in Fig. 2. For these simulations, I use the simple Smagorinsky model, with and without Van Driest damping functions to evaluate its impact on the solution (pretty significant!). I also tested the local dynamic Smagorinsky model, but the results were not that great (skin friction underestimated). As seen in Fig. 3 and 4, it seems that the boundary condition has been correctly implemented. We can see the selfsimilar solution between inlet and recycled plane for the inner and outer layers. However, the simulation does not converge towards the correct profile (in Fig. 1 and 2)! The fine simulation is not that bad, but several people (Jewkes, Lund, etc) obtained very good results on the exact same case on a way coarser grid (the first one)! Has anyone already faced similar issues with LES in OpenFOAM? Where could this come from? Thank you very much for your time! Joachim 

September 23, 2013, 14:23 

#2 
Senior Member
Mohsen KiaMansouri
Join Date: Jan 2010
Location: CFD Lab
Posts: 118
Rep Power: 7 
Dear Joachim
Hello and so nice talking to you again. your 2nd Fig. from left seems perfect to me. your results are exactly coincident with the Lund's results up to Y+=50 and after that there is a little discrepancy but they have the same trend. There is something that seems very interesting for me. when using The simple Smagorinsky model with Van Driest damping functions i.e,: VanDriest.jpg your results are completely coincident up to Y+=50 but after Y+>60 The simple Smagorinsky model with cubeRootDelta are completely coincident with Lund results. So if we combine these two deltas, your desired Results will be obtained !!! have a look at the source of the vanDriestDelta.C: http://foam.sourceforge.net/docs/cpp/a09141_source.html The purpose of the Van Driest damping function is to correct the nusgs near the wall but why it will affect the results for 60<Y+<1000?? So may be this is the problem not your mesh! have you tried the modified version of dynamic Smagorinsky model by Alberto Passalacqua? what about dynOneEqEddy which is dynamic and also solve an extra transport equation for ksgs? By the way, your results are for which version of Lund's method? displacement thickness or momentum thickness?
__________________
“If you have an apple and I have an apple and we exchange these apples then you and I will still each have one apple. But if you have an idea and I have an idea and we exchange these ideas, then each of us will have two ideas.” 

September 23, 2013, 16:26 

#3 
Senior Member
Joachim
Join Date: Mar 2012
Location: Atlanta
Posts: 140
Rep Power: 6 
Hey Mohsen!
Yep, something is definitely strange with this damping function. It actually makes sense that I must not use it in the viscous sublayer, because my mesh is so fine (y+ = 0.5 with hyperbolic tangent stretching to increase the grid density close to the wall). However, it might be that my mesh is too coarse in the log/outer layers (see attached figures). I have used Alberto's dynamic model, but it did not give very good results on the base grid. I did not try it on my fine mesh though... I can't use the dynamic one equation model at this point, because I would need to recycle the turbulent energy. I don't know which selfsimilar profile I should assume for it. It might be interesting to investigate this, but I really don't have time right now. I will use the one equation model for the actual simulation. In these simulations, I imposed the boundary layer thickness, as was done in the original paper. I also developed a version of the BC based on the golden section method to impose the momentum thickness, but the results were really similar. I think I will just extract the plane from my base case and see if it gives good results for my "main" simulation. 

September 23, 2013, 17:07 

#4  
Senior Member
Mohsen KiaMansouri
Join Date: Jan 2010
Location: CFD Lab
Posts: 118
Rep Power: 7 
I have a question about your sample plane:
How did you define 2 cyclic planes inside the domain (interior patches) with very little distance (I think 0.001)? did you use CreateBaffles utility? Quote:
in the Eugene de Villers's PhD dissertation, the recycling section is attached to the main domain and there is a single domain. which one is better?
__________________
“If you have an apple and I have an apple and we exchange these apples then you and I will still each have one apple. But if you have an idea and I have an idea and we exchange these ideas, then each of us will have two ideas.” 

September 23, 2013, 17:17 

#5 
Senior Member
Joachim
Join Date: Mar 2012
Location: Atlanta
Posts: 140
Rep Power: 6 
I actually used ICEM CFD to generate my mesh. For some reasons, blockMesh was unhappy with my little gap.
Indeed, it is possible to attach the two domains. One good thing with this approach is that you don't have to worry about the outlet contaminating your inflow simulation. In addition, you don't have the hassle of having to extract your plane and reinject it in the next simulation. I did not use this method for two reasons: 1. My final objective is to verify my implementation of a new HRLES model. As mentioned previously, I cannot recycle the turbulent kinetic energy, so I cannot use this model for my inflow simulation. 2. I will probably run quite a few simulations later on, when improving my turbulence model. I don't want to run the inflow simulation over and over again. One time is enough! 

September 23, 2013, 17:45 

#6  
Senior Member
Mohsen KiaMansouri
Join Date: Jan 2010
Location: CFD Lab
Posts: 118
Rep Power: 7 
Thank you so much for your helpful comments.
Quote:
Quote:
__________________
“If you have an apple and I have an apple and we exchange these apples then you and I will still each have one apple. But if you have an idea and I have an idea and we exchange these ideas, then each of us will have two ideas.” 

September 23, 2013, 17:47 

#7 
Senior Member
Joachim
Join Date: Mar 2012
Location: Atlanta
Posts: 140
Rep Power: 6 
Nop, I am extracting the velocity, turbulent kinetic energy and pressure from a given plane (in the middle roughly) at each time step. I am saving that somewhere, and then I use it in my main simulation using the timeVaryingIDontRememberTheName boundary condition.


September 23, 2013, 18:27 

#8  
Senior Member
Mohsen KiaMansouri
Join Date: Jan 2010
Location: CFD Lab
Posts: 118
Rep Power: 7 
at each time step!
No Way! Quote:
I have worked with timeVaryingMappedFixedValue before. http://foam.sourceforge.net/docs/cpp...9.html#details It is really troublesome to correct the data at each time step for the required format of timeVaryingMappedFixedValue. pardon me for asking a lot of questions but this topic is very interesting for me. And my final question for today (I promise): so you mean that first you will run the driver section for generating inflow and save the results from a given plane at each time step. after finishing your initial runs for the driver section you will start your main domain run by using these saved data at each time step. am I right?
__________________
“If you have an apple and I have an apple and we exchange these apples then you and I will still each have one apple. But if you have an idea and I have an idea and we exchange these ideas, then each of us will have two ideas.” 

September 23, 2013, 18:30 

#9 
Senior Member
Joachim
Join Date: Mar 2012
Location: Atlanta
Posts: 140
Rep Power: 6 
Yep, just like it is done in the pitzDaily tutorial. The amount of data is not that huge actually. You do not need to save the whole flow field, only one plane.


November 27, 2013, 15:19 

#10 
Member
Fluid Dynamics
Join Date: Mar 2013
Posts: 41
Rep Power: 4 
Hello,
LES Inflow  In this area I am trying to wrap my head around the terms recycling and rescaling. Following is my current understanding  1. Recycling  It is basically helpful when we have a fully developed flow e.g in a channel or a pipe. Is that correct? This is where directMapped comes into picture. 2. Rescaling  It seems to be helpful in a developing BL e.g BL over a flat plate. Here we can maintain a specific BL thickness at the inlet by rescaling the flow field data from a downstream plane by e.g using the law of the wall in the inner region and the defect law in the outer region (from TS Lund 1998). My questions  Do we have a utility in OpenFOAM that can do this rescaling and maintain a specific BL thickness at the Inlet? You mentioned that you have developed a BC that is based on the paper from TS Lund. Would you be able to share that with me? In this rescaling technique it seems that I would still need a mean profile for different variables at the inlet of my domain. After that I would need to perturb the domain e.g using the perturbU utility. After following these steps I should expect a self sustaining turbulent BL. Is that correct? There are some more questions but the message is already very long. Thanks very much. 

November 27, 2013, 16:36 

#11 
Senior Member
Joachim
Join Date: Mar 2012
Location: Atlanta
Posts: 140
Rep Power: 6 
Hey,
As you said, when you recycle the flow, you do not modify it. It is like a "copypaste" operation. When you rescale it, you basically "copymodifypaste". In the case of Lund's method, you assume some kind of selfsimilar turbulent profile (law of the wall close to the surface and law of the wake in the outer region). The boundary condition hasn't been implemented in the official version of OpenFOAM. When I did it a few months ago, I developed three versions of the code: 1. a first one that imposes the boundary layer thickness at the inlet (the original model of Lund) 2. a second one that imposes the boundary layer momentum thickness at the inlet (suggested by Lund. This has to be done iteratively. Basically, you impose different boundary layer thicknesses and everytime, you check the resulting momentum thickness. I used a Goldensection approach to converge quickly). 3. a final algorithm that imposes the boundary layer displacement thickness. This was suggested by Jewkes in 2011 or 2012 (I don't remember exactly). To be honest, I obtained very similar results with the three approaches. It basically depends on your application. I like to impose the momentum thickness, which was a bit more elegant than the other ones I thought. You are right. You will also need to perturb the flow if you want to obtain a turbulent profile. You don't need anything fancy, just use Spalding's law or something similar (if you are very picky, I guess you could couple it with Cole's law in the wake, using the weighting function described by Lund). Send me your private address in an email and I'll send you the codes if you want. It was really frustrating because I spent a lot of time on this, but it still did not give results as good as the ones obtained by Lund or Jewkes. I never found out why! (maybe you will ). Still, it works, and will give you a pretty decent profile for your main simulation. Good luck! Joachim 

November 27, 2013, 17:47 

#12 
Member
Fluid Dynamics
Join Date: Mar 2013
Posts: 41
Rep Power: 4 
Dear Joachim,
Thank you for your prompt response. Can you please send the code/s to this address  cfd.with.openfoam@gmail.com? Are you currently carrying out your main simulations, using the inflow data generated by precursor simulations, employing Lund's rescaling method, that you developed? If yes, then do you use an inbuilt BC for mapping the saved data to your main simulation inlet? I have seen that there are BC's named timeVaryingProfile (cant remember the exact name). Can you please shed some light on the complete process that you follow? Awaiting your response Thanks very much 

November 27, 2013, 19:07 

#13 
Member
Fluid Dynamics
Join Date: Mar 2013
Posts: 41
Rep Power: 4 
Dear Joachim,
I just looked at another post of yours (no. 7 in the link below) where you thank Perry Johnson. 1. LES inlet boundary conditions I also came across a couple of papers from him (links below) where he talks about the rescaling method. My question is  were you able to discuss the Lund BC problem with him as it seems that he might be able to take a quick look at the code and point out the problem. 2. http://arc.aiaa.org/doi/abs/10.2514/6.2012366 3. http://arc.aiaa.org/doi/abs/10.2514/...urnalCode=jtht The issue mentioned in link no. 1 is also quite interesting as to how one can couple swak4Foam (or groovyBC) with directMapped (or turbulentInlet or Lund BC). How do you manage to handle such an issue? One thing that I can think of is just to initialise the whole domain with a profile that we would like to have at the inlet, perturb it and then Lund BC will take care of the rest? Any comments? Thanks very much. 

December 9, 2013, 06:14 
Lund recycle technique

#14 
New Member
Thomas Lloyd
Join Date: May 2011
Posts: 7
Rep Power: 6 
Hi Joachim,
I am interested in using the Lund recycle technique for examining tidal channel turbulence profiles, and comparing the results to a synthetic inflow turbulence generator that I have been using. I just finished my PhD which was investigating tidal turbines using LES. Maybe you could share the code with me and I could help check it? If you are happy to, please send it to T.P.Lloyd@soton.ac.uk Thanks, Thomas 

January 9, 2014, 06:23 

#15 
New Member
Johan Nilsson
Join Date: May 2010
Posts: 4
Rep Power: 7 
Dear Joachim,
I'm interested in your OpenFOAM implementation of the Lund BC. I started to implement my own version of it at what appears to be, roughly speaking, the same time as you. I have implemented a rather simplified version of the BC, but had then to turn my attention to other things. My version seems to help my main simulation, but it is not as physically accurate as a full/proper implementation that you have made. I was now considering going back to continue to work on my implementation of the BC when I saw your post. I'm a PhD student and use the BC for my work/thesis. If you would like to share your implementation with me I would be very happy. Hopefully I can contribute as well. I have sent you my email address over pm. Thank you in advance Johan 

January 9, 2014, 09:57 

#16 
New Member
Join Date: Nov 2012
Posts: 13
Rep Power: 4 
Dear Joachim,
I am also working to implement Lund's method and its variant, the method by Kataoka. Could you please share me your implementation so that I can see if I can learn from it and, if possible, help contribute to it? My email address is xianxiang.li@gmail.com. Many thanks. Xianxiang 

January 18, 2014, 16:42 

#17 
Member
Fluid Dynamics
Join Date: Mar 2013
Posts: 41
Rep Power: 4 
Hello Everyone,
If anybody needs Joachim's code then please send me an email at cfd.with.openfoam@gmail.com. I wanted to upload the code here but I don't have his permission yet. Hopefully he will be OK with me distributing the code via email Thanks. 

January 26, 2014, 20:12 

#18 
New Member
Join Date: Jan 2014
Posts: 16
Rep Power: 3 
Dear All,
I am also interested in the Lund's method and am reading his JCP paper in 1998. As you know, in that appendix, he explained the random fluctuation inflow generation method. I did not understand how the amplitude tensor in Eq. (27) come from. Does anybody know how they derived? GIve me some hints? = =/ = =/ =/ =  Note (Jan. 27, 2014): The above are the elements of the lower triangular matrix of Reynolds stress tensor after Cholesky decomposition. very standard. But another question arises: why a_ij here can be used to represent the amplitude of the random signals and then the constructed velocity has the desired second order one point statistics? Anyone knows? any comments are very welcome! The link for Cholesky decomposition: Code:
http://en.wikipedia.org/wiki/Cholesky_decomposition Last edited by flames; January 27, 2014 at 19:47. 

April 20, 2015, 02:22 

#19 
New Member
Christoph Wenzel
Join Date: May 2014
Location: Germany
Posts: 19
Rep Power: 3 
Hello FOAMers,
I'm also interested in Joachim's implementation of Lund's BC in OpenFOAM. Is it still possible to get the code from anybody who used it? I want to do some DNS with it and it would help me so much to get a running code for this. My email is: wenzel.christoph@web.de If it is not possible anymore to get this code, please let me know... Thank you in advance, Christoph  PS: Thank you so much, this helped me tremendously! Last edited by ChrisWe; April 20, 2015 at 08:03. 

April 24, 2015, 05:19 

#20 
New Member
Christoph Wenzel
Join Date: May 2014
Location: Germany
Posts: 19
Rep Power: 3 
Dear all,
when I tried to run Joachims BC (scaledMappedVelocityFixedValueDelta), I got some ERRORS, that are identical to my problem described here Custom Boundary Condition with OpenFOAM To run the scaledMappedVelocityFixedValueDelta BC, I copied the:  Make/files  Make/options  scaledMappedVelocityFixedValueFvPatchField.C  scaledMappedVelocityFixedValueFvPatchField.H into the following folder: /home/Christoph/OpenFOAM/Christoph2.3.1/src/finiteVolume/fvMesh/fvPatches/derived/scaledMappedVelocityFixedValueDelta Compiling the new BC with wclean and wmake libso did not show any errors and there is a libScaledMappedVelocityBCDelta.so created in: /home/Christoph/OpenFOAM/Christoph2.3.1/platforms/linux64GccDPOpt/lib Changing the boundary field for a simple test case in the 0/U file to: Code:
... boundaryField { inlet { type scaledMappedVelocityFixedValueDelta; value uniform (10 0 0); interpolationScheme cell; setAverage true; average (10 0 0); } ... Code:
libs ("libScaledMappedVelocityBCDelta.so") Code:
... // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Create time Create mesh for time = 0 Reading field p Reading field U > FOAM FATAL IO ERROR: Unknown patchField type scaledMappedVelocityFixedValueDelta for patch type genericPatch Valid patchField types are : 76 ( SRFFreestreamVelocity SRFVelocity ... Is there anybody, who knows, why the scaledMappedVelocityFixedValueDelta BC could not be detected by OpenFOAM2.3.1? Maybe someone has a running testcase that he/she can share with me? Which OpenFOAM version did you use to run Lunds BC? Thank you in advance, Christoph 

Tags 
les lund recycled method 
Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
heat transfer with RANS wall function, over a flat plate (validation with fluent)  bruce  OpenFOAM Running, Solving & CFD  5  September 25, 2013 04:40 
Low Reynolds Number Flow over a Flat Plate  Go  FLUENT  4  August 28, 2013 05:19 
different boundary conditions for flat plate  easyRider  Main CFD Forum  0  March 20, 2012 09:40 
Conjugate heat transfer for filmcooled flat plate  Michele  FLUENT  0  July 3, 2006 08:42 
flat plate boundary layer data  Ekachai Juntasaro  Main CFD Forum  3  March 14, 2001 00:18 