# -*- coding: utf-8 -*-
import numpy as np
import matplotlib.pyplot as plt
# Phi = 0.24
# parameters: a, l, d, b, gamma
Phi = 0.42
gamma = 0.4
d = 3.5
#根据限制选择合适的b区间
b0 = np.linspace(0,5,200)
#Phi *(l + a0)*(b0 + d) = l0*d
l0 = Phi * 2 * 67 *( b0 + d)/d
#(l + a0)/2 = 67
a0 = 2*67 -l0
#a>0 begin
i = 0
running = True
#while缺少对i的限制
while running:
tmp_a = a0[i]
if tmp_a < 0:
running = False
else:
i = i + 1
#a>0 end
#a<l begin
j = 0
running = True
while running:
tmp_a1 = a0[j]
tmp_l1 = l0[j]
if tmp_a1 < tmp_l1:
running = False
else:
j = j + 1
b_lim_max = b0[i-1]
#i-1是因为a0[i]<0 不符合a>0
b_lim_min = b0[j]
#a0[j]<l0[j] 符合a<l
# 设定好b的区间后,开始绘图
b = np.linspace(b_lim_min,b_lim_max,100)
l = Phi * 2 * 67 *( b + d)/d
#(l + a)/2 =
绘制弹性模量的变化
最新推荐文章于 2021-11-25 11:55:51 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)