|
[Sponsors] |
January 29, 2019, 08:28 |
mapFields - outlet to inlet BC
|
#1 |
Senior Member
Guilherme
Join Date: Apr 2017
Posts: 245
Rep Power: 10 |
Hi,
I'm trying to map the velocity profile that has developed into a geometry (channel - cyclic domain) for inlet of a new geometry (backward facing step) and I'm having difficulties. I added the mapFieldsDict file with the following configuration: Code:
patchMap (cyclic inlet); Code:
mapFields ../Folder that will yield the velocity profile/ -sourceTime latestTime There is a mapping of the whole domain and not just the inlet as I would like, not to mention that it is not location in the inlet of the new geometry. The simulation is in RANS and therefore the channel domain is small (cyclic). |
|
January 29, 2019, 10:26 |
|
#2 |
Member
mahdi
Join Date: Nov 2015
Location: Paris, France
Posts: 32
Rep Power: 10 |
Hello
Just one idea, export the velocity profile in the boundary that you want (for example in Paraview) then using printPatchFaces (I compiled it in OpenFOAM 4.1 and it worked) to export mesh data in the inlet of new geometry and finally, do the interpolation (in Matlab for example) to have correct value in each mesh Hope it helps you |
|
January 30, 2019, 14:50 |
|
#3 |
Senior Member
Guilherme
Join Date: Apr 2017
Posts: 245
Rep Power: 10 |
Hi,
Could you explain in more detail how you did it? I tried it today, but I lost it to exhaustion... I could not succeed and I think it's something simple to do, even using mapFields. |
|
January 31, 2019, 10:36 |
|
#4 | |
Member
mahdi
Join Date: Nov 2015
Location: Paris, France
Posts: 32
Rep Power: 10 |
Quote:
This is a method I have used a few years ago on OpenFOAM 2.3 to implement some experimental data as an inlet in my simulation. Let me explain step by step: 1) Export the velocity profile you need from the outlet of the last simulation. You can do it in Paraview for example and it is easy to do. 2) Compile printPatchFaces code (in attached) on your OpenFOAM and run it in new case directory (Don't forget to modify the exist Boundary name in printPatchFaces.C file. By default its "inlet"). This will extract the cell centers in the inlet of new geometry which you would like to impose the new data. 3) To find the exact value in each cell, now you have to do interpolation (on Matlab or octave) between the velocity profile (U,x) and new mesh cell centers. Finally, you can use these results as new BC for the new case. Let me know if you have any further questions. Hope it helps you Good luck |
||
January 31, 2019, 11:30 |
|
#5 |
Senior Member
Guilherme
Join Date: Apr 2017
Posts: 245
Rep Power: 10 |
Hello,
Thanks for your response. 1) In step one I used the sampleDict tool to pick up the velocity field in the center of the cells. Check. 2) I did what you recommended, I compiled the file in OpenFOAM 5.0 and I used the tool in both my two geometries (...the one that will export the velocity profile "OLD" and the one that will receive this velocity profile "NEW"). I attached a print below for the effect of curiosity. DETAIL: They have the same center, and consequently would not require interpolation of the values (I think not) because the input of one is equal to another and consequently I used the same number of divisions. Pay attention to the values of Y. Check. 3) What I have to do now? I do not know what to do with the information. How do I tell OpenFOAM the value in the center of these cells? Would you have an example?! OBS: It's a 2D geometry, I just extract the Ux values, will I have problems with that? Best. |
|
January 31, 2019, 11:33 |
|
#6 |
Senior Member
Guilherme
Join Date: Apr 2017
Posts: 245
Rep Power: 10 |
I forgot the print...
|
|
Tags |
mapfields, mapfieldsdict, openfoam 5.0 |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
MapFields help (inlet, outlet) | iostam | OpenFOAM Running, Solving & CFD | 5 | February 21, 2021 05:34 |
outlet pressure Boundary settings -velocity streamline under ambient temp.conditions | Vishnu_bharathi | CFX | 12 | November 21, 2017 07:56 |
pump outlet pressure higher than inlet pressure | jstan3 | FLUENT | 14 | February 14, 2014 00:44 |
Inlet and Outlet b.c. based on mass flux | Hale | OpenFOAM Pre-Processing | 2 | August 9, 2013 03:26 |
ATTENTION! Reliability problems in CFX 5.7 | Joseph | CFX | 14 | April 20, 2010 16:45 |