CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   The old Hex vs Tet question (https://www.cfd-online.com/Forums/main/125632-old-hex-vs-tet-question.html)

Simbelmynė October 28, 2013 06:58

The old Hex vs Tet question
 
Hi,

For non-specific flows:
1. Hex is always better than Tet when it comes to accuracy.
2. No, Tet is as good as Hex if both solutions are mesh independent, although Tet require more cells to accomplish that.

Is it possible that the question is also related to cell skewness and that many researchers have just compared apples and oranges?

Cheers!

flotus1 October 28, 2013 08:25

I just finished putting together some "best practice" guidelines on this and some related topics.

My opinion based on my personal experience with commercial CFD software is: You can achieve good results with tet meshes for most engineering applications if you obey the basic rules of mesh generation (overall mesh quality, volume jump, angles, boundary layer resolution...)

But you have to know the drawbacks: Solutions with first order upwind schemes on tetrahedral meshes will always suffer from high numerical diffusion.
The computing times with tet meshes will be higher for the same accuracy and the overall convergence behavior is worse than with hex meshes.

And when it comes to LES with commercial cfd software, I would always choose hex meshes.

Simbelmynė October 28, 2013 08:57

Quote:

Originally Posted by flotus1 (Post 459416)
I just finished putting together some "best practice" guidelines on this and some related topics.

But you have to know the drawbacks: Solutions with first order upwind schemes on tetrahedral meshes will always suffer from high numerical diffusion.

Quote:

Originally Posted by flotus1 (Post 459416)
I just finished putting together some "best practice" guidelines on this and some related topics.

The computing times with tet meshes will be higher for the same accuracy and the overall convergence behavior is worse than with hex meshes.

Hi,

1. How is the second statement related to the first statement? 2. Do you mean that we need more cells in order to reduce numerical diffusion? 3. Numerical diffusion is affected by mesh refinement so I would guess that it is captured when doing a mesh sensitivity analysis? 4. It seems that you are leaning towards the second type of answer in my original post, right?


5. Assume that the flow is at a 45 degree angle with regards to the Hex mesh, now how will this affect the assessment of severe numerical diffusion for the Tet mesh compared to the Hex mesh?

Cheers!

;)

flotus1 October 28, 2013 09:43

Quote:

Originally Posted by Simbelmynė (Post 459426)
Hi,

1. How is the second statement related to the first statement? 2. Do you mean that we need more cells in order to reduce numerical diffusion?

Combining the two statements results in the recommendation not to use first order schemes with tet meshes.
Simply refining the mesh reduces the numerical diffusion, but only with a slope of 1.
If your main focus is accuracy then you will need unreasonably fine meshes just to get rid of this error source.

Quote:

5. Assume that the flow is at a 45 degree angle with regards to the Hex mesh, now how will this affect the assessment of severe numerical diffusion for the Tet mesh compared to the Hex mesh?
This would be an excellent computation exercise :D
Nevertheless, one of the goals when creating hex meshes is to "streamline" the grid to prevent flows with a 45 degree angle with respect to the cells.

Simbelmynė October 28, 2013 10:21

2 Attachment(s)
Ok so here are some 2d simulations with a commercial software.

The setup is a square domain with inflow at west and south boundary at a 45 degree angle. A passive scalar is introduced with a value of 1 at the west boundary and a value of 0 at the south boundary. Plots are from south-east corner to north-west corner.

Check attachments for results. It is clear that the quads have more numerical diffusion in this case.

Convergence took much longer for the triangles case. Residuals in both cases were lowered to 1e-8.

flotus1 October 28, 2013 12:28

Rotating the flow direction by 90 degrees, you will get a similar diffusion error on the tet mesh.

Simbelmynė October 28, 2013 13:14

Quote:

Originally Posted by flotus1 (Post 459465)
Rotating the flow direction by 90 degrees, you will get a similar diffusion error on the tet mesh.

Yes. So does a tri mesh have three preferred directions (low numerical diffusion) as opposed to two directions for quad elements? If yes, then it seems to me that polyhedral elements would be superior, given that they may have even more preferred directions.

flotus1 October 31, 2013 06:21

I would not draw the same conclusion.
In your test case with the tet mesh, the numerical diffusion is only zero because the line of separation of the passive scalar has the correct direction AND the correct position.
If you could move the line of separation by half a cell size, you would still get diffusion errors.
Ergo tet elements have no preferred direction at all.

Simbelmynė October 31, 2013 06:36

Quote:

Originally Posted by flotus1 (Post 459992)
I would not draw the same conclusion.
In your test case with the tet mesh, the numerical diffusion is only zero because the line of separation of the passive scalar has the correct direction AND the correct position.
If you could move the line of separation by half a cell size, you would still get diffusion errors.
Ergo tet elements have no preferred direction at all.

1. Ok. So how does this numerical diffusion work, what is the reason for no (small) diffusion when we have the correct direction AND the correct position?

2. Textbooks talk about numerical diffusion being worse when the flow is oblique to the direction of the grid. Should they also add "the correct position" to this statement? (perhaps I don't understand the concept of "grid direction").

Cheers!

FMDenaro October 31, 2013 06:48

Quote:

Originally Posted by Simbelmynė (Post 459996)
1. Ok. So how does this numerical diffusion work, what is the reason for no (small) diffusion when we have the correct direction AND the correct position?

2. Textbooks talk about numerical diffusion being worse when the flow is oblique to the direction of the grid. Should they also add "the correct position" to this statement? (perhaps I don't understand the concept of "grid direction").

Cheers!


numerical diffusion is related to the local truncation error appearing when the convective terms are discretized in non-symmetric way. Hex and Tet cells affects the way in which the discrete operator can be computed on the computational domain.
Hex cells are generally associated to structured grids that generate "line directions", Tet cells generates non-structured grid and you cannot uniquely define a grid direction.
I suggest to do some simple 2D exercise of the solution of the linear equation df/dt+udf/dx+vdf/y=0, you can prescribe u and v. Try to solve on both triangular grid and hex grid. Try to use upwind and central discretization

Simbelmynė October 31, 2013 07:01

Quote:

Originally Posted by FMDenaro (Post 459998)
numerical diffusion is related to the local truncation error appearing when the convective terms are discretized in non-symmetric way. Hex and Tet cells affects the way in which the discrete operator can be computed on the computational domain.
Hex cells are generally associated to structured grids that generate "line directions", Tet cells generates non-structured grid and you cannot uniquely define a grid direction.
I suggest to do some simple 2D exercise of the solution of the linear equation df/dt+udf/dx+vdf/y=0, you can prescribe u and v. Try to solve on both triangular grid and hex grid. Try to use upwind and central discretization

Yes thank you. Do you mean for me to do the exercises like the ones I did in post 5 in this thread or is it something else? First and second order has no effect on the diffusion if the triangular mesh is "correctly" aligned with the flow direction, the diffusion is almost non-existant. I made a structured triangular mesh in the test cases above.


All times are GMT -4. The time now is 15:55.