CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   How do you handle multiple blocks? (https://www.cfd-online.com/Forums/openfoam/88554-how-do-you-handle-multiple-blocks.html)

murrdpirate May 19, 2011 21:32

How do you handle multiple blocks?
 
I'm trying to create a room with an inlet (i.e. diffuser) and outlet, so I broke the room up into 7 blocks as you can see in this image: http://imgur.com/JzgmP

I believe I successfully made patches on all the boundaries, but my problem appears to be that the block faces in the interior are not being treated correctly. I thought I could just leave them as empty, but apparently you can only do that with 2D meshes. Any help would be greatly appreciated.

Bernhard May 20, 2011 01:46

There are no true 2D meshes in OpenFOAM. Do the grids match on the opposite sides of a internal edge?

murrdpirate May 20, 2011 02:03

Right, if I recall from the user's guide, a 2D problem is basically faked by assigning "empty" patches to the block faces in the third dimension. I thought that I could apply this to my interior faces, but I get an error saying I can't because my geometry is 3 dimensional.

I'm not sure what you mean in your second question. I'm able to run blockMesh at least, but I can run the solution. Not sure if that answers your question.

Maybe I'm going about this the wrong way? I just want a box with a small inlet and outlet. I tried doing that with one big block and multiple patches, but that didn't seem to work either.

Thanks for the response.

Bernhard May 20, 2011 02:15

You cannot use empty patch in three dimensions. Because a 2D mesh is treated as a 3D mesh with only one cell in the third direction, that why you take these patches to be empty, because there is nothing to calculate.

You don't have to name the internal faces. All interior faces that you do not name in a patch, are automatically treated as a internal face. All boundary faces get collected in the patch defaultWalls or something. In blockMesh you can leave the patches subdictionary empty, and then check your mesh. If everything is OK, you can continue naming the boundary faces as wall or patch, but not as empty!

murrdpirate May 20, 2011 09:56

I could have sworn that's what I did in my first attempt, and that it kept automatically placing the unpatched block faces into default, empty patches. But I must have been doing something else wrong, because what you say definitely makes sense.

I'm at work at the moment, but I'll give it another shot asap. Thank you very much for your help!

murrdpirate May 20, 2011 14:25

Your first instinct was correct; the meshes were not matching on both sides of all the interior faces. I finally seem to have it working now.

I think that because the meshes didn't match, the program was trying to get me to apply some boundary conditions to them. Or maybe not...I'm really not sure. Either way, thanks again for the help. This is my first non-tutorial case and I felt like I was on my last leg.


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