16.6附源程序代码本章箱形基础计算工程主要包括1个窗体,1个模块。模块的程序代码与第一章基本一致,这里主要给出箱形基础内力计算的主要程序代码。DimZhuB(1To50),ZhuL(1To50),ZhuHh(1To50)'柱截面宽、长和柱的高度DimLiangB(1To50),LiangL(1To50),ZhuLL(50)'梁截面宽、长和柱间距DimNceng'建筑物层数。小于等于8DimMzong'在弯曲方向的节间数DimMheng'在横向的节间数DimMzheng'箱形基础承受的整体弯矩DimEf'箱形基础的混凝土弹性模量DimEb'梁柱的混凝土弹性模量DimBji'箱形基础宽度BjiDimHji'箱形基础高度HjiDimHjing'箱形基础净高HjingDimBjing'箱形基础净宽BjingDimEw'连续钢筋墙弹性模量EwDimBqiang'连续钢筋墙总厚度BqiangDimHqiang'连续钢筋墙总高HqiangDimXx(50),Fji(50),Xpi(50),Pjidi(50)DimxPrivateSubCommand1_Click()'箱形基础内力计算DimIceng(50),Kceng(50),Iliang(50),Kliang(50)DimIguan,EIjiDimEIshang,EIqiangDimQzuo(50),Qyou(50),Mzuoy(50),Mzhong(50)Dimx(50)DimSumM1DimSumPm1CallTianJiaJiBenCallTianJiaHeZaiMe.List4.AddItem(箱形基础内力分析)Me.List4.AddItem()'计算箱形基础刚度'箱形基础横截面惯性矩Iguan=(Bji*Hji^3-Bjing*Hjing^3)/12EIji=Ef*IguanMe.List4.AddItem(箱形基础刚度(kN.m^2)EIji=)&Format(EIji,00.00)2'计算上部结构刚度'各层上下柱的截面惯性矩Sum=0#ForI=1ToNcengIceng(I)=(Mheng+1)*ZhuB(I)*ZhuL(I)^3/12Kceng(I)=Iceng(I)/ZhuHh(I)NextI'纵梁线刚度ForI=1ToMzongIliang(I)=(Mheng+1)*LiangB(I)*LiangL(I)^3/12Kliang(I)=Iliang(I)/ZhuLL(I)NextIForI=1ToNceng-1Sum=Sum+Eb*Iliang(I)*(1#+Mzong^2*(Kceng(I)+Kceng(I+1))/(2*Kliang(I)+Kceng(I)+Kceng(I+1)))NextIMe.List4.AddItem(上部结构各层刚度和(kN.m^2)Sum=)&Format(Sum,00.00)EIqiang=Ew*Mheng*Bqiang*Hqiang^3/12Me.List4.AddItem(连续墙刚度(kN.m^2)EIqiang=)&Format(EIqiang,00.00)EIshang=Sum+EIqiangMe.List4.AddItem(上部结构总刚度(kN.m^2)EIshang=)&Format(EIshang,00.00)'集中力作用截面处的剪力和弯矩Qzuo(1)=Pjidi(1)*Xpi(1)-Fji(1)Qyou(1)=Qzuo(1)-Fji(2)Mzuoy(1)=Pjidi(1)*(Xx(2))^2/2-Fji(1)*Xpi(1)ForI=2ToList9.ListCount-1sumf=0#SumM=0#sump=0#SumPm=0#Forj=1ToIsumf=sumf+Fji(j)sump=sump+Pjidi(j)*Xpi(j)SumM=SumM+Fji(j)*(Xx(I+1)-Xx(j))SumPm=SumPm+Pjidi(j)*Xpi(j)*(Xpi(j)/2+(Xx(I+1)-Xx(j+1)))3NextjQzuo(I)=sump-sumfQyou(I)=Qzuo(I)-Fji(I+1)Mzuoy(I)=SumPm-SumMNextIMe.List4.AddItem()Me.List4.AddItem(荷载作用位置(m))&(左端剪力(kN))&(右端剪力(kN))ForI=1ToList1.ListCountMe.List4.AddItem()&(Format(Xx(I+1),00.00))&()&(Format(Qzuo(I),00.00))&()&(Format(Qyou(I),00.00))NextIMe.List4.AddItem()Me.List4.AddItem(荷载作用位置(m))&(弯矩(kN.m))ForI=1ToList1.ListCountMe.List4.AddItem()&(Format(Xx(I+1),00.00))&()&(Format(Mzuoy(I),00.00))NextI'基础分担的弯矩Me.List4.AddItem()Me.List4.AddItem(荷载作用位置(m))&(基础分担的弯矩(kN.m))ForI=1ToList1.ListCountMf=Mzuoy(I)*EIji/(EIji+EIshang)Me.List4.AddItem()&(Format(Xx(I+1),00.00))&()&(Format(Mf,00.00))NextI'计算各跨中截面处弯矩Me.List4.AddItem()Me.List4.AddItem(跨截面位置(m))&(跨中截面处弯矩(kN.m))x(1)=Xx(1)+(Xx(2)-Xx(1))/2Mzhong(1)=Pjidi(1)*x(1)*x(1)/2-Fji(1)*x(1)ForI=2ToList8.ListCount-1x(I)=Xx(I)+(Xx(I+1)-Xx(I))/2SumM1=0#SumPm1=0#Forj=1ToI-1SumM1=SumM1+Fji(j)*(x(I)-Xx(j))SumPm1=SumPm1+Pjidi(j)*Xpi(j)*(Xpi(j)/2+(x(I)-Xx(j+1)))4NextjSumM1=SumM1+Fji(I)*(x(I)-Xx(I))SumPm1=SumPm1+Pjidi(I)*(x(I)-Xx(I))*(x(I)-Xx(I))/2Mzhong(I)=SumPm1-SumM1NextIForI=1ToList8.ListCount-1Me.List4.AddItem()&(Format(x(I),00.00))&()&(Format(Mzhong(I),00.00))NextI'基础分担的弯矩Me.List4.AddItem()Me.List4.AddItem(荷载作用位置(m))&(基础分担的弯矩(kN.m))ForI=1ToList8.ListCount-1Mf=Mzhong(I)*EIji/(EIji+EIshang)Me.List4.AddItem()&(Format(x(I),00.00))&()&(Format(Mf,00.00))NextItuichu=1ExitSubtch:MsgBox数据输入有误,不能得出结果,vbExclamationEndSubPublicFunctionPjxy(x,y)Pjxy=sumf/(JiChang*JiKuan)+Mxx*y/Ixx+Myy/Iyy*xEndFunctionPrivateSubTianJiaHeZai()DimIAsIntegerForI=1ToList1.ListCountList1.ListIndex=List1.ListCount-IZhuB(I)=Val(List1.Text)NextForI=1ToList2.ListCountList2.ListIndex=List2.ListCount-IZhuL(I)=Val(List2.Text)NextForI=1ToList3.ListCountList3.ListIndex=List3.ListCount-I5ZhuHh(I)=Val(List3.Text)NextForI=1ToList5.ListCountList5.ListIndex=List5.ListCount-ILiangB(I)=Val(List5.Text)NextForI=1ToList6.ListCountList6.ListIndex=List6.ListCount-ILiangL(I)=Val(List6.Text)NextForI=1ToList7.ListCountList7.ListIndex=List7.ListCount-IZhuLL(I)=Val(List7.Text)NextForI=1ToList8.ListCountList8.ListIndex=List8.ListCount-IXx(I)=Val(List8.Text)NextForI=1ToList9.ListCountList9.ListIndex=List9.ListCount-IFji(I)=Val(List9.Text)NextForI=1ToList10.ListCountList10.ListIndex=List10.ListCount-IXpi(I)=Val(List10.Text)NextForI=1ToList11.ListCountList11.ListIndex=List11.ListCount-IPjidi(I)=Val(List11.Text)NextEndSubSubTianJiaJiBen()Nceng=Val(Text1(0).Text)Mzong=Val(Text1(1).Text)x=Val(Text1(2).Text)Ef=Val(Text1(3).Text)Eb=Val(Text1(4).Text)Bji=Val(Text1(5).Text)6Hji=Val(Text1(6).Text)Bjing=Val(Text1(7).Text)Hjing=Val(Text1(8).Text)Mheng=Val(Text1(9).Text)Ew=Val(Text1(10).Text)Bqiang=Val(Text1(11).Text)Hqiang=Val(Text1(12).Text)EndSubPrivateSubCmdExit_Click()UnloadMeEndSubPrivateSubCmdOpen_Click()DimTheFileNameAsString,TheTempAsString,AAAAsStringDimWenjianhaoAsInteger,IAsIntegerTheFileName=OpenDialog(TypeOfDialog.TypeOpen,基础计算器备份文件(*.txt)|*.txt)IfTheFileName=ThenExitSubWenjianhao=OpenFile(TheFileName,OpenType.TypeRead)DoWhileWenjianhao=0DimTheResultAsIntegerTheResult=MsgBox(打开文件发生如下错误:&vbCrLf&Err.Description,vbExclamation+vbRetryCancel)IfTheResult=vbCancelThenExitSubElseWenjianhao=OpenFile(TheFileName,OpenType.TypeRead)EndIfLoopCallQingkongTheTemp=InputLine(Wenjianhao)IfTheTemp箱形基础内力计算ThenGoToLOADFINISHED:InputLineWenjianhaoInputLineWenjianhaoForI=0To12Me.Text1(I).Text