summaryrefslogtreecommitdiff
path: root/2732/CH3/EX3.4/Ex3_4.sce
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /2732/CH3/EX3.4/Ex3_4.sce
downloadScilab-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/CH3/EX3.4/Ex3_4.sce')
-rwxr-xr-x2732/CH3/EX3.4/Ex3_4.sce36
1 files changed, 36 insertions, 0 deletions
diff --git a/2732/CH3/EX3.4/Ex3_4.sce b/2732/CH3/EX3.4/Ex3_4.sce
new file mode 100755
index 000000000..1029d1c60
--- /dev/null
+++ b/2732/CH3/EX3.4/Ex3_4.sce
@@ -0,0 +1,36 @@
+clc
+// initialization of variables
+clear
+epsillon=[0.01 -0.02 0
+ -0.02 0.03 -0.01
+ 0 -0.01 0] // dimensionless
+a_xx=0.6
+theta=acos(a_xx) // radians
+//calculations
+// theta=theta*%pi/180
+a=[cos(theta) 0 -sin(theta)
+ 0 1 0
+ sin(theta) 0 cos(theta)]
+b=a.'
+epsillon_new=a*epsillon*b
+
+// calculation of strain invariants
+// for epsillon
+J1=epsillon(1,1)+epsillon(2,2)+epsillon(3,3)
+
+J2=epsillon(1,1)*epsillon(2,2)+epsillon(2,2)*epsillon(3,3)+epsillon(3,3)*epsillon(1,1)-2*(epsillon(1,2)^2+epsillon(2,3)^2+epsillon(3,1)^2)
+
+J3=epsillon(1,1)*epsillon(2,2)*epsillon(3,3)+2*epsillon(1,2)*epsillon(2,3)*epsillon(3,1)-(epsillon(1,1)*epsillon(2,3)^2+epsillon(2,2)*epsillon(3,1)^2+epsillon(3,3)*epsillon(1,2)^2)
+
+// for epsillon_new
+J11=epsillon_new(1,1)+epsillon_new(2,2)+epsillon_new(3,3)
+
+J22=epsillon_new(1,1)*epsillon_new(2,2)+epsillon_new(2,2)*epsillon_new(3,3)+epsillon_new(3,3)*epsillon_new(1,1)-2*(epsillon_new(1,2)^2+epsillon_new(2,3)^2+epsillon_new(3,1)^2)
+
+J33=epsillon_new(1,1)*epsillon_new(2,2)*epsillon_new(3,3)+2*epsillon_new(1,2)*epsillon_new(2,3)*epsillon_new(3,1)-(epsillon_new(1,1)*epsillon_new(2,3)^2+epsillon_new(2,2)*epsillon_new(3,1)^2+epsillon_new(3,3)*epsillon_new(1,2)^2)
+
+// Results
+printf('The new strain tensor is')
+disp(epsillon_new)
+printf('The strain invariants of old stress tensor are J1=%0.2f J2=%.e J3=%.e \n and that of the new stress tensor are J1=%0.2f J2=%.e J3=%.e',J1,J2,J3,J11,J22,J33)
+