CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   Synthetic turbulence BC for LES (http://www.cfd-online.com/Forums/openfoam/65225-synthetic-turbulence-bc-les.html)

flavio_galeazzo June 9, 2009 06:00

Synthetic turbulence BC for LES
 
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!


ivan_cozza June 9, 2009 06:12

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

nishant_hull March 5, 2010 09:53

hi
 
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

ivan_cozza March 5, 2010 10:10

Quote:

Originally Posted by nishant_hull (Post 248707)
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

nishant_hull March 5, 2010 11:30

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 March 5, 2010 14:35

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 (Post 248726)
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 March 5, 2010 15:33

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 March 8, 2010 18:56

fathali
 
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

nishant_hull April 23, 2010 13:58

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 April 24, 2010 01:39

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 (Post 256120)
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 April 24, 2010 06:16

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

ivan_cozza April 26, 2010 04:13

Quote:

Originally Posted by nishant_hull (Post 256169)
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

nishant_hull April 27, 2010 12:56

Quote:

Originally Posted by ivan_cozza (Post 256288)
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

ivan_cozza April 28, 2010 05:33

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 (Post 256517)
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 May 4, 2010 17:07

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::polyPatch’ has no member named ‘Cf’

Suggest me some way out please.

regards,

Nishant






Quote:

Originally Posted by ivan_cozza (Post 256635)
Nishant,

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

have a nice day,
Ivan


nishant_hull June 8, 2010 14:00

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::printStack(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::pureMixture<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::pureMixture<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 June 9, 2010 13:46

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::printStack(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::oneEqEddy::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

larsdavidson August 15, 2010 17:29

synhetic inlet b.c.
 
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

cfdonline2mohsen October 16, 2012 06:50

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

cfd.with.openfoam January 3, 2014 15:01

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


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