Assignment

Phase field modelling: the materials science,
mathematics and computational aspects
Assignment : week 11
Course instructor : Prof. M. P. Gururajan
Teaching assistants : G Kamalakshi and Arijit Roy
Department of Metallurgical Engineering & Materials Science
INDIAN INSTITUTE OF TECHNOLOGY - BOMBAY
July-2016
Questions : total marks 30
1. In lecture 43 we have written the spectral code to solve the 1-D diffusion problem
in octave. The initial composition profile is a sinusoid of one complete wavelength
varying between 0 and 1 as shown in Fig. 1. Boundary condition is periodic. Simulation parameters are as follows:
• Number of grid points; N = 128.
• Total number of time steps; t = 2000.
• Time step; ∆t = 1.0.
• Diffusivity; D = 1.0.
Initial profile
1
c(x)
0.8
0.6
0.4
0.2
0
-0.2
20
40
60
x
80
100
120
Figure 1: Initial composition profile.
Using the same code as described in lecture 43 complete the following objectives:
(a) Plot the average composition against time and save the figure as a .jpg file.
Average composition should attain a constant value of 0.5 through out the
simulation time, as the initial profile is varying between 0 and 1, and boundary
condition is periodic. Does your result confirm this fact? If not, figure out the
problem. (10 marks)
(b) Print the composition for every 500 steps along with the initial profile using
hold on command and save it as a .jpg file. (5 marks)
2
Hints: What happens to the composition at k = 0 in reciprocal space (it should
represent the average composition of the system) ?
2. Use the above mentioned simulation detail and write an octave script to solve the
1-D diffusion equation for an initial step-like composition profile (see Fig. 2). To
generate this initial profile, divide the simulation grid in three equal parts. Keep the
value of the composition at 1 in the middle part and 0 in the remaining. Complete
the following objectives:
(a) Plot the average composition against time and save the figure as a .jpg file. In
this case, average composition is 0.3. (10 marks)
(b) Print the composition for every 500 steps along with the initial profile using
hold on command and save it as a .jpg file. (5 marks)
Initial profile
1
c(x)
0.8
0.6
0.4
0.2
0
-0.2
20
40
60
x
80
100
120
Figure 2: Initial composition profile.
3