« first day (1469 days earlier)      last day (3067 days later) » 

9:12 PM
@ThomasKlimpel Hi!!!
 
@evinda Hi
 
@ThomasKlimpel Are you familiar with finite difference methods?
 
I have the problem
$u_t+2tx^2u_x=0, x \in [0,2], t \in [0,1] \\ u(0,x)=u_0(x)=e^{-\beta \left( x-1\right)^2} , x \in [0,2]\\ u(t,0)=0, t \in [0,1]$

I have found that the cfl-condition is $2 \nu t_n x_j^2 \leq 1$. Since it holds that $x \in [0,2], t \in [0,1]$, I thought that we could use the upper bounds for x and t and pick as Courant number, $\nu=\frac{1}{8}$. Is this right? @ThomasKlimpel
 
Sounds right. I assume you use a first order upwind scheme...
 
9:21 PM
Yes, I do... So is the justification right? @ThomasKlimpel
 
Yes, the justification is right. And because you use a first order upwind scheme, I think the cfl-condition is also sufficient for stability.
 
@ThomasKlimpel Suppose that N_x is the number of points of discretization of x and N_t is the number of points of discretization of t. Then I get the following errors:
For N_x=200 and N_t=800:

er = 2.2172e-004



For N_x=400 and N_t=1600:

er = 5.8732e-005



For N_x=800 and N_t=3200:

er = 2.0509e-005 @ThomasKlimpel
Do they seem right?
 
Yes, that is more or less the error behavior I would have expected.
 
 
1 hour later…
10:44 PM
"@ThomasKlimpel Great... Thank you!!!
For $N_x=200$ and $N_t=800$ I get the following graph for t_{800}=1 and for the intermediate steps t_{100}=1/8, t_{250}=5/16, t_{500}=5/8:
@ThomasKlimpel So is the approximation good?
 
Well, it is good for N_t=800. For N_t=500, it is not so great, but probably still expected.
 
@ThomasKlimpel Why is it expected? And why is the approximation better for N_x=100 and N_x=250?
 
So your error numbers above are misleading, because the wave has already left the domain for N_t=800 (t=1). So it would be better to report the errors for t=5/8, or maybe even report the max error over all times.
It is expected, because a first order upwind scheme damps like hell, and this is exactly what we see here.
 
11:05 PM
@ThomasKlimpel I have calculated the errors for each of the above times:

er (t_{800}=1) = 2.2172e-004


er1 (t_{100}=1/8) = 0.0154


er2 (t_{250}=5/16) = 0.0754


er3 (t_{500}=5/8) = 0.1661
What do we see from them? @ThomasKlimpel
@ThomasKlimpel N_t is 800 at each time step, it doesn't change... We take various t_n for n=100,250,500,800...
 
11:21 PM
Well, we see that the error is quite big. And if we look at it for the higher resolutions, we should see that it gets smaller.
 
Is there a reason why the errors are smaller for n=100,250,800 than for n=500 ? @ThomasKlimpel
 
Well, for t=5/8, the wave has already travelled quite some distance, and its peak is still within the domain. For t=1, the wave and its peak have already left the domain, so there is not much error left. For t=1/8 and t=2.5/8, the wave has not yet traveled far, so the error is still small(er).
 
@ThomasKlimpel With wave to you mean the exact solution? Also you say that the wave and its peak have already left the domain. Could it be that only one of them have left the domain? Also do you mean the domain of dependence?
 
11:37 PM
By wave, I just mean that nice shape which propagates through your domain, and gets slightly deformed. The peak could have left the domain, while a part of the wave is still within the domain. If the wave has left the domain, then the peak certainly has also left. By domain, I mean the interval $[0,2]$, i.e. the computational domain.
 

« first day (1469 days earlier)      last day (3067 days later) »