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.0. 5.2 4.3 0.5 0.0 2. The hydrostatic stress is a=-0.2 where R is the rotation matrix 0.02 -0.01 0.03 c=-0.01 0.2 -0.05 0.03 -0.05 0.4 dyd +- (110) ₁. and the deviatoric stress is daey-day- 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. cos@+u(1-cos) 3. If we rotate the material, the representation of the stress tensor will change. Suppose that the coordinate system is (e₁,e.es). If we rotate the material about an axis - (₁, 2, 3) (a unit vector) by the angle e, the representation of the stress tensor will become o'Ro. R=(1-cos) +u, sin ₁₂(1-cos@)-, sin cos@+(1-cos) u₂(1-cos)+u, sin 6 ₁,(1-cos) + ₂ sin (1-cos)-uj sin cos@+u(1-cos) (1-cos)-₂ sin 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 /6.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Programming 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
a= -0.2
-0.2 0.5
4.3 0.0
5.2
0.5
0.0
2. The hydrostatic stress is
0.02 -0.01 0.03
€= -0.01 0.2 -0.05
0.03 -0.05 0.4
Ohyd = (ro) 1.
and the deviatoric stress is
deyddyd
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.
where R is the rotation matrix
3. If we rotate the material, the representation of the stress tensor will change. Suppose that the coordinate system is (e₁,e₂, es). If we rotate the material
about an axis u= (₁,42,43) (a unit vector) by the angle 6, the representation of the stress tensor will become
oRo,
cos @ + u(1-cos)
R=₂4(1-cos) + 3 sin
u₁u₂(1-cos 9)-uy sin
cos@+u(1-cos)
uzu₂(1-cos 8) +u, sin 0
uu(1-cos 8) + u₂ sin 0
₂(1-cos)-uj sin 0
cos + u(1-cos 6)
uu(1-cos 0)-₂ sine
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 x/6.
(6+6+8 = 20 marks)
Transcribed Image Text: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 a= -0.2 -0.2 0.5 4.3 0.0 5.2 0.5 0.0 2. The hydrostatic stress is 0.02 -0.01 0.03 €= -0.01 0.2 -0.05 0.03 -0.05 0.4 Ohyd = (ro) 1. and the deviatoric stress is deyddyd 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. where R is the rotation matrix 3. If we rotate the material, the representation of the stress tensor will change. Suppose that the coordinate system is (e₁,e₂, es). If we rotate the material about an axis u= (₁,42,43) (a unit vector) by the angle 6, the representation of the stress tensor will become oRo, cos @ + u(1-cos) R=₂4(1-cos) + 3 sin u₁u₂(1-cos 9)-uy sin cos@+u(1-cos) uzu₂(1-cos 8) +u, sin 0 uu(1-cos 8) + u₂ sin 0 ₂(1-cos)-uj sin 0 cos + u(1-cos 6) uu(1-cos 0)-₂ sine 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 x/6. (6+6+8 = 20 marks)
Expert Solution
steps

Step by step

Solved in 3 steps with 3 images

Blurred answer
Knowledge Booster
Array
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education