Question: Q3. Write a python code to do the following operations. 1. Create a stress tensor and a strain tensor in form of Numpy arrays: 1.0

Q3. Write a python code to do the following operations. 1. Create a stress tensor and a strain tensor in form of Numpy arrays: 1.0 -0.2 0.5 -0.2 4.3 0.0 0.5 0.0 5.2 2. The hydrostatic stress is 0.02 -0.01 E = -0.01 0.2 -0.05 0.03 -0.05 0.4 0.03 Ohyd = tro I, and the deviatoric stress is Odev = 0 - Ohyd. Define a function stress_hyd_dev() which takes in a stress tensor and returns the hydrostatic stress and the deviatoric stress. Then, apply this function to calculate the hydrostatic stress and the deviatoric stress of the stress defined in Question 1. 3. If we rotate the material, the representation of the stress tensor will change. Suppose that the coordinate system is (e1,e2, ez). If we rotate the material about an axis u = (U1, U2, U3) (a unit vector) by the angle 0, the representation of the stress tensor will become o Ro, where R is the rotation matrix: R cos @+u (1 - cos 0) ujuz(1 - cos ) Uz sin uju3(1 - cos 6) + uz sin U2u1(1 - cos 6) + uz sin 0 cose + u(1 cos) uzu3(1 cos e) - Usine W Uzu1(1 - cos ) Uz sin Uzu2(1 cos) + usine cose + u(1 - cos ) Define a function stress_rot) which takes in a stress tensor, rotation axis and rotation angle and returns the stress tensor after rotation. Then, apply this function to calculate the stress tensor after rotating the material about u = (1,1,1) by the angle 1/6. Q3. Write a python code to do the following operations. 1. Create a stress tensor and a strain tensor in form of Numpy arrays: 1.0 -0.2 0.5 -0.2 4.3 0.0 0.5 0.0 5.2 2. The hydrostatic stress is 0.02 -0.01 E = -0.01 0.2 -0.05 0.03 -0.05 0.4 0.03 Ohyd = tro I, and the deviatoric stress is Odev = 0 - Ohyd. Define a function stress_hyd_dev() which takes in a stress tensor and returns the hydrostatic stress and the deviatoric stress. Then, apply this function to calculate the hydrostatic stress and the deviatoric stress of the stress defined in Question 1. 3. If we rotate the material, the representation of the stress tensor will change. Suppose that the coordinate system is (e1,e2, ez). If we rotate the material about an axis u = (U1, U2, U3) (a unit vector) by the angle 0, the representation of the stress tensor will become o Ro, where R is the rotation matrix: R cos @+u (1 - cos 0) ujuz(1 - cos ) Uz sin uju3(1 - cos 6) + uz sin U2u1(1 - cos 6) + uz sin 0 cose + u(1 cos) uzu3(1 cos e) - Usine W Uzu1(1 - cos ) Uz sin Uzu2(1 cos) + usine cose + u(1 - cos ) Define a function stress_rot) which takes in a stress tensor, rotation axis and rotation angle and returns the stress tensor after rotation. Then, apply this function to calculate the stress tensor after rotating the material about u = (1,1,1) by the angle 1/6
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
