CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM

mapped boundary condition

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree4Likes
  • 3 Post By latvietis
  • 1 Post By Linse

Reply
 
LinkBack Thread Tools Display Modes
Old   May 10, 2012, 07:03
Default mapped boundary condition
  #1
Senior Member
 
Samuele Z
Join Date: Oct 2009
Location: Mozzate - Co - Italy
Posts: 490
Rep Power: 9
samiam1000 is on a distinguished road
Dear Foamers,

what about the mapped BC? How can I set them? Where can I find an example? Do you think they are good for fixing the patch where I do have 2 different fluid regions?

Thanks a lot,
Samuele.
samiam1000 is offline   Reply With Quote

Old   May 14, 2012, 22:19
Default
  #2
Member
 
Martin
Join Date: Dec 2011
Location: Latvia
Posts: 54
Rep Power: 5
latvietis is on a distinguished road
I'm actually also looking for some kind of tutorial/example. Any luck finding one?

Martin
latvietis is offline   Reply With Quote

Old   May 15, 2012, 02:45
Default
  #3
Senior Member
 
Samuele Z
Join Date: Oct 2009
Location: Mozzate - Co - Italy
Posts: 490
Rep Power: 9
samiam1000 is on a distinguished road
Hi Martin,

if you agree we can collaborate in order to get something useful.

Please, write me an email and we'll discuss the problem (if you want, of course): samuele.zampini@gmail.com

Have a good day,
Samuele
samiam1000 is offline   Reply With Quote

Old   May 21, 2012, 06:39
Default
  #4
Member
 
Martin
Join Date: Dec 2011
Location: Latvia
Posts: 54
Rep Power: 5
latvietis is on a distinguished road
Greetings!

I actually found solution to my problem. Maybe this will give some hint where to start looking.

Firstly, I did search in OpenFOAM tutorials and

Code:
openfoam210/tutorials/incompressible/pisoFoam/les/pitzDailyMapped
was my starting point.

Then read .H file, that gives some basic knowladge http://foam.sourceforge.net/docs/cpp/a05692_source.htmlAlso, did a little search in forums and in the end I came up with revelation that it isn't that difficult. So, what worked for me was that I had to edit only 2 files - boundary and field file.

I opened "constant/polyMesh/bounadry"

Code:
    
patch1
    {
        type            patch;
        nFaces          3044;
        startFace       2260730;
    }
and edited it to

Code:
    patch1
    {
        type            mappedPatch;
        nFaces          3044;
        startFace       2260730;
        sampleMode      nearestPatchFace;
        samplePatch     patch1a;
        offsetMode      uniform;
        offset          (0 0 0);
    }
then went to "0/field_I_want_to_map"

Code:
    patch1
    {
        type                fixedValue;
        value               uniform (0 0 0);
    }
and edited to

Code:
    patch1
    {
        type                mapped;
        value               uniform (0 0 0);
        interpolationScheme cell;
        setAverage          false;
        average             (0 0 0);
    }
and it worked. At least I believe it did. I still have questions to all Foamers out there since there are things I want to understand to be sure about the result I achieved.

1) What is the meaning of 'offset'?

Code:
        offsetMode      uniform;
        offset          (0 0 0);
2) What is the meaning of 'averaging' something?

Code:
        setAverage          false;
        average             (0 0 0);
Yours,
Martin
sina.s, Alhasan and rajibroy like this.
latvietis is offline   Reply With Quote

Old   May 30, 2012, 06:36
Default
  #5
Senior Member
 
Bernhard Linseisen
Join Date: May 2010
Location: Magdeburg/Geneva
Posts: 178
Blog Entries: 1
Rep Power: 7
Linse is on a distinguished road
Concerning the "offset":
If I am not totally mistaken on this, "offset" gives the distance from the actual boundary where the mapping get's its data.
So if there is boundary A set with an offset of 0.001 it will get the value to map from B in a distance of 0.001 from A. If you set offset to -0.5, A will get the value from C 0.5 upstream of A.

C----(0.5)-------A-(0.001)-B

In case I am wrong on that, please anybody correct me!

For the average thing I do have many speculations, but nothing I would write in here....
rajibroy likes this.
Linse is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can anyone give me some hint on how to make traction free boundary condition? poplar OpenFOAM 3 January 14, 2015 03:37
Boundary Conditions Thomas P. Abraham Main CFD Forum 20 July 7, 2013 05:05
Setting outlet Pressure boundary condition using CAFFA code Mukund Pondkule Main CFD Forum 0 March 16, 2011 04:23
Domain Imbalance HMR CFX 3 March 6, 2011 21:10
How to set boundary condition in Fluent for the fo Peiyong FLUENT 1 November 10, 2006 12:44


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