哈工大材料力学上机编程报告Word下载.docx
- 文档编号:17228378
- 上传时间:2022-11-29
- 格式:DOCX
- 页数:19
- 大小:56.83KB
哈工大材料力学上机编程报告Word下载.docx
《哈工大材料力学上机编程报告Word下载.docx》由会员分享,可在线阅读,更多相关《哈工大材料力学上机编程报告Word下载.docx(19页珍藏版)》请在冰豆网上搜索。
4.单击“显示图形”按钮,或直接单击空白区域即可显示单元体及应力圆如下图
5.单击“重新输入”返回上级窗体,可以按步骤重新输入数据进行下一组数据的计算
附:
源程序代码
form1语句:
PrivateSubCommand1_Click()
DimjAsDouble
DimkAsDouble
DimiAsDouble
DimqAsDouble'
输入的应力状态
DimmAsDouble
DimnAsDouble
DimpAsDouble'
输出的主应力
DimXAsDouble
DimYAsDouble
DimzAsDouble'
输出的切应力
DimaAsDouble
DimbAsDouble
DimcAsDouble'
输出的任意应力状态
j=Val(Text1.Text)
k=Val(Text2.Text)
i=Val(Text3.Text)
q=Val(Text4.Text)/180*3.14159
m=(j+k)/2+Sqr(((j-k)/2)^2+i^2)'
最大主应力
n=(j+k)/2-Sqr(((j-k)/2)^2+i^2)'
最小主应力
Ifj=kThen
p=45
Else
p=((Atn((i*2)/(j-k)))/2)/3.1415926*180'
角度
EndIf
X=Sqr(((j-k)/2)^2+i^2)'
最大切应力
Y=-Sqr(((j-k)/2)^2+i^2)'
最小切应力
Ifi=0Then
z=45
z=((Atn(-(j-k)/(2*i)))/2)/3.1415926*180'
主切平面方位角
a=(j+k)/2+(j-k)*Cos(2*q)/2+i*Sin(2*q)'
任意面应力
b=-(j-k)*Sin(2*q)/2+i*Cos(2*q)
Text7.Text=Format(m,"
0.00"
)
Text8.Text=Format(n,"
Text9.Text=Format(p,"
Text10.Text=Format(X,"
Text11.Text=Format(Y,"
Text12.Text=Format(z,"
Text5.Text=Format(a,"
Text6.Text=Format(b,"
EndSub
PrivateSubCommand2_Click()
Form1.Visible=False
Form2.Visible=True
form2语句:
Form1.Visible=True
Form2.Visible=False
PrivateSubpicture2_GotFocus()
DimbAsDouble'
DimcAsDouble
j=Val(Form1.Text1.Text)
k=Val(Form1.Text2.Text)
i=Val(Form1.Text3.Text)
q=Val(Form1.Text4.Text)/180*3.14159
c=(j+k)/2+(j-k)/2*Cos(2*p)+c*Sin(2*p)
Ifc<
>
mThen
p=p+90
Ifi=0Then
a=(j+k)/2+(j-k)*Cos(2*q)/2+i*Sin(2*q)
Picture2.Cls'
清除图中线条
Picture2.DrawWidth=3
Picture2.Scale(-2,2)-(2,-2)
Picture2.Line(-1,1)-(-1,-1)
Picture2.Line(-1,-1)-(1,-1)
Picture2.Line(1,-1)-(1,1)
Picture2.Line(1,1)-(-1,1)'
输出正方形
Picture2.DrawWidth=1
Ifp<
0Then
IfAbs(Tan(p))<
1Then
Picture2.Line(0,0)-(Tan(p),-1),vbGreen
Picture2.Line(0,0)-(-Tan(p),1),vbGreen
Picture2.Line(0,0)-(1.6*Cos(p),1.6*Sin(p)),vbGreen
Else
IfAbs(Tan(p))>
Picture2.Line(0,0)-(1,-1/Tan(p)),vbGreen
Picture2.Line(0,0)-(-1,1/Tan(p)),vbGreen
Picture2.Line(0,0)-(1.6*Cos(p),1.6*Sin(p)),vbGreen'
按角度不同作出主应力的平面
EndIf
Ifi>
Picture2.Line(1.2,-0.8)-(1.2,0.8),vbRed
Picture2.Line(1.2,0.8)-(1.3,0.7),vbRed
Picture2.Line(1.2,0.8)-(1.1,0.7),vbRed'
切应力
Picture2.Line(-1.2,-0.8)-(-1.2,0.8),vbRed
Picture2.Line(-1.2,-0.8)-(-1.3,-0.7),vbRed
Picture2.Line(-1.2,-0.8)-(-1.1,-0.7),vbRed'
Picture2.Line(0.8,1.2)-(-0.8,1.2),vbRed
Picture2.Line(0.8,1.2)-(0.7,1.3),vbRed
Picture2.Line(0.8,1.2)-(0.7,1.1),vbRed'
Picture2.Line(0.8,-1.2)-(-0.8,-1.2),vbRed
Picture2.Line(-0.8,-1.2)-(-0.7,-1.3),vbRed
Picture2.Line(-0.8,-1.2)-(-0.7,-1.1),vbRed'
Ifi<
Picture2.Line(1.2,-0.8)-(1.3,-0.7),vbRed
Picture2.Line(1.2,-0.8)-(1.1,-0.7),vbRed'
Picture2.Line(-1.2,0.8)-(-1.3,0.7),vbRed
Picture2.Line(-1.2,0.8)-(-1.1,0.7),vbRed'
Picture2.Line(-0.8,1.2)-(-0.7,1.3),vbRed
Picture2.Line(-0.8,1.2)-(-0.7,1.1),vbRed'
Picture2.Line(0.8,-1.2)-(0.7,-1.3),vbRed
Picture2.Line(0.8,-1.2)-(0.7,-1.1),vbRed'
Ifj>
Picture2.Line(1,0)-(1.8,0),vbRed
Picture2.Line(1.8,0)-(1.7,0.1),vbRed
Picture2.Line(1.8,0)-(1.7,-0.1),vbRed'
主应力
Picture2.Line(-1,0)-(-1.8,0),vbRed
Picture2.Line(-1.8,0)-(-1.7,0.1),vbRed
Picture2.Line(-1.8,0)-(-1.7,-0.1),vbRed'
Ifj<
Picture2.Line(1,0)-(1.1,0.1),vbRed
Picture2.Line(1,0)-(1.1,-0.1),vbRed'
Picture2.Line(-1,0)-(-1.1,0.1),vbRed
Picture2.Line(-1,0)-(-1.1,-0.1),vbRed'
Ifk>
Picture2.Line(0,1)-(0,1.8),vbRed
Picture2.Line(0,1.8)-(0.1,1.7),vbRed
Picture2.Line(0,1.8)-(-0.1,1.7),vbRed
Picture2.Line(0,-1)-(0,-1.8),vbRed
Picture2.Line(0,-1.8)-(0.1,-1.7),vbRed
Picture2.Line(0,-1.8)-(-0.1,-1.7),vbRed
Ifk<
Picture2.Line(0,1)-(0.1,1.1),vbRed
Picture2.Line(0,1)-(-0.1,1.1),vbRed
Picture2.Line(0,-1)-(0.1,-1.1),vbRed
Picture2.Line(0,-1)-(-0.1,-1.1),vbRed
PrivateSubPicture3_GotFocus()
Picture3.Cls'
s=(j+k)/2
r=((j+k)/2-n)
Picture3.DrawWidth=3'
确定线宽
Picture3.ScaleMode=3
Ifs<
Picture3.Scale(-(1.6*r+Abs(s)),(1.6*r+Abs(s)))-((1.6*r+Abs(s)),-(1.6*r+Abs(s)))'
定义坐标
Picture3.Line((1.5*r+Abs(s)),0)-(-(1.5*r+Abs(s)),0)
Picture3.Line(0,-(1.5*r+Abs(s)))-(0,(1.5*r+Abs(s)))
Picture3.Line((1.5*r+Abs(s)),0)-((1.4*r+Abs(s)),0.1*r)
Picture3.Line((1.5*r+Abs(s)),0)-((1.4*r+Abs(s)),-0.1*r)
Picture3.Scale(-2,2)-(2,-2)'
Picture3.Line(-1.9,0)-(1.9,0)
Picture3.Line(0,-1.9)-(0,1.9)
Picture3.Line(1.9,0)-(1.7,0.1)
Picture3.Line(1.9,0)-(1.7,-0.1)
Picture3.Circle(s,0),Abs(r),vbRed'
做圆,圆心,半径,红线
'
判定
正方形
Picture2.Line(1.2,-0.8)-(1.2,0.8),vbR
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 哈工大 材料力学 上机 编程 报告