|
[Sponsors] |
May 10, 2018, 17:45 |
Single and double precision
|
#1 |
Member
Marcello Asciolla
Join Date: Apr 2018
Location: Italy
Posts: 43
Rep Power: 8 |
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?
|
|
May 10, 2018, 19:26 |
|
#2 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,871
Rep Power: 144 |
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. |
|
May 10, 2018, 19:50 |
|
#3 |
Member
Marcello Asciolla
Join Date: Apr 2018
Location: Italy
Posts: 43
Rep Power: 8 |
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?
|
|
May 10, 2018, 20:08 |
|
#4 |
Senior Member
Join Date: Jun 2009
Posts: 1,880
Rep Power: 33 |
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. |
|
May 10, 2018, 20:17 |
|
#5 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,871
Rep Power: 144 |
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. |
|
May 11, 2018, 04:27 |
|
#6 |
Senior Member
Gert-Jan
Join Date: Oct 2012
Location: Europe
Posts: 1,928
Rep Power: 28 |
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.
|
|
Tags |
double, precision, single |
|
|
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 |