CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > CFX

double precision

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 13, 2011, 05:27
Default double precision
  #1
hsn
New Member
 
hasan amini
Join Date: Jul 2009
Posts: 14
Rep Power: 17
hsn is on a distinguished road
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.
hsn is offline   Reply With Quote

Old   June 13, 2011, 07:19
Default
  #2
Member
 
Join Date: Jun 2011
Location: Germany
Posts: 59
Rep Power: 15
Siassei is on a distinguished road
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.
Siassei is offline   Reply With Quote

Old   June 13, 2011, 08:05
Default
  #3
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,871
Rep Power: 144
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
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.
ghorrocks is offline   Reply With Quote

Old   June 13, 2011, 17:04
Default
  #4
Member
 
Join Date: Jun 2011
Location: Germany
Posts: 59
Rep Power: 15
Siassei is on a distinguished road
Quote:
Originally Posted by ghorrocks View Post
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?
Siassei is offline   Reply With Quote

Old   June 13, 2011, 20:14
Default
  #5
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,871
Rep Power: 144
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
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.
ghorrocks is offline   Reply With Quote

Old   June 14, 2011, 00:05
Default
  #6
hsn
New Member
 
hasan amini
Join Date: Jul 2009
Posts: 14
Rep Power: 17
hsn is on a distinguished road
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?
hsn is offline   Reply With Quote

Old   June 14, 2011, 00:18
Default
  #7
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,871
Rep Power: 144
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
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).
ghorrocks is offline   Reply With Quote

Reply

Tags
double precision


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Continuing User Defined Real Gas Model issues aeroman FLUENT 6 April 8, 2016 04:34
Parallel User Defined Real Gas Model aeroman FLUENT 4 July 1, 2015 07: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 11:38
REAL GAS UDF brian FLUENT 6 September 11, 2006 09:23


All times are GMT -4. The time now is 16:09.