Linear line, need it to curve

ri = 80
ro = 160
Pi = 150
r = 80:1:160
%inside radius tan sress
tsi = Pi*((ro.^2)+(ri.^2))/((ro.^2)-(ri.^2))
%inside radius radial stress
rsi = -Pi
%inside radius hoop stress
hsi = ((Pi)*(ri.^2))/((ro.^2)-(ri.^2))
%outer radius inside tan stress
tso = ((2*Pi*(ri.^2))/(ro.^2)-(ri.^2))
%outer radius inside radial stress
rso = 0
%outer radius inside hoop stress
hso = ((Pi*(ri.^2))/(ro.^2)-(ri.^2))
plot(r,tsi,'d')
hold on
plot(r,rsi,'d')
hold on
plot(r,hsi,'d')
hold on
plot(r,tso,'d')
hold on
plot(r,rso,'d')
hold on
plot(r,hso,'d')
xlabel('Radius - mm')
ylabel('Stress - MPa')
title('Thick Cylinder Stress')
grid on

Réponses (2)

Star Strider
Star Strider le 30 Juil 2020

0 votes

I have absolutely no idea what you are doing.
Note that ‘ri’ and ‘ro’ are scalars in your code, so the appropriate result are straight lines. Taking a guess abouit what ‘ri’ and ‘ro’ might be, and adding element-wise division:
ri1 = 80
ro1 = 160
Pi = 150
r = 80:1:160;
ri = r-ri1;
ro = r+ro1;
%inside radius tan sress
tsi = Pi*((ro.^2)+(ri.^2))./((ro.^2)-(ri.^2));
%inside radius radial stress
rsi = -Pi;
%inside radius hoop stress
hsi = ((Pi)*(ri.^2))./((ro.^2)-(ri.^2));
%outer radius inside tan stress
tso = ((2*Pi*(ri.^2))./(ro.^2)-(ri.^2));
%outer radius inside radial stress
rso = 0;
%outer radius inside hoop stress
hso = ((Pi*(ri.^2))./(ro.^2)-(ri.^2));
plot(r,tsi,'d')
hold on
plot(r,rsi,'d')
hold on
plot(r,hsi,'d')
hold on
plot(r,tso,'d')
hold on
plot(r,rso,'d')
hold on
plot(r,hso,'d')
xlabel('Radius - mm')
ylabel('Stress - MPa')
title('Thick Cylinder Stress')
grid on
.
Cris LaPierre
Cris LaPierre le 30 Juil 2020

0 votes

Couple issues.
  1. you only use r0 and ri in your equations, but you plot against r. This is why you see the straight lines. You will need to somehow incorporate the varying radii r into your equations if you want to see different values.
  2. Your equation for tso has been grouped incorrectly with parentheses. The denominator is (ro.^2-ri.^2).
  3. Your equation for hso has been grouped incorrectly with parentheses. The denominator is (ro.^2-ri.^2).

Catégories

En savoir plus sur Stress and Strain dans Centre d'aide et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by