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

Mapped Boundary Condition

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By luther1990

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 21, 2018, 12:40
Default Mapped Boundary Condition
  #1
New Member
 
TSE Kwan Shu
Join Date: Sep 2016
Posts: 10
Rep Power: 10
louistse is on a distinguished road
I would like to use the "mapped boundary condition" as the recycling method to specify inlet boundary condition for LES simulation, so that the field U and k on a certain plane downstream of the inlet is mapped back to the inlet for the next time step.
I read through the thread
mapped boundary condition
and the code guide
https://www.openfoam.com/documentati...e.html#details

Does anyone know what do the following choices mean:

- nearestCell : sample cell containing point
- nearestOnlyCell : nearest sample cell (even if not containing point)
- nearestPatchFace : nearest face on selected patch
- nearestPatchFaceAMI : nearest face on selected patch
A.patches need not conform
B. uses AMI interpolation
- nearestFace : nearest boundary face on any patch
- nearestPatchPoint : nearest patch point (for coupled points this might be any of the points so you have to guarantee the point data is synchronised beforehand)

Thanks
louistse is offline   Reply With Quote

Old   January 29, 2018, 10:52
Default Get confused when I read the mappedFixedValueFvPatchField.H
  #2
New Member
 
Join Date: Aug 2016
Posts: 16
Blog Entries: 68
Rep Power: 10
kindle is on a distinguished road
I'm also interested in this BC. I'm doing a Turbulent mixing in a TJunction and what I'm imposing now for "U" at the entry is a mean profile (from turbulent pipe flow) with random fluctuation at the very same patch. What I want to achieve is a re-scaling and re-cycling : taking values of "U" from downstream and rescale (because the BL develops).

But when I read the mappedFixedValueFvPatchField.H which is the very class of type "mapped" in tutorials/incompressible/pisoFoam/les/pitzDailyMapped/

Description
Recycles the value at a set of cells or patch faces back to *this. Can not
sample internal faces (since volField not defined on faces).

And in the class definition there is even no keyword "offset" which appeared in pitzDailyMapped/constant/polyMesh/blockMeshDict.

I'm trying to figure out what this BC do too...
kindle is offline   Reply With Quote

Old   January 29, 2018, 23:06
Default
  #3
New Member
 
Yuncheng Xu (Cloud)
Join Date: May 2011
Location: State College, PA
Posts: 20
Rep Power: 15
luther1990 is on a distinguished road
Quote:
Originally Posted by louistse View Post
I would like to use the "mapped boundary condition" as the recycling method to specify inlet boundary condition for LES simulation, so that the field U and k on a certain plane downstream of the inlet is mapped back to the inlet for the next time step.
I read through the thread
mapped boundary condition
and the code guide
https://www.openfoam.com/documentati...e.html#details

Does anyone know what do the following choices mean:

- nearestCell : sample cell containing point
- nearestOnlyCell : nearest sample cell (even if not containing point)
- nearestPatchFace : nearest face on selected patch
- nearestPatchFaceAMI : nearest face on selected patch
A.patches need not conform
B. uses AMI interpolation
- nearestFace : nearest boundary face on any patch
- nearestPatchPoint : nearest patch point (for coupled points this might be any of the points so you have to guarantee the point data is synchronised beforehand)

Thanks
It is a base class.

First, you need to figure out what are the definitions of cell, patch, face, and point. And you also need to know how OpenFOAM stores values.

Second, you need to know the available mapped BCs in OpenFOAM, such as cyclic, cyclicAMI, mappedFlowRate, mappedVelocityFluxFixedValue.

Then, you should know what they mean.

Check this
https://www.openfoam.com/documentati...conditions.php

It may be more helpful to you.
luther1990 is offline   Reply With Quote

Old   January 29, 2018, 23:22
Default
  #4
New Member
 
Yuncheng Xu (Cloud)
Join Date: May 2011
Location: State College, PA
Posts: 20
Rep Power: 15
luther1990 is on a distinguished road
Quote:
Originally Posted by kindle View Post
I'm also interested in this BC. I'm doing a Turbulent mixing in a TJunction and what I'm imposing now for "U" at the entry is a mean profile (from turbulent pipe flow) with random fluctuation at the very same patch. What I want to achieve is a re-scaling and re-cycling : taking values of "U" from downstream and rescale (because the BL develops).

But when I read the mappedFixedValueFvPatchField.H which is the very class of type "mapped" in tutorials/incompressible/pisoFoam/les/pitzDailyMapped/

Description
Recycles the value at a set of cells or patch faces back to *this. Can not
sample internal faces (since volField not defined on faces).

And in the class definition there is even no keyword "offset" which appeared in pitzDailyMapped/constant/polyMesh/blockMeshDict.

I'm trying to figure out what this BC do too...
Are you using an older version? anyway. I am also working on some older versions...

Look at the definition of the class, it has two mother classes...
Code:
template<class Type>
class mappedFixedValueFvPatchField
:
    public fixedValueFvPatchField<Type>,
    public mappedPatchFieldBase<Type>
{
...
In the class head file of mappedPatchFieldBase, you will find
Code:
template<class Type>
class mappedPatchFieldBase
{

protected:

    // Protected data

        //- Mapping engine
        const mappedPatchBase& mapper_;
...
Yes! Mapping engine!!

Goto the C file of mappedPatchBase... look at the construction part... You will find "offset".

Code:
    else if (dict.found("offset"))
    {
        offsetMode_ = UNIFORM;
        offset_ = point(dict.lookup("offset"));
    }
OK. "offset" means the distance (a vector) between the selected patch (mapping target) and the sampling plane (mapping source).
luoyang likes this.
luther1990 is offline   Reply With Quote

Old   June 1, 2018, 06:55
Default Come back to this offset
  #5
New Member
 
Join Date: Aug 2016
Posts: 16
Blog Entries: 68
Rep Power: 10
kindle is on a distinguished road
Quote:
Originally Posted by luther1990 View Post
Are you using an older version? anyway. I am also working on some older versions...

Look at the definition of the class, it has two mother classes...
Code:
template<class Type>
class mappedFixedValueFvPatchField
:
    public fixedValueFvPatchField<Type>,
    public mappedPatchFieldBase<Type>
{
...
In the class head file of mappedPatchFieldBase, you will find
Code:
template<class Type>
class mappedPatchFieldBase
{

protected:

    // Protected data

        //- Mapping engine
        const mappedPatchBase& mapper_;
...
Yes! Mapping engine!!

Goto the C file of mappedPatchBase... look at the construction part... You will find "offset".

Code:
    else if (dict.found("offset"))
    {
        offsetMode_ = UNIFORM;
        offset_ = point(dict.lookup("offset"));
    }
OK. "offset" means the distance (a vector) between the selected patch (mapping target) and the sampling plane (mapping source).
Thank you for your explanation ! I was working on the periodic pipe and now come back for this mapped BC. Here is what I have known from my history of this "offset" :

I set up the channel395 to a laminar and only x-periodic case. Then I run simu. I get sampled data for this periodic simu (or precursor simu) by using sample utility.

For sampling : I have tried two type "patch" and "patchInternalField" with a little offset "0.01" and a big offset "0.5".

The results are :
"patch sampling" gives "points" file of size 750 as well as "patchInternalField offset=0.01", whereas "patchInternalField offset=0.5" gives the "right" 806 points.

What Do I mean by "right" ? I set up now my main simu based on TimeVaryingMappedFixedValue on U at the inlet and U zeroGradient at outlet.
p zeroGradient at inlet and fixed uniform 0 at outlet. When running main simu only the "806 points" passes.

So I take this "patchInternalField offset=0.5" result and re-run simu with sampling surface only that this time I focus on "whether what I'm mapping is close to what I'm obtaining". So I sample both "patch" and "patchInternalField offset=0.5". To be precise : I compare constant/boundaryData and postProcessing/blabla.

I compare for time=1 two List<vector> actually to see where TimeVaryingMappedFixedValue is imposing my entryData from precusor simu. And "I think" it maps the data to the "offset=0.5 position rather than the inlet patch" !! I try to set the "offset" to be "-0.5" inside my BC for U (YES, here's the "offset") hoping to get the map right... Well. when I compare mag(U_constantBoundaryData - U), I found out still the sampled data at offset position +0.5 is closer to what I impose.

My question is here :
1. Is it a problem of my comparison ?
2. It's curious that TimeVaryingMappedFixedValue takes "points" of precursor and map to the exact same place...(I may be wrong) Intuitively values should be mapped to the very BC where we typed it as TimeVaryingMappedFixedValue, no?
kindle is offline   Reply With Quote

Old   June 1, 2018, 09:23
Default
  #6
New Member
 
Join Date: Aug 2016
Posts: 16
Blog Entries: 68
Rep Power: 10
kindle is on a distinguished road
By they way I'm using mostly OF-2.3.x
kindle 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
Radiation in semi-transparent media with surface-to-surface model? mpeppels CFX 11 August 22, 2019 08:30
OpenFoam mapped boundary condition Eman. OpenFOAM 5 January 19, 2019 07:10
My radial inflow turbine Abo Anas CFX 27 May 11, 2018 02:44
Centrifugal fan-reverse flow in outlet lesds to a mass in flow field xiexing CFX 3 March 29, 2017 11:00
Question about heat transfer coefficient setting for CFX Anna Tian CFX 1 June 16, 2013 07:28


All times are GMT -4. The time now is 01:37.