CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Running, Solving & CFD

How to make only some parameters pass trough internal face converted into a boundary

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   March 30, 2017, 13:21
Question 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: 2
mizo is on a distinguished road
Sponsored Links
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
mizo is offline   Reply With Quote
Sponsored Links

Old   March 30, 2017, 19:57
Default
  #2
Senior Member
 
Lucky Tran
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 1,854
Rep Power: 26
LuckyTran will become famous soon enoughLuckyTran will become famous soon enough
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)
}
Then for the others,
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.
LuckyTran is offline   Reply With Quote

Old   March 31, 2017, 09:33
Default
  #3
New Member
 
Michal
Join Date: Jan 2017
Location: Trondheim, Norway
Posts: 9
Rep Power: 2
mizo is on a distinguished road
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:
baffles
{
baffleFaces
{
type faceZone;
zoneName middlePart;

patches
{
master
{
name neviem0;
type cyclic;
neighbourPatch neviem1;
}

slave
{
name neviem1;
type cyclic;
neighbourPatch neviem0;
}
But there are multiple possibilities. The patch type can be coupled, patch or cyclic. These are the three I have tried. Then, I specify the boundary for each paramerer like you mentioned with velocity. The problem is, not every patch type I specify in createBafflesDictionary works with every patchField type . For example, if I specify the patch type to be cyclic in the createBafflesDict, then fixedValue does not work for the velocity. I get this error:
Quote:
--> FOAM FATAL IO ERROR:
inconsistent patch and patchField types for
patch type cyclic and patchField type fixedValue
All the other fields work as intended as cyclic, they go trough. I have also tried the types you suggested but with no luck. I can only let all the parameters go trough or none of them.

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 10:54.
mizo is offline   Reply With Quote

Old   April 4, 2017, 10:50
Default
  #4
New Member
 
Michal
Join Date: Jan 2017
Location: Trondheim, Norway
Posts: 9
Rep Power: 2
mizo is on a distinguished road
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
mizo is offline   Reply With Quote

Old   April 30, 2017, 12:15
Default
  #5
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 9,978
Blog Entries: 39
Rep Power: 108
wyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of light
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:
wyldckat is offline   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Error - Solar absorber - Solar Thermal Radiation MichaelK CFX 12 September 1, 2016 05:15
Radiation interface hinca CFX 15 January 26, 2014 18:11
BlockMesh FOAM warning gaottino OpenFOAM Native Meshers: blockMesh 7 July 19, 2010 14:11
BlockMeshmergePatchPairs hjasak OpenFOAM Native Meshers: blockMesh 11 August 15, 2008 07:36
Convective Heat Transfer - Heat Exchanger Mark CFX 6 November 15, 2004 16:55

Sponsored Links


All times are GMT -4. The time now is 12:12.