Deviatoric strain rate tensor components and invariants.

%strain rate tensor
%Parameter
vx0 = 10.^(-9)
vy0 = vx0./0.33333
 
%set gird
[x,y] = meshgrid(0:10000:1000000,0:10000:1500000)
[x1,y1] = meshgrid(0:100000:1000000,0:100000:1500000)
W = max(max(x))
H = max(max(y))
%msgbox(num2str(W), 'value of variable W', 'modal');
%msgbox(num2str(H), 'value of variable H', 'modal');
 
%field
velocity_x = -vx0*sin(2*pi*x./W).*cos(pi*y./H)
velocity_y = vy0*cos(2*pi*x./W).*sin(pi*y./H)
velocity_x_arrow = -vx0*sin(2*pi*x1./W).*cos(pi*y1./H)
velocity_y_arrow = vy0*cos(2*pi*x1./W).*sin(pi*y1./H)
x_derivative_of_velocity_x = -vx0*cos(pi*y./H).*(2*pi./W).*cos(2*pi*x./W)
y_derivative_of_velocity_y = vy0*cos(2*pi*x./W).*cos(pi*y./H).*(pi./H)
divergence_of_velocity = x_derivative_of_velocity_x + y_derivative_of_velocity_y
 
%shear deviatoric strain rate components
figure(1)
shear_strain = divergence_of_velocity.*(1/2)
pcolor(x,y,shear_strain)
title('Shear deviatoric strain rate components')
set(gca,'xaxislocation','top');
set (gca,'YDir','reverse')
xlabel('Horizontal(m)')
ylabel('Vertical(m)')
shading flat
colorbar
%normal(x) deviatoric strain rate components
figure(2)
normal_x = x_derivative_of_velocity_x.*(2/3)-y_derivative_of_velocity_y.*(1/3);
pcolor(x,y,normal_x)
title('Normal(x) deviatoric strain rate components')
set(gca,'xaxislocation','top');
set (gca,'YDir','reverse')
xlabel('Horizontal(m)')
ylabel('Vertical(m)')
shading flat
colorbar
%normal(y) deviatoric strain rate components
figure(3)
normal_y = y_derivative_of_velocity_y.*(2/3)-x_derivative_of_velocity_x.*(1/3);
pcolor(x,y,normal_y);
title('Normal(y) deviatoric strain rate components')
set(gca,'xaxislocation','top');
set (gca,'YDir','reverse')
xlabel('Horizontal(m)')
ylabel('Vertical(m)')
shading flat
colorbar
%the above is tensor components,below is tensor invariants.

%deviatoric strain rate invariants(second)
figure(4)
second_invariants = sqrt(  (1/2).*(normal_x.^2+normal_y.^2) + shear_strain.^2 )
pcolor(x,y,second_invariants)
title('Deviatoric strain rate invariants(second)')
set(gca,'xaxislocation','top');
set (gca,'YDir','reverse')
xlabel('Horizontal(m)')
ylabel('Vertical(m)')
shading flat
colorbar

Deviatoric strain rate tensor components and invariants._第1张图片

 Deviatoric strain rate tensor components and invariants._第2张图片

 Deviatoric strain rate tensor components and invariants._第3张图片

 Deviatoric strain rate tensor components and invariants._第4张图片

你可能感兴趣的:(偏应变率张量,tensor,numerical)