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

Machine round-off precision

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

Reply
 
LinkBack Thread Tools Display Modes
Old   March 11, 2010, 20:19
Default Machine round-off precision
  #1
Member
 
prout
Join Date: May 2009
Posts: 32
Rep Power: 8
zboud is on a distinguished road
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.
zboud is offline   Reply With Quote

Old   March 12, 2010, 00:39
Default
  #2
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 10,929
Rep Power: 85
ghorrocks has a spectacular aura aboutghorrocks has a spectacular aura aboutghorrocks has a spectacular aura about
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.
ghorrocks is offline   Reply With Quote

Old   March 12, 2010, 08:32
Default
  #3
Member
 
prout
Join Date: May 2009
Posts: 32
Rep Power: 8
zboud is on a distinguished road
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... ^^
zboud is offline   Reply With Quote

Old   March 14, 2010, 18:48
Default
  #4
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 10,929
Rep Power: 85
ghorrocks has a spectacular aura aboutghorrocks has a spectacular aura aboutghorrocks has a spectacular aura about
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?
ghorrocks is offline   Reply With Quote

Old   March 15, 2010, 08:51
Default
  #5
Member
 
prout
Join Date: May 2009
Posts: 32
Rep Power: 8
zboud is on a distinguished road
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).
zboud is offline   Reply With Quote

Old   March 15, 2010, 15:17
Default
  #6
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 10,929
Rep Power: 85
ghorrocks has a spectacular aura aboutghorrocks has a spectacular aura aboutghorrocks has a spectacular aura about
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.
ghorrocks is offline   Reply With Quote

Old   March 15, 2010, 18:54
Default
  #7
Member
 
prout
Join Date: May 2009
Posts: 32
Rep Power: 8
zboud is on a distinguished road
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?
zboud is offline   Reply With Quote

Old   March 16, 2010, 07:09
Default
  #8
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 10,929
Rep Power: 85
ghorrocks has a spectacular aura aboutghorrocks has a spectacular aura aboutghorrocks has a spectacular aura about
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.
ghorrocks is offline   Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Number of elements x double precision matheusguzella ANSYS Meshing & Geometry 2 October 7, 2009 10: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 10:38
double precision assigning in FRTRAN R.A.Khurram Main CFD Forum 12 October 2, 2001 11:00
PC vs. Workstation Tim Franke Main CFD Forum 5 September 29, 1999 15:01


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