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)

cedric_duprat January 23, 2008 03:52

Good morning, I'm sorry for
 
Good morning,

I'm sorry for disturbing during coffee break (in France, time is coming).
But I'm still a little bit confused.

In the articles I've read about LES on OpenFOAM, to get real turbulent inlet, we used to define a "mapping surface". I agree.
Here comes my first question, to be sure I didn't make any mistakes here, I think that it is defined in the constant/polymesh/boundary files in the inlet by changing the offset (if the inlet is directMappedPatch) isn't it ?

so, doing this, we get a periodic volume between inlet patch and the Mapping surface right ?

My mask function should be 1 in this volume and 0 elsewhere.

by writing these 2 lines I will never get the volume but only the cells which are in my patch "inlet":

label patchINLET = mesh.boundaryMesh().findPatchID("inlet");
toto.boundaryField()[patchINLET]=1.0;

So my question is is there a way to take all these cells and to impose "toto" of all these cell =1 (not only boundary patch)

Thank you again,

Regards,

Cedric

kanarya April 1, 2008 06:05

hi to all, I m a beginner i
 
hi to all,

I m a beginner in OpenFoam and I want to program fluctuations with tensor...
for example I want the following program to do with fluctuations.
magSqr(fvc::grad(U))+ sqr(gradU.component(tensor::YX) + gradU.component(tensor::XY))

does someone can help me?
best regards

kanarya April 1, 2008 07:27

hi to all, I m a beginner
 
hi to all,

I m a beginner in OpenFoam and I want to program fluctuations with
tensor...
for example I want the following program to do with fluctuations.
magSqr(fvc::grad(U))+ sqr(gradU.component(tensor::YX) +
gradU.component(tensor::XY))

does someone can help me?
best regards

wilko October 16, 2008 08:58

Hello, this is a question r
 
Hello,

this is a question regarding the DirectMappedFixedValue Boundary Patch.
I would like to use the patch for generating a nice developed flow as an inlet condition (LES).
Unfortunally I am working with the OpenFOAM Version 1.3. Is there a version of this b.c. for OF 1.3?
Trying to figure out the structure of this boundary condition brought me fast to the directMapped file that allows to transfer the needed inlet values to the boundary patch. This class is refering to PStream. I think, in this file, there are some big changes from 1.3 to 1.5. How deep are the changes going? Is it possible to include this boundary condition to 1.3?

Perhaps somebody can help me with an other idea to generate an inlet profile with a small number of cells as it can be done by this b.c. I belive that a pipelength of 4d (2d for recirculation and 2d to take into account the interaction with the pipe exit) should be enough.

Thank you so fare

Wilko

cedric_duprat November 6, 2008 08:32

Hi, I'm working on Klein i
 
Hi,

I'm working on Klein inflow condition which is an effective algebraic Methods. It is used to target the statistics of turbulence by performing operation on them.
Now, I'm implementing it directly on a LES solver.

I've to define the Cholesky decomposotion "aij" of the Reynolds stress tensor. The expression of aij is not so hard to implement but, while compiling, I still have a error:

error: no matching function for call to âFoam::dimensioned<foam::tensor<double> >::dimensioned(const char [5], Foam::dimensionSet)â
/home/users/duprat/OpenFOAM/OpenFOAM-1.4.1/src/OpenFOAM/lnInclude/dimensionedTyp e.C:95: note: candidates are: ...


I create aij as a volTensorField:
volTensorField aij
(
IOobject
(
"aij",
runTime.constant(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
mesh,
dimensionedTensor("null",dimensionSet(0, 1, -1, 0, 0, 0, 0))
);

And in these last lines is the mistake.

Then, I write :

aij[cellI] = (....)

where cellI is the mesh at the inlet patch


Can someone give me a hint to solve this problem ?

I'll use this tensor every time step but it is constant in time that's why it is defined in constant directory

Thank you for helping,

Cedric

PS: aij tensor is not a symetric tensor and I need it only in the inlet patch

cedric_duprat November 6, 2008 09:12

I got it dimensionedTenso
 
I got it

dimensionedTensor("null",dimensionSet(0, 1, -1, 0, 0, 0, 0))
should be
dimensionedTensor("null",dimensionSet(0, 1, -1, 0, 0, 0, 0),tensor::zero)
..... initial value, everything is there !!

I hope I can give to the community this solver but .... I've still some work to do :-)

Cedric

braennstroem November 24, 2008 02:23

Hi, for the implementation
 
Hi,

for the implementation of a synthetic inlet of L. Davidson one needs random numbers with the probability distribution of p(phi)=1/2*Pi with 0<=phi<=2*Pi.

Does anyone know, how to achieve this? So far I know of:
Random perturbation(1234567);
scalar phi_n=phiValues.GaussNormal();

Would be nice, if you can give me a hint!
Fabian

niklas November 24, 2008 02:37

have you tried this? some p
 
have you tried this?

some pdf's can be found in thermophysicalModels

Random rndGen(0);

autoPtr<pdf> phiPDF
(
pdf::New
(
<dictionary>
rndGen
)
);

scalar phi = phiPDF->sample();

the pdf is defined in the the <dictionary> of which you can find examples in sprayProperties where I use them.

N

braennstroem November 26, 2008 04:19

Hi Niklas, thansk for the h
 
Hi Niklas,

thansk for the hint!

Fabian

kumar October 5, 2009 07:56

Hello Cedric
I am working on the break up study of liquid sheets. I am using lesInterfoam for this purpose. I am looking into start working on the implementation of Kleins initial conditions for turbulence. I saw your post and thought as you have already worked on it you could give me some hints on how to start along with it or just explain me the steps you followed to implement it in the lessolver.

Any help is appreciated.

bye
with regards
K.Suresh kumar

panda60 January 29, 2010 09:58

1 Attachment(s)
Quote:

Originally Posted by eugene (Post 205489)
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


Dear eugene,
It seems that OpenFOAM only can simply map the internal value back to inlet. If I want to use mapping position value multiply an function and then feed back to inlet, is it possible to realise ?

< > is time-averaged value,
is boundary layer thickness
recy is mapping plane position

eugene February 2, 2010 04:50

I see no reason why modifying the mapped value should not be possible. In fact several people have already done this. Try to contact Gavin Tabor at Exeter Uni. I think he has some code for this. (I do not unfortunately.)

panda60 February 9, 2010 09:19

Dear all,

It seems that pitzDailyDirectMapped case can't be run in version-1.6.

When I run, I have the following mistakes:

patch type 'patch' not type 'directMappedPatchBase'
for patch inlet of field U in file "/home/panda60/OpenFOAM/run/tutorials/incompressible/pisoFoam/les/pitzDailyDirectMapped/0/U"

From function directMappedFixedValueFvPatchField<Type>::directMa ppedFixedValueFvPatchField
(
const fvPatch& p,
const DimensionedField<Type, volMesh>& iF,
const dictionary& dict
)

in file fields/fvPatchFields/derived/directMappedFixedValue/directMappedFixedValueFvPatchField.C at line 109.

FOAM exiting

who knows how to use DirectMapped condition crectly ?
Thank you very much.

deji April 23, 2010 17:51

Inflow boundary question
 
hey there foamers. i have been using openfoam for about 6months now, and have a question. if anyone can assist please do so, it would be greatly appreciated. i am trying to implement the turbulentinlet boundary for my simulation, but i am not able to find any documentation on how the following quantities are chosen. can anyone explain to me? :confused:

boundaryField
{
inlet
{
type turbulentInlet;
referenceField uniform (10 0 0);
fluctuationScale (0.02 0.01 0.01);
value uniform (10 0 0);

Fransje August 31, 2010 10:38

Quote:

Originally Posted by panda60 (Post 245490)
Dear all,

It seems that pitzDailyDirectMapped case can't be run in version-1.6.

When I run, I have the following mistakes:

patch type 'patch' not type 'directMappedPatchBase'
for patch inlet of field U in file "/home/panda60/OpenFOAM/run/tutorials/incompressible/pisoFoam/les/pitzDailyDirectMapped/0/U"

From function directMappedFixedValueFvPatchField<Type>::directMa ppedFixedValueFvPatchField
(
const fvPatch& p,
const DimensionedField<Type, volMesh>& iF,
const dictionary& dict
)

in file fields/fvPatchFields/derived/directMappedFixedValue/directMappedFixedValueFvPatchField.C at line 109.

FOAM exiting

who knows how to use DirectMapped condition crectly ?
Thank you very much.

You should take the followings steps when trying to run the pitzDailyDirectMapped test case:
1. blockMesh
2. changeDictionary
3. pisoFoam.

This should do the trick.

Regards,

Francois.

Fransje August 31, 2010 14:20

Quote:

Originally Posted by deji (Post 256138)
hey there foamers. i have been using openfoam for about 6months now, and have a question. if anyone can assist please do so, it would be greatly appreciated. i am trying to implement the turbulentinlet boundary for my simulation, but i am not able to find any documentation on how the following quantities are chosen. can anyone explain to me? :confused:

boundaryField
{
inlet
{
type turbulentInlet;
referenceField uniform (10 0 0);
fluctuationScale (0.02 0.01 0.01);
value uniform (10 0 0);

You might want to look at example 3.2 in the Programmer's guide. In the guide they detail the implementation of a turbulent flow over a backward-facing step.

Regards,

Francois.

janara September 7, 2010 05:06

Inlet velocity Profile
 
Hi,

I am using parabolic inlet velocity profile (solved analytically) for shear-driven multiphase flow using InterFoam solver. I could observe numerical diffusion due to the analytical velocity profile which is imposed at inlet.
Please do let me know how to get interpolated discretized velocity profile from internal field on to inlet boundary.

Thanks,
Jagannath

And September 9, 2010 04:27

directMapped boundary conditions
 
Good morning to the OpenFOAM community!

I would like to use the directMapped method in the LES of the pitzDaily3D testcase without. In order to do that after having previously read the suggestions contained in the former threads, I'have followed these steps:

  • Download the pitzDailyDirectMapped testcase,
  • Modify the 0/U file in the following way

Code:


..........

boundaryField
{
    inlet
    {
        type            directMapped;
        value          uniform (13.3 0 0);
        setAverage      true;
        average        (13.3 0 0);
    }

...........

  • Enlarge the channel lenght of four inlet heights (Eugene de Villiers Ph.D. Thesis) changing the blockMeshDict

[CODE]
  • Execute blockMesh
  • Modify the file boundary in this way:
Code:


    inlet
    {
        type            directMappedPatch;
        nFaces          600;
        startFace      715675;
        sampleMode      nearestCell;
        sampleRegion    region0;
        samplePatch    none;
        offset          (0.081 0 0);
    }

Thus if I understand the meaning of the offset plane keyword, the mapping plane to sample the flow velocity is placed 0.081 unit downstream from the first domain point. Is this right ?

Anyway I'm not sure to know the correct meaning of the keyword sampleMode contained in the dictionary. Could someone give any further information about the sampleMode nearestCell keywords ?

Regards,

Andrea Aprovitola

Fransje November 8, 2010 10:54

Hello Andrea,

A little late, but better late than never!

To answer your questions:
  • The offset value: The value specified is the vector at which the sampling plane should be taken, with respect to the reference plane (in your case, the reference plane is inlet).
  • For sampleMode, you have a few options available, namely
    1. NEARESTFACE
    1. NEARESTCELL
    1. NEARESTPATCHFACE
    The naming of these options is a straightforward description of how they work, namely that openfoam searches for the nearest cell, face, or patchface to the offset vector specified.

I hope this helps!

Kind regards,

Francois.

And November 9, 2010 08:35

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);


Quote:

Originally Posted by Fransje (Post 282633)
Hello Andrea,

A little late, but better late than never!

To answer your questions:
  • The offset value: The value specified is the vector at which the sampling plane should be taken, with respect to the reference plane (in your case, the reference plane is inlet).
  • For sampleMode, you have a few options available, namely
    1. NEARESTFACE
    1. NEARESTCELL
    1. NEARESTPATCHFACE
    The naming of these options is a straightforward description of how they work, namely that openfoam searches for the nearest cell, face, or patchface to the offset vector specified.

I hope this helps!

Kind regards,

Francois.



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