-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtask2_static.m
41 lines (34 loc) · 849 Bytes
/
task2_static.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
clc, clear, close all
%% Properties
E = 2.1e5; %% N/mm^2
thickness = 10; % mm
width = 100; % mm
[A, I] = area_properties(thickness, width);
ep = [E A I];
%% Create geometry
[Edof, Coord, Dof] = circular_arch(20);
bc = [1 0; 2 0; 61 0; 62 0];
%% Load
max_load = -26.7e3; % N
f = load_vector(Edof, max_load);
%% Solve
% Create stiffness matrix
K = global_stiffness(Edof, Coord, ep);
[a,r] = solveq(K, f, bc);
max_disp = max(abs(a));
%% Plots
title_prefix = 'Direct stiffness,';
% Geometry
[Ex, Ey] = coordxtr(Edof, Coord, Dof, 2);
plotpar = [2 2 1];
sfac = 1;
Ed = extract(Edof, a);
eldisp2(Ex, Ey, Ed, plotpar, sfac);
title(strcat(title_prefix, ' geometry last increment'))
% Load displacement
figure
plot([0 max_disp],[0 abs(max_load)])
title(strcat(title_prefix, ' load/displacement'))
xlabel('displacement [mm]')
ylabel('load [N]')
grid on