You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
842 B
22 lines
842 B
4 years ago
|
%--------------------------
|
||
|
% @Author: Jingqiao Hu
|
||
|
% @Date: 2021-06-03 13:51:44
|
||
|
% @LastEditTime: 2021-06-03 14:13:29
|
||
|
%--------------------------
|
||
|
function green_strain(F, globalx, globaly)
|
||
|
m = size(F{1}, 2);
|
||
|
I = repmat([1, 0, 0, 1]', 1, m);
|
||
|
E = zeros(4, 4, m);
|
||
|
for gp = 1:4
|
||
|
Fg = F{gp}; % 4,m
|
||
|
FT = Fg([1,3,2,4], :);
|
||
|
E(gp, :, :) = (matrix_3d_multiply(FT, Fg) - I) * 0.5;
|
||
|
end
|
||
|
Em = squeeze(mean(E, 1));
|
||
|
s1 = reshape(Em(1, :), globaly, globalx);
|
||
|
s2 = reshape(Em(2, :), globaly, globalx);
|
||
|
s3 = reshape(Em(4, :), globaly, globalx);
|
||
|
figure; imagesc(s1); colormap(jet); axis equal; axis off; caxis([-0.1, 0.1]);
|
||
|
figure; imagesc(s2); colormap(jet); axis equal; axis off; caxis([-0.15, 0.03]);
|
||
|
figure; imagesc(s3); colormap(jet); axis equal; axis off; caxis([-0.1, 0.1]);
|
||
|
end
|