diff options
author | priyanka | 2015-06-24 15:03:17 +0530 |
---|---|---|
committer | priyanka | 2015-06-24 15:03:17 +0530 |
commit | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch) | |
tree | ab291cffc65280e58ac82470ba63fbcca7805165 /2732/CH2/EX2.7/Ex2_7.sce | |
download | Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2 Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip |
initial commit / add all books
Diffstat (limited to '2732/CH2/EX2.7/Ex2_7.sce')
-rwxr-xr-x | 2732/CH2/EX2.7/Ex2_7.sce | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/2732/CH2/EX2.7/Ex2_7.sce b/2732/CH2/EX2.7/Ex2_7.sce new file mode 100755 index 000000000..9bece8d3a --- /dev/null +++ b/2732/CH2/EX2.7/Ex2_7.sce @@ -0,0 +1,31 @@ +clc
+// initialization of variables
+clear
+tau=[200 100 0
+ 100 0 0
+ 0 0 500] // some units
+theta=60 // degrees
+//calculations
+theta=theta*%pi/180
+a=[cos(theta) sin(theta) 0
+ -sin(theta) cos(theta) 0
+ 0 0 1]
+b=a.'
+tau_new=a*tau*b
+
+// stress invariants :old
+I1=tau(1,1)+tau(2,2)+tau(3,3)
+I2=tau(1,1)*tau(2,2)+tau(2,2)*tau(3,3)+tau(3,3)*tau(1,1)-(tau(1,2)^2+tau(2,3)^2+tau(3,1)^2)
+I3=tau(1,1)*tau(2,2)*tau(3,3)+2*tau(1,2)*tau(2,3)*tau(3,1)-(tau(1,1)*tau(2,3)^2+tau(2,2)*tau(3,1)^2+tau(3,3)*tau(1,2)^2)
+
+// stress invariants :new
+I11=tau_new(1,1)+tau_new(2,2)+tau_new(3,3)
+I22=tau_new(1,1)*tau_new(2,2)+tau_new(2,2)*tau_new(3,3)+tau_new(3,3)*tau_new(1,1)-(tau_new(1,2)^2+tau_new(2,3)^2+tau_new(3,1)^2)
+I33=tau_new(1,1)*tau_new(2,2)*tau_new(3,3)+2*tau_new(1,2)*tau_new(2,3)*tau_new(3,1)-(tau_new(1,1)*tau_new(2,3)^2+tau_new(2,2)*tau_new(3,1)^2+tau_new(3,3)*tau_new(1,2)^2)
+
+// Results
+printf('The invariants of old stress tensor are I1=%0.2f I2=%.e I3=%.e \n and that of the new stress tensor are I1=%0.2f I2=%.e I3=%.e',I1,I2,I3,I11,I22,I33)
+printf('\n Hence the same stress tensor invariants')
+
+
+
|