|
[Sponsors] |
How to make only some parameters pass trough internal face converted into a boundary |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
March 30, 2017, 14:21 |
How to make only some parameters pass trough internal face converted into a boundary
|
#1 |
New Member
Michal
Join Date: Jan 2017
Location: Trondheim, Norway
Posts: 9
Rep Power: 9 |
Hello
I am relatively new to openFoam. I am working on an anion exchange membrane. These are the steps of my simulation: 1. I create a mesh with blockMesh. The mesh consists of two boxes, one on top of the other one. The bottom box has inlet and outlet of a fluid. The upper one does not have any inlets or outlets. There is an internal face connecting the boxes. 2. I run topoSet to create faceZoneSet containing the mentioned internal face. 3. I run createBaffles -overwrite to convert the internal face into a boundary face. The idea is that there is a given concentration of dissolved species in the flow. They should diffuse into the upper box (which is the membrane). So, the problem is I want the concentration to go "trough" the face between the boxes but I do not want velocity to "go" there. Or in other words, velocity in the upper box should be zero. The equation that calculates the concentration has a diffusion and a convection part. So, if the velocity is zero, only the diffusion part will remain. I can set the type of the face between the boxes to "cyclic". But the problem is that all of the parameters will go trough. Is there a different patchField type I could use? In other words, how can I make certain parameters (pressure, concentration) go from one box to the other one, but different parameters (velocity) not to go trough? Or is there another way how to set velocity to zero in the upper box? I hope I explained my problem at least somewhat well. If not I can try to do it differently. Thanks for reading and help, Mizo |
|
March 30, 2017, 20:57 |
|
#2 |
Senior Member
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,761
Rep Power: 66 |
Get out of polymesh/boundary
boundary conditions are specified in the appropriate boundaryField dict of each variable in the time folder (U, p, T, etc.) To set zero velocity at the wall, go to the U dict, in boundary fields do a Code:
{ type fixedValue value (0 0 0) } http://www.openfoam.com/documentatio...conditions.php Try any of the coupled types. I'm not sure which one would work best for you, they all seem applicable. i.e. fixedJump or mappedField. |
|
March 31, 2017, 10:33 |
|
#3 | ||
New Member
Michal
Join Date: Jan 2017
Location: Trondheim, Norway
Posts: 9
Rep Power: 9 |
Thanks for the reply LuckyTran. I have tried different combinations of boundary field types but with no luck so far.
I have a question if I may. How should I define the boundary face I create from internal face with createBaffles? This is how I do it: Quote:
Quote:
My question is, how to define the patch type in createBafflesDict so I can let all the parametres pass trough the interface, but the velocity would not pass trough? For the velocity it should basically be a wall. Thanks again, Mizo Last edited by mizo; March 31, 2017 at 11:54. |
|||
April 4, 2017, 11:50 |
|
#4 |
New Member
Michal
Join Date: Jan 2017
Location: Trondheim, Norway
Posts: 9
Rep Power: 9 |
Hello,
sadly, I still have not resolved this issue. I tried many combinations but I am still getting errors with the patch type and patchField like I mentioned in my previous post. There is a great list of boundary conditions in the link LuckyTran provided ( http://www.openfoam.com/documentatio...conditions.php ) but I do not know what patch types and patchFields can be combined. I thought the patch types would be the header of each category (for example coupled) in the link and patchFields would be the items in that category (for example fixedJump) but it does not seem to work like that. Is there any way to see all the possible uses of patch types with patchFields? The only was I know how to let parameters of my simulation go trough the boundary that is inside my geometry is using patch type cyclic (in the createBaffles dictionary) and also patchField cyclic (in the 0/specific parameter dictionary). The problem is, when I use patch type cyclic, any other patchField other than cyclic does not work - I get the "inconsistent patch and patchField types" error. I have tried at least 20 from the list. I would be very thankful for any thoughts on how to overcome this problem. Thank you, mizo |
|
April 30, 2017, 13:15 |
|
#5 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Quick note: For future reference, the boundary conditions that start with "mapped" are the more commonly used alternative to "cyclic" when only a few conditions are meant to be passed between patches. The "chtMultiRegion*Foam" cases use this for passing patch data between regions.
In addition, mizo seems to have followed with this idea in the next two threads: |
|
|
|
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 |
[blockMesh] BlockMesh FOAM warning | gaottino | OpenFOAM Meshing & Mesh Conversion | 7 | July 19, 2010 15:11 |
[blockMesh] BlockMeshmergePatchPairs | hjasak | OpenFOAM Meshing & Mesh Conversion | 11 | August 15, 2008 08:36 |
Convective Heat Transfer - Heat Exchanger | Mark | CFX | 6 | November 15, 2004 16:55 |