You are on page 1of 2

ME 614 Homework 1

Prof. S. H. Frankel
Abstract
This homework focuses on lecture material related to the classification of PDEs and finite-difference
approximations of derivatives, as well as additional practice for Fortran90 and building more code blocks
that will be needed in future projects. Prepare handwritten write-ups on engineering paper of all the
problems and your computer code, graphics, and sample output in an electronic (Word, LaTex), or
equivalent version. ProEd students may also email their written assignment to me (scanned in etc.) but
on-campus students must turn in a paper copy. All students - Please email your codes to me on
the due date so I can compile, run, and test them.

PDE Problems
1. Give the order of each of the following PDEs and state whether they are linear, quasilinear, or nonlinear.
If it is linear, state whether it is homogeneous or not:
(a) uxx + uyy = 0
(b) uxxx + uxy + a(x)uy + log(u) = f (x, y)
(c) uxxx + uxyyy + a(x)uxxy + u2 = f (x, y)
(d) uuxx + u2yy + eu = 0
(e) ux + cuy = d
2. Show that u(x, t) = cos(x ct) is a solution of ut + cux = 0.
3. Which of the following PDEs is linear? quasilinear? nonlinear? If it is linear, state whether it is
homogeneous or not.
(a) uxx + uyy 2u = x2
(b) uxy = u
(c) uux xuy = 0
(d) u2x + log(u) = 2xy
(e) uxx 2uxy + uyy = cos(x)
(f) ux (1 + uy ) = uxx
(g) (sinux )ux + uy = ex
(h) 2uxx 4uxy + 2uyy + 3u = 0
(i) ux + ux uy uxy = 0
4. Classify each of the following as hyperbolic, parabolic, or elliptic at every point (x, y) of the domain:
(a) xuxx + uyy = x2
(b) x2 uxx 2xyuxy + y 2 uyy = ex
(c) ex uxx + ey uyy = u
(d) uxx + uxy xuyy = 0 in left half plane (x 0)
(e) x2 uxx + 2xyuxy + y 2 uyy + xyux + y 2 uy = 0
(f) uxx + xuyy = 0 (Tricomi equation)
5. Consider the following PDE: uxx + 4uxy + 3uyy + 3ux uy + 2u = 0.
(a) Show that it is hyperbolic
1

(b) Find the characteristics and transform the PDE to canonical form
6. Problem 2.9 in your textbook.
7. Consider again Tricomis PDE, which is a simple model for irrotational transonic aerodynamics, uyy +
yuxx = 0. In the hyperbolic region determine the characteristics and the canonical form.

Computer Programming Practice


In order to continue to develop and test your Fortran90 programming skills, and to prepare you for some of
the computer projects to follow, please write Fortran90 programs to do the following:
1. Write another two subroutines to add to the program you developed in HW0 called deriv12 and deriv14
such that given the function u on the grid x evaluate the first derivative (hence the name deriv1) using
second- and fourth-order centered finite-difference schemes (hence the names deriv12 and deriv14) given
in your textbook as Eqn.(3.28) and Eqn.(3.44) in Table 3.1 on page 52. Write another subroutine called
exact that evaluates the exact derivative of a function u and call it uderiv1. Consider the function
u(x) = esin(x) on the domain [, ].
2. Run your program for npts ranging from 23 to 28 (you might want to modify your code to evaluate npts
in a loop rather than read it in from the user input for this case). Create a log-log plot of the maximum
error versus npts and comment on your findings with regard to what you know about the truncation
error expected by these finite-difference approximations. Plot the function and its derivative as well.

Programming Tips
Please write your programs in a modular form following the template we provided in either the notes or
the prec.f90 program downloadable from the website. That is, create a module, call it module subs, and
put all your subroutines in it. Then use that module in your main program. Add a second module called
typesvars, give in the prec.f90 code and use it in your main program and in your module subs to facilitate the
use of double-precision reals in all your codes in this class. In general, try and establish a coding style, e.g.
use the 2-space indent rule for all code blocks, comment you code concisely, capitalize all Fortran key words,
use white space to improve readability and use !.... line breaks between procedures, modules, etc.

You might also like