# Meshing partitioned Volume with multi-faced face

Hi to all and thanks in advance for taking time.

I want to do mesh creation with salome for later use with OpenFOAM. The case is a valve with a quite small annular gap, depending on how far the locking piece is inserted into the valve. Because of parameter variations I intend to perform the task with a python script.

Till now, I created severeal points (MakeVertex), and depending on if the line is curved or straight edges (MakeInterpol, MakeEdge), which where used to create faces (MakeFaceWires), from which a volume each was created (MakePrismVecH). Then the volumes are partitioned (MakePartition([listofvolumes])).

I already figured out how to get all the edges for applying hypotheses later and how to set up the groups of 'boundary' faces for later use in OF.

The problem I'm facing is that I couldn't use 'viscous layer' because the annular gap is so small that the layers will overlap, which gives an error. Instead I tried to get the near wall layer manually (sections 1 and 3, see attached picture).

Question: Is there a way to mesh section 4 with Hexahedron mesh?

It seems that whatever I try, section 4 always has 6 edges in x-y-plane, which is 2 too much. I would be really thankful if someone could give me a hint on how to tackle this problem.

Martin

ps. I really hope this is the right place to ask, didn't find any forum guidelines yet...

Sorry, I read several times your explanations, and I still don't get it. I can't understand your geometry nor the problems.

On the picture, I see only 3 edges for the section 4, but if you want to mesh it using quadrangles (2D), you'll have to divide it manually trough geometric section. Depending on your division (ex. lines between center of edges and center of triangle), you will be able to mesh each part with quadrangles and then in hexahedrons. However I don't understand why hexas would solve any trouble you face.

Thanks for taking time anyway, I'll try it again

attached is another sketch of the case in general. you can see the valve, which consists of a nozzle and a locking piece. it's axially symmetric. the both form an annular gap, where the gas flows through. I'm supposed to do multiple simulations for different positions of the locking piece on the x-axis and therefore for different thicknesses of the gap.

the first intention was to get sepperate wall layers on the inner contour of the nozzle and on the contour of the locking piece. this seems not possible for small annular gaps, because the wall layers would overlap then. that's why I thought why not create the layers manually? starting from the inlet (pipe) till they would meet. these are sections 1 and 3 in the previous picture. section 4 shall cover the annular gap and if possible also make use of the Quadrangle parameter reduced, but this is another point.

but I'm not able to do so because the edge between 4, 1, 2 and 3 consists of three edges, so I'm always getting an error like "meshing algorithm failed, face x had 6 instead of 4 edges"

if I could solve this, you would have the nozzle meshed. but there's still no wall layer on the locking piece in section 5... I must add that this is the first cfd simulation I'm doing on my own and so I'm not entirely shure if I really need what I'm trying to get, but since the speed of the gas flow will reach transsonic velocitys, I guess the mesh should be 'correct' especially at the wall and preferable adaptable to shock fronts for example, but this could be done with the number of segments on edges...

I hope I could give you a deeper inside in what I think my problem is and thanks for helping,

Martin

Hi Martin

but I'm not able to do so because the edge between 4, 1, 2 and 3 consists of three edges, so I'm always getting an error like "meshing algorithm failed, face x had 6 instead of 4 edges"

"Quadrangle (mapping)" algorithm is able to unite continuous edges into one side to have needed 4 sides of a quadrilateral face (see attached picture). To profit from this feature, ensure that your 3 edges lie on a line.

St.Michael

You are right! I tried it myself and it works. But unfortunatly I'm still not done:

I observed the following:

- creating the faces and partition them and meshing with "Quadrangle" and "Wire_discretization" works.

- creating the faces and extrude them and partition the volumes and meshing with "Hexahedron" and "Quadrangle" and "Wire_discretization" results in the following error:

p, li { white-space: pre-wrap; }"Hexa_3D_3" failed on SOLID #84. Error: Algorithm failed. Error in _QuadFaceGrid::LoadGrid():1063

where SOLID #84 is section 4.

since the mesh seems to be generated, I could ignore this error, but sadly import in OpenFOAM doesn't work.

this is the error I get:

UNV conversion with ideasUnvToFoam(I use salome v.6.3.0)

I also tried meshing completly without 3D algorithm. meshing went fine, but then conversion also doesn't work.

however, I could still just mesh the partitioned faces and extrude the mesh, but the problem here is that I have know idea how to get the face groups for boudary creation... is there a way to explode a mesh into faces?

this time I attach the script used to generate this, at least for me, tricky geometry. maybe this way it's easier to find a solution.

BUT, thanks for your help so far!

Martin

Hi Martin

I managed to get 3D mesh from your model using "3D extrusion" algorithm.

To get groups of faces after extrusion, you can create groups of edges that will be extruded into groups of faces with same names + "_extruded" suffix. Use "MakeGroups" argument of Extrusion() function to activate this feature.

Unfortunately I can't help you with conversion to OF.

St. Michael