|
-
February 15th, 2013, 01:29 PM
#3
Re: Need Variable Time Step to Avert Unstable Numerical Integ. Exceeding Limits of Do
The "explosion" somehow forces the logic of the software to drop out of the function performing the computation. The variable "blows up" in a function loop, and I need to identify how to detect a variable that has just gone to infinity based upon some characteristic of the variable.
Yes, I can test for an empty position in the output vector (a zero value), and if I find one, restart the loop with a smaller time step. My question here is a little more subtle than that. I'm seeking some deeper mathematical insight into how to avoid merely adjusting the time step down to something on the order of 10^ -10 seconds in a simulation over billions of years and waiting for the world to end before the computation is done.
I could detect the "blow-up" via the output vector test, then adjust the time-step down by a factor of ten until the "blow-up" doesn't occur, after resetting variables appropriately, then re-set the time-step to the "normal" value if the loop completes without a problem.
Testing the products, numerators, and denominators might be a useful alternative in terms of the exponential terms, to see if they can add up to a problematic value. I could reduce the time-step if the exponents seem to present a problem.
I'm going to attempt a 4th order Runge-Kutta method first, since my initial Euler technique is known to produce errors, which could generate instability if the errors are large enough. (I was hoping for a quick and dirty solution that would work.)
Thanks.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|