0% found this document useful (0 votes)
21 views

Using FDM and Numerical Analysis To Calculate Temperature and Strength

Numerical Method to calculate temperature and strength

Uploaded by

Nguyen An Tin
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views

Using FDM and Numerical Analysis To Calculate Temperature and Strength

Numerical Method to calculate temperature and strength

Uploaded by

Nguyen An Tin
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 19

TABLE OF CONTENTS

I/ PROBLEM 1.................................................................................................................................................. 2
A) BASE THEORY ......................................................................................................................................... 2
B) MATLAB CODE ........................................................................................................................................ 3
II/ PROBLEM 2 ................................................................................................................................................ 6
A) NUMERICAL METHOD SOLUTION ....................................................................................................... 6
1/ Displacement of elements .............................................................................................................12
2/ Stress of elements ...........................................................................................................................12
B) ANSYS APDL SOLUTION ......................................................................................................................14
III/ REFERENCES...........................................................................................................................................19

1
I/ PROBLEM 1
A) BASE THEORY
We have the thickness of the plate: L = 6 cm = 0.06 m.
L 0.06
There are 3 nodes, therefore the distance between 2 consecutive nodes is: = = 0.03 (m).
3−1 2

The left side of the plate is maintained at 0o C by iced water so T0 = 0o C (1).


Using finite difference method, we can perform the temperature connection between three
consecutive nodes as:
Ti−1 + 2 ∗ Ti + Ti+1 g
+ = 0 (2)
∆x 2 k
With Ti is the temperature at an interior node.
With the right-most node (node 2) that is exposed to convection, its temperature can be seen as in
equation:
Tn−1 − Tn ∆x
h(T∞ − Tn ) + k +g = 0 (3)
∆x 2
With T∞ is the temperature of the environment that allows convection (Tenv in MATLAB code).
Tn is the temperature at the out-most node we are considering.
Tn−1 is the temperature at the interior node which is adjacent to the out-most node.
Using (1), (2) and (3), we can solve for T1 and T2 , hence plot the temperature with respect to the
thickness of the Uranium plate.

*Additional code attached using finite element method to display steady-state temperature colormap
of Uranium plate.
*There will be 1 displayed result and 4 figures generated by the MATLAB code: The temperature to
thickness plot; The mesh figure,
Results and Figures 1- 5:

2
B) MATLAB CODE
% with finite difference method:

% Set up symbolic variables:


syms g k T0 h Tenv deltaX;
deltaX = 0.06/(3-1) % Thickness of plate divided by (Number of nodes -
1);
g = 5*10^6;
k = 28;
h = 44;
Tenv = 24;
T0 = 0 %Left side of plate is maintained at 0 degree Celcius;

3
syms T1 T2;
% Equation for node 1:
eqn1 = (T0 - 2*T1 + T2)/(deltaX^2) + g/k == 0;
% Equation for node 2:
eqn2 = h*(Tenv - T2) + k*(T1 - T2)/deltaX + g*deltaX/2 == 0;
% Solve the two equations:
S = solve(eqn1, eqn2);
% Display results:
fprintf("Temperature at node 1 is %s degrees Celsius. \n",
string(double(S.T1)));
fprintf("Temperature at node 2 is %s degrees Celsius. \n",
string(double(S.T2)));
% Plot results:
y = [T0,S.T1,S.T2];
x = [0, 0.03, 0.06];
figure;
hold on;
plot(x,y, 'r-', 'LineWidth', 3);
plot (x, y, 'r^', 'MarkerSize', 10);
xlabel ('Thickness of plate (Meters)');
ylabel ('Temperature (Celsius Degree)');
grid on;
title('Temperature to Thickness of Uranium plate plot');

% with finite element method to display temperature colormap:

% Declare steadystate thermal partial difference model:


tmodel = createpde('thermal','steadystate');

% Create geometry
width = 0.06;
height = 0.06;
gdm = [3 4 0 width width 0 0 0 height height]';
g = decsg (gdm, 'S1', ('S1')');
geometryFromEdges(tmodel,g);

figure;

4
pdegplot(tmodel,"EdgeLabels","on");
axis([-0.01 0.07 -0.01 0.07]);
title("Geometry With Edge Labels Displayed");

% Set boundary conditions:


thermalProperties(tmodel, "ThermalConductivity", 28);
internalHeatSource(tmodel, 5000000);
thermalBC (tmodel, "Edge", 4, "Temperature", 0);
thermalBC (tmodel, "Edge", 2,"ConvectionCoefficient", 44,
"AmbientTemperature", 24);

% Mesh the geometry


hmax = .03; % element size

msh = generateMesh(tmodel,"Hmax",hmax);

figure;
pdeplot(tmodel);
axis equal;
xlabel("X-coordinate, meters");
ylabel("Y-coordinate, meters");

title("Meshed geometry");

% Solve the model and plot the temperature colormap:


Rt=solve(tmodel)
T = Rt.Temperature;
colormap default;
figure;
pdeplot(tmodel, "XYData", T, "Contour", "on");

xlabel("X-coordinate, (meters)")

axis equal;
title ("Steady-State Temperature of Uranium (Celcius)");

5
II/ PROBLEM 2
A) NUMERICAL METHOD SOLUTION

Figure 6. Problem's bridge diagram

Figure 7: Bridge model with named elements (in white) and nodes (in yellow)
Topo Table:
Elements Initial point Terminal point Length l m
x y x y
1 (1-2) 0 0 1.8 3.118 3.6 0.5 0.8661
2 (1-3) 0 0 3.6 0 3.6 1 0
3 (2-3) 1.8 3.118 3.6 0 3.6 0.5 -0.8661
4 (2-4) 1.8 3.118 5.4 3.118 3.6 1 0
5 (3-4) 3.6 0 5.4 3.118 3.6 0.5 0.8661
6 (3-5) 3.6 0 7.2 0 3.6 1 0
7 (4-5) 5.4 3.118 7.2 0 3.6 0.5 -0.8661
8 (4-6) 5.4 3.118 9 3.118 3.6 1 0
9 (5-6) 7.2 0 9 3.118 3.6 0.5 0.8661
10 (5-7) 7.2 0 10.8 0 3.6 1 0
11 (6-7) 9 3.118 10.8 0 3.6 0.5 -0.8661

6
11 Element stiffness matrix:
With a 2D bar element, we have its global stiffness matrix described as:
l2 lm −l2 −lm
EA lm m 2
−lm −m2 ]
[k] = [ 2
L −l −lm l2 lm
−lm −m2 lm m2
Element 1, 5, 9: θ = 60°; l = 0.5; m = 0.8661
0.25 0.43305 −0.25 −0.43305
250 ∗ 109 ∗ 3500 ∗ 10−6 0.43305 0.7501 −0.43305 −0.7501
[k1,5,9 ] = [ ]
3.6 −0.25 −0.43305 0.25 0.43305
−0.43305 −0.7501 0.43305 0.7501
Element 2, 4, 6, 8, 10: θ = 0°; l = 1; m = 0
1 0 −1 0
250 ∗ 109 ∗ 3500 ∗ 10−6 0 0 0 0
[k 2,4,6,8,10 ] = [ ]
3.6 −1 0 1 0
0 0 0 0
Element 3, 7, 11: θ = -60°; l = 0.5; m = -0.8661
0.25 −0.8661 −0.25 0.8661
250 ∗ 109 ∗ 3500 ∗ 10−6 −0.8661 0.7501 0.8661 −0.7501
[k 3,7,11 ] = [ ]
3.6 −0.25 0.8661 0.25 −0.8661
0.8661 −0.7501 −0.8661 0.7501

7
8
9
Boundary conditions (BC):
u1 = v1 = v7 = 0;
F2x = F2y = F3x = F4x = F4y = F5x = F6x = F6y = F7x = 0 (N);
F1x = R1x;
F1y = R1y − 280 kN;
F3y = −210 kN;
F5y = −280 kN;
F7y = R7y − 360 kN;

10
11
1/ Displacement of elements
Using matrixcalc.org we can solve for the displacement matrix as follows:
u2 0.00238636
v2 −0.00271085
u3 0.00057735
v3 −0.00508839
u4 0.00123167
v4 = −0.00559946 (m)
u5 0.00178977
v5 −0.00541058
u6 −0.00003848
v6 −0.00288861
[u7 ] [ 0.00242485 ]
This result matches our team ANSYS APDL’s simulation result.
Movable support R displaces approximately 0.00242485 meters or about 2.42485 millimeters along
the positive x axis only.

2/ Stress of elements
We have the stress in a 2D element from node i to node j written as:
𝑢𝑖
𝐸 𝑣𝑖
𝜎= [−𝑙 −𝑚 𝑙 𝑚] {𝑢 }
𝐿 𝑗
𝑣𝑗

Therefore (result with larger value than 1000 will be separated by commas (,) and decimal numbers will
be separated by points (.)),
For element 1 (node 1-2):
0
240 ∗ 109 0
σ1 = [−0.5 −0.8661 0.5 0.8661] { } ≈ −76,979,145.67 (Pa)
3.6 0.00238636
−0.00271085
For element 2 (node 1-3):
0
240 ∗ 109 0
σ2 = [−1 −0 1 0] { } ≈ 38,490,000 (Pa)
3.6 0.00057735
−0.00508839
For element 3 (node 2-3):
0.00238636
240 ∗ 109 −0.00271085
σ3 = [−0.5 0.8661 0.5 −0.8661] { } ≈ −76979145.67 (Pa)
3.6 0.00057735
−0.00508839
For element 4 (node 2-4):
0.00238636
240 ∗ 109 −0.00271085
σ4 = [−1 −0 1 0] { } ≈ −76,979,333.33 (Pa)
3.6 0.00123167
−0.00559946

12
For element 5 (node 3-4):
0.00057735
240 ∗ 109
σ5 = [−0.5 −0.8661 0.5 0.8661] {−0.00508839} ≈ −7,698,515.133 (Pa)
3.6 0.00123167
−0.00559946
For element 6 (node 3-5):
0.00057735
240 ∗ 109 −0.00508839
σ6 = [−1 −0 1 0] { } ≈ 80,828,000 (Pa)
3.6 0.00178977
−0.00541058
For element 7 (node 4-5):
0.00123167
240 ∗ 109
σ7 = [−0.5 0.8661 0.5 −0.8661] {−0.00559946} ≈ 7,697,402.133 (Pa)
3.6 0.00178977
−0.00541058
For element 8 (node 4-6)
0.00123167
240 ∗ 109 −0.00559946
σ8 = [−1 −0 1 0] { } ≈ −84,676,666.67 (Pa)
3.6 −0.00003848
−0.00288861
For element 9 (node 5-6):
0.00178977
240 ∗ 109 −0.00541058
σ9 = [−0.5 −0.8661 0.5 0.8661] { } ≈ 84,676,881.13 (Pa)
3.6 −0.00003848
−0.00288861
For element 10 (node 5-7):
0.00178977
240 ∗ 109 −0.00541058
σ10 = [−1 −0 1 0] { } ≈ 42,338,666.67 (Pa)
3.6 0.00242485
0
For element 11 (node 6-7):
−0.00003848
240 ∗ 109
σ11 = [−0.5 0.8661 0.5 −0.8661] {−0.00288861} ≈ −84,677,341.3 (Pa)
3.6 0.00242485
0
These stresses solution relatively match our team’s ANSYS APDL’s simulation results.

13
B) ANSYS APDL SOLUTION
This part of the report will be presented step by step with figures and their captions, important results
are Bold:

Figure 8. Insert type of simulation.

Figure 9. Define element types.

14
Figure 10. Define material and Young module.

Figure 11. Define cross-section area.

15
Figure 12. Define nodes' coordinates.

Figure 13. Connect the nodes to create bar elements.

16
Figure 14. Set up constraints for node 1 and 7.

Figure 15. Define acting forces.

17
Figure 16. Plot displacements of bars

Figure 17. Bars' displacement results

18
Figure 19. von Mises stresses results (or total stresses that appear on axial direction of each bar, read
the result by nodes to nodes since the elements are numbered by the software and therefore are not
synchronized with our report).

III/ REFERENCES
1. Dr. Le Thanh Long’s lecture slides
2. https://www.mathworks.com/
3. https://www.ansys.com/

19

You might also like