开发者

Estimating the rate of convergence, finite difference scheme [closed]

开发者 https://www.devze.com 2023-02-21 17:52 出处:网络
Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed. This question is off-topic. It is not currently accepting answers.

Want to improve this question? Update the question so it's on-topic for Stack Overflow.

Closed 11 years ago.

开发者_Go百科 Improve this question

I'm trying to estimate the rate of convergence of a sequence.

background:

u^n+1 = G u_n, where G is a iteration matrix (coming from heat equation).

Fixing dx = 0.1, and setting dt = dx*dx/2.0 to satisfy the a stability constraint I then do a number of iterations up to time T = 0.1, and calculate the error (analytical solution is known) using max-norm.

This gives me a sequence of global errors, which from the theory should be of the form O(dt) + O(dx^2).

Now, I want to confirm that we have O(dt).

How should I do this?


Relaunch the same code with dt/2 and witness the error being halved.


I think Alexandre C.'s suggestion might need a little refinement (no pun intended) because the global error estimate depends on both Δt and Δx.

So if Δx were too coarse, refining Δt by halving might not produce the expected reduction of halving the error.

A better test might then be to simultaneously reduce Δt by quartering and Δx by halving. Then the global error estimate leads us to expect the error reduced by quartering.

Incidently it is common to plot the global error and "scales" as a log-log graph to estimate the order of convergence.

With greater resources (of time and computer runs) independently varying the time and space discretizations would allow a two-parameter fit (of the same sort of log-log model).


I suck at physics, but simple problems like this, even I can do.

Well, with what do you have problem with?

Calculating rate of the convergence:

  1. If you have series defined as

    Estimating the rate of convergence, finite difference scheme [closed]

    ( Sum[a[n], {n, 1, Infinity}] ), then you need to find location, where the series converges

    Estimating the rate of convergence, finite difference scheme [closed]

    ( L=Limit[a[n], n -> Infinity] ).
  2. Now you can find the rate of the convergence

    Estimating the rate of convergence, finite difference scheme [closed]

    ( μ = Limit[(a[n + 1] - L)/(a[n] - L), n -> Infinity] )

Finding the combined uncertainty with analytical solution

Using the equation:

Estimating the rate of convergence, finite difference scheme [closed]

( Uc = Sqrt[(D[a, t] Δt)^2 + (D[a, x] Δx)^2] )

0

精彩评论

暂无评论...
验证码 换一张
取 消