Here we present numerical results obtained when the
MEBDFSO code was applied to some ODEs that arise in the numerical
method of lines solution of time dependent partial differential equations.
In each case NAME.F will denote the drivers and
NAME.RES will denote the numerical results obtained. The file
NAME.DAT specifies the PDE and should be in the same working
directory as the three Fortran files.
The file DISCRT.F contains the spatial approximation we used.
The runs were done on an IBM RS6000. We used the Fortran 77 compiler with
optimization:
f77 -O3 MEBDFSO.F YALE.F NAME.F INITIAL.F DISCRT.F.
In what follows the subscripts in T and X denote
partial derivatives with
respect to these independent variables. To solve each of the following PDEs
we used a uniform mesh spacing, DX, of N points, so that
DX =(XU-XL)/(N-1), where XU, XL are the upper and
lower limits of X respectively.
We then applied finite difference approximations to the spatial derivatives.
This reduces the problem to a linear system of ODEs with N equations.
The Method of lines and some of the spatial approximations we used are
explained in detail in
[8].
Here Vis denotes the viscosity. This parameter significantly affects the
character of the equation. For small Vis the equation is hyperbolic,
while for large Vis it is parabolic.
For our test we used Vis = 0.003 and N=201.
The spatial derivatives
We ran the problem with Vis=0.1 and 31 spatial grid points
in both the X and Y direction.
This gives 961 ordinary differential equations
We used the following spatial derivative approximations:
Again the results are obtained by compiling the first three Fortran
programs together and the results are in the BURGER2D.RES file.
We ran the problem with N=2001 and D=2D-5.
The spatial derivatives
To run this problem it is necessary to compile the first four Fortran
programs together where the file EXACT.F contains the reference
solution and the results are in the FLOOD.RES file.
It is important to note that the equation we are solving is really the
simple heat equation. We wish to test the performance of our algorithm
as function evaluations become more expensive. To do this we give the results
with P=1, P=10 and P=25. We used N=201
with the following spatial approximation :
To run this problem it is necessary to compile the first four Fortran
programs together where the file EXACT.F contains the reference
solution.
The KDV equation is a classical nonlinear PDE, originally
formulated to model shallow water flow. It is given by
For our test we approximate the space domain by -30 < X < 70
with N=400. We used a fifth
degree spline approximation to approximate the spatial derivatives.
The results given here are for one soliton
(KDV1S.RES), two equal solitons (KDV2ES.RES) and two
unequal solitons (KDV2NES.RES).
To run this problem it is necessary to compile the first four Fortran
programs together where the file EXACT.F contains the reference
solution.
Top of the page
U = Vis * U -U*U 0< X < 1
T XX X
The exact solution is :
U(X,T)=PHI(X,T)=(0.1D+00*EA+0.5D+00*EB+EC)/(EA+EB+EC),
where
EA=(0.05D+00/VIS)*(X-0.5D+00+4.95D+00*T)
EB=(0.25D+00/VIS)*(X-0.5D+00+0.75D+00*T)
EC=( 0.5D+00/VIS)*(X-0.375D+00).
The initial and boundary conditions are:
U(X,0) = PHI(X,0)
U(0,T) = PHI(0,T)
U(1,T) = PHI(1,T).
U and U are approximated by a cubic spline polynomial.
X XX
To run this problem it is necessary to compile the first three Fortran
programs together and the results are in the BURGER1D.RES file.
U = -U*U + Vis*U - U*U + Vis*U
T X XX Y YY
where 0 < X < 1, 0 < Y< 1 and 0 < T < 2.
The exact solution is :
U(X,Y,T)=UA(X,Y,T)=1/(1+EXP(X/(2*Vis)+Y/(2*Vis)-2*T/(4*Vis)))
The initial and boundary conditions are:
U(X,Y,0) = UA(X,Y,0)
U(0,Y,T) = UA(0,Y,T)
U(1,Y,T) = UA(1,Y,T)
U(X,0,T) = UA(X,0,T)
U(X,1,t) = UA(X,1,T).
For more details about the spatial approximation see
[8].
The error in the numerical solution is computed at the point
(X=(NX/2),Y=(NY/2)).
Similarly for the spatial derivatives with respect to Y.
U = D*U - U -2 < X < 2, 0 < T < 2
T XX X
The initial and boundary conditions are:
U(X,0) = EXP(-X^2)
U(-2,T)= [1/SQRT(1+4*D*T)]*EXP[-(-2-T)^2/(1+4*D*T)]
U( 2,T)= [1/SQRT(1+4*D*T)]*EXP[-(2-T)^2/(1+4*D*T)]
The analytical solution:
U(X,T) = [1/SQRT(1+4*D*T)]*EXP[-(X-T)^2/(1+4*D*T)]
U and U are approximated by a cubic spline polynomial.
X XX
2 2
U = U + U - 0.5*U*S -(.5)*S
T XX
where
S = SUM[ COS(I*X)*EXP(-I^2*T)], I=1,...,P
0 < T < 5.0 and 0 < X < 1.0
The initial and boundary conditions are:
U(X,0)= SUM[ COS(I*X) ], I,1,..,P
U(0,T)= SUM[ EXP(-I^2*T) ] I=1,..,P
U(1,T)= SUM[ COS(I)*EXP(-I^2*T) ], I=1,..,P
The analytical solution:
U(X,T) = SUM[ COS(I*X)*EXP(-I^2*T)], I=1,...,P
U : By five point, fourth order finite difference approximation.
X
U : By second order finite difference approximation.
XX
U = -6U*U - U -INF < X < INF
T X XXX
The initial condition is:
U(X,0) = (1/2)*c*sech^2{SQRT(c)*X/2}.
The analytical solution:
U(X,T) = (1/2)*c*sech^2{SQRT(c)(X-c*T)/2}
which is the equation for a soliton traveling from left
to right with velocity c and height (1/2)*c.