CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Meshing & Mesh Conversion (https://www.cfd-online.com/Forums/openfoam-meshing/)
-   -   [blockMesh] Zero-thickness internal elements in blockMesh (https://www.cfd-online.com/Forums/openfoam-meshing/100354-zero-thickness-internal-elements-blockmesh.html)

Claudio April 24, 2012 10:52

Zero-thickness internal elements in blockMesh
 
2 Attachment(s)
I realized I posted in the wrong thread, but I also seem not to be able to find how to delete my own post.

Hi,

I'm trying to create a "simple" 2D geometry: it's a rectangular tank which has 4 internal members that are attached to the tank only at one end. Three of them look like shelves on the right wall and one is a vertical partition that goes only half the height up from the bottom of the tank. The number of cell in the B dimension is 1, hence the 2D case.

I made these internal members zero-thickness, but it seems I either did not define well the patches, or blockMesh does not like zero-thickness internal members.

Anybody know which one is it?

I'm attaching a pic of the geometry and the blockMeshDict

lovecraft22 April 24, 2012 18:19

I'm not sure 100% but I don't think you can do that… theoretically speaking you would end up with a single node that would belong to two faces of a wall surface… Don't think it's possible but let's wait anyway for someone with more experience than me…

Toorop April 26, 2012 06:49

Hi,

a while back I had the same problem and found this solution. Basically, you name your touching domains in the blockMeshDict, and extract the adjacent faces with some topoSet commands. Finally, you make these faces internal with createBaffles.

Good luck!

vonboett June 28, 2012 07:57

Thanks Toorop, I used your topoSet / createBaffles workaround to build a model of a 4m diameter rotating drum for rheometer measurements of debris material that included 2 cm raisers, and it works fine. I think it is always a good strategy to provide beginners with all posibilities using simple meshing methods like blockMesh, especially since snappyHexMesh is not so easy to fully understand.

Claudio August 9, 2012 17:18

1 Attachment(s)
Quote:

Originally Posted by Toorop (Post 357161)
Hi,

a while back I had the same problem and found this solution. Basically, you name your touching domains in the blockMeshDict, and extract the adjacent faces with some topoSet commands. Finally, you make these faces internal with createBaffles.

Good luck!

Hi Toorop,

I tried to follow your example and got to the point of creating the faceZoneSets for each of the three horizontal buffers (BTW the example I am uploading is similar, but not the same as above).
How can I modify your createBaffles command so that all three of the faceZoneSets are part of the same patch (HorzMembers in my case)?

THanks,
Claudio

Toorop August 22, 2012 05:12

Hi Cladio,

Sorry for the delayed response.

The Allrun script that you provided had a typo at the line with m4.
Should be something like this:
Code:

m4 constant/polyMesh/blockMeshDict.m4 > constant/polyMesh/blockMeshDict
The next problem I encountered is that the blockMesh file has some strange entries at the blocks:
Code:

blocks
(
    hex (0 8 9 1 24 32 33 25) HrzM1 (4 7 1) simpleGrading (1 1 1)
    hex (1 9 11 3 25 33 35 27) HrzM2 (4 9 1) simpleGrading (1 1 1)
    hex (3 11 13 5 27 35 37 29) HrzM3 (4 9 1) simpleGrading (1 1 1)
    hex (5 13 14 6 29 37 38 30) HrzM4 (4 14 1) simpleGrading (1 1 1)
    hex (6 14 15 7 30 38 39 31) HrzM5 (4 ND4 1) simpleGrading (1 1 1)
    hex (8 16 17 9 32 40 41 33) (64 7 1) simpleGrading (1 1 1)
    hex (9 17 19 11 33 41 43 35) (64 9 1) simpleGrading (1 1 1)
    hex (11 19 21 13 35 43 45 37) (64 9 1) simpleGrading (1 1 1)
    hex (13 21 22 14 37 45 46 38) (64 14 1) simpleGrading (1 1 1)
    hex (14 22 23 15 38 46 47 39) (64 ND4 1) simpleGrading (1 1 1)
);

I would suggest a step-by-step approach if you're into uncharted territory. So fix the blockMeshDict and try the createBaffles in a not so complicated case first. Then merge the best of both! :)

Good luck!

Claudio August 22, 2012 11:44

Thanks Tibor.

Sorry about the typos. ND4 in blockMeshDict just needs to be defined at the top of blockMeshDict.m4, where ND1, ND2, ND3 are defined.

I did use your method to change just one internal face to a wall, and got it to work, but now I need to be able to do it for multiple walls and have them be a part of the same patch.

Any suggestions for that?

Claudio

Toorop August 23, 2012 04:14

2 Attachment(s)
Hi Claudio,

I have attached the cavity example tutorial with baffles and other minor modifications (to get a nice look). This time I made the cellSets with topoSet so I didn't have to bother with the blockMeshDict file. Hopefully, you can find it useful!

hfs November 13, 2012 12:01

3 Attachment(s)
Thank you Toorop for sharing your case..

Can I use topoSet to create 2 patches from one 0 thickness STL; such that one patch is facing upside and the other is facing downside?

More details about what I want is in this thread
http://www.cfd-online.com/Forums/ope...tml#post391904

Thank you for your feedback,,,

vbchris November 21, 2012 21:29

This maybe a bit off path buy I just finished a mesh with internal walls.
I found the easiest was was to define the internal face points twice. Use the original points for once face, and the duplicate points for the other face on the 0 thickness wall.

aujamal20 March 23, 2013 09:29

Hello OFs

I am facing a problem regarding defining an internal patch within fluid domain such that internal patch behave as a patch and I am interested to calculate mass flow through that patch.

Right now I can use topoSet to define the faceSet/faceZone of that patch and using createBaffles utility patch could be created and I did that. But I dont know exaclty how to use createBaffle to create internal patch because when i create patch that also becomes a boundary patch. And this scenario lead to another situation by defining BC on that patch.
So what I want to do is to create an intern patch and to use that patch to measure mass flow and temperature of fluid passing through that patch, for that I use funtions in controlDict like
Quote:

functions
{
patchMassFlow
{
type patchExpression;
region "fluid";

accumulations (
sum
);
patches (
patchName
);
expression "phi";
//after 5;
verbose true;
}

patchAverage
{
type patchExpression;
region "fluid";

accumulations (
average
);
patches (
patchName
);
expression "T";
//after 5;
verbose true;
}
}
Secondly is it possible to define groovyBC on that internal patch to control flow rate.
Suggestions and recommondations will be highly appreciated.
Thanks

Claudio April 29, 2013 14:52

Thank you
 
Hi Tibor,

sorry for the very long delay on the thank you and on the reply.
Another project came in with higher priority and this one got put aside, so I forgot to keep checking this thread.
Now I'm back working on it.

I downloaded your solution and will study it. I'm sure I will have some question, and I hope you'll still be able and willing to help.

Cheers.

Quote:

Originally Posted by Toorop (Post 378279)
Hi Claudio,

I have attached the cavity example tutorial with baffles and other minor modifications (to get a nice look). This time I made the cellSets with topoSet so I didn't have to bother with the blockMeshDict file. Hopefully, you can find it useful!


Claudio April 30, 2013 15:07

HI,

I thought about doing that, but then I read page U-132 of the OF 2.1.0 Manual, where it says "the point list cannot contain two different points at an exactly identical position nor any point that is not part of at least one face".
This seem to imply you can't do what you did, but you did it so...

In any case I solved my problem for now using the method Tibor suggested.

C.

Quote:

Originally Posted by vbchris (Post 393565)
This maybe a bit off path buy I just finished a mesh with internal walls.
I found the easiest was was to define the internal face points twice. Use the original points for once face, and the duplicate points for the other face on the 0 thickness wall.


Claudio June 7, 2013 12:39

Internal walls solution
 
1 Attachment(s)
Hi,

so I was able to take what Tibor posted and make a few changes to adapt it better to my case.
I'm attacking the cases of an oscillating 2D tank with internal baffles.

I do not use the "box" command in topoSetDict to make a cellSet, but instead create different cellSets directly in the grid. This is because I found that if the position where I want the internal walls does not coincide with a cell face, the method breaks down.

For example in the cavity example posted by Tibor, if I wanted to make only 2 baffles that were at 1/3 of the distance from the side walls it would not work because there are 200 cells in the horizontal direction and that is not divisible by 3. But if instead of making he grid out of one single block I make out of 6 blocks, then I have more control over where I place the baffles.

Anyway, I hope my case can help others.

Claudio


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