CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Pre-Processing

simple problem with internal faces Boundary condition

Register Blogs Community New Posts Updated Threads Search

Like Tree11Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 8, 2010, 14:20
Default simple problem with internal faces Boundary condition
  #1
Member
 
Mohammad.R.Shetab
Join Date: Jul 2010
Posts: 49
Rep Power: 16
mrshb4 is on a distinguished road
Hi everyone!!!!
I am new with openfoam.I have studied about almost all boundary conditions in openfoam but I haven't seen any B.B. for internal(interior) faces.I mean faces with no special condition and just between two region of fluids.How should I describe their boundary condition in boundary Dictionary and folder 0.
To be more clear I give a simple example.it is a solid cylinder inside a 2D channel.I could use just one part mesh but to test B.C. for internal face I used two regions of mesh.what is the boundary condition for that internal face?!




can anyone help?!!!
thank you
mizzou and ms.hashempour like this.
mrshb4 is offline   Reply With Quote

Old   August 9, 2010, 12:09
Default
  #2
New Member
 
Robert Langner
Join Date: Dec 2009
Location: Freiburg, Germany
Posts: 27
Rep Power: 17
Robat is on a distinguished road
Hi Mohammad,

I don't think a patch is suitable to describe a movable (and even splitable) fluid interface.
Following your explanation, the solver "interFoam" (laminar) or "lesInterFoam" should be a good way. It's a two fluid approach so you can define the different fluid properties as well.
InterFoam calculates the interface from the volume fraction of the two fluids, which is given by the additional field value "gamma" (or alpha since OF1.6) for each cell.
The status you illustrated in your picture you can set up easily as an "internal Field" in the 0/alpha file with the aid of the "setFieldsDict".
The "damBreak" tutorial should give you a good basement for your case and even shows how the setFieldsDict works.


Bests,
Robert
mizzou likes this.
Robat is offline   Reply With Quote

Old   August 9, 2010, 18:50
Default .....
  #3
Member
 
Mohammad.R.Shetab
Join Date: Jul 2010
Posts: 49
Rep Power: 16
mrshb4 is on a distinguished road
Dear Robert
thanks for your reply and your useful guidance.but first I want to be sure if my problem is completely clear to you.my original problem is a fan that is much more complicated than this example but to understand the way defining internal faces,I made this example.
the internal boundary is not between two different fluids.It is just between two kind of Meshes.so I've found a way to describe this kind of internal faces by means of stitchMesh.you know any better way!?

thank you again
Mohammad
mrshb4 is offline   Reply With Quote

Old   August 10, 2010, 14:48
Default
  #4
Senior Member
 
Ben K
Join Date: Feb 2010
Location: Ottawa, Canada
Posts: 140
Rep Power: 19
benk is on a distinguished road
For internal faces, check our chtMultiRegionFoam or conjugateHeatFoam.

conjugateHeatFoam is only available in 1.5-dev.
benk is offline   Reply With Quote

Old   August 12, 2010, 03:08
Default
  #5
Senior Member
 
Arne Stahlmann
Join Date: Nov 2009
Location: Hanover, Germany
Posts: 209
Rep Power: 18
Arnoldinho is on a distinguished road
Mohammad,

why do you need an internal boundary? You can put a mesh with different resolutions and types (I guess that is what you want to do) together, without defining an internal boundary.
But I'm not familiar with how this is working in blockMesh, if you are using this, as I'm using Salome instead. What kind of mesh are you using, structured or unstructured?

Arne

Last edited by Arnoldinho; August 12, 2010 at 03:25.
Arnoldinho is offline   Reply With Quote

Old   August 12, 2010, 04:31
Default solved!!!!
  #6
Member
 
Mohammad.R.Shetab
Join Date: Jul 2010
Posts: 49
Rep Power: 16
mrshb4 is on a distinguished road
Dear Arne
My problem has been solved!!!!
It was easy and I wonder why I couldn't anywhere read about it!!!!
you know my fan(main problem that I want to model) is much complicated than this model.so I cant use diffrent mesh resolution for that!!!I just have to mesh different parts and then with internal faces gather them together.
but it is solved!!!!it is easy.
you should just mesh two volumes separately in gambit(any type of mesh you want),but it is essential that one and just one face should be between 2 volumes, and then when you want to mention boundaries and their types in gambit, dont even choose this internal face. openfoam automatically name it default-patch and finally set it interior face and not a boundary.

anyway
thank youfor your reply

Mohammad
mrshb4 is offline   Reply With Quote

Old   August 22, 2010, 02:30
Default
  #7
Senior Member
 
Nilesh Rane
Join Date: Apr 2010
Posts: 122
Rep Power: 16
nileshjrane is on a distinguished road
Hello Mohammad,

Just to get the idea cleared, i suppose the internal face u r talking about is the boundary face between the non-conformal meshes i.e. meshes who dont have same distribution on either sides of the particular face right??? And you just want the fluid flow through the face and no special boundary condition as such, am i right??? So that Openfoam will just interpolate the values from one mesh nodes to the other one.

Actually i also was wondering whether this is possible in openfoam using the mesh of blockMesh.
__________________
Imagination is more important than knowledge..
nileshjrane is offline   Reply With Quote

Old   August 22, 2010, 18:37
Default yeah!!
  #8
Member
 
Mohammad.R.Shetab
Join Date: Jul 2010
Posts: 49
Rep Power: 16
mrshb4 is on a distinguished road
yeah!!! you're right
and the solution was what I had posted in previous post.
I use gambit for making my meshes and not blockMesh.
I had to not to define that internal face in Gambit as a boundary, and it must be just one face between two volumes of course.I mean it must be a part of two volumes.

anyway
thank you
Mohammad reza
Arslan Arshad likes this.
mrshb4 is offline   Reply With Quote

Old   August 23, 2010, 03:34
Default
  #9
Senior Member
 
Arne Stahlmann
Join Date: Nov 2009
Location: Hanover, Germany
Posts: 209
Rep Power: 18
Arnoldinho is on a distinguished road
Mohammed, you should then be careful when sticking two different meshes together. If the nodes of your meshes are not at the same positions in both meshes, this might result in artificial high velocities at the interface due to the interpolation in OpenFoam.
Arnoldinho is offline   Reply With Quote

Old   August 23, 2010, 05:03
Default
  #10
Senior Member
 
Bernhard Linseisen
Join Date: May 2010
Location: Heilbronn
Posts: 183
Blog Entries: 1
Rep Power: 16
Linse is on a distinguished road
Quote:
Originally Posted by Arnoldinho View Post
If the nodes of your meshes are not at the same positions in both meshes, this might result in artificial high velocities at the interface due to the interpolation in OpenFoam.
Thank you for the suggestion!
Just right now I am doing preliminary simulations that include such a block-change...

For those working with blockMesh only: It seems even simpler than in Gambit! Just do not give a specific patch-type to the internal face. Though it seems the meshes are calculated separately (I did not look into that too sharply), flow like normal definitely does take place through that internal face.

Nevertheless, what I experienced (just doing a confirmatory simulation, waiting for results) : Even if the nodes of the meshes at the boundary are perfectly identical, different size of the mesh cells in the other dimension seems to really influence the simulation result!
Linse is offline   Reply With Quote

Old   August 23, 2010, 07:16
Default
  #11
Senior Member
 
Nilesh Rane
Join Date: Apr 2010
Posts: 122
Rep Power: 16
nileshjrane is on a distinguished road
Hello friends,

I guess if the face has same number of nodes its not a non-conformal mesh.

And i dont understand, why should the fact that the nodes are not matching on the face affect the solution so critically. I mean, as far as i know, the values just need to be interpolated from one node mapping (from one side of the internal face) to another (on the other side of the face). Its suppose to be a simple interpolation calculation e.g. weighted average of values of surrounding nodes of the 2nd node map from the 1st node mapping.

Please correct me if i am way to wrong.
__________________
Imagination is more important than knowledge..
nileshjrane is offline   Reply With Quote

Old   December 20, 2010, 08:31
Default
  #12
Member
 
Claudio
Join Date: Mar 2010
Posts: 57
Rep Power: 16
claco is on a distinguished road
Quote:
Originally Posted by mrshb4 View Post
Dear Arne
My problem has been solved!!!!
It was easy and I wonder why I couldn't anywhere read about it!!!!
you know my fan(main problem that I want to model) is much complicated than this model.so I cant use diffrent mesh resolution for that!!!I just have to mesh different parts and then with internal faces gather them together.
but it is solved!!!!it is easy.
you should just mesh two volumes separately in gambit(any type of mesh you want),but it is essential that one and just one face should be between 2 volumes, and then when you want to mention boundaries and their types in gambit, dont even choose this internal face. openfoam automatically name it default-patch and finally set it interior face and not a boundary.

anyway
thank youfor your reply

Mohammad

Dear Sir,

You said that OF automatically name it patch into the boundary file. However, once the patch appears into the boundary file, one has to define for it the proper boundary conditions in p, U T, etc., files. My question is, is there an "interior" (which simulates a "neutral" patch) boundary condition implemented in OF?
Thank You very much,

Claudio Comis
granzer likes this.
claco is offline   Reply With Quote

Old   December 20, 2010, 12:19
Default neutral patch
  #13
Member
 
Mohammad.R.Shetab
Join Date: Jul 2010
Posts: 49
Rep Power: 16
mrshb4 is on a distinguished road
Dear Claudio,

When I said that OF convert internal face into patch, I didn't mean that it must be defined in boundary conditions. Look at this example:

I have a mesh in gambit with one face (and just one face) between 2 volumes and I won't define them as boundaries in gambit. Then bring them in .msh format and use fluentMeshToFoam command to convert that to OF type. In this conversion, OF automatically set that face into a default patch that you should have not define it in /polyMesh/boundary and 0 folder. It is a NEUTRAL interior, and that's it. Just test it.


( If it is 2 faces between 2 volumes it won't be internal face anymore, and you have 2 choices: 1- define both faces in gambit as boundaries that your case would work properly BUT with that BC that is not internal face anymore ( you should define it in /boundary in OF too). 2- not to define them in gambit as boundaries ( and so it won't come to OF boundaries too) that your case would not give you answer properly.)

Hope this helps
Mohammadreza
mrshb4 is offline   Reply With Quote

Old   June 26, 2014, 19:18
Default
  #14
New Member
 
Jue Wang
Join Date: Apr 2014
Posts: 23
Rep Power: 12
Joe Wang is on a distinguished road
Hi, Mohammad,
I'm a beginner in OF. I faced the same problem in defining internal faces BC. It sounds you have solved the problem by not defining internal faces as boundaries, right? Did you solve the problem with blockMesh? Four years has passed, I'm not sure whether you could kindly paste your blockMeshDict for reference.
Thanks a lot.

Joe
Joe Wang is offline   Reply With Quote

Old   June 28, 2014, 10:19
Default
  #15
Senior Member
 
Nima Samkhaniani
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,267
Blog Entries: 1
Rep Power: 25
nimasam is on a distinguished road
Dear Jue
1- do you have separated region ? then u can give the idea from chtMultiRegion tutorials
2- if you have connected region you can define a baffle

would you please define your problem much specifically ?
__________________
My Personal Website (http://nimasamkhaniani.ir/)
Telegram channel (https://t.me/cfd_foam)
nimasam is offline   Reply With Quote

Old   June 28, 2014, 12:45
Default
  #16
New Member
 
Jue Wang
Join Date: Apr 2014
Posts: 23
Rep Power: 12
Joe Wang is on a distinguished road
Hi Nima,
Thanks for your quick reply.
I fixed some problems but the new problem is that one master patch has dozens of different slave patches, like walls and baffles. I may divide the master patch into pieces but it needs too much work. Can I connect the master patch with those slave patches simultaneously? Does it work with "mergePatchPairs"? Thank you.

Joe

Quote:
Originally Posted by nimasam View Post
Dear Jue
1- do you have separated region ? then u can give the idea from chtMultiRegion tutorials
2- if you have connected region you can define a baffle

would you please define your problem much specifically ?
Joe Wang is offline   Reply With Quote

Old   June 29, 2014, 02:49
Default
  #17
Senior Member
 
Nima Samkhaniani
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,267
Blog Entries: 1
Rep Power: 25
nimasam is on a distinguished road
yes, it works, just u should define all your slave faces as one patch name, because you can use mergePatchPairs once
__________________
My Personal Website (http://nimasamkhaniani.ir/)
Telegram channel (https://t.me/cfd_foam)
nimasam is offline   Reply With Quote

Old   April 22, 2015, 04:12
Default
  #18
New Member
 
zahra
Join Date: Jun 2014
Location: Iran-Tehran
Posts: 28
Rep Power: 12
zahraa is on a distinguished road
Hi every body
I am new to openfoam and I have a case with three region, one solid phase and 2 fluid phases. I have used Chtmultiregionfoam as a solver, the boundary between 2 fluids which are two different gases is internal, I have 4 polymesh folders in my case, three for 3 parts( one solid and 2 fluids) and one polymesh folder for total mesh of structure. I have made all meshes in Gambit. Now please help me with:
1)which kind of boundary condition I should use for this internal boundary in gambit and openfoam in each polymesh/boundary folder?
2) which kind of boundary condition I should use in 0/p, 0/u or in 0/T for this internal boundary?
zahraa is offline   Reply With Quote

Old   April 22, 2015, 05:16
Default internal interfaces
  #19
Senior Member
 
Bernhard Linseisen
Join Date: May 2010
Location: Heilbronn
Posts: 183
Blog Entries: 1
Rep Power: 16
Linse is on a distinguished road
Dear Zahra,

for chtMRF basically it is the same principle as for the cases above:
If you have fluid flowing through this internal interface, it should not be split into different regions but remain one flow region. Even if you combine different parts during meshing, these internal interfaces should not be defined as boundaries.
If in contrast you are thinking of two regions of immiscible fluids, just let splitMeshRegions do its magic and set the wall conditions.
If you are trying to use different flow settings in the two different fluid regions and there is supposed to be full communication between them: I have worked on some interfaces for such a case some time ago, but that work is not yet finished - although I plan to revive it during May and June. To my knowledge, so far there is no such interconnection-condition in the official release yet.

But if you just want to define e.g. two different temperatures for the fluid "regions" I suggest not taking the way of defining different regions but using the setSet- or topoSet-functionality. Definition of the cellsets should be working similar to the region-setting, but you will not have to partition the mesh for the different fluid zones. As an example for what I mean you could look at the damBreak-tutorial, I think there it is put up in a way easy to follow.

Cheers,
Bernhard

Edit: If you want to consider multiphase flow within chtMultiRegionFoam I am quite certain you would have to do some programming in the solver...
luiscardona and granzer like this.
Linse is offline   Reply With Quote

Old   April 22, 2015, 05:46
Default
  #20
New Member
 
zahra
Join Date: Jun 2014
Location: Iran-Tehran
Posts: 28
Rep Power: 12
zahraa is on a distinguished road
Thank you bernhard
In fact I have only one kind of gas in my model, it is air. I have a channel which half part of it, is porous. In porous media we have the same fluid but with different governing equation ( researchers model porous media as a fluid but with different governing equation). Air can pass through the line between porous zone and the other half of the channel. Now I am confused, what I should do?!!
Zahra
zahraa is offline   Reply With Quote

Reply


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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Wind turbine simulation Saturn CFX 60 July 17, 2024 06:45
Foam::error::PrintStack almir OpenFOAM Running, Solving & CFD 92 May 21, 2024 08:56
Outflow boundary condition in cartesian grid SIMPLE velocity-pressure coupling ghobold Main CFD Forum 9 September 19, 2015 03:50
Compressor Simulation using rhoPimpleDyMFoam Jetfire OpenFOAM Running, Solving & CFD 107 December 9, 2014 14:38
[Gmsh] Import problem ARC OpenFOAM Meshing & Mesh Conversion 0 February 27, 2010 11:56


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