CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Inlet BC for LES (https://www.cfd-online.com/Forums/openfoam-solving/58281-inlet-bc-les.html)

N. A. November 9, 2010 12:13

Hi Frnasje, Eugene and others,

Are there any guideline of selecting the offset plane value, for example how far from the inlet?

Thanks,
Nir

Fransje November 10, 2010 10:51

Hello Andrea,

The definition you show here, from your ./constant/polyMesh/boundary file, is fine to use with the nearestCell keyword.

If you want to use the nearestPatchFace keyword, you will have to specify a sample patch to the samplePatch switch, instead of none.

I also understand that there is a bug under investigation associated with the use of the nearestFace keyword.

Let me know if this solves your problem.

Kind regards,

Francois.

Quote:

Originally Posted by And (Post 282747)
Dear Francois,

thank you very much for your help.

Now I'm confident about the meaning of the offset value. Anyway, only the sample mode "nearestCell" seems working for my application. NEARESTFACE and NEARESTPATCHFACE model are not working. I'm not sure of what I'm doing wrong,

Regards

Andrea

Code:

inlet
{
        type                directMappedPatch;
        nFaces            1500;
        startFace          2486476;
        sampleMode      nearestCelll;
        sampleRegion    region0;
        samplePatch      none;
        offset              (0.081 0 0);
}



Fransje November 10, 2010 11:00

Yes, there are.

You might want to read the following papers:
  • Lund et al (1998):
    Generation of Turbulent Inflow Data for Spatially-Developing Boundary Layer Simulations
  • Keating, Piomelli et al (2004):
    A priori and a posteriori tests of inflow conditions for LES
  • Liu and Pletcher (2006):
    Inflow conditions for the large eddy simulation of turbulent boundary layers: A dynamic recycling procedure
  • Ferrante and Elghobashi (2004):
    A robust method for generating inflow conditions for direct simulations of spatially-developing turbulent boundary layers
And you might also want to consider the original papers by Spalart etal.

I hope this helps, and good luck.

Kind regards,

Francois.

Quote:

Originally Posted by N. A. (Post 282782)
Hi Fransje, Eugene and others,

Are there any guideline of selecting the offset plane value, for example how far from the inlet?

Thanks,
Nir


Fransje November 10, 2010 11:57

Update to the use of nearestFace
 
Update to the use of nearestFace

The bug related to the use of the nearestFace keyword has been fixed in the 1.7.x release.

If you are using the 1.7.x version of OpenFOAM, go to the ./OpenFOAM-1.7.x map, and enter:
Code:

git pull
to download the latest updates. Then recompile by using:
Code:

./Allwmake
Kind regards,

Francois.

And November 11, 2010 04:21

Dear Francois,

I'm very grateful to you for your support, it s all clear to me and my application is working now :D

Kind Regards,

Andrea


Quote:

Originally Posted by Fransje (Post 282961)
Update to the use of nearestFace

The bug related to the use of the nearestFace keyword has been fixed in the 1.7.x release.

If you are using the 1.7.x version of OpenFOAM, go to the ./OpenFOAM-1.7.x map, and enter:
Code:

git pull
to download the latest updates. Then recompile by using:
Code:

./Allwmake
Kind regards,

Francois.


yashar.afarin November 30, 2010 08:31

free planar jet
 
Hi

I am using pisofoam and I want to model a three dimentional free planar jet with large eddy simulation. the co-flow velocity in my case is weak compared to the jet centerline velcity resulting in a strong shear layer at the jet edge.

1- can I use direct map method for turbulet inlet generation?
2- does any body use priodic boundary condition in OF?

I really appreciate any help !!
sincerely yours

Fransje November 30, 2010 10:45

Dear Yashar,

Yes, you can use DirectMapped method for turbulent flow generation. That's what is was developed for. Whether you can apply it to your jet flow case is an other question.
Maybe you can get away with a random turbulent inlet, as your case is somewhat similar to a flow over a backward facing step, for which the quality of the initial turbulence if of less importance. You should refer to relevant literature over the influence of the quality of turbulent information at the inlet for different flow cases. Think of Lund etal 1998, Keating and Piomelli 2004, etc.

Yes, cyclic BC are used in OpenFOAM. Have a look at the channelFoam tutorial.

Kind regards,

Francois.

yashar.afarin November 30, 2010 11:01

Dear Francois,

I am really grateful for you guidance.
I will study those papres.

sincerely yours,

Yashar

panda60 January 10, 2011 03:19

Dear Fransje,
I use directMappedVelocityFlux to recycle the velocity field, but the flow field can not develop at all. After some steps, the velocity in the whole field is nearly zero.

I use "pisoFoam" solver, Smagorinsky SGS model.

I want to know how to make flow field develop using directMapped method ?

or directMapped method must be used for channelFoam ?

Thanks.

panda60 January 10, 2011 09:34

2 Attachment(s)
I run the "pitzDailyDirectMapped" tutorials. I initialize the flow field using Ux=10m/s. But after some time steps, the Ux value become very small.
I think the velocity was not recycled at all.
Anyone can help me ?

The left figure is initial data, the right is some time steps later.

Fransje January 11, 2011 08:24

Dear Jiang,

What is the boundary condition you are using? directMappedVelocityFlux, or directMapped(FixedValue)?

Kind regards,

Francois.

panda60 January 12, 2011 03:44

Dear Fransje,

I am sorry, I haven't explain clearly.
I run the case in the directory "tutorials/........./incompressible/les/pitzDirectMapped".
I have tried 3 kinds of inflow conditions:
1. directMapped (nearestCell).
2. directMapped (nearestFace).
3. directMappedVelocityFlux (nearestFace).

I use the solver "pisoFoam".The following is the detailed information.

panda60 January 12, 2011 03:53

2 Attachment(s)
1. directMapped (nearestCell).

U file:
boundaryField
{
inlet
{
type directMapped;
setAverage false;
average (10 0 0);
value uniform (10 0 0);
}

boundary file:
(
inlet
{
type directMappedPatch;
nFaces 30;
startFace 27238;
sampleMode nearestCell;
sampleRegion region0;
samplePatch none;
offset (0.05 0 0);
}

changeDictionaryDict file:
dictionaryReplacement
{
boundary
{
inlet
{
type directMappedPatch;
offset ( 0.05 0 0 );
sampleRegion region0;
sampleMode nearestCell;
samplePatch none;
}
}
}

the following is initial concours and 1000 time steps later

panda60 January 12, 2011 04:00

2 Attachment(s)
2. directMapped (nearestFace).
U file:
boundaryField
{
inlet
{
type directMapped;
setAverage false;
average (10 0 0);
value uniform (10 0 0);
}

boundary file:
inlet
{
type directMappedPatch;
nFaces 30;
startFace 27238;
sampleMode nearestFace;
sampleRegion region0;
samplePatch none;
offset (0.05 0 0);
}

changeDictionaryDict file:
dictionaryReplacement
{
boundary
{
inlet
{
type directMappedPatch;
offset ( 0.05 0 0 );
sampleRegion region0;
sampleMode nearestFace;
samplePatch none;
}
}
}

the following is initial concours and 1000 time steps later.

panda60 January 12, 2011 04:07

2 Attachment(s)
3. directMappedVelocityFlux (nearestFace).
U file:
boundaryField
{
inlet
{
type directMappedVelocityFlux;
value uniform (10 0 0);
phi phi;
}

boundary file:
type directMappedPatch;
nFaces 30;
startFace 27238;
sampleMode nearestFace;
sampleRegion region0;
samplePatch none;
offset (0.05 0 0);
}

changeDictionaryDict file:
dictionaryReplacement
{
boundary
{
inlet
{
type directMappedPatch;
offset ( 0.05 0 0 );
sampleRegion region0;
sampleMode nearestFace;
samplePatch none;
}
}
}
the following is initial concours and 1000 time steps later.

panda60 January 12, 2011 04:13

So I think the method "nearestCell" is correct, but the "nearestFace" method in new version 1.7.x is still wrong. I just updated to the version 1.7.x last month(2010.12.20).

Because only directMappedVelocityFlux can be used to modify to realise rescaling method, So the "nearestFace" is important for me. Could you give me some suggestions ? Thanks.

Fransje January 12, 2011 08:43

Dear Jiang,

To be honest, I find surprising that you get any results at all with the settings you gave me.
  1. Are you sure you didn't use previous velocity information as a starting condition for a new run? Like running a simulation, and using the last result as the starting time step of your new simulation.
    As a check, do you have internalField uniform (0 0 0) in every ./0/U file?
  1. Are you certain you did not specify setAverage=true in one of your U files?

Kind regards,

Francois.

panda60 January 12, 2011 09:35

  1. Are you sure you didn't use previous velocity information as a starting condition for a new run? Like running a simulation, and using the last result as the starting time step of your new simulation.
    As a check, do you have internalField uniform (0 0 0) in every ./0/U file?
Yes, I am sure. For these 3 cases, I use exactly the same initial field. The inital field was set using U=10m/s through "potentialFoam".
  1. Are you certain you did not specify setAverage=true in one of your U files?
As you see above, I didn't specify setAverage=true in U files. All my information are directly copied from my case files.

And the nearestCell method shows correct result, but nearestFace method shows wrong result. I wait for nearestFace nearly 1 year. But it is a pity, I can't pass the example in my computer even using new version 1.7.x. How about your case ? could you give me some information about your case ?
Thanks.

Fransje January 12, 2011 10:17

Dear Jiang,

I definitely cannot reproduce your results using the method you described. As I understand it, you applied the following steps to get your results:
  1. You took the ./run/tutorials/incompressible/pisoFoam/les/pitzDailyDirectMapped tutorial
  2. You ran blockMesh, and changeDictionary, with an offset of 0.05 instead of 0.0495, and nearestCell or nearestFace, as needed
  3. You changed, in the ./0/U file, the internalField information to internalField uniform (10 0 0); and the inlet information to setAverage false;
  4. You ran potentialFoam, after adding the necessary lines to ./system/fvScheme and ./system/fvSolution
  5. You ran pisoFoam for 1000 time steps with the standard pitzDailyDirectMapped settings
Did I miss any steps?

Kind regards,

Francois.

panda60 January 12, 2011 10:55

Dear Francois,

Yes, I did like this. Is there something which are not appropriate in my setting ?

Thanks.


All times are GMT -4. The time now is 00:25.