CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Lund Recycled Method for LES (flat plate)

Register Blogs Community New Posts Updated Threads Search

Like Tree36Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 23, 2013, 14:27
Default Lund Recycled Method for LES (flat plate)
  #1
Senior Member
 
Joachim
Join Date: Mar 2012
Location: Paris, France
Posts: 145
Rep Power: 15
Joachim is on a distinguished road
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 self-similar 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
Attached Images
File Type: png fig1.png (24.2 KB, 492 views)
File Type: png fig2.png (31.4 KB, 478 views)
File Type: jpg fig3.jpg (28.1 KB, 388 views)
File Type: jpg fig4.jpg (30.4 KB, 332 views)
File Type: jpg fig5.jpg (22.0 KB, 434 views)
Joachim is offline   Reply With Quote

Old   September 23, 2013, 15:23
Default
  #2
Senior Member
 
cfdonline2mohsen's Avatar
 
Mohsen KiaMansouri
Join Date: Jan 2010
Location: CFD Lab
Posts: 118
Rep Power: 16
cfdonline2mohsen is on a distinguished road
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,:
Van-Driest.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?
faiazk likes this.
__________________
“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.”
cfdonline2mohsen is offline   Reply With Quote

Old   September 23, 2013, 17:26
Default
  #3
Senior Member
 
Joachim
Join Date: Mar 2012
Location: Paris, France
Posts: 145
Rep Power: 15
Joachim is on a distinguished road
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 self-similar 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.
Attached Images
File Type: jpg baseGrid.jpg (46.9 KB, 340 views)
File Type: jpg fineGrid.jpg (53.4 KB, 273 views)
cfdonline2mohsen likes this.
Joachim is offline   Reply With Quote

Old   September 23, 2013, 18:07
Default
  #4
Senior Member
 
cfdonline2mohsen's Avatar
 
Mohsen KiaMansouri
Join Date: Jan 2010
Location: CFD Lab
Posts: 118
Rep Power: 16
cfdonline2mohsen is on a distinguished road
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:
I think I will just extract the plane from my base case and see if it gives good results for my "main" simulation
is your recycling section seperate from your main domain? How did you run 2 simultaneous cases at the same time and use your recycling outlet for your main inlet at each timestep?
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.”
cfdonline2mohsen is offline   Reply With Quote

Old   September 23, 2013, 18:17
Default
  #5
Senior Member
 
Joachim
Join Date: Mar 2012
Location: Paris, France
Posts: 145
Rep Power: 15
Joachim is on a distinguished road
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 re-inject 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!
cfdonline2mohsen likes this.
Joachim is offline   Reply With Quote

Old   September 23, 2013, 18:45
Default
  #6
Senior Member
 
cfdonline2mohsen's Avatar
 
Mohsen KiaMansouri
Join Date: Jan 2010
Location: CFD Lab
Posts: 118
Rep Power: 16
cfdonline2mohsen is on a distinguished road
Thank you so much for your helpful comments.
Quote:
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.
Yeah, I agree with you.
Quote:
I don't want to run the inflow simulation over and over again. One time is enough!
What do you mean? I think inlet must be time dependent in LES and one of the objectives of this method is to create time-dependent turbulent structures at each time step. So you are going to use the outlet of this method (a fixed value) for you inlet of the main calculation at all time steps??
__________________
“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.”
cfdonline2mohsen is offline   Reply With Quote

Old   September 23, 2013, 18:47
Default
  #7
Senior Member
 
Joachim
Join Date: Mar 2012
Location: Paris, France
Posts: 145
Rep Power: 15
Joachim is on a distinguished road
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.
Joachim is offline   Reply With Quote

Old   September 23, 2013, 19:27
Default
  #8
Senior Member
 
cfdonline2mohsen's Avatar
 
Mohsen KiaMansouri
Join Date: Jan 2010
Location: CFD Lab
Posts: 118
Rep Power: 16
cfdonline2mohsen is on a distinguished road
at each time step!
No Way!
Quote:
I am saving that somewhere
Huge amount of data!
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.”
cfdonline2mohsen is offline   Reply With Quote

Old   September 23, 2013, 19:30
Default
  #9
Senior Member
 
Joachim
Join Date: Mar 2012
Location: Paris, France
Posts: 145
Rep Power: 15
Joachim is on a distinguished road
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.
cfdonline2mohsen likes this.
Joachim is offline   Reply With Quote

Old   November 27, 2013, 15:19
Default
  #10
Member
 
Fluid Dynamics
Join Date: Mar 2013
Posts: 41
Rep Power: 13
cfd.with.openfoam is on a distinguished road
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.
cfd.with.openfoam is offline   Reply With Quote

Old   November 27, 2013, 16:36
Default
  #11
Senior Member
 
Joachim
Join Date: Mar 2012
Location: Paris, France
Posts: 145
Rep Power: 15
Joachim is on a distinguished road
Hey,

As you said, when you recycle the flow, you do not modify it. It is like a "copy-paste" operation. When you re-scale it, you basically "copy-modify-paste". In the case of Lund's method, you assume some kind of self-similar 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 Golden-section 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
Joachim is offline   Reply With Quote

Old   November 27, 2013, 17:47
Default
  #12
Member
 
Fluid Dynamics
Join Date: Mar 2013
Posts: 41
Rep Power: 13
cfd.with.openfoam is on a distinguished road
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
cfd.with.openfoam is offline   Reply With Quote

Old   November 27, 2013, 19:07
Default
  #13
Member
 
Fluid Dynamics
Join Date: Mar 2013
Posts: 41
Rep Power: 13
cfd.with.openfoam is on a distinguished road
Dear Joachim,

I just looked at another post of yours (no. 7 in the link below) where you thank Perry Johnson.

1. http://www.cfd-online.com/Forums/ope...onditions.html

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.2012-366
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.
cfd.with.openfoam is offline   Reply With Quote

Old   December 9, 2013, 06:14
Default Lund recycle technique
  #14
New Member
 
Thomas Lloyd
Join Date: May 2011
Posts: 7
Rep Power: 15
Thomas_Lloyd is on a distinguished road
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
Thomas_Lloyd is offline   Reply With Quote

Old   January 9, 2014, 06:23
Default
  #15
New Member
 
Johan Nilsson
Join Date: May 2010
Posts: 4
Rep Power: 16
jnilsson is on a distinguished road
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 e-mail address over pm.

Thank you in advance
Johan
jnilsson is offline   Reply With Quote

Old   January 9, 2014, 09:57
Default
  #16
New Member
 
Join Date: Nov 2012
Posts: 13
Rep Power: 14
lixx is on a distinguished road
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
lixx is offline   Reply With Quote

Old   January 18, 2014, 16:42
Default
  #17
Member
 
Fluid Dynamics
Join Date: Mar 2013
Posts: 41
Rep Power: 13
cfd.with.openfoam is on a distinguished road
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.
cfd.with.openfoam is offline   Reply With Quote

Old   January 26, 2014, 20:12
Default
  #18
New Member
 
Join Date: Jan 2014
Posts: 16
Rep Power: 12
flames is on a distinguished road
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 a_{ij} in Eq. (27) come from. Does anybody know how they derived? GIve me some hints?

a_{11}=\sqrt{R_{11}}
a_{21}=R_{21}/a_11
a_{22}=\sqrt{R_{22}-a_{21}^2}
a_{31}=R_{31}/a_{11}
a_{32}=R_{32}-a_{21}*a_{31}/a_{22}
a_{33}=\sqrt{R_{33}-a_{31}^2-a_{32}^2}

----------------------------------------------------------------------------------------------------------------------------------------
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.
flames is offline   Reply With Quote

Old   April 20, 2015, 03:22
Default
  #19
New Member
 
Christoph Wenzel
Join Date: May 2014
Location: Germany
Posts: 21
Rep Power: 12
ChrisWe is on a distinguished road
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 09:03.
ChrisWe is offline   Reply With Quote

Old   April 24, 2015, 06:19
Default
  #20
New Member
 
Christoph Wenzel
Join Date: May 2014
Location: Germany
Posts: 21
Rep Power: 12
ChrisWe is on a distinguished road
Dear all,

when I tried to run Joachims BC (scaledMappedVelocityFixedValueDelta), I got some ERRORS, that are identical to my problem described here
http://www.cfd-online.com/Forums/ope...penfoam-3.html

To run the scaledMappedVelocityFixedValueDelta BC, I copied the:
- Make/files
- Make/options
- scaledMappedVelocityFixedValueFvPatchField.C
- scaledMappedVelocityFixedValueFvPatchField.H

into the following folder:
/home/Christoph/OpenFOAM/Christoph-2.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/Christoph-2.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);
    }
...
and inserting in the controlDict (Make/files: ...LIB = $(FOAM_USER_LIBBIN)/libScaledMappedVelocityBCDelta)
Code:
libs ("libScaledMappedVelocityBCDelta.so")
I ran my simulation and got a FATAL IO ERROR
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
...
When I tried to do the same with the "mapped" BC (copying to my personal folder and try to run it without changes), I got the identical error. When I tried the same with the "parabolicInlet" BC (no generic BC), all worked fine.

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
ChrisWe is offline   Reply With Quote

Reply

Tags
les lund recycled method


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
heat transfer with RANS wall function, over a flat plate (validation with fluent) bruce OpenFOAM Running, Solving & CFD 6 January 20, 2017 07:22
Low Reynolds Number Flow over a Flat Plate Go FLUENT 4 August 28, 2013 06:19
different boundary conditions for flat plate easyRider Main CFD Forum 0 March 20, 2012 09:40
Conjugate heat transfer for film-cooled flat plate Michele FLUENT 0 July 3, 2006 09:42
flat plate boundary layer data Ekachai Juntasaro Main CFD Forum 3 March 14, 2001 00:18


All times are GMT -4. The time now is 09:24.