필터 지우기
필터 지우기

plot strain ellipse and principal stress axes using eigenvalues and eigevectors.

조회 수: 6 (최근 30일)
Anitha Limann
Anitha Limann 2023년 12월 8일
편집: Matt J 2023년 12월 13일
Hello,
I am trying to plot strain ellipses and principle stress axes (longest and shortest axes of the ellipse) on a grid (x_new,y_new) according to followig instructions. I would be really greatful if someone could help me complete this code.
Thank you.
x = -333.6:5:831.4; %(1x234)
y = 0:5:500; %(1x101)
[xx, yy] = meshgrid(x, y);
dx = 5;
dy = 5;
u = flow values of each grid node in x direction.
v = flow values of each grid node in y direction.
%% Plot Principle axes
pick the 4, center most u and v values. Using this 4 grid nodes u and v values we can compute ux, uy, vx, and vy values for the center point.
then using computed ux,uy, vx, vy values, ( e.g. ux=(u1+u2/dx) )
strain_tensor = [ux uy; vx vy];
[V,D]=eig(strain_tensor);
Now I want to use this eigenvalues and eigenvectors to plot strain ellipeses at the center of each four grid nodes along with quiver arrows inside the ellipses.
  댓글 수: 2
Matt J
Matt J 2023년 12월 8일
What is supposed to be the relationship between the eigenvalues/vectors and the geometry of the ellipse?
Anitha Limann
Anitha Limann 2023년 12월 8일
maximum eigen value is the length of the longest axis and minimum eigenvalue is the length of shortest axis. attached below is a theory slide for this.

댓글을 달려면 로그인하십시오.

답변 (1개)

Matt J
Matt J 2023년 12월 8일
a=10; %long axis
b=3; %short axis
theta=30; %rotation angle
p=rotate( scale(nsidedpoly(1000),[a,b]) ,theta);
plot(p)
  댓글 수: 4
Anitha Limann
Anitha Limann 2023년 12월 13일
편집: Matt J 2023년 12월 13일
Hello,
I am so sorry to trouble you. but I still get the same error msg. Below is my complete code.
clearvars -except mv m
m=[0.0428602731501996 0; 0 -0.0159426987862691];
mv=[0.973953757211399 0.139025444512699; 0.226746728341998 0.990288809276388];
a = max(max(m)); % longest axis
b = min(min(m)); % shortest axis
theta1 = atan2(mv(1,2), mv(1,1))*180/pi; % angle between x-axis and largest eigenvalue
theta2 = atan2(mv(2,2), mv(2,1))*180/pi; % angle between x-axis and smallest eigenvalue
scale =2;
p=rotate(scale(nsidedpoly(1000),[a,b]),theta1);
Unable to use a value of type polyshape as an index.
figure
plot(p)
Matt J
Matt J 2023년 12월 13일
편집: Matt J 2023년 12월 13일
The line scale =2 serves no apparent purpose and should probably be removed. Also, your [a,b] should both be positive numbers.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Numerical Integration and Differential Equations에 대해 자세히 알아보기

제품

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by