CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   CFX (https://www.cfd-online.com/Forums/cfx/)
-   -   double precision (https://www.cfd-online.com/Forums/cfx/89441-double-precision.html)

hsn June 13, 2011 04:27

double precision
 
Dear friends,
I am dealing with a simple hydrodynamic problem of water flow in milichannels. my simulation is transient and as it is obvious, with relatively small dimensions. I checked with the documentation to see whether it is recommended to use double precision for calculations when you are dealing with small dimensions and I saw nothing.
Do you think I should use double precision?
my domain is a duct, 1mm long with a 0.3mm*0.3mm cross section...
thank you.

Siassei June 13, 2011 06:19

Hello,

you should use double precision for all calculations. A double precision calculation use a 64 bit floating point number. A not double precision calc. use a 32 bit floating point number. Today, our FPU (floating poitn unit) deals with 11xbits (normaly).

64 bit numbers increase the robustness and stability of your calculation.

ghorrocks June 13, 2011 07:05

I do not agree that you should use double precision for all calculations. I routinely use single precision for MEMS simulations where the domain size is around 10um by 10um.

The key thing is the range of scales. If everything is small then single precision is probably OK. If some thing are small and some large then you probably need double. If you just want to be sure and don't mind about longer run times and have lots of memory then just use double anyway.

Siassei June 13, 2011 16:04

Quote:

Originally Posted by ghorrocks (Post 311751)
I do not agree that you should use double precision for all calculations. I routinely use single precision for MEMS simulations where the domain size is around 10um by 10um.

Ok, I agree with you. I'm not a CFX expert, but what units use CFX in the background of a calculation? Is the unit system fixed (e.g length in m and mass in kg) or use CFX-Solve the units, that are enabled (in the GUI of) in CFX-Pre?

Ok, next. If the domain is 10 by 10 um and the velocity of the fluid is 10 m/s. What you are use?

A question.
How big is the difference of time cost by our cases?

ghorrocks June 13, 2011 19:14

By default CFX uses SI units internally (m-kg-s-K). But it can use any internally consistent set of units.

What do you mean by "What you are use?"

Double precision generally adds about 50% to the simulation time and memory requirements providing the equivalent single precision simulation converges equivalently. If the double precision simulation improves convergence (that is, numerical accuracy was a problem for the single precision run) then the double precision run may be faster.

hsn June 13, 2011 23:05

thank you ghorrocks and Siassei. I believe that double precision should be used when you are dealing with high aspect ratios. Thus what Siassei is pointing out is that: for example when your velocity is 1m/s but your smallest dimension is 0.1mm, the ratio of these two is 10e4 which is high(?) and we should use double precision... is my conclusion right, Siassei?

ghorrocks June 13, 2011 23:18

You cannot take a ratio of velocity and distance to give a meaningful number. The important ratio is of the largest and smallest important dimension, or the largest and smallest velocity or the largest and smallest pressure (relative to the reference pressure).


All times are GMT -4. The time now is 20:27.