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

Inlet BC for LES

Register Blogs Community New Posts Updated Threads Search

Like Tree5Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 15, 2007, 09:47
Default I guess, to many of you, this
  #1
sek
Member
 
Sung-Eun Kim
Join Date: Mar 2009
Posts: 76
Rep Power: 17
sek is on a distinguished road
I guess, to many of you, this is a recurring issue with LES involving an inlet boundary. Experience has shown that a reasonably accurate representation of turbulent velocity - with proper statistical correlations - is required at the inlet to guarantee good predicion of the downstream flow. Has anyone tried an inlet velocity B.C. along that line? I have some hands on experience in this issue with FLUENT. Superposing random signals won't wotk. Turbulent (fluctuating) velocity synthesized using varuous techniques might be more useful. One idea is to solve (embed) cyclic boundary problem along with LES. Has anybody tried "recycling" strategy with OF where the instantaneous velocity somehwere in the downstream location is fed to the inlet boundary? I'm interested in learning the mechanics of doinbg that.
sek is offline   Reply With Quote

Old   October 15, 2007, 10:01
Default Eugene de Villiers has impleme
  #2
Senior Member
 
Gavin Tabor
Join Date: Mar 2009
Posts: 181
Rep Power: 17
grtabor is on a distinguished road
Eugene de Villiers has implemented this in OF, and it works very well. I've worked with a PhD student in extending what he has done, including feedback control to drive the inlet section towards the desired velocity and turbulence profile - basically you create a body force and/or a velocity correction for the inlet section and make it proportional to the difference between the sampled profile and the intended profile. We are just starting to put together some papers on this - email me if you want and I'll send some preprints.

Gavin
grtabor is offline   Reply With Quote

Old   October 15, 2007, 10:35
Default I want to add that you can fin
  #3
Senior Member
 
Cedric DUPRAT
Join Date: Mar 2009
Location: Nantes, France
Posts: 195
Rep Power: 17
cedric_duprat is on a distinguished road
I want to add that you can find also a hint in the October 11, 2007 http://www.cfd-online.com/OpenFOAM_D...ges/1/311.html
or how to use OF boundary condition to create turbulence inlet field.
and as I understand, the Eugene's code (PerturbU) impose a turbulent field as an initial field but, doesn't prescribe an inlet BC with any turbulence noise in an unsteady run. I hope I'm not wrong :o)
regards,

cedric

PS: Gavin, I'm interresting on your preprints, if you can send me them ... , thank you
cedric_duprat is offline   Reply With Quote

Old   October 15, 2007, 10:51
Default PeturbU is a different code ..
  #4
Senior Member
 
Gavin Tabor
Join Date: Mar 2009
Posts: 181
Rep Power: 17
grtabor is on a distinguished road
PeturbU is a different code .. I think. Eugene did let me have some code which maps from an interior plane back to the inlet, correcting to get a target flux, but I don't know if its distributed generally or if you have to get on to Eugene to get it. Its described in Eugene's PhD thesis.

Cedric - if you let me have your email address I'll email you the papers. My email address is g.r.tabor@ex.ac.uk

Gavin
grtabor is offline   Reply With Quote

Old   October 15, 2007, 11:12
Default Hearing what's been said so fa
  #5
sek
Member
 
Sung-Eun Kim
Join Date: Mar 2009
Posts: 76
Rep Power: 17
sek is on a distinguished road
Hearing what's been said so far, it appears I need what Eugene put together. I wonder if the code would be made available.
sek is offline   Reply With Quote

Old   October 16, 2007, 05:01
Default It is all in 1.4.1. Make the p
  #6
Senior Member
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26
mattijs is on a distinguished road
It is all in 1.4.1. Make the patch a 'directMappedPatch' which requires an additional offset vector where to put the mapping plane.

The patchFields should be of type directMapped.

Attached a simpleFoam case where the inlet is of directMapped type.
pitzDailyDirectMapped.tgz
mattijs is offline   Reply With Quote

Old   October 16, 2007, 05:40
Default Hi all, I would like to add,
  #7
Senior Member
 
Cedric DUPRAT
Join Date: Mar 2009
Location: Nantes, France
Posts: 195
Rep Power: 17
cedric_duprat is on a distinguished road
Hi all,
I would like to add, again, this link : http://www.cfd-online.com/OpenFOAM_D...html#POST13069 about Mattijs upper message.

If I get well, directMapped can exactly do the same as channelOodles + Oodles coupling by an internal plane in the computation of the geometry. It's used to map velocity data and k
Regards,

Cedric
cedric_duprat is offline   Reply With Quote

Old   October 16, 2007, 10:44
Default Hi again, I have questions
  #8
Senior Member
 
Cedric DUPRAT
Join Date: Mar 2009
Location: Nantes, France
Posts: 195
Rep Power: 17
cedric_duprat is on a distinguished road
Hi again,

I have questions on the upper directMapped type:

1- what is the difference between type directMapped and type directMappedFixedValue ?
Because Mattijs, in his attached case use a directMapped type and fixed the value uniform.

2- there is, in this patch, no interpolation. What is the meaning of setAverage. for 0/k, we copy the average of the internal plane in the computation geometry at the inlet ? So, If I plan to do LES, I shouldn't use the average option ?

3- to define the internal plane, we have to set an <offset> which is define, for example by (0 0 1). Is it the coordinates of a point ? if yes, how to define a plan with only one coordinates ?

sorry for these questions, but I'm a little bit slow :o)

regards,
Cedric
cedric_duprat is offline   Reply With Quote

Old   October 16, 2007, 15:20
Default 1. Use directMapped for the pa
  #9
Senior Member
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26
mattijs is on a distinguished road
1. Use directMapped for the patchField type (the typeName of directMappedFixedValueFvPatchField).

2. Average scales/offsets the mapped value to maintain some average. E.g. for fixed massflow inlet.

3. offset gets added to all faceCentres on the patch ('inlet' in the sample case) to find the location of the cell whose value to use.
mattijs is offline   Reply With Quote

Old   November 8, 2007, 11:40
Default good afternoon forum, I've
  #10
Senior Member
 
Cedric DUPRAT
Join Date: Mar 2009
Location: Nantes, France
Posts: 195
Rep Power: 17
cedric_duprat is on a distinguished road
good afternoon forum,

I've got one more question about directMappedPatch.
As Eugene said, We can use it for turbulent inlet generator.
In channel_Oodles, we add a source term in our Navier-Stokes equation to balance the wall friction force. Is there some thing like that on the directMappedPatch or not ?
if not, we can add it easly (like in channelOodles) but how to manage the fact that some time you need this source term (in our periodic box) and some time not (in the other part on the geometry) ?
I understand that if you have experimental data, you can compare your compute result with the experimental one and correct with the difference but, if you don't have previous result, you must add some theorical terms.
Then, if you have flow swirling flow, it's more complicate to find the source term (in comparison of channel_Oodles).

Well, these are thursday evening questions,

Cedric D.
cedric_duprat is offline   Reply With Quote

Old   November 8, 2007, 15:53
Default >Is there some thing like that
  #11
Senior Member
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26
mattijs is on a distinguished road
>Is there some thing like that on the directMappedPatch

No, there is only optional averaging. Have a look at updateCoeffs() in finiteVolume/lnInclude/directMappedFixedValueFvPatchField.C.
mattijs is offline   Reply With Quote

Old   November 9, 2007, 05:02
Default Some friday morning answers...
  #12
Senior Member
 
Gavin Tabor
Join Date: Mar 2009
Posts: 181
Rep Power: 17
grtabor is on a distinguished road
Some friday morning answers....

>In channel_Oodles, we add a source term in our Navier-Stokes equation to balance the wall friction force. Is there some thing
> like that on the directMappedPatch or not ?
>if not, we can add it easly (like in channelOodles) but how to manage the fact that some time you need this source term (
>in our periodic box) and some time not (in the other part on the geometry) ?

Construct a mask function with value 1 in the inlet domain and 0 in the problem domain; then multiply the source term in the momentum equation by the mask function.

>I understand that if you have experimental data, you can compare your compute result with the experimental one and
>correct with the difference but, if you don't have previous result, you must add some theorical terms.
>Then, if you have flow swirling flow, it's more complicate to find the source term (in comparison of channel_Oodles).

I think you can do this in a number of ways. We have been able to think of 3 ways of modifying the inlet flow; manipulating the mapped data before reinserting it, introducing a body force into the momentum equation, and introducing a velocity correction to the velocity field in the inlet section. In each case, control algorithms can be used to drive the flow towards the correct result. Thus it is possible to match mean and turbulent velocity profiles very accurately.

Gavin
grtabor is offline   Reply With Quote

Old   November 9, 2007, 06:09
Default Hi Mattijs and Gavin, Thank
  #13
Senior Member
 
Cedric DUPRAT
Join Date: Mar 2009
Location: Nantes, France
Posts: 195
Rep Power: 17
cedric_duprat is on a distinguished road
Hi Mattijs and Gavin,

Thank you for your answers.
For optional averaging, I'm afraid that it will filter the turbulent structure, which it's not the goal in LES calculation. But, your're right, in RANS, it's enought to maintain a constant flow rate in the periodic part.
That's why, I should introduce a body force into the momentum equation. As I said, It's a little bit hard for me to compare with target mean flow but, I am trying to find some theorical sources terms.
For the mask function, of course, you are right.


Thanks again, so now, ... let's do that :o)

Regards,
Cedric
cedric_duprat is offline   Reply With Quote

Old   December 12, 2007, 05:35
Default Good morning Forum, I've go
  #14
Senior Member
 
Cedric DUPRAT
Join Date: Mar 2009
Location: Nantes, France
Posts: 195
Rep Power: 17
cedric_duprat is on a distinguished road
Good morning Forum,

I've got a question about inlet for LES, good thread :o)

I would like to try something different compare to directMappedPatch. which is noise generation.
I know that in OF there is a uncorelated noise generator.
Is there any paper about what is implemented in OF ?

As I understand, we (in fact, Open Foam) add a velocity fluctuation to the mean velocity. So at eatch time step, we generate these fluctuations.
The question now is how to create them ?
So now, we impose inlet (as usual) and the turbulentInlet add the uncorellated fluctuation.

I have a paper from Klein Jou.Comp.Physics 186 (2003) which explain how to make correclated fluctuation. I plan to plug this method in OF, I think a big part is already done but, I've to understand first how it work in OF now.

Regards ,

Cedric
cedric_duprat is offline   Reply With Quote

Old   December 12, 2007, 08:16
Default Are you referring to the turbu
  #15
Senior Member
 
Eugene de Villiers
Join Date: Mar 2009
Posts: 725
Rep Power: 21
eugene is on a distinguished road
Are you referring to the turbulentInlet boundary condition?

Basically this is a random walk for each face value on the boundary around some reference value. All the details are available in

src/finiteVolume/lnInclude/turbulentInletFvPatchField.C

Give us a shout once you run in to more specific problems
eugene is offline   Reply With Quote

Old   December 13, 2007, 13:19
Default thank you Eugene for your answ
  #16
Senior Member
 
Cedric DUPRAT
Join Date: Mar 2009
Location: Nantes, France
Posts: 195
Rep Power: 17
cedric_duprat is on a distinguished road
thank you Eugene for your answer and, you are right, it's not a technical question.
I already look into turbulentInlet but ....I'm not sur to get every thing.
I would like to use the files which are in randomProcesses like turbGen where the fluctuations satistied a given energy spectrum.
and I think, but maybe I'm wrong, that turbulentInlet doesn't used these files. that's why I asked for short idee of how turbulentInlet work.
I just would like to know if I can start for something existing to make my "noise" or if I have to start from zero.


Regards,
Cedric
cedric_duprat is offline   Reply With Quote

Old   January 22, 2008, 05:57
Default Good morning from france, I
  #17
Senior Member
 
Cedric DUPRAT
Join Date: Mar 2009
Location: Nantes, France
Posts: 195
Rep Power: 17
cedric_duprat is on a distinguished road
Good morning from france,

I want to come back on Gavin's answer and the mask function.
I did something like that:
scalar alpha = 0;
label INLET = mesh.boundaryMesh().findPatchID("inlet");
const polyPatch& cellINLET = mesh.boundaryMesh()[INLET];
forAll(cellINLET, INLET)
{ alpha = 1;}
and then corrected the momentum equation.

Now, I need to extract the velocity in the flow direction to calculate the real pressure gradient increment. In channelOodles, the weightedAverage(mesh.V()) refered to all the volume.
I "just" need the volume defined by inlet and the offset defined in my directMappedPatch.
My problem is that in finiteVolume/lnInclude/directMappedFixedValueFvPatchField.C I can't find any way to get the size I want.

I hope someone has an idea ... please ?

Regards,

Cedric
cedric_duprat is offline   Reply With Quote

Old   January 22, 2008, 06:11
Default Since your mask function has v
  #18
Senior Member
 
Gavin Tabor
Join Date: Mar 2009
Posts: 181
Rep Power: 17
grtabor is on a distinguished road
Since your mask function has value 1.0, could you not calculate a weightedAverage of the mask function, then multiply that by the total volume of the mesh to get the volume of the inlet region (which I think is what you are asking for)?

Gavin
grtabor is offline   Reply With Quote

Old   January 22, 2008, 07:56
Default Thank you Gavin for the fast a
  #19
Senior Member
 
Cedric DUPRAT
Join Date: Mar 2009
Location: Nantes, France
Posts: 195
Rep Power: 17
cedric_duprat is on a distinguished road
Thank you Gavin for the fast answer.

It's excactly what I was asking for. I'll try your way which seems to be easier than what I was thinking about.

Cedric
cedric_duprat is offline   Reply With Quote

Old   January 22, 2008, 13:36
Default ... It's working, I get a volu
  #20
Senior Member
 
Cedric DUPRAT
Join Date: Mar 2009
Location: Nantes, France
Posts: 195
Rep Power: 17
cedric_duprat is on a distinguished road
... It's working, I get a volume which is different to the total volume.

I've got Vinlet = 0 :o)

Vinlet = toto.weightedAverage(mesh.V()).value()*sum(mesh.V( )).value()

I checked that the sum(mesh.V()).value() is correct.

and here is define my "toto" which is the mask function ... I hope here is also my mistake because I don't know where to look for it.


in createFields.H:
------------------
volScalarField toto
(
IOobject
(
"toto",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
mesh,
dimensionedScalar("toto",dimensionSet(0, 0, 0, 0, 0, 0, 0),0)
);


in oodles.C:
------------
label patchINLET = mesh.boundaryMesh().findPatchID("inlet");
toto.boundaryField()[patchINLET]=1.0;


I checked the Info<< toto which gives me 0 everywhere except for the inlet patch where it is 1.

Thank you for helping me, or giving me an idea ... again :o)

Regards,

Cedric
cedric_duprat 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
velocity inlet vs pressure inlet cheong FLUENT 6 April 9, 2011 04:07
subsonic inlet or supersonic inlet? mali CFX 0 November 28, 2008 21:57
about inlet bc ivanyao OpenFOAM Running, Solving & CFD 0 November 25, 2008 04:17
reversed flow at velocity inlet / mass flow inlet ib FLUENT 1 March 26, 2007 14:11
How to set smoke inlet speed on inlet Adam FLUENT 0 October 4, 2005 09:18


All times are GMT -4. The time now is 10:02.