|
[Sponsors] |
May 10, 2012, 08:03 |
mapped boundary condition
|
#1 |
Senior Member
Samuele Z
Join Date: Oct 2009
Location: Mozzate - Co - Italy
Posts: 520
Rep Power: 19 |
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. |
|
May 14, 2012, 23:19 |
|
#2 |
Member
Martin
Join Date: Dec 2011
Location: Latvia
Posts: 54
Rep Power: 15 |
I'm actually also looking for some kind of tutorial/example. Any luck finding one?
Martin |
|
May 15, 2012, 03:45 |
|
#3 |
Senior Member
Samuele Z
Join Date: Oct 2009
Location: Mozzate - Co - Italy
Posts: 520
Rep Power: 19 |
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 |
|
May 21, 2012, 07:39 |
|
#4 |
Member
Martin
Join Date: Dec 2011
Location: Latvia
Posts: 54
Rep Power: 15 |
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 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; } Code:
patch1 { type mappedPatch; nFaces 3044; startFace 2260730; sampleMode nearestPatchFace; samplePatch patch1a; offsetMode uniform; offset (0 0 0); } Code:
patch1 { type fixedValue; value uniform (0 0 0); } Code:
patch1 { type mapped; value uniform (0 0 0); interpolationScheme cell; setAverage false; average (0 0 0); } 1) What is the meaning of 'offset'? Code:
offsetMode uniform; offset (0 0 0); Code:
setAverage false; average (0 0 0); Martin |
|
May 30, 2012, 07:36 |
|
#5 |
Senior Member
|
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.... |
|
July 14, 2016, 08:57 |
|
#6 | |
Member
Join Date: Apr 2016
Posts: 91
Rep Power: 10 |
Quote:
Thank you guys! |
||
February 10, 2019, 15:54 |
|
#7 |
Senior Member
Reviewer #2
Join Date: Jul 2015
Location: Knoxville, TN
Posts: 141
Rep Power: 11 |
Here is the code that associated with the setAverage
Code:
if (setAverage_) { Type averagePsi = gSum(this->patch().magSf()*newValues) /gSum(this->patch().magSf()); if (mag(averagePsi)/mag(average_) > 0.5) { newValues *= mag(average_)/mag(averagePsi); } else { newValues += (average_ - averagePsi); } } this->operator==(newValues); |
|
July 6, 2020, 19:57 |
|
#8 | |
Senior Member
Reviewer #2
Join Date: Jul 2015
Location: Knoxville, TN
Posts: 141
Rep Power: 11 |
Quote:
This statement is erroneous, my apology. If you are using the mapped BC as recycling BC for generating turbulence flow in LES, you need to rescale your velocity to keep the same mean bulk velocity. |
||
September 17, 2020, 10:47 |
|
#9 | |
New Member
Ran Yi
Join Date: May 2019
Posts: 9
Rep Power: 7 |
Quote:
Many thanks for your kind interpolation! Regards, Ran |
||
September 17, 2020, 10:51 |
|
#10 | |
Senior Member
Reviewer #2
Join Date: Jul 2015
Location: Knoxville, TN
Posts: 141
Rep Power: 11 |
Quote:
Correct. Also, make sure your recycling length is long enough to allow the turbulence statistics decorrelated. Thanks, Rdf |
||
September 17, 2020, 11:14 |
|
#11 |
New Member
Ran Yi
Join Date: May 2019
Posts: 9
Rep Power: 7 |
Hi Rdf,
I just ran a ring pipe with LES (smagorinsky model) with the recycling mapped method to generate a fully developed turbulence flow as the beginning at a chamber. The recycling length is set as 3*D_out, and the setAverage has been set as true. However, after about 10 flow through times, I found it is strange that the mean velocity profile near the chamber inlet plane (the offset position of the mapped flow inlet) is something like "laminar" profile rather than a more "flatter" one. If you have some experience with this, can you give me some hints? |
|
September 18, 2020, 10:39 |
|
#12 |
Senior Member
Reviewer #2
Join Date: Jul 2015
Location: Knoxville, TN
Posts: 141
Rep Power: 11 |
Ran,
What is your bulk inlet Reynolds number? Also, make sure your model has initialized with enough disturbance that can trigger the turbulence. If your inlet chamber is open channel, I will put the inlet recycling length at least 2pi*D. If you have everything above correct, then I believe is somewhere in your inlet boundary has problem. You may want to monitor the rescaling and mapped velocity to debug your model. As a side note, depends on your geometry, OpenFOAM may not be the best choice for LES if your model geometry is relatively simple. Thanks, Rdf |
|
November 10, 2021, 07:20 |
|
#13 |
New Member
Lorenzo
Join Date: Feb 2021
Posts: 3
Rep Power: 5 |
I am sorry, I am afraid I do not understand what is the value I had to specify if I am just mapping points from a place to another one? (it also seems to be mandatory otherwise it won't run)
|
|
November 10, 2021, 07:47 |
i have few doubts regrading the Two Phase Separator
|
#14 |
New Member
Akshay
Join Date: Jan 2020
Posts: 28
Rep Power: 6 |
Hello Everyone,
I am trying to simulate a two phase separator for water and oxygen, presently I have considered interfoam for this simulation. I am using OpenFOAM 8, the separator mesh which I am using is attached below. It has 6552 elements. I am a bit confused regarding whether the solver which I have considered serves the purpose or should I consider MultiphaseEulerFoam where I need to consider another set of equation for oxygen as well? There is one inlet and two outlets. Inlet: 2/3rd mass fraction of water and 1/3rd mass fraction of oxygen Outlet1 is for oxygen and outlet2 is for water. Other sides are considred as walls and the front and back in Z axis is considered empty. These are the boundary condition which I have considered /*--------------------------------*- C++ -*----------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Version: 8 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volVectorField; object U; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 1 -1 0 0 0 0]; internalField uniform (0 0 0); boundaryField { walls { type noSlip; } inlet { type flowRateInletVelocity; massFlowRate constant 0.6667; value uniform (0 0 0); } outlet1 { type pressureInletOutletVelocity; value uniform (0 0 0); inletValue uniform (0 0 0); } outlet2 { type pressureInletOutletVelocity; value uniform (0 0 0); inletValue uniform (0 0 0); } frontandback { type empty; } } // ************************************************** *********************** // /*--------------------------------*- C++ -*----------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Version: 8 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volVectorField; object U; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 1 -1 0 0 0 0]; internalField uniform (0 0 0); boundaryField { walls { type noSlip; } inlet { type flowRateInletVelocity; massFlowRate constant 0.6667; value uniform (0 0 0); } outlet1 { type pressureInletOutletVelocity; value uniform (0 0 0); inletValue uniform (0 0 0); } outlet2 { type pressureInletOutletVelocity; value uniform (0 0 0); inletValue uniform (0 0 0); } frontandback { type empty; } } // ************************************************** *********************** // /*--------------------------------*- C++ -*----------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Version: 8 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; object p_rgh; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [1 -1 -2 0 0 0 0]; internalField uniform 0; boundaryField { walls { type fixedFluxPressure; value $internalField; } inlet { type fixedFluxPressure; value $internalField; } outlet1 { type fixedValue; value $internalField; } outlet2 { type fixedValue; value $internalField; } frontandback { type empty; } } // ************************************************** *********************** // Please let me know if my boundary conditions are correct? |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Domain Imbalance | HMR | CFX | 5 | October 10, 2016 06:57 |
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 06:05 |
Setting outlet Pressure boundary condition using CAFFA code | Mukund Pondkule | Main CFD Forum | 0 | March 16, 2011 04:23 |
How to set boundary condition in Fluent for the fo | Peiyong | FLUENT | 1 | November 10, 2006 12:44 |