Help with the Deflection of a Plate in MATLAB
6 views (last 30 days)
Show older comments
Dear all,
I am trying to solve for the deflection of plate and to do this I am using finite differences in MATLAB. The plate is 6m by 6m and has a uniform load of 2 kN/m^2.
The equation to solve the plate is:
u(i+1,j) + u(i-1,j) + u(i,j+1) + u(i,j-1) - 4*u(i,j) = q/D
The input data is:
E = 3.3E+07 % Modulus of elasticity
D = E*0.2^3/(12*(1-0.2^2)) % Flexural rigidity
q = 2 % Uniform load
L = 6; % plate dimensions
dx = 1; % Step size x direction
dy = 1; % Setp size y direction
x = 0:dx:L; % x direction vector
y = 0:dy:L; % y direction vector
nx = length(x);
ny = length(y);
% Boundary Conditions at the edges - deflection is zero
u(:,1) = 0
u(1,:) = 0
u(:,7) = 0
u(7,:) = 0
So I set up a nested for loop as follows:
for i = 2:nx-1
for j = 2:ny-1
u(i,j) = (-q/D + u(i+1,j) + u(i,j+1) + u(i-1,j) + u(i,j-1))/4
end
end
U = u*1000
From this the answer I get is:
0 0 0 0 0 0 0
0 -0.0218 -0.0273 -0.0286 -0.0290 -0.0291 0
0 -0.0273 -0.0355 -0.0378 -0.0385 -0.0387 0
0 -0.0286 -0.0378 -0.0407 -0.0416 -0.0419 0
0 -0.0290 -0.0385 -0.0416 -0.0426 -0.0430 0
0 -0.0291 -0.0387 -0.0419 -0.0430 -0.0433 0
0 0 0 0 0 0 0
This is not the solution I am aiming for as the correct solution will be a symmetrical matrix - with the magnitude increasing towards the centre - if you imagine the deflection of a plate under a uniform load fixed at the edges - the centre will deflect the most.
I am hoping some of you intelligent people out there could help me.
Many thanks
Scott
0 Comments
Accepted Answer
Torsten
on 6 Feb 2025
Edited: Torsten
on 6 Feb 2025
You are trying to solve the heat conduction equation with a homogeneous heat sink -q/D and boundary temperature 0. Is this the same equation that has to be solved for the deflection of a plate ?
Further, you have to solve a linear system of equations to get u(i,j). Doing a fixed-point iteration in the loop
for i = 2:nx-1
for j = 2:ny-1
u(i,j) = (-q/D + u(i+1,j) + u(i,j+1) + u(i-1,j) + u(i,j-1))/4
end
end
will not solve this linear system "in one go".
Try this code instead:
E = 3.3E+07; % Modulus of elasticity
D = E*0.2^3/(12*(1-0.2^2)); % Flexural rigidity
q = 2; % Uniform load
L = 6; % plate dimensions
dx = 1; % Step size x direction
dy = 1; % Setp size y direction
x = 0:dx:L; % x direction vector
y = 0:dy:L; % y direction vector
nx = length(x);
ny = length(y);
% Boundary Conditions at the edges - deflection is zero
u = zeros(nx,ny);
u(:,1) = 0;
u(1,:) = 0;
u(:,7) = 0;
u(7,:) = 0;
itermax = 50;
error = 1;
iter = 0;
while iter < itermax & error > 1e-8
iter = iter + 1;
for i = 2:nx-1
for j = 2:ny-1
u(i,j) = (-q/D + u(i+1,j) + u(i,j+1) + u(i-1,j) + u(i,j-1))/4 ;
end
end
error = 0;
for i = 2:nx-1
for j = 2:ny-1
error = error + (u(i,j) - (-q/D + u(i+1,j) + u(i,j+1) + u(i-1,j) + u(i,j-1))/4)^2 ;
end
end
error = sqrt(error);
end
error
iter
U = u*1000
More Answers (0)
See Also
Categories
Find more on Loops and Conditional Statements in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!