|
[Sponsors] |
December 28, 2016, 13:04 |
Custom boundary by face
|
#1 |
New Member
---
Join Date: Jan 2013
Posts: 17
Rep Power: 13 |
Hi you all,
I'm trying to use openfoam as an interconnect for different processes and I'm interested on defining a boundary by face. I mean, I have the list of faces of a boundary but I would like to specify the value of the outlet flow of this boundary by face (I have mapped one model to the other so I know what it belongs to what). Is it possible? Thanks in advance! |
|
December 29, 2016, 09:05 |
|
#2 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52 |
If you are talking about boundary faces, you can use codedFixedValue.
Sent from my HTC One mini using CFD Online Forum mobile app
__________________
Keep foaming, Tobias Holzmann |
|
January 15, 2017, 09:18 |
|
#3 | |
New Member
---
Join Date: Jan 2013
Posts: 17
Rep Power: 13 |
Quote:
thanks! The thing is imagine I have a patch which is inlet and I want to have an alpha phase plus non-alpha phase on this face. I would like to create a region which is taking the same inlet speed of the whole patch but to be alpha inlet, and the rest non-alpha inlet. Is like the example provided before but with alpha and non-alpha inlet on the same boundary face, is it possible? Thanks again! |
||
January 15, 2017, 10:01 |
|
#4 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52 |
Of course it is possible. There for you just have to get the face values of alpha and code (based on alpha) you inlet profile. Finally you can do whatever you would like to do.
__________________
Keep foaming, Tobias Holzmann |
|
January 15, 2017, 13:19 |
|
#5 |
New Member
---
Join Date: Jan 2013
Posts: 17
Rep Power: 13 |
Hey Tobi, thanks! I found out how to it, I was taking the code literally without thinking very much, what I did is on alpha.water (in my case).
redirectType basically is the name of the class I'm creating in my case "alphainRectangle" and as per proof of concept I'm taking the same strategy to set new values on a rectangle (in my case in a y-region inside the patch) and then modify the boundary according to what i need. inlet { type codedFixedValue; value uniform 0; redirectType alphainRectangle; code #{ const fvPatch& boundaryPatch = patch(); const vectorField& Cf = boundaryPatch.Cf(); scalarField& field = *this; scalar min = 0.00065; scalar max = 0.0008; forAll(Cf, faceI) { if ( (Cf[faceI].x() > min) && (Cf[faceI].x() < max) ) { field[faceI] = 1; } } #}; } Thanks again tobi! I hope it'll help someone! |
|
Tags |
boundary, custom, face, mapping |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Error - Solar absorber - Solar Thermal Radiation | MichaelK | CFX | 12 | September 1, 2016 06:15 |
Radiation interface | hinca | CFX | 15 | January 26, 2014 18:11 |
Question about heat transfer coefficient setting for CFX | Anna Tian | CFX | 1 | June 16, 2013 07:28 |
[blockMesh] non-orthogonal faces and incorrect orientation? | nennbs | OpenFOAM Meshing & Mesh Conversion | 7 | April 17, 2013 06:42 |
[blockMesh] BlockMeshmergePatchPairs | hjasak | OpenFOAM Meshing & Mesh Conversion | 11 | August 15, 2008 08:36 |