
[Sponsors] 
June 13, 2011, 04:27 
double precision

#1 
New Member
hasan amini
Join Date: Jul 2009
Posts: 14
Rep Power: 9 
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. 

June 13, 2011, 06:19 

#2 
New Member
Join Date: Jun 2011
Posts: 4
Rep Power: 7 
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. 

June 13, 2011, 07:05 

#3 
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 12,721
Rep Power: 99 
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. 

June 13, 2011, 16:04 

#4  
New Member
Join Date: Jun 2011
Posts: 4
Rep Power: 7 
Quote:
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? 

June 13, 2011, 19:14 

#5 
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 12,721
Rep Power: 99 
By default CFX uses SI units internally (mkgsK). 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. 

June 13, 2011, 23:05 

#6 
New Member
hasan amini
Join Date: Jul 2009
Posts: 14
Rep Power: 9 
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?


June 13, 2011, 23:18 

#7 
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 12,721
Rep Power: 99 
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).


Tags 
double precision 
Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Continuing User Defined Real Gas Model issues  aeroman  FLUENT  6  April 8, 2016 03:34 
Parallel User Defined Real Gas Model  aeroman  FLUENT  4  July 1, 2015 06:09 
Missing math.h header  Travis  FLUENT  4  January 15, 2009 12:48 
what's wrong about my code for 2d burgers equation  morxio  Main CFD Forum  3  April 27, 2007 10:38 
REAL GAS UDF  brian  FLUENT  6  September 11, 2006 08:23 