CFD Online Discussion Forums

CFD Online Discussion Forums (
-   CFX (
-   -   Refining Mesh using Tets and Prisms (

Help Please March 27, 2006 13:13

Refining Mesh using Tets and Prisms
Hi Everybody,

I am new to using unstructured meshes (tets and prisms) and am a little confused.

I am just modelling flow in a pipe, and I am using tets and prisms. I am a pretty experienced user of CFD and I am confident that I am getting the correct solution (I have compared to experiments), but I am now trying to coarsen the mesh to check if I can get the right solution with less nodes.

I specify tet sizes on the surface of the pipe and on the pipe cross sections. When I double the size of the tet that I am specifying on on the pipe cross sections (keep ing the surface element size the same), my node/element counts do not decrease by a factor of 2 as I expected they would, in fact they hardly decrease at all. I am using 15 prism elements with an expansion ratio if 1.2.

Am I fundamentally mis-understanding how tet meshes work? Please help explain this to me!

Robin March 27, 2006 16:51

Re: Refining Mesh using Tets and Prisms
You might get the behavior you're expecting if you were meshing in 1 dimension, but a change in mesh size will effect the node distribution in 3 dimensions. However, you also have to consider the effect of you mesh controls. You may be have overlapping influences of surface controls, volume controls, curvature sensitivity, etc. It also depends on which meshing appication you are running.

Which meshing application are you using?

Regards, Robin

Help Please March 27, 2006 17:42

Re: Refining Mesh using Tets and Prisms
Hi Robin,

Thanks for taking the time to offer your advice.?I am using ICEM to make the mesh.

A lot of things I have left as default settings, but here are the things that I changed.?I mostly just took these settings from a tutorial.

Global Element Scale Factor = 5 Global Element Seed Size = 64

Pipe (cylindrical surface) - Surface Mesh Size = 2 Pipe cross section - surface mesh size = 0.25

Mesh Volume Smooth Transition Factor = 1.2

Prism Parameters - Exponential, Height Ratio = 1.2, Number of layers = 15

When I select parts for the prism layer, I select both the cylindrical surface of the pipe and the body (volume) that I created for the pipe.

Let me know if I am doing anything stupid :)?How do you normally go about changing your tet meshes when doing a grid dependence study?

TB March 27, 2006 22:29

Re: Refining Mesh using Tets and Prisms
Hi... Are you going to use Richardson extrapolation method to check for grid error? It doesn't work well for non-uniform mesh, especially for mesh containing both prism & tetra elements. You may want to reduce or increase the grid size by a factor of at least 1.2 each time and run for at least 3 different mesh sizes. Compare some key variables like static pressure drop or velocity profile to see if solution changes dramatically.

Help Please March 28, 2006 11:09

Re: Refining Mesh using Tets and Prisms
Yeah, that is my plan. First I want to understand more about how to actually control the mesh size using these tets and prisms though.

Robin March 28, 2006 17:50

Re: Refining Mesh using Tets and Prisms
Which parameter are you changing?

Every one of these will affect your mesh in several ways, but it helps to understand how tetra/prism creates a mesh. I don't want to get into that here and recommend getting ICEM CFD training for these details. In the meantime, here are some recommended settings to get a good quality mesh...

-Set your "Global Element Scale Factor" to 1 -Set the Global Element Seed Size to the maximum element size you want in your mesh (usually the volume element size) -Set the surface mesh sizes to what you want. You will get the nearest factor of two smaller than the specified size -Keep the Transition Factor at 1.2 -Define the first prism height to desired value, height ratio to 1.3 and number of layers to 30 or more. Also add "Max Base to Height" equal to between .8 and 1. This will give you a nice, smooth transition between the last layer of prisms and the first layer of tets. -To do the above effectively, you might also need to add a "width" value of 4 to 10. This is the number of layers of constant element size prism generates next to a surface.

Don't generate prism layers on any open boundaries (which it sounds like you have not done).

As you modify the mesh parameters, you will only be modifying what they specifically influence. The best global way to modify the mesh is by changing the scale factor. Note that this will not change your prism layers, but this is good. It allows you to look at the effect of the global mesh spacing and near wall spacing separately.

Best idea is to create a simple mesh, a cube for instance, and see how changing the parameters modifies this mesh.

Good luck.


TB March 29, 2006 03:45

Re: Refining Mesh using Tets and Prisms
Follow Robin's suggestion about the parameters and keep them constant while you're refining or coarsening the meshes. Again, it's tricky business when you have to deal with inflation layers for mesh dependency test.

TobiasZ March 29, 2006 07:23

Re: Refining Mesh using Tets and Prisms
Hi Robin,

>> Don't generate prism layers on any open boundaries (which it sounds like you have not done).

Please, can you tell me why prisms shouldn't be used on any open boundaries? I'd be glad to hear any advice, since I've started to use openings for my domain with tetra+prisms.

Kind regards


Robin March 30, 2006 10:32

Re: Refining Mesh using Tets and Prisms
Hi Tobias,

By "open", I mean any boundary which fluid passes through such as inlets, outlets, openings, periodics or grid interfaces. Inflation is only needed at walls to capture the velocity gradients in the boundary layer. At open boundaries, there is no need to refine the mesh near the boundary and besides wasting nodes, doing so can result in numerical instability due to interaction with the boundary.

At an interfaces, including periodics, inflating is equivalent to including high aspect ratio's in the middle of a mesh, which is also bad practice. High aspect ratio's are easily tolerated near the walls, where the flow is predominantly parallel to the elements, but can be problematic if in the free stream.

The only exception is when you specify a zero gradient condition at a boundary, in which case some refinement may be necessary to get an accurate profile. Otherwise it is simply good practice to avoid it.

Regards, Robin

Andy March 30, 2006 15:42

Re: Refining Mesh using Tets and Prisms
Dear Robin

Interesting to know this.

In my case, I have 30 gas diffusers(on the bottom of a water tank), and I was using inflation(cfxmesh) trying to refine the meshes at these inlets and walls around the inlets. From what you said, I should not add inflation layers. Could you please suggest how to generate mesh for the mutiple inlets (especially when the the sizes of the inlets are much much smaller than the size of the main domain)?


Best regards!


Robin March 31, 2006 10:14

Re: Refining Mesh using Tets and Prisms
Hi Andy,

I see. It sounds like you have some small inlets located along your wall. In that case, you may want the inflation to cross over the inlets to maintain the continuity of your inflation layer across the wall. Otherwise, it may be difficult to get good inflation, as you are constantly reducing the inflation to zero layers at the inlet locations.

On the other hand, resolving the boundary layer along this wall may not be very important (assuming there is no significant cross flow). If you find that you are having convergence problems, consider removing the boundary layer.

Regards, Robin

Andy March 31, 2006 12:39

Re: Refining Mesh using Tets and Prisms
Dear Robin

Thanks a lot for the suggestions!

Best regards!


All times are GMT -4. The time now is 13:57.