|
[Sponsors] |
March 11, 2010, 20:19 |
Machine round-off precision
|
#1 |
Member
prout
Join Date: May 2009
Posts: 32
Rep Power: 17 |
Hi,
Does anyone have a simple solution to tell CFX "just iterate until you reach the machine round-off precision"? It seems quite difficult to set up such a convergence criteria... Thanks. |
|
March 12, 2010, 00:39 |
|
#2 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,872
Rep Power: 144 |
Difficult? Try setting the residual target to 1e-20 and see what happens. Machine round off will stop you getting anywhere near the value.
But if you are asking how do you get it to stop when it reaches numerical round-off - well, that's a different question. There is no easy way to judge machine accuracy. I would just set a very tight residual critereon and do a sensitivity analysis to show whether it is tight enough. |
|
March 12, 2010, 08:32 |
|
#3 |
Member
prout
Join Date: May 2009
Posts: 32
Rep Power: 17 |
Thanks Glenn.
Yes, my problem here is not the "just iterate" part, but the "until" part. I run many simulations through a script, and I'd like the computation to stop when residuals reach the machine round-off. (Basically when the graphs become flat) I tried monitoring the run with an awk script, calculating a relative standard deviation on the last N iterations (or the last N*n iterations). But it's messy and does not work so well. So I was wondering if there was some kind of built-in hidden developer thing that could help me... ^^ |
|
March 14, 2010, 18:48 |
|
#4 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,872
Rep Power: 144 |
Why can't you just say a maximum of X iterations where X is larger than would ever be required? Or a convergence tolerance tight enough that it is pretty close to machine round off?
Why do you need to run to machine round off anyway? |
|
March 15, 2010, 08:51 |
|
#5 |
Member
prout
Join Date: May 2009
Posts: 32
Rep Power: 17 |
Right now that's what I'm doing, running X iterations. A tight tolerance could work, but as I have various values to run in a script I can't guess a value for each run...
I need machine round off to verify the asymptotic convergence of my result when the number of nodes increases, so I'm sure the result I get is the true result of the model (neglecting the machine precision). |
|
March 15, 2010, 15:17 |
|
#6 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,872
Rep Power: 144 |
The truncation error due to mesh resolution should be orders of magnitude higher than the error due to round off. I can't see why you would bother going to machine round off error. Convergence to a tight tolerance should be fine.
|
|
March 15, 2010, 18:54 |
|
#7 |
Member
prout
Join Date: May 2009
Posts: 32
Rep Power: 17 |
I'm sorry, I think I have mistaken terms here, I realize that reading the CFX Help...technical English is a little tricky for me!
I'm not truely looking for machine round-off precision, but for the best precision the solver could give me. For instance, if after 200 iterations the residuals do not change and their graphs stay flat when the run continues, here I am: I know the solver found the best solution it could. I guess the right term would be "solver precision", which would be reached when only the machine round-off and timestepping have an influence on the solution of Ax=b? |
|
March 16, 2010, 07:09 |
|
#8 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,872
Rep Power: 144 |
No, I think I correctly understood your terminology - I think you misunderstood my last point.
My point was that the error due to the mesh size (ie truncation due to mesh size) is going to be far larger than the difference between tight convergence, tighter convergence and run until it converges no more. So my point is I don't think running to such tight tolerances is required. Mesh sensitivities can be adequately found using more standard residual tolerances for most cases. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Number of elements x double precision | matheusguzella | ANSYS Meshing & Geometry | 2 | October 7, 2009 11:15 |
Distributed Parallel on dual core remote machine | Justin | CFX | 1 | February 3, 2008 18:23 |
what's wrong about my code for 2d burgers equation | morxio | Main CFD Forum | 3 | April 27, 2007 11:38 |
double precision assigning in FRTRAN | R.A.Khurram | Main CFD Forum | 12 | October 2, 2001 12:00 |
PC vs. Workstation | Tim Franke | Main CFD Forum | 5 | September 29, 1999 16:01 |