CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   CFX (http://www.cfd-online.com/Forums/cfx/)
-   -   re: Double precision and grid quality (http://www.cfd-online.com/Forums/cfx/24302-re-double-precision-grid-quality.html)

Wooster July 25, 2007 13:29

re: Double precision and grid quality
 
I didn't want to hijack someone elses post so I'll make this one.

Robin had said that applying double precision helps with grid quality issues and I was wonder a little about that. How does double precision help with the grid, and on what scale? Is it a small thing that can be noticeable only on very very fine meshes or is it something more noticeable on any particular mesh?

-W

Gui July 25, 2007 16:20

Re: re: Double precision and grid quality
 
I don't see why double or simple precision would have something to do with mesh quality. It just tells with how much numbers you represent a floating point. With simple precision you can already represents number well below the millimeter (and the elements in a mesh are of the order of the millimeter). It just tells how precise the computations are so for me it's independent of the mesh.

Robin July 25, 2007 16:45

Re: re: Double precision and grid quality
 
The question should be "What does grid quality have to do with errors?".

Grid quality comes into play when the discrete equations are assembled. The effect of aspect ratio, for instance, is that you end up with one face of a control volume which has a very large area and another with a very small one. When you assemble the equations, the coefficients associated with the large face may be significantly larger than those of the small face. With single precision, the effect of the smaller face may be lost due to round-off error. Double precision pushes the limit of round-off error and therefore the tolerance for poor grid quality.

Other quality criteria have similar effects.

One interesting thing is to consider what I just said about aspect ratio and how it behaves near a wall. We often tell people that a high aspect ratio can be tolerated near the wall if the grid is parallel to the wall. The reason for this is that in the advection term, the coefficient from the face parallel to the wall scales with the mass flow through the face. Since the velocity normal to the wall is nearly zero, the coefficient on the larger face is no longer much greater than the one perpendicular to the flow and therefore there is no round-off issue. Aspect ratio problems are greater when they occur far from the wall.

It is also important to note that grid quality criteria are code dependant. What affects CFX is often quite different from other codes because the control volumes are constructed around element nodes, creating polyhedral control volumes. This reduces the production of solution errors due to rogue elements. Having multiple bad elements in the same region is bad, however.

Version 11.0 includes grid quality measures in the solver which are output to the results file as variable fields. It's worth checking these and the accompanying notes in the documentation, which you will find in ANSYS CFX-Solver Modeling Guide>Advice on Flow Modeling>Mesh Issues>Measures of Grid Quality.

Regards, Robin

Gui July 25, 2007 17:35

Re: re: Double precision and grid quality
 
I hadn't think about that and it makes sense. But what do you mean by the coefficient of the face?

and you say that cfx construct control volumes around elements nodes. So the equations are not integrated over the elements ? I thought the elements were the control volumes.

Robin July 26, 2007 08:58

Re: re: Double precision and grid quality
 
Hi Gui,

Coefficients are the values by which a variable is multiplied. For the transport of a scalar, phi, across a face for instance, the equation is mass_flow*phi, so the coefficient is mass flow. Look at the theory doc for a more complete explanation.

Regarding elements, most codes will use the element itself as the control volume, locating a node at the centroid of the element to store variables. CFX uses what is referred to as a Control Volume based Finite Element Method, which locates the center of the control volume at the element vertices and constructs the control volume by adding up the sectors of each element surrounding the vertex. This is also explained in detail in the theory documentation.

Regards, Robin

Wooster July 26, 2007 10:10

Re: re: Double precision and grid quality
 
That makes sense.

I've seen where programs would use just the node as a control volume and others use some kind of edge. It's interesting to note the differences in CFD and how they handle the equations in relation to the nodes.

thanks for the response guys.

-W


All times are GMT -4. The time now is 21:12.