Numerical Methods for Supercomputers Graphics Assignment 2 Dr. Ed Donley Due ***
To improve the hardness characteristics of steel, carbon can be added in a controlled manner by a process called carburization, which involves the gradual diffusion into the steel of atoms of carbon applied at the metal surface. For example, if a rod of pure iron is welded to a similar rod containing carbon, the carbon content of the originally pure end will vary with time, t, and position down the rod, x. At time t = 0, the concentration of carbon in the pure half is zero. It can be shown that the concentration of carbon, C, at any time t > 0 and position x, is

where D is the diffusion constant, and Co is the initial concentration at t0. This integral is called the error function, Erf. It occurs frequently in mathematics, statistics, and the sciences.
The diffusion process is very temperature dependent and, for constant temperatures, this can be taken into account in the diffusion constant by expressing it as
D = Do e^(-q/RT)
where Do (in m^3/sec) is a constant depending on the properties of the material, q (in joules) is the activation energy and is constant, R (8.316 J/mole-K) is the ideal gas constant, and T (in degrees Kelvin) is the temperature.
We want to examine how lowering the temperature of a section of the bar will effect the carburization process. Generate the concentration for 0 < x < 0.5 m (at 51 equally-spaced points, including 0 and 0.5) and 0 < t < 5.0 x 10^6 sec (at 101 equally-spaced points, including 0 and 5.0 x 10^6 ) and a constant temperature of T = 1300oK. Compute these concentrations by applying the 5-point Gauss quadrature rule to the above integral. First partition the interval of integration into subintervals of length at most 0.1. Then apply the 5-point Gauss quadrature rule to each subinterval. Use the following values for the variables:
Co = 0.10 Do = 2.4 x 10^-5 m^3/sec q = 0.75 x 10^5 Joules
The Gauss points and weights for the interval [-1/2, 1/2] are:
xo = 0 wo = 64/225 x+/- 1 = +/- 0.2692346551 w+/-1 = 0.2393143352 x+/-2 = +/- 0.4530899230 w+/-2 = 0.1184634425
Include the loopmarking option when you compile your program and if necessary, try to transform any loops that would not automatically vectorize.
I have already generated the concentrations for the non-constant temperature distribution T(x) = 1300 - 400 e^[-900(x - 0.2)^2]. (This required approximating the solution to a partial differential equation.) You can copy the results to your account from PDIR$PROJECT:CARBON.DAT on IUP's VAX or from /usr/users/ma481 on IUP's DECstations. The format for the file is:
write(8,100) x write(8,100) t do i = 0, nt write(8, 200) (c(i, j), j = 0, nx) enddo 100 format(1x, 10e11.6) 200 format(1x, 20f6.5)
Compare the constant temperature solution and the non-constant temperature solution by displaying both solutions simultaneously as animated color graphs. Use colors to represent various concentrations. You only need to display your solution at every other time step, for a total of 51 animation frames.
You should hand in your list file generated from the loopmarking option (include an explanation of why some of the loops, if any, did not vectorize). Secondly, write a one or two paragraph report describing the effect of the lowered temperature on the carburization process, and lastly, give me the name of your CGM graphics metafile, so that I can see your animation. In class, I will describe the process for placing the animation on videotape.