





Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!






Homework Problems
(We recommend you contact the instructor and ask for a printed copy of these problems
as they make not appear correctly in some browsers. Please be sure to send us your snail
mail address).
#1 a. Prepare a floppy diskette (3 1/2") that is “bootable”, i.e., a diskette that is a
system diskette.
b. Make sure the diskette has 3 directories with names MATH, FORTRAN, and
c. The AUTOEXEC.BAT file should reference a batch file called MENU.BAT
that interrogates the user as to which directory he/she wishes to work with and
switches to that directory.
For this problem, mail your diskette to Q. Loveland, 100 Radiation Center,
Oregon State University, Corvallis, OR 97331, USA. Submit all other problems
by email.
#2 a. Poiseuille’s law for viscous fluid flow through a pipe of radius a is
Q=pa
4
P/8hl
where Q is the flow rate(m
3
/s), P/l is the pressure gradient down the pipe (N/m
3
and h is the viscosity (kg/m-s). Create a spreadsheet that consists of a two-input
table using copied formulas for water (h=100 x 10
kg/m-s) for 10 pipe diameters
between 0.5 cm and 5 cm and 10 pressure gradients between 10
5
and 10
6
N/m
3
to 10 atm through a 1 m pipe).
b. Create an Excel spreadsheet that plots the radial distribution function for the 3s
orbital of hydrogen for values of r = 0.... 15. The radial dependence of the 3s
wave function
n l
is
30
( r ) =
a
0
3 / 2
6 - 6 r + r
2
e
where a 0
= 52.92 pm, r = (2Zr/3a
0
) and Z is the atomic number. The radial distribution
function can be approximated as
r
p r r
RDF μ r R r μ r - + e
2 2 2 2
30
2
RDF μ r
2
( 6 - 6 r + r
2
2
e
[The radial distribution function is the probability of finding an electron at a radius r from
the nucleus]. Evaluate the value of r at which the RDF is a maximum. Use steps of r of
0.1 in plots.
The spreadsheets should be named e2a.xls and e2b.xls, respectively.
#3 a. Create an Excel spreadsheet (e3a.xls) that calculates the compressibility factor z
(=PV/n RT) for an ideal gas, nitrogen, carbon dioxide and chlorine. (Assume Van der
Waal’s behavior). Let n = 1, T = 300K, P = 0, 75, 150, 225, 300, 375, 450, 525, 600, and
675 atm. Plot the results on the spreadsheet.
Van der Waals constants
a(atm-L
2
/mol
2
) b(L/mol)
Ideal 0 0
2
2
Cl 2
b. Create an Excel spreadsheet (e3b.xls) that contains a macro GRADER that will read in
an ASCII file a:GRADES.DAT that I will supply. The macro should compute the
average, population standard deviation, sample standard deviation, weighted sample
mean and the variance of the weighted mean of the data. Assume the file will have 50
entries corresponding to y i
, s
i
where i = i...50. Assume each line will contain the entry y
i
and s i
, delineated by an irregular number of spaces between them.
#4 a. Use Mathematica (e4a,nb) to compute the exact numerical value of the
following integral.
xy
2
dydx
0
( 1 - x )
0
1
b. Use Mathematica (e4b.nb) to :
2
= height of peak 2 above baseline
x 1
= position of peak 1 maximum along x axis
x 2
= position of peak 2 maximum along x axis
s
1
= standard deviation of peak 1
s
2
= standard deviation of peak 2
B = baseline offset from zero on y axis
x i
= ith point on x axis
y i
= ith point on y axis where x = x i
x i
y i
x i
y i
Use a FORTRAN90 program (e9.f90).
#10 Write a Mathematica program (e10.nb) to calculate the fugacity f as a function of
pressure P and temperature T assuming the van der Waals equation can be applied.
ln
f
p
dp
0
R
The van der Waals equation is given as
2
a
V b
Hints:
ln
f
p
dp
0
R
dp
0
p
where C = pV/RT = compressibility coefficient. For the van der Waals equation of state
a
2
3
2
b +
a
2 b
V - b
a
b
a
Expanding
C = 1 + b -
a
b
2
Use perfect gas approx. and truncate expansion at first term.
b -
a
l
= e
l
lc
where P
V
is the molar absorptivity of the substance and l is the sample thickness. For a
multicomponent mixture
l
= e
l
(1) lc 1
l
(2) l c 2
l
(n)l c n
l
= e
l
( j ) lc
j
j = 1
n
Measurement at several different wavelengths gives a set of equations, one for each
wavelength that can be solved as a set of simultaneous equations.
The methylation of toluene produces a mixture of xylene isomers: a low temperature (
º
C) favors 1, 3 addition, a high temperature (
º
C) gives 1, 2 and 1, 4 addition and side
chain substitution. Calculate the concentration of the isomers in a reaction mixture
producing the data below and decide whether reaction was carried out at high or low
temperature.
l(mm) D
l
o-xylene m-xylene p-xylene ethylbenzene
#14 Write a FORTRAN program (e14. f 90) that solves problem 6, p.675 of Nyhoff
and Leestma.
#15 Consider the following problem in chemical kinetics. Three chemical compounds
are linked by the following set of equations:
k
12
, k
21
¨ ææÆ B
k
23
, k
32
¨ ææÆ C
with the following set of differential equations that express the concentrations of
A, B and C as a function of time:
d A
dt
= - k
12
21
d B
dt
= - ( k
23
21
12
32
d C
dt
= - k
32
23
Use a fourth order Runge-Kutta method to solve these differential equations. Your
program should allow the input of the rate constants and starting concentrations of A, B
and C and should trace the concentrations for 20 seconds using step sizes of 25 steps/sec.
#16 Consider the function
Sin (2pt) (1 + 1/5 Sin [ 6pt ] + 1/10 Sin [ 8pt])
Generate a table of data points from this function with random noise added. Take the
Fourier transform of the table and plot the results. Filter the transform and replot the data
to show removal of the noise. Do this exercise in Mathematica (e16).
#17 Develop a FORTRAN 90 program (e17. f 90) to compute the average depth
of a pond if the local depth Z (x, y) at point ( x, y ) is given by
2 2
x y
Z x y
The surface of the water is bounded by
(x/300)
2
2
(All dimensions in feet). Do this by “measuring” the depth at 10, 100, 1000 and 10000
randomly chosen points (x, y) on a (-300 < x < 300) and (-50 <y <50) surface. Be sure
each measurement is on the water and not the land. Report how < Z > and its standard
deviation vary with the number of measurements.
#18 Write a FORTRAN 90 program (e18. f 90) that considers two hard disks in an
isolated two dimensional system. Write a program that for given initial positions and
velocities determines whether the two disks will collide. If they do, obtain the time of
collision, the positions at collision and the post collision velocities. If they do not collide,
obtain their positions at the closest point of approach.
Assume as typical input r
1
(0) = 4j V
1
(0) = -j
r 2
(0) = -j V 2
(0) = 4j
i & j are the unit vector in the + x and + y directions.
#19 Devise an Excel spreadsheet (e19.xls) that for a given (input) value of n and r
calculates the Spherical Bessel Function j n
(r).
#20 Write a FORTRAN 90 program (e20.f 90) that: