8.3 Python求解
Python求解代码如下:
1.import math
2.
3.sigma1 = 300 # 最大主应力,单位 kPa
4.sigma3 = 100 # 最小主应力,单位 kPa
5.alpha = 30 # m-n面与最小主应力方向夹角,单位度
6.
7.rad_alpha = math.radians(alpha) # 转化为弧度制
8.sigma_avg = 0.5 * (sigma1 + sigma3)
9.sigma_diff = 0.5 * (sigma1 - sigma3)
10.
11.sigma = sigma_avg + sigma_diff * math.cos(2 * rad_alpha)
12.tau = sigma_diff * math.sin(2 * rad_alpha)
13.
14.print("法向应力为:", sigma, "kPa")
15.print("剪应力为:", tau, "kPa")
运行结果为:
法向应力为: 200.0 kPa
剪应力为: 86.60254037844385 kPa
下载地址:
https://oan3m7w1ar.feishu.cn/file/WMEsbUF7Iokbt2x3OgKcqQqnnTd
学Python并不难,会敲键盘就能学!