CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Pre-Processing (https://www.cfd-online.com/Forums/openfoam-pre-processing/)
-   -   simple problem with internal faces Boundary condition (https://www.cfd-online.com/Forums/openfoam-pre-processing/78972-simple-problem-internal-faces-boundary-condition.html)

 mrshb4 August 8, 2010 13:20

simple problem with internal faces Boundary condition

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?!

http://sphotos.ak.fbcdn.net/hphotos-..._6709822_n.jpg

can anyone help?!!!
thank you

 Robat August 9, 2010 11:09

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

 mrshb4 August 9, 2010 17:50

.....

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

 benk August 10, 2010 13:48

For internal faces, check our chtMultiRegionFoam or conjugateHeatFoam.

conjugateHeatFoam is only available in 1.5-dev.

 Arnoldinho August 12, 2010 02:08

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

 mrshb4 August 12, 2010 03:31

solved!!!!

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

 nileshjrane August 22, 2010 01:30

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.

 mrshb4 August 22, 2010 17:37

yeah!!

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

 Arnoldinho August 23, 2010 02:34

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.

 Linse August 23, 2010 04:03

Quote:
 Originally Posted by Arnoldinho (Post 272319) 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!

 nileshjrane August 23, 2010 06:16

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.:confused:

 claco December 20, 2010 08:31

Quote:
 Originally Posted by mrshb4 (Post 271230) 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

 mrshb4 December 20, 2010 12:19

neutral patch

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

 Joe Wang June 26, 2014 18:18

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

 nimasam June 28, 2014 09:19

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

 Joe Wang June 28, 2014 11:45

Hi Nima,
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 (Post 499074) 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 ?

 nimasam June 29, 2014 01:49

yes, it works, just u should define all your slave faces as one patch name, because you can use mergePatchPairs once

 zahraa April 22, 2015 03:12

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?

 Linse April 22, 2015 04:16

internal interfaces

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...

 zahraa April 22, 2015 04:46

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

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