|
[Sponsors] |
January 21, 2018, 12:40 |
Mapped Boundary Condition
|
#1 |
New Member
TSE Kwan Shu
Join Date: Sep 2016
Posts: 10
Rep Power: 10 |
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 |
|
January 29, 2018, 10:52 |
Get confused when I read the mappedFixedValueFvPatchField.H
|
#2 |
New Member
|
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... |
|
January 29, 2018, 23:06 |
|
#3 | |
New Member
Yuncheng Xu (Cloud)
Join Date: May 2011
Location: State College, PA
Posts: 20
Rep Power: 15 |
Quote:
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. |
||
January 29, 2018, 23:22 |
|
#4 | |
New Member
Yuncheng Xu (Cloud)
Join Date: May 2011
Location: State College, PA
Posts: 20
Rep Power: 15 |
Quote:
Look at the definition of the class, it has two mother classes... Code:
template<class Type> class mappedFixedValueFvPatchField : public fixedValueFvPatchField<Type>, public mappedPatchFieldBase<Type> { ... Code:
template<class Type> class mappedPatchFieldBase { protected: // Protected data //- Mapping engine const mappedPatchBase& mapper_; ... 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")); } |
||
June 1, 2018, 06:55 |
Come back to this offset
|
#5 | |
New Member
|
Quote:
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? |
||
|
|
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 |