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/)
-   -   Using outlet values as inlet BC (https://www.cfd-online.com/Forums/openfoam-solving/84760-using-outlet-values-inlet-bc.html)

bephi February 8, 2011 06:37

Using outlet values as inlet BC
 
Hello everybody,

my question is whether there is a possibility in OpenFOAM to use values from a calculation in a simple geometry as boundary conditions at the inlet of a complex geometry.

In my case, I need a fully developed velocity profile as a inlet boundary condition so at first I want to develop this profile in a straight pipe and use the outlet values.

Unfortunately I have no idea how to put them on the inlet of the other mesh!
With regards!
Philipp

fcortes February 8, 2011 06:56

I don't know if that can be done, but perhaps you could use groovyBC approximate the profile of your simple geometry solution…. Just an idea
Best regards,
Francisco.

bephi February 8, 2011 07:05

Hello Francisco,
thank you for the quick reply! I thought of using groovyBC but the formula that I have to calculate the velocity is just for a circle. Unfortunately my inlet is not a perfect circle.
Maybe there is a way to map the values but I have no idea how to realize this...

Does someone else has an idea how to get the velocity profile at the inlet of the complex geometry?

MartinB February 8, 2011 07:16

Hi Philipp,

to use a fully developed velocity profile on the inlet have a look at the directMapped boundary condition. You must define the BC in your 0/U file, as well as in the constant/polyMesh/boundary file. Here are some snippets:

Code:

0/U    File:
    inlet
    {
        //type            fixedValue;
        //value          uniform (0 0 0.063111);
        type            directMapped;
        value          uniform (0 0 0.063111);
        setAverage      true;
        average        (0 0 0.063111);
    }

Code:

constant/polyMesh/boundary file:
    inlet
    {
        type            directMappedPatch;
        nFaces          342; // <--- your values untouched here
        startFace      2804297;  // <--- your values untouched here
        sampleMode      nearestCell;
        sampleRegion    region0;
        samplePatch    none;
        offset          ( 0 0 0.01 );
    }

Another way as you suggest in your first post would be: use the mapFields tool and define in system/mapFieldsDict:
Code:

patchMap        ( outlet_from_one_simulation inlet_from_other_simulation );
(The last one might be the other way round, too, don't remember right now...).

Martin

maddalena February 8, 2011 07:38

Quote:

Originally Posted by bephi (Post 294177)
my question is whether there is a possibility in OpenFOAM to use values from a calculation in a simple geometry as boundary conditions at the inlet of a complex geometry.

I have done it using the timeVaryingMappedFixedValue on U.
Search in the forum for it, there should be something about it (this is what I get: http://www.cfd-online.com/Forums/ope...tml#post245855)

mad

bephi February 8, 2011 09:01

Thank you all so much for your help!

@Martin:
Both suggestions seem to be a good idea! In the following days I try to realize those.
One important question is the following: How can I make sure that the mesh at the outlet (simple geometry) knows the mesh at the inlet (complex geometry). Does it have to be the same mesh with the same coordinates? Or can I map outletvalues to "every" inlet independent from cell number and coordinates?

@mad:
I will search for timeVaryingMappedFixedValue! But is it possible to achieve a velocity profile that is dependent on time and space or just a fixed value for U at different time steps (block profile).

MartinB February 8, 2011 09:33

Quote:

How can I make sure that the mesh at the outlet (simple geometry) knows the mesh at the inlet (complex geometry). Does it have to be the same mesh with the same coordinates? Or can I map outletvalues to "every" inlet independent from cell number and coordinates?
The outlet of the simple geometry must be at the same position in space as the inlet of the complex geometry. However, it's not necessary that the meshes are the same (have the same coordinates for the cells). The values will be interpolated, if the meshes are different.

Martin


All times are GMT -4. The time now is 05:31.