From: bangerth Date: Mon, 6 Nov 2006 05:33:55 +0000 (+0000) Subject: Finish also the results section. Update one formula in the introduction X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7a61f30de47f03c8944da645256ed1a063e6a946;p=dealii-svn.git Finish also the results section. Update one formula in the introduction git-svn-id: https://svn.dealii.org/trunk@14163 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/examples/step-25/doc/intro.dox b/deal.II/examples/step-25/doc/intro.dox index 92c4f67e12..c7c692f385 100644 --- a/deal.II/examples/step-25/doc/intro.dox +++ b/deal.II/examples/step-25/doc/intro.dox @@ -222,10 +222,10 @@ this:
  • In 1d: @f[ u(x,t) = - -f \arctan\left[ - \frac - {m\sin\left(\sqrt{1-m^2}t+c_2\right)} - {\sqrt{1-m^2} \cosh\left(mx+c_1\right)} + -4 \arctan\left[ + \frac{m\sin}{\sqrt{1-m^2}} + \frac{\left(\sqrt{1-m^2}t+c_2\right)} + {\cosh\left(mx+c_1\right)} \right] @f] where we choose $m=\frac 12, c_1=c_2=0$. diff --git a/deal.II/examples/step-25/doc/results.dox b/deal.II/examples/step-25/doc/results.dox index 7b011cb349..222badfccf 100644 --- a/deal.II/examples/step-25/doc/results.dox +++ b/deal.II/examples/step-25/doc/results.dox @@ -1,10 +1,15 @@

    Results

    -The explicit Euler time stepping scheme ($\theta=0$) performs adequately for the problems we wish to solve. Unfortunately, a rather small time step has to be chosen due to stability issues --- $k\sim h/10$ appears to work for most the simulations we performed. On the other hand, the Crank-Nicolson scheme ($\theta=\frac{1}{2}$) is unconditionally stable, and (at least for the case of the 1D breather) we can pick the time step to be as large as $25h$ without any ill effects on the solution. The impicit Euler scheme ($\theta=1$) is "exponentially damped," so it is not a good choice for solving the sine-Gordon equation, which is conservative. However, some of the damped schemes in the continuum that is offered by the $\theta$-method were useful for eliminating spurious oscillations due to boundary effects. +The explicit Euler time stepping scheme ($\theta=0$) performs adequately for the problems we wish to solve. Unfortunately, a rather small time step has to be chosen due to stability issues --- $k\sim h/10$ appears to work for most the simulations we performed. On the other hand, the Crank-Nicolson scheme ($\theta=\frac{1}{2}$) is unconditionally stable, and (at least for the case of the 1D breather) we can pick the time step to be as large as $25h$ without any ill effects on the solution. The implicit Euler scheme ($\theta=1$) is "exponentially damped," so it is not a good choice for solving the sine-Gordon equation, which is conservative. However, some of the damped schemes in the continuum that is offered by the $\theta$-method were useful for eliminating spurious oscillations due to boundary effects. -In the simulations below, we solve the sine-Gordon on the interval $\Omega = [-10,10]$ in 1D and on the square $\Omega = [-10,10]\times [-10,10]$ in 2D. In each case, the respective grid is refined uniformly 6 times ($\Rightarrow h\sim 2^{-6}$). +In the simulations below, we solve the sine-Gordon on the interval $\Omega = +[-10,10]$ in 1D and on the square $\Omega = [-10,10]\times [-10,10]$ in 2D. In +each case, the respective grid is refined uniformly 6 times, i.e. with $h\sim +2^{-6}$. -

    An (1+1)D Solution

    -The first example we discuss is the so-called 1D (stationary) breather solution of the sine-Gordon equation. The breather has the following closed-form expression: +

    An (1+1)-d Solution

    +The first example we discuss is the so-called 1D (stationary) breather +solution of the sine-Gordon equation. The breather has the following +closed-form expression, as mentioned in the Introduction: \f[ u_{\mathrm{breather}}(x,t) = -4\arctan \left(\frac{m}{\sqrt{1-m^2}} \frac{\sin\left(\sqrt{1-m^2}t +c_2\right)}{\cosh(mx+c_1)} \right), \f] @@ -12,18 +17,43 @@ where $c_1$, $c_2$ and $m<1$ are constants. In the simulation below, we have cho \image html step-25.1d-breather.gif "Animation of the 1D stationary breather." width=5cm -Another way to visualize the (1+1)D solution is to use the output from the DataOutStack object to produce the space-time plot below instead of the animation above. +Though not shown how to do this in the program, another way to visualize the +(1+1)-d solution is to use output generated by the DataOutStack class; it +allows to "stack" the solutions of individual time steps, so that we get +2-dimensional space-time graphs from 1-dimensional time dependent +solutions. This produces the space-time plot below instead of the animation +above. \image html step-25.1d-breather_stp.png "A space-time plot of the 1D stationary breather." width=5cm -Furthermore, since the breather is an analytical solution of the sine-Gordon equation, we can use it to validate our code, at least in 1D. For the simulation shown in the two images above, the $L^2$ norm of the error in the finite element solution at each time step remained on the order of $10^{-2}$. Hence, we can conclude that the numerical method has been implemented correctly in the program. - -

    A few (2+1)D Solutions

    -The only analytical solution to the sine-Gordon equation in (2+1)D that can be found in the literature is the so-called kink solitary wave. It has the following closed-form expression: -\f[ -u_{\mathrm{kink}}(x,t) = -4\arctan \left\{a_0\left[x\cos\vartheta+\sin\vartheta\left(y\cosh\lambda + t\sinh\lambda\right) \right]\right\}, -\f] -where $a_0$, $\vartheta$ and $\lambda$ are constants. In the simulation below we have chosen $a_0=\lambda=1$. Notice that if $\vartheta=\pi$ the kink is stationary, hence it would make a good solution against which we can validate the program in 2D because no reflections off the boundary of the domain occur. +Furthermore, since the breather is an analytical solution of the sine-Gordon +equation, we can use it to validate our code, although we have to assume that +the error introduced by our choice of Neumann boundary conditions is small +compared to the numerical error. Under this assumption, one could use the +VectorTools::integrate_difference function to compute the difference between +the numerical solution and the function described by the +ExactSolution class of this program. For the +simulation shown in the two images above, the $L^2$ norm of the error in the +finite element solution at each time step remained on the order of +$10^{-2}$. Hence, we can conclude that the numerical method has been +implemented correctly in the program. + + +

    A few (2+1)-d Solutions

    + +The only analytical solution to the sine-Gordon equation in (2+1)-d that can be found in the literature is the so-called kink solitary wave. It has the following closed-form expression: + @f[ + u(x,y,t) = 4 \arctan \left[a_0 e^{s\xi}\right] + @f] +with + @f[ + \xi = x \cos\vartheta + \sin(\vartheta) (y\cosh\lambda + t\sinh \lambda) + @f] +where $a_0$, $\vartheta$ and $\lambda$ are constants. In the simulation below +we have chosen $a_0=\lambda=1$. Notice that if $\vartheta=\pi$ the kink is +stationary, hence it would make a good solution against which we can +validate the program in 2D because no reflections off the boundary of the +domain occur. The simulation shown below was performed with $u_0(x) = u_{\mathrm{kink}}(x,t_0)$, $\theta=\frac{1}{2}$, $k=20h$, $t_0=1$ and $t_f=500$. The $L^2$ norm of the error of the finite element solution at each time step remained on the order of $10^{-2}$, showing that the program is working correctly in 2D, as well as 1D. Unfortunately, the solution is not very interesting, nonetheless we have included a snapshot of it below for completeness. @@ -48,21 +78,14 @@ the following separable 2D initial condition: \frac{m}{\sqrt{1-m^2}} \frac{\sin\left(\sqrt{1-m^2}t_0\right)}{\cosh(mx_2)} \right), \f] -where $x=(x_1,x_2)\in{R}^2$, $m=0.5(<1)$ as in the 1D case we discussed +where $x=(x_1,x_2)\in{R}^2$, $m=0.5<1$ as in the 1D case we discussed above. For the simulation shown below, we have chosen $\theta=\frac{1}{2}$, $k=10h$, $t_0=-5.4414$ and $t_f=2.7207$. The solution is pretty interesting --- it acts like a breather (as far as the pictures are concerned); however, -it appears to break up and reassemble, rather than just oscillate. Naturally, -the are things in the animation that can not be explained in a few words due -to the fact that this initial condition is not an analytical solution to the -sine-Gordon equation. +it appears to break up and reassemble, rather than just oscillate. \image html step-25.2d-pseudobreather.gif "Animation of a 2D pseudobreather." width=5cm -

    Future work

    -Time-adaptive grids would likely be useful when solving a problem like this one (especially in the case of a traveling wave). However, due to the complexity of their implementation they are better left for another day. - -

    Possibilities for extensions

    @@ -77,3 +100,11 @@ the InitialValues class, by replacing the call to the u_0(x,y) = \cos\left(\frac x2\right)\cos\left(\frac y2\right) @f] if $|x|,|y|\le \frac\pi 2$, and $u_0(x,y)=0$ outside this region. + +Beyond this, clearly adaptivity (i.e. time-adaptive grids) would be of +interest to problems like these. Their complexity leads us to leave this out +of this program again, though the general comments in the introduction of @ref +step_23 "step-23" remain true. + + +