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

Single and double precision

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 10, 2018, 17:45
Default Single and double precision
  #1
Member
 
Marcello Asciolla
Join Date: Apr 2018
Location: Italy
Posts: 43
Rep Power: 8
MarcelloAsciolla is on a distinguished road
I noticed that CFX solver can perform the simulations in single precision or double precision. I saw that the most common choose is the double one, because it is more accurate. But what must be considered for this choice? When is it possibile to use the single one?
MarcelloAsciolla is offline   Reply With Quote

Old   May 10, 2018, 19:26
Default
  #2
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
Single precision uses less memory and is faster per iteration. But this decreased accuracy of the numerics means that convergence may be affected. So it depends on what you are modelling as to whether the numerics are sensitive to the loss in accuracy - some are, some are not.
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum.
ghorrocks is offline   Reply With Quote

Old   May 10, 2018, 19:50
Default
  #3
Member
 
Marcello Asciolla
Join Date: Apr 2018
Location: Italy
Posts: 43
Rep Power: 8
MarcelloAsciolla is on a distinguished road
I am looking for something more specific (in turbulence terms, heat transfer problems, multiphase situations, ..., I do not know), where could I have a bigger effect of the loss of accuracy and why?
MarcelloAsciolla is offline   Reply With Quote

Old   May 10, 2018, 20:08
Default
  #4
Senior Member
 
Join Date: Jun 2009
Posts: 1,880
Rep Power: 33
Opaque will become famous soon enough
It only matters for cases with the differences between large numbers is meaningful, for example, pressure gradient or cases where the mesh aspect ratio is fairly large, i.e. highly refined boundary layers.

The pressure gradient issue can be dealt with by setting an appropriate Reference Pressure, then a single precision solver can be used. If you use the double precision solver, setting the Reference Pressure to 0 will work as well.
Opaque is offline   Reply With Quote

Old   May 10, 2018, 20:17
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
Any simulation where convergence is difficult is likely to be helped by double precision. So many multiphase, compressible flow are likely to qualify. But there are a few multiphase and compressible flow simulations which are easy to converge so they will run fine on single precision.

The key thing is how hard it is to obtain convergence, rather than the type of simulation.
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum.
ghorrocks is offline   Reply With Quote

Old   May 11, 2018, 04:27
Default
  #6
Senior Member
 
Gert-Jan
Join Date: Oct 2012
Location: Europe
Posts: 1,928
Rep Power: 28
Gert-Jan will become famous soon enough
I tend to use double precision in cases where heat transfer comes plays an important role. The large enthalpy numbers, makes it necessary to be precise when these are subtracted and single precision srews up the accuracy.
Gert-Jan is offline   Reply With Quote

Reply

Tags
double, precision, single


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
Warning message C4133 while compiling Arminius Fluent UDF and Scheme Programming 0 October 2, 2017 12:44
Interpret-Real Gas UDF ndabir Fluent UDF and Scheme Programming 3 November 18, 2015 08:29
Single precision better than double precision? 140raiders CFX 1 July 30, 2015 03:32
Parallel User Defined Real Gas Model aeroman FLUENT 4 July 1, 2015 07:09
Double precision does not converge, Single precision does jmmichie Main CFD Forum 0 May 7, 2015 09:16


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