|
[Sponsors] |
July 3, 2014, 07:30 |
Double precision in fluent
|
#1 |
Member
Ashutosh
Join Date: Jul 2013
Posts: 98
Rep Power: 13 |
I was solving flow over a flat plate problem in 2D in fluent as given in the tutorials of cornell university. I observed a peculiar thing. The residuals of momentum and continuity converge when double precision option is selected. However, in case of single precision one, the residuals flatten after a few hundered equations.
Is this behaviour normal in case of the double precision option? How exactly double precison affect the solver? |
|
July 3, 2014, 10:06 |
|
#2 |
Senior Member
Join Date: Feb 2013
Location: Germany
Posts: 200
Rep Power: 24 |
In general double precision numbers allocate 8 bytes of memory in the computer while single precision numbers only allocate 4. This means that double precision numbers can be twice as long or have two time more decimal places. In Fluent it is six decimal places in single precision vs. 12 decimal places in double precision (or 7 vs. 14 I am not really shure).
This allows the residuals to drop 6 orders in magnitude in sp and 12 orders in dp (source: fluent user guide). After that they hit round off and they won't go down any further. |
|
July 3, 2014, 11:40 |
|
#3 |
Member
Ashutosh
Join Date: Jul 2013
Posts: 98
Rep Power: 13 |
@kad:
So, the convergence will be faster in case of double precision. Okay I agree. But then, what could be the reason for flat residuals in case of single precision? Atleast after more number of iterations solution should have converged. |
|
July 3, 2014, 12:17 |
|
#4 |
Senior Member
Join Date: Feb 2013
Location: Germany
Posts: 200
Rep Power: 24 |
Convergence in double precision is not necessarily faster. My idea was that the residuals flatten because they reach round off for single precision very quickly. It was just a guess cause I do not know your case in detail.
|
|
July 4, 2014, 07:13 |
|
#5 |
Super Moderator
Alex
Join Date: Jun 2012
Location: Germany
Posts: 3,428
Rep Power: 49 |
Another guess would be that the aspect ratio of some of your cells is so high that double precision is actually needed to solve the case. Try to be more specific when you describe your problem.
|
|
July 16, 2014, 12:24 |
|
#6 |
Member
Ashutosh
Join Date: Jul 2013
Posts: 98
Rep Power: 13 |
Well my problem is flow over a flat plate in 2D. So, in that case, i got flat residuals for single precision, while I get convergence for double precision. I have used mapped face meshing with edge sizing to get the desired number of nodes. I will let you know aspect ratios soon.
|
|
July 16, 2014, 12:32 |
|
#7 |
Super Moderator
Alex
Join Date: Jun 2012
Location: Germany
Posts: 3,428
Rep Power: 49 |
||
Tags |
double precision solver, fluent |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Continuing User Defined Real Gas Model issues | aeroman | FLUENT | 6 | April 8, 2016 04:34 |
Single Precision and Double Precision | wateraction | FLUENT | 1 | May 27, 2011 13:16 |
what's wrong about my code for 2d burgers equation | morxio | Main CFD Forum | 3 | April 27, 2007 11:38 |
UDF & Double precision; Please help?? | Asghari | FLUENT | 0 | January 31, 2007 14:14 |
DOUBLE PRECISION doubt | Dinesh | FLUENT | 2 | September 11, 2006 09:20 |