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

Single and double precision

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 10, 2018, 16:45
Default Single and double precision
  #1
Member
 
Marcello Asciolla
Join Date: Apr 2018
Location: Italy
Posts: 43
Rep Power: 6
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, 18:26
Default
  #2
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,091
Rep Power: 134
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, 18:50
Default
  #3
Member
 
Marcello Asciolla
Join Date: Apr 2018
Location: Italy
Posts: 43
Rep Power: 6
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, 19:08
Default
  #4
Senior Member
 
Join Date: Jun 2009
Posts: 1,552
Rep Power: 28
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, 19:17
Default
  #5
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,091
Rep Power: 134
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, 03:27
Default
  #6
Senior Member
 
Gert-Jan
Join Date: Oct 2012
Location: Europe
Posts: 1,500
Rep Power: 22
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

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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


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