0% found this document useful (0 votes)
56 views13 pages

Solutions

Uploaded by

unknown unknown
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
56 views13 pages

Solutions

Uploaded by

unknown unknown
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

Solution Manual: Introduction to Computational

Methods for Materials Scientists


1
Lecture Notes for the course Introduction to Modelling and Simulation (ML3L009)

Kodanda Ram Mangipudi


School of Minerals, Metallurgical and Materials Engineering
Indian Institute of Technology Bhubaneswar

March 22, 2023

1
Disclaimer: This is a draft still under development, and is therefore incomplete, may contain errors,
typos, etc. Reporting any mistakes will fetch you 1 bonus mark per mistake for overall grading.
Contents

1 Developing Computational Models 3

1.1 Exercise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

2 Finite Difference Method 5

2.1 Exercise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

2.2 Solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

1
2
CHAPTER 1

Developing Computational Models

1.1 Exercise

1. Draw the geometry that you would actually simulate in the following cases with clear
justification.

Figure 1.1: Tensile test on the round and sheet notched specimens.

2. Your goal is to obtain the stress and strain fields under the indenter using finite element
analysis. To minimize computational memory and simulation time, for each of the inden-
tation tests shown below, draw the geometry of the material beneath the indenter you
would actually simulate in your FEM model. The side view and top view of the indenter
tips are shown below.

Figure 1.2: Indenter tip geometries for various indentation tests.

3
4 CHAPTER 1. DEVELOPING COMPUTATIONAL MODELS

3. Water is filled in the shown vessel in Figure 1.3. A thin tube of porous membrane consisting
of a diffusing species “A” is inserted in the centre of the vessel covering the entire height.
What is the geometry you would use to simulate the concentration profile of A?

Figure 1.3: A steel tumbler.

4. A thick solid furnace door has internal piping through which water is circulated for cooling
(see the picture below). The face of the door that faces the inside of the furnace is at
a temperature of Ti . The opposite side of the door is at a temperature of To . The
door is made of steel with thermal conductivity k, and heat capacity cp . The water is
circulated at a fixed rate of M cc/s. The total length of internal piping is L. The water
inlet temperature is Twi and the outlet temperature is Two . Further note that Twi <
Two < 100o C. Assume missing information appropriately, if any. Develop a mathematical
model (1D/2D/3D geometry, governing equations, boundary conditions, etc.) to obtain
the temperature distribution in the door.

Figure 1.4: Water cooled door of a furnace.


CHAPTER 2

Finite Difference Method

2.1 Exercise

1. Derive the forward, backward and central difference approximations for the first order and
second order differentials, as applicable.
2. Derive the implicit finite difference method to solve for temperature profile in a 1D domain
with source term along with Neumann conditions prescribed on both boundaries and room
temperature as the initial condition.
3. Derive the explicit finite difference method to solve 2D diffusion equation on a rectangular
domain of dimensions Lx × Ly with the following boundary conditions:
 2
∂2c

∂c ∂ c
=D + (2.1)
∂t ∂x2 ∂y 2

with

c(x, y, t = 0) = 300(x2 + 3xy + y 2 ) (2.2)


c(x = 0, y) = c0 c(x = Lx , y) = c0 (2.3)
n · J = g(x) on remaining boundaries (2.4)

4. Discuss the limitations on the choice of time step in implicit and explicit time integration
schemes of FDM.
5. The wall of a carburizing chamber is made of 5 cm thick low carbon steel plate. The carbon
content of the steel is 0.02 wt%. The temperature of the carburizing chamber is 900 K. If
the carbon concentration on the inside of the chamber is always maintained constant such
that it is equivalent to 0.9 wt%. The outside of surface of the plate is exposed to ambient
air. The average diffusion coefficient of carbon in steel is D = 2 × 10−6 exp(−15000/T )
m2 /s. Simulate the changes in the carbon concentration in the steel sheet over a period
of 1 hr.
6. A solid mild steel pillar with square cross-section needs to be case-hardened. The side
length of the square cross section is 30 cm. The carbon content of the steel is 0.02 wt%.
The carbon content of the pack carburizing atmosphere is equivalent to 2.5 wt% in steel.
If the case depth (i.e. %C > 0.8 wt%) to be achieved is 0.7 mm, find the minimum time

5
6 CHAPTER 2. FINITE DIFFERENCE METHOD

required for carburization at 1300 K through simulations using finite difference method.
The average diffusion coefficient of carbon in steel is D = 2 × 10−6 exp(−15000/T ) m2 /s.

7. Imagine that you are the manager of a hot rolling mill that produces stainless steel rods
from SS 304 billets of size 0.5 × 0.5 × 5 m are loaded into a reheating furnace of a rolling
mill. The slabs are stored in the yard which measures an ambient temperature of 40 ◦ C.
The furnace is a waling-beam furnace. Due to the failure of some burners, the temperature
at the bottom of the billets is 1080 ◦ C while that at the top is maintained at 1250 ◦ C.
Due to this burner failure, an inhomogeneous temperature profile is expected across the
cross-section of the billet. If a homogeneous discharge temperature needs to be attained,
develop an optimized plan of time intervals for turning the billet on its sides so that the
total reheating time is minimized. You may need to consult handbooks or internet for
any physical and material properties needed for the simulation.

8. A reusable space craft has a heat shield on its bottom surface to protect it from the
extreme heat generated due to friction with air molecules in the atmosphere while re-
entry into earth’s atmosphere. Unfortunately, nearly at the final stage of re-entry, the
joint between two thermal tiles has failed opening a small 5 × 0.75 cm2 rectangular crack,
exposing the 2 cm thick Al alloy sheet below it. The temperature of the air on the outside
the tiles has risen to 1000 K. The melting temperature of this alloy is 900 K, and its
thermal conductivity is k = 200 W/(m·K). Latent heat of fusion is ∆Hf = 400 J/mol.

(a) If the remaining time to land is 5 s, is there a chance of breaching the hull of the
space craft?
(b) If the remaining time to land is 100 s, how big the size of the hole can be?

2.2 Solutions

Problem 1

Figure 2.1: Educated guesses of the various carburizing parameters for the furnace wall.
2.2. SOLUTIONS 7

Fig. 2.1 shows the expected temperature and concentration profiles based on our under-
standing of the carburization process. Now we will refine our guesses by order of magnitude
estimates. Let us consider the following points from general observation and reasoning:

1. The general case depths during carburization over couple of hours is known to reach on
the order of sub-millimeter depths. An estimate for the order of diffusion
√ distance can be
obtained by setting the non-dimensional length parameter ξ = x/2 Dt ≈ 1 1 . For the
upper limit, consider D at 900 K and t = 3600s. D = 2 × 10−6 exp (−15000/T ) m2 /s =
2 × 10−2 exp 2
√ (−15000/T ) cm−4/s = 1.56 × 10
−11 cm2 /s at 900 K. Therefore, for ξ ≈ 1, we

have x ≈ 2 Dt = 4.08 × 10 cm or 4.08 µm.


Hence, we do not need to model the entire thickness of the sheet; only a few micrometers
is sufficient. Let us choose a depth of 5 µm or 5×10−4 cm as the region of interest (ROI).

2. Since it is a furnace wall, its thickness of 5 cm is much smaller than the length or breadth.
Except for a region approximately 5 to 10 cm near the corners, there will not be any
concentration variation in any plane perpendicular to the thickness; concentration varies
only along the thickness direction only. Hence, the problem can be treated as a 1D
problem simulating the diffusion along the thickness direction with left boundary point
being facing the furnace and the right boundary point on the ambient side.

3. Given that (i) the diffusion coefficient D is dependent on the temperature, and (ii) one side
of the wall is at 800 K while other is exposed to ambient air at 298 K. Thus, a temperature
gradient can be expected across the sheet thickness. These two facts suggest that one also
needs to simulate the temperature variation across the sheet thickness. However, since
our ROI is only a few microns deep, the temperature across this ROI would reach 900 K
very quickly within a few seconds and remain 900 K through out the carburizing period.
Thus, we only need to model the diffusion of Carbon within the ROI with a constant
D = 9.879 × 10−14 cm2 /s.

4. On the furnace side, the boundary condition would be a constant concentration Dirichlet
condition. When the diffusion process happens only to a depth of a few microns, the
5 cm thick sheet appears like an infinite medium. Thus if the considered length of 5
µm is long enough, the concentration at this position will not alter. In such a case, the
concentration profile will remain flat well before the boundary. Hence, the boundary
condition on the other side would be Dirichlet condition of constant concentration equal
to the initial concentration. It may be noted here that the estimated ROI length gives the
order of magnitude estimate of the diffusion distance. Hence, it is possible that this length
is not sufficient to represent the realistic behaviour. If the concentration plot appears to
change its slope at this boundary then we can infer that the length is not sufficient and
need to consider a larger ROI depth.

Since the Carbon concentration will vary nonlinearly across the thickness, we will use 1001
nodes, i.e. ∆x = 5 × 10−7 cm. With the stability parameter α = 0.5, we have a stable time step
∆t = 0.0108 s. Thus to simulate for t = 3600 s, we need 3600/0.0108 = 3,32,799 time steps or
iterations. A simple MATLAB code would look like:
1 function d if fu sio n_ ex pl ic it
2 L = 10 e -4; % Domain length in cm
3 Nx = 1001; % Total number of nodes
4 dx = L /( Nx -1) % x - spacing
1
Recall the analytical solution method to solve diffusion equation
8 CHAPTER 2. FINITE DIFFERENCE METHOD

5 x = 0: dx : L ; % x coordinates
6 Temp = 900;
7 D = 2e -4* exp ( -15000/ Temp ) % Diffusion coefficient in cm ^2/ s
8
9 alpha = 0.5; % the von Neuman stability factor
10 dt = alpha * dx * dx / D % time spacing
11 T = 3600; % total simulaiton time
12 M = ceil ( T / dt )
13 output_ts = [10 100 , 1000 , 10000 , 100000 , M ];
14 cnp1 = zeros ( Nx ,1) ; % concentration at ( n +1) th time step
15 cn = zeros ( Nx ,1) ; % concentration at n the time step
16
17 c0 = 0.02;
18 cn = sheet_Ix (x , c0 ) ; % Initial condition
19
20 figure (1) ;
21 plot (x , cn , ' k - ' , ' LineWidth ' , 2) ; hold on
22 axis ([ x (1) x ( Nx ) 0 1]) ;
23 xlabel ( ' x [ cm ] ' , ' FontSize ' , 18) ;
24 ylabel ( ' c ( x ) [ wt . %] ' , ' FontSize ' , 18) ;
25 leg {1}= ' t =0 s ' ;
26 nout =0;
27 for t = 1: M +1
28
29 for i = 2: Nx -1 % calculate for all the internal nodes
30 cnp1 ( i ) = cn ( i ) + alpha *( cn ( i +1) -2* cn ( i ) + cn (i -1) ) ;
31 end
32
33 % incorporate Drichlet BCs
34 cnp1 (1) = 0.9; % left BC
35 cnp1 ( Nx ) = 0.02; % right BC
36
37 % plot only for certain number of increments
38 if ( sum ( find ( output_ts == t ) ) )
39 plot (x , cnp1 , ' - ' , ' linewidth ' , 2) ; hold on ;
40 nout = nout +1;
41 leg { end +1}=[ num2str ( round ( t * dt , 1) ) , ' s ' ];
42 end
43 cn = cnp1 ;
44 end
45 legend ( leg )
46 set ( gca , ' fontsize ' , 18) ;
47 end
48
49 function Ix = sheet_Ix (x , c0 )
50 Ix = zeros ( size ( x ) ) + c0 ;
51 end
52
53 function Ix = gs_Ix ( x )
54 sigma = x ( end ) /100;
55 Ix = exp ( -0.5*( (x - x ( end ) /2) .^2) / sigma ^2) ;
2.2. SOLUTIONS 9

56 end
57
58 function Ix = hat_Ix (x , c0 )
59 Ix = zeros ( size ( x ) ) ;
60 Ix ( find (x >0.485* x ( end ) & x <0.515* x ( end ) ) ) = c0 ;
61 end

The resultant profile is shown in Fig. 2.2(a). Since the concentration in the neighbourhood
of the right node is changing, i.e. the slope of the concentration line is changing, the chosen
ROI length is not sufficient to represent reality at large times. Hence, let us take higher ROI
lengths to which will not alter the composition in the neighbourhood of the right node:

(a) L=5 µm (b) L=10 µm (c) L=15 µm

Figure 2.2: Variation in concentration with in 1 hr for different ROI lengths.

We can see from Fig. 2.2(c) that an ROI length of 15 µm is sufficient to simulate 1 hr of
carburising, giving realistic concentration profiles.

Problem 2

Let us build the solution strategy as follows:

1. The pillar is being carburized from outer surfaces all along its height. The pillar has a
square cross section of 30 cm which is same all along its height. Hence, all the cross
sections along its experience identical conditions. Hence, it is sufficient to consider one
cross section. Further, the case depths to be achieved are on the order of a millimeter.
The case depth along any side would be identical except a few mm near the corners. If
the conditions at the corners can be ignored, then it is sufficient to model about 1 to 5
mm from the surface into the thickness of the pillar. Thus the problem reduces to a 1D
diffusion problem, and the length of the ROI can be take to be 5 mm initially.

2. Evaluate D at 1300 K: D = 2 × 10−6 exp (−15000/T ) m2 /s = 2 × 10−2 exp (−15000/T )


cm2 /s = 1.95 × 10−9 cm2 /s.

3. Let us choose 1001 nodes along the 1D domain, i.e. ∆x = 5 × 10−4 cm. Taking the
stability factor α = 0.5, we find that ∆t = 40.06 s.

4. Now we need to estimate the time that it would take to achieve a case depth on the
order of √
0.1 mm. This can be obtained by setting the non-dimensional length parameter
ξ = x/2 Dt ≈ 1 2 . Therefore, for a diffusion length scale on the order of x = 0.1 cm,
2
Recall the analytical solution method to solve diffusion equation
10 CHAPTER 2. FINITE DIFFERENCE METHOD

setting ξ ≈ 1, we have t ≈ x2 /2 D = 2.5 × 106 s. Thus, we need to simulate at least up
to 2 million seconds.

Now we simulate the evolution of the concentration in the ROI and watch for the concen-
tration at x = 0.7 mm. Fig. 2.3 shows the concentration evolution with time:

Figure 2.3: Growth of the case depth during carburization of a square pillar.

The following code gives the time required as t = 1242258 s.


1 function d if fu sio n_ ex pl ic it
2 L = 10 e -4; % Domain length in cm
3 Nx = 1001; % Total number of nodes
4 dx = L /( Nx -1) % x - spacing
5 x = 0: dx : L ; % x coordinates
6 Temp = 900;
7 D = 2e -4* exp ( -15000/ Temp ) % Diffusion coefficient in cm ^2/ s
8
9 alpha = 0.5; % the von Neuman stability factor
10 dt = alpha * dx * dx / D % time spacing
11 T = 3600; % total simulaiton time
12 M = ceil ( T / dt )
13 output_ts = [10 100 , 1000 , 10000 , 100000 , M ];
14 cnp1 = zeros ( Nx ,1) ; % concentration at ( n +1) th time step
15 cn = zeros ( Nx ,1) ; % concentration at n the time step
16
17 c0 = 0.02;
18 cn = sheet_Ix (x , c0 ) ; % Initial condition
19
20 figure (1) ;
21 plot (x , cn , ' k - ' , ' LineWidth ' , 2) ; hold on
22 axis ([ x (1) x ( Nx ) 0 1]) ;
23 xlabel ( ' x [ cm ] ' , ' FontSize ' , 18) ;
24 ylabel ( ' c ( x ) [ wt . %] ' , ' FontSize ' , 18) ;
25 leg {1}= ' t =0 s ' ;
26 nout =0;
27 for t = 1: M +1
28
29 for i = 2: Nx -1 % calculate for all the internal nodes
2.2. SOLUTIONS 11

30 cnp1 ( i ) = cn ( i ) + alpha *( cn ( i +1) -2* cn ( i ) + cn (i -1) ) ;


31 end
32
33 % incorporate Drichlet BCs
34 cnp1 (1) = 0.9; % left BC
35 cnp1 ( Nx ) = 0.02; % right BC
36
37 % plot only for certain number of increments
38 if ( sum ( find ( output_ts == t ) ) )
39 plot (x , cnp1 , ' - ' , ' linewidth ' , 2) ; hold on ;
40 nout = nout +1;
41 leg { end +1}=[ num2str ( round ( t * dt , 1) ) , ' s ' ];
42 end
43 cn = cnp1 ;
44 end
45 legend ( leg )
46 set ( gca , ' fontsize ' , 18) ;
47 end
48
49 function Ix = sheet_Ix (x , c0 )
50 Ix = zeros ( size ( x ) ) + c0 ;
51 end
52
53 function Ix = gs_Ix ( x )
54 sigma = x ( end ) /100;
55 Ix = exp ( -0.5*( (x - x ( end ) /2) .^2) / sigma ^2) ;
56 end
57
58 function Ix = hat_Ix (x , c0 )
59 Ix = zeros ( size ( x ) ) ;
60 Ix ( find (x >0.485* x ( end ) & x <0.515* x ( end ) ) ) = c0 ;
61 end

Problem 4

The ceramic tiles open a rectangular crack ex-


posing Al plate beneath it. The rectangu-
lar area is continuously exposed to 1000 K.
The heat diffuses in all the directions from the
crack. Since the Al plate is 2 cm thick, there
exists a gradient in the temperature across
the thickness. Hence, although some melting
of this exposed surface will take place, hull
breach requires that the temperature across
the entire thickness at some location in the
plate reaches the melting temperature. Thus,
we need to model the 3D geometry of the
plate. However the entire plate need not be
modelled; rather a quarter of the crack geom-
Figure 2.4: Opening in the ceramic tiles (left)
above the Al plate where the temperature is
1000 K. The reduced geometry to be modelled
(right) given the symmetry of the problem.
12 CHAPTER 2. FINITE DIFFERENCE METHOD

etry is sufficient for modelling due to the sym-


metry along vertical and horizontal planes.

Now in the 3D geometry the top hatched


surface of Al plate (that is exposed to 1000
K) will provide a Dirichlet BC, while the rest
of the top surface has zero flux BCs. The horizontal and vertical symmetry planes also have a
zero flux BC. Initially, the width and length of the ROI from the plate to be modelled can be
chosen to be 10 times the length of the length and breadths of the crack.

The finite difference equation at any point xi,j,k in 3D has the form
n+1 n  n n + Tn n n + Tn
Ti,j,k − Ti,j,k k Ti+1,j,k − 2Ti,j,k i−1,j,k Ti,j+1,k − 2Ti,j,k i,j−1,k
= +
∆t ρcp (∆x)2 (∆y)2
n
Ti,j,k+1 n + Tn
− 2Ti,j,k

i,j,k−1
+ . (2.5)
(∆z)2

You might also like