Professional Documents
Culture Documents
Assignment 1 - Solutions
Question 1
Solve the following differential equation by finite difference method within a domain of 𝑥 ∈ 1, 1.4 .
𝑑𝑦
2 4𝑦 4𝑥 10
𝑑𝑥
where y(1) = 0.5. Consider a step size of h = 0.1.
Solution
This is an initial value problem that can be solved using Euler method.
Using Euler method, the y value at Step i+1 can be found by the following equation
𝑦 𝑦 ℎ𝑦 ′ (Eq. 1-1)
For this problem,
2𝑦 4𝑦 4𝑥 10
𝑦 2𝑥 5 2𝑦
Therefore, Eq. 1-1 becomes
𝑦 𝑦 0.1 2𝑥 5 2𝑦
𝑦 0.8𝑦 0.2𝑥 0.5 (Eq. 1-2)
We will now apply Eq. 1-2 step-by-step to solve for the unknown values within the
domain as follows. We need to solve up to x = 1.8 in this case.
Step 0 (i = 0)
The x and y values at this step i = 0 are
𝑥 1
𝑦 0.5
Therefore,
𝑦 0.8𝑦 0.2𝑥 0.5
𝑦 0.8 0.5 0.2 1 0.5
𝑦 1.1
Step 1 (i = 1)
The x and y values at this step i = 1 are
𝑥 1.1
𝑦 1.1
Therefore,
𝑦 0.8𝑦 0.2𝑥 0.5
𝑦 0.8 1.1 0.2 1.1 0.5
𝑦 1.6
Step 2 (i = 2)
The x and y values at this step i = 2 are
𝑥 1.2
𝑦 1.6
Therefore,
𝑦 0.8𝑦 0.2𝑥 0.5
𝑦 0.8 1.6 0.2 1.2 0.5
𝑦 2.02
Step 3 (i = 3)
The x and y values at this step i = 3 are
𝑥 1.3
𝑦 2.02
Therefore,
𝑦 0.8𝑦 0.2𝑥 0.5
𝑦 0.8 2.02 0.2 1.3 0.5
𝑦 2.376
Therefore, the values within the domain are
x y
1 0.5
1.1 1.1 (ANS.)
1.2 1.6
1.3 2.02
1.4 2.376
Question 2
Solution
The domain for this problem is as follows. We need to solve for unknown values for Node 1 to 3.
𝑦
Node 3
Node 2 Node 4
𝒚𝟒 𝟑
Node 1
𝑥
0 1 2 3
𝑖 1 𝑖 2 𝑖 3 𝑖 4
𝑦 𝑦
𝑦 1
ℎ
𝑦 𝑦 1
Substitute 𝑦 𝑦 1 to Eq. 2-2, we have
𝑦 𝑦 𝑦 1 4
𝑦 2𝑦 5 (Eq. 2-2a)
Question 3
Solution
j=3 6 u = 25 u = 25 u = 25 u = 25
j=2 4 u = 25 u’ = 0.8
j=1 2 u = 25 u’ = 0.8
j=0 0 u = 25 u = 25 u = 25 u = 25 x
0 2 4 6
i=0 i=1 i=2 i=3
We can make use of solution symmetry to reduce the number of unknowns to solve for. Based on
symmetry, we know that
u1,1 = u1,2
u2,1 = u2,2
u3,1 = u3,2
Step 2 – Setup difference equation at each node with unknown value. Apply boundary conditions that
provide known boundary values also.
Apply Eq. 3-1 to each node with unknown value as follows. We will substitute known boundary
values to the equation also. Because of symmetry, we will only need to consider the nodes along
either j = 1 or j = 2. Let’s consider nodes along j = 1.
At i = 1, j = 1 𝑢 , 𝑢 , 𝑢 , 𝑢 , 4𝑢 , 12𝑥 , 20
25 𝑢 , 25 𝑢 , 4𝑢 , 12 2 20
𝑢 , 3𝑢 , 6 (Eq. 3-2)
At i = 2, j = 1 𝑢 , 𝑢 , 𝑢 , 𝑢 , 4𝑢 , 12𝑥 , 20
𝑢 , 𝑢 , 25 𝑢 , 4𝑢 , 12 4 20
𝑢 , 𝑢 , 3𝑢 , 43 (Eq. 3-3)
At i = 3, j = 1 𝑢 , 𝑢 , 𝑢 , 𝑢 , 4𝑢 , 12𝑥 , 20
𝑢 , 𝑢 , 25 𝑢 , 4𝑢 , 12 6 20
𝑢 , 𝑢 , 3𝑢 , 67 (Eq. 3-4)
and by symmetry,
𝒖𝟏,𝟐 𝒖𝟏,𝟏 𝟖. 𝟑𝟖
𝒖𝟐,𝟐 𝒖𝟐,𝟏 𝟑𝟏. 𝟏𝟑 (ANS.)
𝒖𝟑,𝟐 𝒖𝟑,𝟏 𝟒𝟐. 𝟎𝟐
j=3 6 u = 25 u = 25 u = 25 u = 25
j=0 0 u = 25 u = 25 u = 25 u = 25 x
0 2 4 6
i=0 i=1 i=2 i=3
Question 4
Consider a simply supported beam that is subjected to two point loads as shown below. Determine the
deflection at the nodes along the beam using finite difference method with a mesh size of 1 m. Take EI
as 1×105 kNm2.
120 kN 40 kN
A B
1m 2m 1m
4m
Solution
The mesh and boundary conditions are as follows
1 2 3 4 5 Nodes are 1 m
apart
120 kN 40 kN
A B
1m 2m 1m
3m
Cut A
+ ΣMcut = 0 𝑀 100𝑥 0
Ma
𝑀 100𝑥
x
100
120 kN Cut B
120 kN 40 kN Cut C
Step 3 – Setup difference equation at each node with unknown deflection value. Apply boundary
conditions also.
At Node 2 (i = 2),
𝑀 𝑀 1 100 1 100 kNm
𝑦 2𝑦 𝑦 𝑀 10
𝑦 2𝑦 0 100 10
𝑦 2𝑦 100 10 (Eq. 4-1)
At Node 3 (i = 3),
𝑀 𝑀 2 20 2 120 80 kNm
𝑦 2𝑦 𝑦 𝑀 10
𝑦 2𝑦 𝑦 80 10 (Eq. 4-2)
At Node 4 (i = 4),
𝑀 𝑀 3 20 3 120 60 kNm
𝑦 2𝑦 𝑦 𝑀 10
0 2𝑦 𝑦 60 10 (Eq. 4-3)
Solving we have,
𝑦 0.0013 m
𝑦 0.0016 m
𝑦 0.0011 m