Showing posts with label Hairer & Wanner. Show all posts
Showing posts with label Hairer & Wanner. Show all posts

Monday, October 27, 2014

(Single) Diagonally Implicit RK Method


Let us now focus attention on the s x s Butcher tableau for the Implicit method. Hairer & Wanner quote Roger Alexander’s paper, where Alexander suggests the use of a lower-triangularized form of the table. By using the lower triangular form, the need for iterations vanishes and it becomes a single-step process.

In doing so, Alexander suggests that the term ai,j becomes 0 for all i < j. He refers to such a process as a Diagonally Implicit RK method.

The Implicit RK formulation necessitates the solution of ki’s via Newton-type iterations at each time step. A reformulation of the ki’s can be written as follows (Hairer & Wanner):
Rearranging the terms to a form that has the independent variable ki on the left hand side, the common term that arises in the iteration is:


The partial derivative is equivalent to the Jacobian.


Alexander proceeds further to state that if all the ai,i terms are equal, (i.e., the outer diagonal terms of the lower triangular matrix), then the above matrix with the Jacobian needs to be evaluated only once at each time step. Such a formulation is referred to as the Single Diagonally Implicit RK method, or the SDIRK.

The Butcher tableau for the SDIRK method thus takes the form:



Friday, September 26, 2014

The non-linear Coupled Pendulum


The equations for the coupled pendulum as presented in Hairer et al are: 



2nd order ODE’s can be numerically integrated by converting into 1st order equivalents. This can be performed by a straight-forward conversion, or using the State-Space approach. Once represented as 1st order ODE’s, a numerical technique such as Runge-Kutta or Rosenbrock can be easily implemented to achieve the required output. Shown below is the solution to the coupled pendulum, integrated using the Generalized Rosenbrock method with the VELDS coefficients.

Tuesday, September 23, 2014

Veldhuizen’s Coefficients for Rosenbrock Methods (VELDS)



Veldhuizen developed two sets of coefficients for use with the Rosenbrock formulation. Shown below is one such set, “VELDS”, as presented in Hairer & Wanner’s ROS4 code.

              A21= 0.2000000000000000E01
       A31= 0.1750000000000000E01
       A32= 0.2500000000000000
       C21=-0.8000000000000000E01
       C31=-0.8000000000000000E01
       C32=-0.1000000000000000E01
       C41= 0.5000000000000000
       C42=-0.5000000000000000
       C43= 0.2000000000000000E01
       B1= 0.1333333333333333E01
       B2= 0.6666666666666667
       B3=-0.1333333333333333E01
       B4= 0.1333333333333333E01
       E1=-0.3333333333333333
       E2=-0.3333333333333333
       E3=-0.0000000000000000
       E4=-0.1333333333333333E01
       GAMMA= 0.5000000000000000
       C2= 0.1000000000000000E01
       C3= 0.5000000000000000
       D1= 0.5000000000000000
       D2=-0.1500000000000000E01
       D3=-0.7500000000000000
       D4= 0.2500000000000000
 
Used with the Generalized Rosenbrock formulation, these coefficients can be implemented fairly easily for numerical solution of 1st order ODE’s.

Wednesday, August 6, 2014

Rosenbrock – L-Stable coefficients



Here is another set of L-Stable coefficients for the Rosenbrock generalized method, as presented in Hairer & Wanner. The Gamma value for the L-Stable coefficients is 0.572. The coefficients have been obtained from here.

       A21= 0.2000000000000000E1
       A31= 0.1867943637803922E1
       A32= 0.2344449711399156
       C21=-0.7137615036412310E1
       C31= 0.2580708087951457E1
       C32= 0.6515950076447975
       C41=-0.2137148994382534E1
       C42=-0.3214669691237626
       C43=-0.6949742501781779
       B1= 0.2255570073418735E1
       B2= 0.2870493262186792
       B3= 0.4353179431840180
       B4= 0.1093502252409163E1
       E1=-0.2815431932141155
       E2=-0.7276199124938920E-1
       E3=-0.1082196201495311
       E4=-0.1093502252409163E1
       GAMMA= 0.5728200000000000
       C2= 0.1145640000000000E1
       C3= 0.6552168638155900
       D1= 0.5728200000000000
       D2=-0.1769193891319233E1
       D3= 0.7592633437920482
       D4=-0.1049021087100450

Tuesday, July 29, 2014

Hairer & Wanner’s Brusselator problem

A good test of the Rosenbrock methods can be applied to the PDE from Hairer & Wanner. The PDE’s for the diffusion equation (also known as the Brusselator in one spatial coordinate) are:
 


The initial & boundary conditions are:



The first step in the solution of this PDE is to convert it into equivalent ODE’s, with the use of the finite difference technique & the MOL. Here is the procedure to solve the PDE’s:
  • Choose the number of grid points N to be used for the finite difference method.
  • Calculate the discrete location of the points on the grid:
  •  Calculate the spacing between the grid points 
  •  Use the finite difference technique to represent the 2nd order PDE’s as ODE’s
 
  •  Use the MOL to convert the PDE’s to ODE’s



Plotted below are the 3D solutions of vectors u & v.