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

Synthetic turbulence BC for LES

Register Blogs Community New Posts Updated Threads Search

Like Tree7Likes
  • 2 Post By ivan_cozza
  • 1 Post By nishant_hull
  • 4 Post By larsdavidson

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 9, 2009, 07:00
Default Synthetic turbulence BC for LES
  #1
Member
 
Flavio Galeazzo
Join Date: Mar 2009
Location: Karlsruhe, Germany
Posts: 34
Rep Power: 18
flavio_galeazzo is on a distinguished road
Hi all!
I am currently conduction my first LES simulations of mixture between two flows (jet in crossflow configuration).
I read a lot about inlet boundary conditions for LES in the forum, and I have seen that various Foamers are working on synthetic turbulence BCs (using the ideas of Klein or L. Davidson).
I am wondering if someone that has already successfully implemented some sort of synthetic turbulence BC would be kind enough to share it. I would be very grateful!

flavio_galeazzo is offline   Reply With Quote

Old   June 9, 2009, 07:12
Default
  #2
Senior Member
 
Ivan Flaminio Cozza
Join Date: Mar 2009
Location: Torino, Piemonte, Italia
Posts: 210
Rep Power: 18
ivan_cozza is on a distinguished road
Send a message via MSN to ivan_cozza
Hi Flavio,
I'm working on synthetic turbulence for computational aeroacoustics, and I've implemented in OF some synthetic turbulence model (Billson, Smirnov, Ewert).
My implementations produce volFields, so not exactly ready for BC, but it couldn't be so difficult to extend it for BC, if you want to try, contact me!
Ivan
ivan_cozza is offline   Reply With Quote

Old   March 5, 2010, 09:53
Default hi
  #3
Senior Member
 
Nishant
Join Date: Mar 2009
Location: Glasgow, UK
Posts: 166
Rep Power: 17
nishant_hull is on a distinguished road
HI Ivan,

I am trying to implement a synthetic boundary condition using Klein/Lund's digital filtering method. your implmentation might not be the thing what i want but that might help me to develop the code for my purpose. I have just started the coding process and I am currently trying to find out ways to implement a iteration process for the stress tensor. Struggling a bit. I was wondering if you can share your implementation with me? The final code will be available to the community for free.
Thanks & regards,

Nishant
nishant_hull is offline   Reply With Quote

Old   March 5, 2010, 10:10
Default
  #4
Senior Member
 
Ivan Flaminio Cozza
Join Date: Mar 2009
Location: Torino, Piemonte, Italia
Posts: 210
Rep Power: 18
ivan_cozza is on a distinguished road
Send a message via MSN to ivan_cozza
Quote:
Originally Posted by nishant_hull View Post
HI Ivan,

I am trying to implement a synthetic boundary condition using Klein/Lund's digital filtering method. your implmentation might not be the thing what i want but that might help me to develop the code for my purpose. I have just started the coding process and I am currently trying to find out ways to implement a iteration process for the stress tensor. Struggling a bit. I was wondering if you can share your implementation with me? The final code will be available to the community for free.
Thanks & regards,

Nishant
Hi Nishant,
I've implemented something similar to the Klein method, based on the work of Ewert, but in my opinion is not easy to use it as a b.c. for LES, as it's very tricky to parallelize it. I think that other techniques should be better suited for this purpose, like the inlet b.c. of Davidson, take a look there:

http://books.google.it/books?id=snG1...age&q=davidson les inlet&f=false

Essentially those are local b.c., each inlet face stand for it's own and don't look for other cells data, so easier to make parallel.

For the Re Stress tensor correction for anisotropy, I've implemented something, but I stopped working on it many months ago and it isn't tested at all...
Hope this can help,
Ivan
cfdonline2mohsen and charmc like this.
ivan_cozza is offline   Reply With Quote

Old   March 5, 2010, 11:30
Default
  #5
Senior Member
 
Nishant
Join Date: Mar 2009
Location: Glasgow, UK
Posts: 166
Rep Power: 17
nishant_hull is on a distinguished road
Thanks Ivan,

Thanks for the quick reply. I cant use any recirculation kind of boundary condition because I want to superimpose a sound pulse at the inlet after the process reaches a steady state with the synthetic boundary condition. I am afraid the recirculation boundary condition might kill the pulse or deform it.
I was wondering if you could help me with the piece of code or with some sort of guidance in writting the final code for the digital filtering boundary condition? I might go further to write the code proposed by Fathali et al, which look a bit more advanced than the digital filtering.

Thanks & regards,

Nishant
nishant_hull is offline   Reply With Quote

Old   March 5, 2010, 14:35
Default
  #6
Senior Member
 
Ivan Flaminio Cozza
Join Date: Mar 2009
Location: Torino, Piemonte, Italia
Posts: 210
Rep Power: 18
ivan_cozza is on a distinguished road
Send a message via MSN to ivan_cozza
Dear Nishant,
the paper I suggest you doesn't talk at all on recirculation b.c., but on synthetic turbulent inlet for flows with recirculations (i.e. separations, bubbles, and so...).
If you take a deeper look on it you can find something interesting I think...

I'm sorry but I don't know the work of Fathali et al, if you suggest me some paper I'll take a look on it...
Ivan

Quote:
Originally Posted by nishant_hull View Post
Thanks Ivan,

Thanks for the quick reply. I cant use any recirculation kind of boundary condition because I want to superimpose a sound pulse at the inlet after the process reaches a steady state with the synthetic boundary condition. I am afraid the recirculation boundary condition might kill the pulse or deform it.
I was wondering if you could help me with the piece of code or with some sort of guidance in writting the final code for the digital filtering boundary condition? I might go further to write the code proposed by Fathali et al, which look a bit more advanced than the digital filtering.

Thanks & regards,

Nishant
ivan_cozza is offline   Reply With Quote

Old   March 5, 2010, 15:33
Default
  #7
Senior Member
 
Nishant
Join Date: Mar 2009
Location: Glasgow, UK
Posts: 166
Rep Power: 17
nishant_hull is on a distinguished road
Ivan,

In deed, I have not had a close look at the paper. I have already put a lot of time investigating the digital filter method. I can see few paper from Ewert. Not sure which one you are talking about. I was wondering if you can send me the exact paper on my id nishant.nitj@gmail.com
About the paper form Fathali, I think forum is not allowing me to upload 800kb file, as the limit is 600kb? send me your id and i will upload the papers to you there. This paper seems to be a natural extension of digital filter method. So i find it interesting.


Thanks & regards,

Nishant
nishant_hull is offline   Reply With Quote

Old   March 8, 2010, 18:56
Default fathali
  #8
Senior Member
 
Nishant
Join Date: Mar 2009
Location: Glasgow, UK
Posts: 166
Rep Power: 17
nishant_hull is on a distinguished road
Hi Ivan

Hope you had a nice weekend. Please find the Fathali implementation here:
http://www3.interscience.wiley.com/j...TRY=1&SRETRY=0

I had a look at the Davidson method and it looks good to me. Can I get more info about this method?

regards,

Nishant
cfdonline2mohsen likes this.
nishant_hull is offline   Reply With Quote

Old   April 23, 2010, 14:58
Default
  #9
Senior Member
 
Nishant
Join Date: Mar 2009
Location: Glasgow, UK
Posts: 166
Rep Power: 17
nishant_hull is on a distinguished road
Hi Ivan,
Hope you ar doing good. I needed your help here. I have done the implementation of Davidson's condition and the problem I am facign now is that the simulation is converging after some times. When I looked back to the problem, everything looked ok to me except the fact that I am not very sure about one variable, which is x in the
U(x) = un cos (k.x + ψ). Can you tell me something about this variable?
Is x the space cordinates? but if this is space co-ordinates then it vanishes the x-component of the k- vector all the time, as the inlet condition is generated on y-z plane on the inlet patch.
Or is x is equal to the multiplication of velocity of sound C and time t (i.e. C*t)?

regards,
Nishant
nishant_hull is offline   Reply With Quote

Old   April 24, 2010, 02:39
Default
  #10
Senior Member
 
Ivan Flaminio Cozza
Join Date: Mar 2009
Location: Torino, Piemonte, Italia
Posts: 210
Rep Power: 18
ivan_cozza is on a distinguished road
Send a message via MSN to ivan_cozza
Hi Nishant,

x is the position vector, so even if your inlet is on a yz plane, you have variable y and z, and nothing vanishes!

Hope this can help,
Ivan


Quote:
Originally Posted by nishant_hull View Post
Hi Ivan,
Hope you ar doing good. I needed your help here. I have done the implementation of Davidson's condition and the problem I am facign now is that the simulation is converging after some times. When I looked back to the problem, everything looked ok to me except the fact that I am not very sure about one variable, which is x in the
U(x) = un cos (k.x + ψ). Can you tell me something about this variable?
Is x the space cordinates? but if this is space co-ordinates then it vanishes the x-component of the k- vector all the time, as the inlet condition is generated on y-z plane on the inlet patch.
Or is x is equal to the multiplication of velocity of sound C and time t (i.e. C*t)?

regards,
Nishant
ivan_cozza is offline   Reply With Quote

Old   April 24, 2010, 07:16
Default
  #11
Senior Member
 
Nishant
Join Date: Mar 2009
Location: Glasgow, UK
Posts: 166
Rep Power: 17
nishant_hull is on a distinguished road
HI Ivan,
Thanks for your reply. If x is the position vector then the term k1*x1 in the k.x (which is k1x1+k2x2+k3x3) will always be zero or constant (if x1 is the mid-point of the inlet).
I was wondering how do you access the x, y and z co-ordinate of the face of mesh in the inlet patch? if you help me there.
regards,

Nishant
nishant_hull is offline   Reply With Quote

Old   April 26, 2010, 05:13
Default
  #12
Senior Member
 
Ivan Flaminio Cozza
Join Date: Mar 2009
Location: Torino, Piemonte, Italia
Posts: 210
Rep Power: 18
ivan_cozza is on a distinguished road
Send a message via MSN to ivan_cozza
Quote:
Originally Posted by nishant_hull View Post
HI Ivan,
Thanks for your reply. If x is the position vector then the term k1*x1 in the k.x (which is k1x1+k2x2+k3x3) will always be zero or constant (if x1 is the mid-point of the inlet).
I was wondering how do you access the x, y and z co-ordinate of the face of mesh in the inlet patch? if you help me there.
regards,

Nishant
I do like this:

label patchI = mesh.boundaryMesh().findPatchID("inlet");
const fvPatchVectorField& patchU = U.boundaryField()[patchI];
const labelList inletFc = patchU.patch().faceCells();
const vectorField inletCf = patchU.patch().Cf();

I select an inlet patch (for me is the patch called "inlet", there are other ways to do it...), and on it I collect the face center vectors in a vector field called inletCf, accessing the components of this vector you have x,y,z!

Have a nice day, Ivan
ivan_cozza is offline   Reply With Quote

Old   April 27, 2010, 13:56
Default
  #13
Senior Member
 
Nishant
Join Date: Mar 2009
Location: Glasgow, UK
Posts: 166
Rep Power: 17
nishant_hull is on a distinguished road
Quote:
Originally Posted by ivan_cozza View Post
I do like this:

label patchI = mesh.boundaryMesh().findPatchID("inlet");
const fvPatchVectorField& patchU = U.boundaryField()[patchI];
const labelList inletFc = patchU.patch().faceCells();
const vectorField inletCf = patchU.patch().Cf();

I select an inlet patch (for me is the patch called "inlet", there are other ways to do it...), and on it I collect the face center vectors in a vector field called inletCf, accessing the components of this vector you have x,y,z!

Have a nice day, Ivan

Hi Ivan,

Sorry for late reply and Thanks for the help. My code structure is pretty different to accept exact the same implementation but hopefully something similar can be implemented. However I was wondering what "mesh" is in the first line of implementation? As mesh is accessing the findPatchID() function through boundaryMesh(), it seems to be some object or instance of the polyMesh class. isn't it?

regards,

Nishant
nishant_hull is offline   Reply With Quote

Old   April 28, 2010, 06:33
Default
  #14
Senior Member
 
Ivan Flaminio Cozza
Join Date: Mar 2009
Location: Torino, Piemonte, Italia
Posts: 210
Rep Power: 18
ivan_cozza is on a distinguished road
Send a message via MSN to ivan_cozza
Nishant,

mesh is the object created by the included file "createMesh.H", I suppose is polyMesh...

have a nice day,
Ivan



Quote:
Originally Posted by nishant_hull View Post
Hi Ivan,

Sorry for late reply and Thanks for the help. My code structure is pretty different to accept exact the same implementation but hopefully something similar can be implemented. However I was wondering what "mesh" is in the first line of implementation? As mesh is accessing the findPatchID() function through boundaryMesh(), it seems to be some object or instance of the polyMesh class. isn't it?

regards,

Nishant
ivan_cozza is offline   Reply With Quote

Old   May 4, 2010, 18:07
Default
  #15
Senior Member
 
Nishant
Join Date: Mar 2009
Location: Glasgow, UK
Posts: 166
Rep Power: 17
nishant_hull is on a distinguished road
Hi Ivan,

I have worked a little to enhance the coding structure of my code now. But I am struggling to access the "inletCf" in the SyntheticBoundary patch on the inlet, after creating inletCf in the createField.H file. When I build the solver, it simply says that the inletCf is not in the scope of this class.!

I have also attempted to use what have been used by the activeBaffleVelocity boundary condition. There the implementation goes like:
const fvPatch& cyclicPatch = patch().boundaryMesh()[cyclicPatchLabel_];
const labelList& cyclicFaceCells = cyclicPatch.patch().faceCells();

However, when I run my case with this sort of implementation then the error is:
227: error: there are no arguments to ‘patch’ that depend on a template parameter, so a declaration of ‘patch’ must be available
227: error: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)
229: error: ‘const class Foam:olyPatch’ has no member named ‘Cf’

Suggest me some way out please.

regards,

Nishant






Quote:
Originally Posted by ivan_cozza View Post
Nishant,

mesh is the object created by the included file "createMesh.H", I suppose is polyMesh...

have a nice day,
Ivan
nishant_hull is offline   Reply With Quote

Old   June 8, 2010, 15:00
Default
  #16
Senior Member
 
Nishant
Join Date: Mar 2009
Location: Glasgow, UK
Posts: 166
Rep Power: 17
nishant_hull is on a distinguished road
Hi Ivan,

I have implemented the davidson's boundary condition now but there are some problem I am having while running. After some time like 0.001 or 0.003 sec in a channel test case, I am having these errors:

Maximum number of iterations exceeded#0 Foam::error:rintStack(Foam::Ostream&) in "/home/nishant/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libOpenFOAM.so"
#1 Foam::error::abort() in "/home/nishant/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libOpenFOAM.so"
#2 Foam::hPsiThermo<Foam:ureMixture<Foam::constTran sport<Foam::specieThermo<Foam::hConstThermo<Foam:: perfectGas> > > > >::calculate() in "/home/nishant/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libbasicThermophysicalModels.so"
#3 Foam::hPsiThermo<Foam:ureMixture<Foam::constTran sport<Foam::specieThermo<Foam::hConstThermo<Foam:: perfectGas> > > > >::correct() in "/home/nishant/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libbasicThermophysicalModels.so"
#4
in "/home/nishant/OpenFOAM/nishant-1.6/applications/bin/linux64GccDPOpt/rhoPisoFoam-klein"
#5 __libc_start_main in "/lib/libc.so.6"
#6
in "/home/nishant/OpenFOAM/nishant-1.6/applications/bin/linux64GccDPOpt/rhoPisoFoam-klein"


From function specieThermo<thermo>::T(scalar f, scalar T0, scalar (specieThermo<thermo>::*F)(const scalar) const, scalar (specieThermo<thermo>::*dFdT)(const scalar) const) const
in file /home/dm2/henry/OpenFOAM/OpenFOAM-1.6/src/thermophysicalModels/specie/lnInclude/specieThermoI.H at line 68.

FOAM aborting

Can you please tell me how to get rid of such problems? I assume you might have come across such problems in the early stages. Any help in this regard will be deeply appreciated.

Thanks & regards,

Nishant
nishant_hull is offline   Reply With Quote

Old   June 9, 2010, 14:46
Default
  #17
Senior Member
 
Nishant
Join Date: Mar 2009
Location: Glasgow, UK
Posts: 166
Rep Power: 17
nishant_hull is on a distinguished road
Hi Ivan,

After some modifications, I am getting this error:

time step continuity errors : sum local = 6.07738e-06, global = -2.00825e-07, cumulative = -1.65828e-07
#0 Foam::error:rintStack(Foam::Ostream&) in "/home/nishant/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libOpenFOAM.so"
#1 Foam::sigFpe::sigFpeHandler(int) in "/home/nishant/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libOpenFOAM.so"
#2 in "/lib/libc.so.6"
#3 Foam::sqrt(Foam::Field<double>&, Foam::UList<double> const&) in "/home/nishant/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libOpenFOAM.so"
#4 Foam::sqrt(Foam::tmp<Foam::Field<double> > const&) in "/home/nishant/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libOpenFOAM.so"
#5 Foam::compressible::LESModels::vanDriestDelta::cal cDelta() in "/home/nishant/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libcompressibleLESModels.so"
#6 Foam::compressible::LESModels:neEqEddy::correct( Foam::tmp<Foam::GeometricField<Foam::Tensor<double >, Foam::fvPatchField, Foam::volMesh> > const&) in "/home/nishant/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libcompressibleLESModels.so"
#7 Foam::compressible::LESModel::correct() in "/home/nishant/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libcompressibleLESModels.so"
#8
in "/home/nishant/OpenFOAM/nishant-1.6/applications/bin/linux64GccDPOpt/rhoPisoFoam-klein"
#9 __libc_start_main in "/lib/libc.so.6"
#10
in "/home/nishant/OpenFOAM/nishant-1.6/applications/bin/linux64GccDPOpt/rhoPisoFoam-klein"
Floating point exception

Have you come across anything like this? I wonder why there is floating point error in LESmodels??? Any idea, if you can assist me here please?

Thanks & regards,

Nishant
nishant_hull is offline   Reply With Quote

Old   August 15, 2010, 18:29
Default synhetic inlet b.c.
  #18
New Member
 
Lars Davidson
Join Date: Aug 2010
Posts: 1
Rep Power: 0
larsdavidson is on a distinguished road
Hi,

I have recently uploaded details on how to implement my synthetic inlet b.c., see

http://www.tfd.chalmers.se/~lada/pro.../proright.html


/Lars D
larsdavidson is offline   Reply With Quote

Old   October 16, 2012, 07:50
Default
  #19
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
Hi Ivan, Nishant and also Professor Davidson

I still have a problem finding a suitable inflow generator for my case in LES After a lot of ongoing struggle!!
From the above discussions I found that you guys were trying to implement the Davidson synthetic inlet boundary conditions in OpenFOAM.
Have you succeeded??
If so is it possible for you to share the code here in the forums or pm me via private message?

Thank in advance
Mohsen
cfdonline2mohsen is offline   Reply With Quote

Old   January 3, 2014, 15:01
Default
  #20
Member
 
Fluid Dynamics
Join Date: Mar 2013
Posts: 41
Rep Power: 13
cfd.with.openfoam is on a distinguished road
Hello,

Is there any news in this regard?

Mohsen did you manage to get the code? If yes, then can you please upload it here?

Thanks
cfd.with.openfoam 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
Question on Turbulence Intensity Eric FLUENT 1 March 7, 2012 05:30
Discussion: Reason of Turbulence!! Wen Long Main CFD Forum 3 May 15, 2009 10:52
Code release: Flow Transition and Turbulence Chaoqun Liu Main CFD Forum 0 September 26, 2008 18:15
Turbulence boundary values lego Main CFD Forum 0 October 24, 2002 14:47


All times are GMT -4. The time now is 14:51.