if you like our post please support by sharing with friends 🔥🔥
Apparatus-
Scilab software, Laptop .
Algorithm-
1. Give the value of number of points .
2. Give the value of radius of the ring and mass of the ring .
4. Using the ‘for loop’ on the equation of mass .
5. write the identity matrix (3,3), repreoentating ‘d’ in inertia tensor .
6. Using the ‘linspace’ command for show the maximum value between 0 to n .
7. write the polar equation .
8. show the value of x1,y1,z1 represent all x,y,z coordinates respectably .
9. Give the equation of ‘r2’ which represent r2=(x1.*x1)+(y1.*y1)+(z1.*z1 ) .
10. Again using the 2 ‘for loop’ representing index ‘ab’ of I(a,b) .
11. write the equation of inertia tensor matrix .
12. Display the inertia tensor matrix .
13. Using the ‘spec’ command for find the eigen value of principle axis .
14. Display the value of first,second and third principle axis .
15. Using the for loop and plot the graph .
16. Plot the graph in the four coordinates .
17. Using the ‘xgrid’ command .
18. label the graph by using the label command .
INPUT-
n=100
r=1//in cm
M=1//in gm
for i=1:n
m(i)=M/n
end
d=eye(3,3)
c=linspace(0,2*%pi,n)
X=r*cos(c)
Y=r*sin(c)
for i=1:n
x(i,1)=X(i)
x(i,2)=Y(i)
x(i,3)=0
end
x1=x(:,1)
y1=x(:,2)
z1=x(:,3)
r2=(x1.*x1)+(y1.*y1)+(z1.*z1)
for a=1:3
for b=1:3
I(a,b)=0
for i=1:n
I(a,b)=I(a,b)+(m(i)*(d(a,b)*r2(i)-x(i,a)*x(i,b)))
end
end
end
disp(I,'moment of inertia')
[pa,mpa]=spec(I)
disp(pa(:,1),'first principal value')
disp(pa(:,2),'second principal value')
disp(pa(:,3),'third principal value')
for s=1:n
plot(X(s),Y(s),'+')
end
disp(I)
xa=[-pa(1,1), pa(1,1)]
yb=[-pa(2,1), pa(2,1)]
plot(xa,yb)
xa=[-pa(1,2), pa(1,2)]
yb=[-pa(2,2), pa(2,2)]
plot(xa,yb)
xgrid
xlabel("X-AXIS")
ylabel("Y-AXIS")
OUTPUT-
moment of inertia
0.495 0. 0.
0. 0.505 0.
0. 0. 1.
first principal value
1.
0.
0.
second principal value
0.
1.
0.
third principal value
0.
0.
1.
No comments:
Post a Comment