CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   ANSYS Meshing & Geometry (https://www.cfd-online.com/Forums/ansys-meshing/)
-   -   [ICEM] merge meshes between hexa and prism (https://www.cfd-online.com/Forums/ansys-meshing/112881-merge-meshes-between-hexa-prism.html)

jjz2013 February 7, 2013 00:00

merge meshes between hexa and prism
 
I have a question confusing me for a while. Can ICEM merge hexa and prism meshes at an interface. For example, the mesh on the left side is triangular prism and on the right side is the hexahedral mesh. I always get some fail message when I try to merge these two type of meshes at an interface. Does anyone have the experience for it? Thanks!

Far February 7, 2013 00:28

No not possible. However you can create non-conformal interface in CFX/Fluent.

jjz2013 February 7, 2013 10:29

Thank you, Far. I also think about this solution. I am just worried about the convergence problem since at one side the domain will be defined as porous media.
Btw, do you know how to hexahedral meshes without using blocking function. Like in gambit, I can firstly create hexa meshes in the porous media domain, and then create tetra meshes. The interface can automatically create formal meshes. Do you have any idea?

Far February 7, 2013 10:46

Procedure in ICEM is different than any bottom-up approach whether it is Gambit or gridgen.

The solution is to mesh one domain with tetra and other with Hexa and merge them. It is to be noted pyramids will be there at interface.

jjz2013 February 7, 2013 11:27

Thank you for your reply. You helps me a lot to answer my questions.
If merge meshes is not functional for the mesh pair of prism and anyother, it will become a real problem in practice. Becaues this is the situation that I met quite often in my work. I will have to define interfaces in fluent anyway.

Thanks, far!

Far February 7, 2013 11:30

Why you dont try full hexa ?

diamondx February 7, 2013 11:50

prism+tetra merging with hexa... that's my dream :D

@FAR, i previously saw a thread where someone claimed he could do it but the quality was very bad... do you remember that thread ? i can't find it ...

jjz2013 February 7, 2013 12:40

Thanks for you guys' suggestions. I will try both solutions.

Far February 7, 2013 13:00

@Ali: In fact those were your words which I just wrote here " Prisms cannot be merged with Hexa due to stiffness of prism" Remember :)

The basic logic is " when we merge Hexa with tetra, it changes tetra mesh on that face and keep the Hexa as it is. While this is not possible with prisms. In other words prisms cannot redistribute themselves to conform with Hexas

diamondx February 7, 2013 13:07

yeah yeah i do remember, here is why i also remember:

That guy said he created the tetra without prism, then the hexa. he after that merged them. Until here everything everything can be done without affecting the quality.

then after the merge he generated the prism. (on the hexa+tetra). it is doable when you think about it, but i don't know about the reality...

Far February 7, 2013 13:13

that is simply not possible due to working style of ICEM.

FJSJ May 13, 2013 11:29

2 Attachment(s)
Hi all,
I've read this post to try to deal with a problem. I'm surprised to read Farīs word about merge meshes because I made the "Merged Tetra-Hexa Mesh in a Hybrid Tube" tutorial and in that case is possible. I did it. And, now Iīm trying to do exactly the same between this two meshes.

I mean, Iīd thought to do in the same project, the first mesh, then save it, then close it, secondly, create the second mesh (picture 2), and then merge them. Exactly, the same procedure as the tutorial. So.. Is it not possible?

Thanks in advance!

FJSJ May 14, 2013 04:02

Hi guys,
I have an other doubt. Itīs about merge meshes tool. In the same tutorial that I said yesterday, at beginning, give some advices. In the next-to-last is:

"The perimeters of all the interface parts must be associated to curves that are aligned (or even onthe same curve) on both sides of the interface."

So, when appears "aligned" it means that I canīt do this with geom I presented you yesterday? Because those curves are not aligned, even those curves are not parallels...

Iīm not sure about it and I donīt want to waste the time in something at the end is not possible. Anyone know about it?

Thank you guys!

scribby182 May 20, 2013 17:51

Hello FJSJ and all,

I have been trying to battle with hybrid meshing the past few days myself. I've definitely been a little unhappy with the capabilities of ICEM vs. other hybrid meshing I've seen.

From what I can tell, you can easily do a hybrid tet+hex mesh if you have no inflation/prism layers. In this case, you can make the two meshes separately, load them both together (selecting merge rather than replace), and then use the merge mesh tool at the interface. I think this is something that has some tutorials on the customer portal and has also been discussed here.

Where it gets tricky is when prism layers are included. Like some of the above posts, I have not yet been able to merge meshes when the tet already includes prism layers. The one place I have had a little success though is by:
1) building the hex and tet (no prism)
2) loading both together and merging
3) adding a prism layer to both the tet and hex blocks

I believe this works as long as the total height of the prism layer is less than the first cell height in the hex mesh. I have only done this with really simple test geometries so far, but it seems to just replace a portion of the first hex cell and leave the rest unchanged. I just put a two node (1 element) o-grid right next to the surface I wanted the prism layer on, that way I easily make sure I had the right element size. One problem I see in the future for this method might be that, for complex geometry, it isn't always possible to really closely control the height of an ogrid. This might mean it either grows a lot compared to the desired first cell height (so you have a strange intermediate cell between prism and rest of mesh), or it might shrink and the prism layer may fail entirely.

If anyone tries any of this or has any success including inflation layers/prism layers in hybrid meshes, I'd really appreciate your thoughts.

Scribby182

FJSJ May 21, 2013 04:05

1 Attachment(s)
thank you Scribby182,

I have been dealing with this problem too. I got the mesh that I suggested few days here. Yes, youīre right, Iīve made the approach you comment. And it worked. I have a conformal mesh between hexas and tetras by pyramids layer (pic.1). About your prism layer doubt.. I think I canīt help you, Iīve not tried prism layer yet. The only I can say you itīs about tutorials, Tetra/prism Mesh in a Fin Confituration or Tetra/Prism Mesh generation for a Helicopter....

PeterDaniel October 25, 2013 11:45

Quote:

Originally Posted by scribby182 (Post 428744)
Hello FJSJ and all,

I have been trying to battle with hybrid meshing the past few days myself. I've definitely been a little unhappy with the capabilities of ICEM vs. other hybrid meshing I've seen.

From what I can tell, you can easily do a hybrid tet+hex mesh if you have no inflation/prism layers. In this case, you can make the two meshes separately, load them both together (selecting merge rather than replace), and then use the merge mesh tool at the interface. I think this is something that has some tutorials on the customer portal and has also been discussed here.

Where it gets tricky is when prism layers are included. Like some of the above posts, I have not yet been able to merge meshes when the tet already includes prism layers. The one place I have had a little success though is by:
1) building the hex and tet (no prism)
2) loading both together and merging
3) adding a prism layer to both the tet and hex blocks

I believe this works as long as the total height of the prism layer is less than the first cell height in the hex mesh. I have only done this with really simple test geometries so far, but it seems to just replace a portion of the first hex cell and leave the rest unchanged. I just put a two node (1 element) o-grid right next to the surface I wanted the prism layer on, that way I easily make sure I had the right element size. One problem I see in the future for this method might be that, for complex geometry, it isn't always possible to really closely control the height of an ogrid. This might mean it either grows a lot compared to the desired first cell height (so you have a strange intermediate cell between prism and rest of mesh), or it might shrink and the prism layer may fail entirely.

If anyone tries any of this or has any success including inflation layers/prism layers in hybrid meshes, I'd really appreciate your thoughts.

Scribby182

Hello Scribby182,
How did you manage to generate the prims on the hexa part? When i try to create the prims after merging the two parts i only obtain prims on the tetra part :(.
Thank you,
Peter

Andrea1984 November 13, 2013 07:44

Hi PeterDaniel,

I have the same problem, it generates the prisms only on the tetra mesh even if the height of the prism layer is less than the height of the first cell in the hexa mesh.
I am wondering if someone actually managed to create a conformal interface between tetra-with-prism and hexa or you are bounded to use non conformal interface when you have prisms.

Andrea1984 November 13, 2013 11:44

What do you think about interrupting generation of the prisms just before the interface in the unstructured domain? in this way the interface is only between tetra and hexa and should not be problematic to make it conformal.
what are the drawbacks of this approach in your opinion?

I will attach some screenshot shortly.

Andrea1984 November 13, 2013 12:17

2 Attachment(s)
this illustrates, in a very rough example, what I meant in the previous post

stuart23 November 13, 2013 18:19

Conforming hexas into prisms is doable, but not easy. If you are not familiar with ICEM, just stick with a non-conformal interface.

The trick is that you must build the tetra/prism zone bottom-up to be conformal. Firstly create conformal surface mesh in the unstructured region using PD or PI with respect line elements. Then inflate prisms off the surface with the Advanced Prism Param: "Using Quad Elements" enabled. Finally fill the rest of the void with Delaunay to connect the prisms, quads and whatever other tris are in your domain.

You can only do this using the Pre Inflation technique. "Using Quad Elements" will not work if there is already tetras/pyras in your domain.

Once again, if you did not understand these instructions, I would suggest using a non-conformal interface.

Good Luck,

Stu

Far November 14, 2013 03:20

can we avoid penta-5 elements?

Andrea1984 November 15, 2013 07:16

2 Attachment(s)
Hi Stuart,

I am following your approach (many thanks for the tips!) and actually I feel that I am close to obtain my goal :)
I have created the conformal patch mesh on my unstructured region, but when I inflate the prisms from this surface mesh (enabling "using existing quad layers") the mesh is no more conformal at the interface, since the inflation of the prisms do modify the surface mesh at the interface (see attached pictures).

Any suggestion on how overcome this problem?

Thank you
Andrea

Andrea1984 November 21, 2013 06:43

3 Attachment(s)
Hi Scribby,

I am trying to use this approach in a simple test case with the aim of using it for my "real" complex geometry.
I am able to correctly create the prism layer both in the tetra and in the hexa regions and a conformal interface between them, but the hexa mesh is highly distorted by the creation of the prisms layer (as you can see in the attached pictures). This is the same problem that I am experiencing on my real geometry, but in the latter case the deformation is even more dramatic because the blocking is far more complex with respect to a simple pipe.

Do you or someone else have any idea on what is wrong with that?

I am also attaching my case geometry, blocking and settings if someone wants to reproduce it.

Thanks

Andrea

Quote:

Originally Posted by scribby182 (Post 428744)
Hello FJSJ and all,

I have been trying to battle with hybrid meshing the past few days myself. I've definitely been a little unhappy with the capabilities of ICEM vs. other hybrid meshing I've seen.

From what I can tell, you can easily do a hybrid tet+hex mesh if you have no inflation/prism layers. In this case, you can make the two meshes separately, load them both together (selecting merge rather than replace), and then use the merge mesh tool at the interface. I think this is something that has some tutorials on the customer portal and has also been discussed here.

Where it gets tricky is when prism layers are included. Like some of the above posts, I have not yet been able to merge meshes when the tet already includes prism layers. The one place I have had a little success though is by:
1) building the hex and tet (no prism)
2) loading both together and merging
3) adding a prism layer to both the tet and hex blocks

I believe this works as long as the total height of the prism layer is less than the first cell height in the hex mesh. I have only done this with really simple test geometries so far, but it seems to just replace a portion of the first hex cell and leave the rest unchanged. I just put a two node (1 element) o-grid right next to the surface I wanted the prism layer on, that way I easily make sure I had the right element size. One problem I see in the future for this method might be that, for complex geometry, it isn't always possible to really closely control the height of an ogrid. This might mean it either grows a lot compared to the desired first cell height (so you have a strange intermediate cell between prism and rest of mesh), or it might shrink and the prism layer may fail entirely.

If anyone tries any of this or has any success including inflation layers/prism layers in hybrid meshes, I'd really appreciate your thoughts.

Scribby182


stuart23 November 21, 2013 07:31

Hi Far,

No you cannot avoid pentas at the interface. However the pentas that we are used to are the high aspect ratio pentas that are generated at the terminating faces of stairstepped prisms. These pentas are not the same as they are connected to (hopefully) a very high quality quad on one side, and 4 very high quality tris on the other sides. You should also smooth the pentas while freezing the prisms and hexas. There is no other way to join quads (from hexas) to tris (from tets) except using pentas.

Stu

stuart23 November 21, 2013 07:34

Hi Andrea,

Make sure you set your prism parameters to match the quad faces. The sizes do not have to be exactly the same, but you will not get it to work if your first prism is double (or half) the height of your first hexa. Also, turn smoothing off for the prism generation. You should have started with a high quality surface mesh already, so smoothing should not be necessary. If your geometry is quite complex, however, smooth manually after the prism generation with the quads frozen.

Good Luck,

Stu

Andrea1984 November 21, 2013 07:41

Hi Stuart,

Thank you for the advice; I can see your point but one of the requirements for generating the prisms also in the hexa region is that the overall prisms height should be less than the first hexa height; so if, for example, I want to generate three layers of prisms there is no way to make the first prism height similar to the first hexa height.

Am I right or something is wrong in my reasoning?

Andrea

stuart23 November 21, 2013 08:11

1 Attachment(s)
Hi Andrea,

I should clarify, what was suggested earlier and my method are completely different. For my method with the "Using Quad Elements" enabled, you do not create the prisms in the hexa region, they are only created in the unstructured region before it is filled with tets. I developed this method for complex hexa geometries where creating the required distribution (large first layer then smaller second layer) required for running prism on hexas was not feasible.

It is up to you which method you choose. I used my method to create the below image.

Stu

Andrea1984 November 21, 2013 08:15

Now it is clear, I think my first option is going to be your method, because it seems more reasonable to not create the prism layer in the structured domain.

Thank you again

Andrea

Andrea1984 November 21, 2013 09:42

1 Attachment(s)
Hi Stuart,

just to let you and the others know that your method worked for me on a simple pipe with a single layer of prisms (attached picture); now let's do the hard work on the "real" thing.
Thank you so much for sharing it (and maybe I should bother you again in the future :) )

Andrea

Quote:

Originally Posted by stuart23 (Post 461872)
Conforming hexas into prisms is doable, but not easy. If you are not familiar with ICEM, just stick with a non-conformal interface.

The trick is that you must build the tetra/prism zone bottom-up to be conformal. Firstly create conformal surface mesh in the unstructured region using PD or PI with respect line elements. Then inflate prisms off the surface with the Advanced Prism Param: "Using Quad Elements" enabled. Finally fill the rest of the void with Delaunay to connect the prisms, quads and whatever other tris are in your domain.

You can only do this using the Pre Inflation technique. "Using Quad Elements" will not work if there is already tetras/pyras in your domain.

Once again, if you did not understand these instructions, I would suggest using a non-conformal interface.

Good Luck,

Stu


Andrea1984 November 25, 2013 09:39

Hi Stuart,

as promised I am here to bother you again :)
I am able to use your technique in simple test cases but I am really struggling to use it in my actual geometry.
The main problem is that I am not able to generate the Prisms with the Pre Inflation Technique starting from my conformal surface mesh.
(notice that I can successfully use the same surface mesh with Delaunay and then inflate the prism in my volume mesh but, as you mentioned, this is of no help if you want to create a conformal interface with the prisms).

The log is the following:

"completed smoothing
extruding prism layer 1
there is a problem with the shell with vertices
(-67.9916,-0.437414,-85.9903) (-67.1629,-0.433143,-85.9903) (-67.9384,2.80371,-85.9903)
stopping prism and writing mesh
performing cleanup smoothing
Created inflation elements:
Layer 1: 0 prisms, 0 pyramids, 0 hexas
Layer 2: 0 prisms, 0 pyramids, 0 hexas
Layer 3: 0 prisms, 0 pyramids, 0 hexas
failed to create any inflation elements
prism finished"


...and the three points listed in the log does not define any shell element!

Do you have any idea of what the problem may be?

Thanks

Andrea

stuart23 November 25, 2013 09:47

Hi Andrea,

When inflating stand alone surface mesh, ICEM Prism uses the surface element normal to indicate the direction of inflation. You should check that the normals are pointing into the direction of the fluid volume. The easiest way (I think) to check this is to right click the shells in the Model Tree and select show normal arrows. All the arrows should be pointing into the fluid zone.

Another possible reason Prism failed is because of bad quality surface mesh. As a rough guide, you should try and smooth your surface mesh up to at least 0.4 before inflating prisms.

Stu

Andrea1984 November 28, 2013 06:30

Hi Stuart,

the normals orientation is ok and so is the shell mesh quality (lowest quality at about 0.45) but I still get the same problem.
I am trying to run my simulation using another meshing technique, but when I will have a little bit of spare time I will come back to your approach.

Thank you again for sharing your method

Andrea

Andrea1984 July 28, 2014 10:24

Just a quick update on this topic as someone may be interested: finally, I managed to create a beautiful conformal interface between a tetra-with-prisms and an hexa mesh for a quite complex geometry (an industrial gas turbine combustor) following Stuart's approach (thanks again for sharing it).

If anyone else is interested please feel free to ask for details.

Andrea

MarkusIHS February 26, 2015 05:32

Hi Andrea,

I know this thread is a few months old, but I try to follow your and Stuart's approach since a few days and don't even manage to get a hybrid mesh with prism layer in the unstructured part in a tube. Not to mention my real case in a turbomachinery runner's channel.
Here is my procedure:
*Creating structured O-Grid in one part (pipe inlet, first half of the pipe wall and interface plane) and "load mesh from blocking"
*Creating unstructured surface-mesh on other part of the pipe wall and outlet with "respect line elements" to get a fitting surface-mesh
*Setting mesh parameters for prism to fit the first layer of the structured grid (only one layer or more layers with same height ratio doesn't make any difference). "Use Existing Quad Layers" in Advanced Parameters is chosen.
*Try to compute the prism layer
ICEM says at this point with:

create_bfcart_inflation -inflate 1 -cleanup
Total Num. tris = 906
creating offset layer...
No new vertices created in offset layer


and actually nothing happens... Error message works :)

Can you tell me if there are more special settings to do or do you see any mistake in my procedure?
I would be very happy if you could help me with this problem!

Thank you in advance!
Markus

Andrea1984 February 26, 2015 09:30

Hi Markus,

the steps to create the conformal interface are:
1) create the hexa mesh in the structured region and a full tetra mesh (i.e. without prisms) in the unstructured region
2) create a conformal interface between these two meshes
3) delete all the volume elements and all the surface elements in the structured region (but make sure you retain the quads at the interface)
4) if necessaray smooth the surface mesh freezing the quads
5) inflate prism layers from the surface mesh using the Existing quad layers option and making sure that the prisms layers match the nodes distribution of the structured mesh
6) fill the empty volume with Delaunay mesh
7) load the structured mesh
8) merge the nodes at the interface with a small tolerance
9) delete the quad elements in the interface part
10) check the mesh and hopefully everything should be ok!

The crucial part is the prisms inflation step. You prism distribution should match the existing quads very precisely in order for this technique to work correctly.

Good luck :)
Andrea

MarkusIHS February 26, 2015 10:56

Yeah, that works! Thank you very much!

HBetta February 5, 2019 11:14

Hi guys,

I'm doing a mesh similar to discussed here, but I'm still not able to do so. Could anyone give me another tip?

Thank you!

anand32 February 11, 2019 14:21

What is your problem? Please explain in a little more details

Thanks

Vishal
Learn ICEM From Scratch
https://www.youtube.com/channel/UCdP..._as=subscriber

mrhaghighatjoo February 12, 2019 10:28

Hi guys, I have a question.
I am gonna generate a hexa/tetra or even tetra/tetra mesh in two domains. when my mesh is coarse, I get to merge them properly and at the interface, there is no problem. BUT, in case I am gonna refine the mesh, unfortunately, a few bad, damaged elements would be appeared at the interface. WHY???
I have even used Edit Mesh-Check Mesh to find out the reason or fix them or ignore them or even create a subset for them. Afterwards, I have used Smooth Mesh Globally too.
The problem is that if I fail to fix these a few damaged elements, they are gonna be appeared in my boundary conditions in Fluent and I would not be able to set them 'interior' in Fluent.

PLEASE Help me. Please shed light on this issue.
Thank you so much.

HBetta February 12, 2019 11:38

Hi Anand32,

I'm trying to merge a hex and tetra mesh as discussed in the topic. I'm able to accomplish the method described by stuart23 when only one side of my unstructured domain is connected to a structured.

But, in my real case, both sides are connected to a strucuted mesh. Following the steps showed by andrea, I try to delete all the volume elements (after merge meshes) but ICEM is not able to delete tetrahedas, then, I cannot create my Prism layer.

Thanks

Quote:

Originally Posted by anand32 (Post 724392)
What is your problem? Please explain in a little more details

Thanks

Vishal
Learn ICEM From Scratch
https://www.youtube.com/channel/UCdP..._as=subscriber



All times are GMT -4. The time now is 04:34.