-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathProblem_NL_1_21_Stress_xx.m
163 lines (140 loc) · 5.42 KB
/
Problem_NL_1_21_Stress_xx.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
clc;
clear all;
close all;
format shortG;
folder = 'plots';
if(~exist(folder,'dir'))
mkdir(folder);
end
%%
% import PubPlotLib.*
% Aspect Ratio
Lx = 300;
h = 3;
[ar_N,ar_D] = rat(h/Lx);
file = sprintf('Problem_NL_1_21_Stress_xx');
figure;
fig_size = get(0,'screensize');
fig_size(3) = fig_size(3)/2;
set(gcf,'Position',fig_size);
set(gcf,'PaperPositionMode','auto');
set(gcf,'name',file,'numbertitle','off');
hold on;
% Colors = [
% 0.16, 0.44, 1.00;
% 0.93, 0.00, 0.00;
% 0.00, 0.57, 0.00;
% 0.44, 0.00, 0.99;
% 1.00, 0.50, 0.10;
% 0.75, 0.00, 0.75;
% 0.50, 0.50, 0.50;
% 0.50, 0.57, 0.00;
% 0.17, 0.17, 0.17;
% 0.00, 0.00, 0.00;
% ];
Colors = [
1.00, 0.00, 0.00; % light red
0.00, 0.57, 0.00; % green
0.25, 0.25, 0.75; % navy blue
0.75, 0.25, 0.25; % brown
0.75, 0.00, 0.75; % dark pink
1.00, 0.10, 0.60; % maganta
0.17, 0.17, 0.17; % middle black
0.44, 0.00, 0.99; % purple
0.99, 0.41, 0.23; % dark orange
0.10, 0.49, 0.47; % grey
0.00, 1.00, 0.00; % light green
0.00, 0.75, 0.75; % cyan
0.34, 0.57, 0.92; % sky
0.00, 0.00, 1.00; % light blue
0.16, 0.44, 1.00; % blue
0.50, 0.57, 0.00;
0.93, 0.00, 0.00; % red
1.00, 0.50, 0.10; % light orange
0.00, 0.50, 0.00; % dark green
0.25, 0.25, 0.25; % light dark
0.00, 0.00, 0.00; % dark black
0.54, 0.63, 0.22; % middle green
1.00, 0.83, 0.00; % yellow
0.50, 0.50, 0.50;
0.88, 0.75, 0.73; % white
0.66, 0.34, 0.65; % light purple
0.76, 0.57, 0.17;
0.75, 0.75, 0.00; % green-yellow
];
load(fullfile(pwd,'plots','Poblem_NL_1_Linear_UDL_h_a_1_100_IHSDT.mat'));
h1 = plot(Data_xx(:,1),Data_xx(:,2),'-','LineWidth',2.5,'Color',Colors(6,:));
set(h1,'Marker','none','MarkerFaceColor','none','MarkerSize',10);
load(fullfile(pwd,'plots','Poblem_NL_1_Linear_UDL_h_a_1_100_TSDT.mat'));
h2 = plot(Data_xx(:,1),Data_xx(:,2),'--','LineWidth',2.5,'Color',Colors(10,:));
set(h2,'Marker','s','MarkerFaceColor','none','MarkerSize',16);
load(fullfile(pwd,'plots','Poblem_NL_1_vonKarman_UDL_h_a_1_100_IHSDT.mat'));
h3 = plot(Data_xx(:,1),Data_xx(:,2),'-.','LineWidth',2.5,'Color',Colors(11,:));
set(h3,'Marker','none','MarkerFaceColor','none','MarkerSize',20);
load(fullfile(pwd,'plots','Poblem_NL_1_vonKarman_UDL_h_a_1_100_TSDT.mat'));
h4 = plot(Data_xx(:,1),Data_xx(:,2),':','LineWidth',2.5,'Color',Colors(7,:));
set(h4,'Marker','.','MarkerFaceColor','none','MarkerSize',16);
load(fullfile(pwd,'plots','Poblem_NL_1_Green_UDL_h_a_1_100_IHSDT.mat'));
h5 = plot(Data_xx(:,1),Data_xx(:,2),'.','linewidth',2.5,'Color',Colors(1,:));
set(h5,'Marker','o','MarkerFaceColor','none','MarkerSize',20);
load(fullfile(pwd,'plots','Poblem_NL_1_Green_UDL_h_a_1_100_TSDT.mat'));
h6 = plot(Data_xx(:,1),Data_xx(:,2),'.','linewidth',2.5,'Color',Colors(3,:));
set(h6,'Marker','^','MarkerFaceColor','none','MarkerSize',15);
% icons(end-6).Children.MarkerSize = 20;
axis on;
grid off;
box on;
% set( gca , ...
% 'Units' , 'normalized',...
% 'FontName' , 'Arial', ...
% 'FontSize' , 20,...
% 'Box' , 'on' , ...
% 'Color' , 'none',...
% 'TickLength' , [0.02,0.02] , ...
% 'XMinorTick' , 'on', ...
% 'YMinorTick' , 'on', ...
% 'ZMinorTick' , 'on', ...
% 'XMinorGrid' , 'off', ...
% 'YMinorGrid' , 'off', ...
% 'ZMinorGrid' , 'off', ...
% 'XColor' , [0,0,0], ...
% 'YColor' , [0,0,0], ...
% 'ZColor' , [0,0,0], ...
% 'LineWidth' , 1.5);
set(gca,'YTick',[0:5:25]);
set(gca,'XTick',[0,100,200,300,400]);
set(gca,'YLim',[0,25]);
set(gca,'XLim',[0,405]);
set(gca,'lineWidth',1.5);
% set(gca,'FontSize',25,'FontWeight','bold','FontName','Helvetica');
set(gca,'FontSize',20,'FontWeight','normal','FontName','Arial');
xlabel('\bf Load $\bf( \bar{P} )$',...
'Interpreter', 'Latex','FontName','Arial',...
'FontWeight','bold','FontSize',20);
ylabel('\bf Axial Stress $\bf( \bar{\sigma}_{xx} )$',...
'Interpreter', 'Latex','FontName','Arial',...
'FontWeight','bold','FontSize',20);
drawnow;
legendID = [h1(1),h2(1),h3(1),h4(1),h5(1),h6(1)];
legendString = {sprintf('FEM-IHSDT (Linear) - UDL'),sprintf('FEM-TSDT (Linear) - UDL'),...
sprintf('FEM-IHSDT (von Karman) - UDL'),sprintf('FEM-TSDT (von Karman) - UDL'),...
sprintf('FEM-IHSDT (Green-Lagrange) - UDL'),sprintf('FEM-TSDT (Green-Lagrange) - UDL')};
% [h_legend,icons,plots,legend_text]
h_legend = legend(legendID,legendString,'location','southeast');
set(h_legend,'FontSize',17);
% icons(1).FontSize = 15;
% icons(2).FontSize = 15;
% icons(3).FontSize = 15;
% icons(4).FontSize = 15;
% icons(5).FontSize = 15;
% icons(6).FontSize = 15;
set(gca,'Position',get(gca, 'OuterPosition') - get(gca, 'TightInset')*...
[-1 0 1 0;0 -1 0 1; 0 0 1 0; 0 0 0 1]);
set(gca, 'Position', [0.15 0.15 0.80 0.80]);
% set(h_legend,'location','best');
% set(gcf,'renderer','opengl');
set(gcf,'renderer','painters');
% set(gcf,'PaperOrientation','portrait');
% break;
print(fullfile(pwd,'plots',get(gcf,'Name')), '-depsc2', '-r1200');
print(fullfile(pwd,'plots',get(gcf,'Name')), '-dpng', '-r100');