回 帖 发 新 帖 刷新版面

主题:50多页的VB源代码,求流程图


 因为我不懂程序  所以请帮忙

附录

源代码

30

主界面

VERSION 5.00

Begin VB.MDIForm MDI_Main

   BackColor       =   &H8000000C&

   Caption         =   "MDIForm1"

   ClientHeight    =   12150

   ClientLeft      =   165

   ClientTop       =   840

   ClientWidth     =   14535

   Icon            =   "MDI_Main.frx":0000

   LinkTopic       =   "MDIForm1"

   Picture         =   "MDI_Main.frx":08CA

   StartUpPosition =   3  '窗口缺省

   WindowState     =   2  'Maximized

   Begin VB.Menu Mnu_Computing

      Caption         =   "膨胀套管力学性能评价"

   End

   Begin VB.Menu Mnu_Reports

      Caption         =   "结果输入Word文件"

      Enabled         =   0   'False

   End

   Begin VB.Menu Mnu_Help

      Caption         =   "帮助"

      Begin VB.Menu Mnu_Info

         Caption         =   "软件信息"

      End

      Begin VB.Menu Mnu_StressStrainCurves

         Caption         =   "材料应力-应变曲线"

      End

      Begin VB.Menu Mnu_Manual

         Caption         =   "软件使用手册"

      End

   End

   Begin VB.Menu Mnu_Exit

      Caption         =   "退出"

   End

End

Attribute VB_Name = "MDI_Main"

Attribute VB_GlobalNameSpace = False

Attribute VB_Creatable = False

Attribute VB_PredeclaredId = True

Attribute VB_Exposed = False

Dim wordApp As Word.Application

Dim doc As Word.Document

'-----------------------------------------------

Private Sub Mnu_Computing_Click()

   Ex_casing.Show

End Sub

 

Private Sub Mnu_Exit_Click()

'     wordApp.DisplayAlerts = False '关闭时不提示保存

'    wordApp.ActiveWindow.Close

'     wordApp.Quit

 

  End

End Sub

 

Private Sub Mnu_Info_Click()

   Version.Show

End Sub

 

Private Sub Mnu_Manual_Click()

   Call HTMLHelp(hwnd, App.Path & "\help\Help.chm", 0, 0)

 

'  Manual.Show

End Sub

 

Private Sub Mnu_Reports_Click()

'

     

     

      Set wordApp = New Word.Application

      Set doc = wordApp.Documents.Add

      wordApp.Visible = False

       

        If wordApp.ActiveWindow.View.SplitSpecial = wdPaneNone Then

            wordApp.ActiveWindow.ActivePane.View.Type = wdPrintView

        Else

            wordApp.ActiveWindow.View.Type = wdPrintView

        End If

       

         With wordApp.ActiveDocument.PageSetup

            .LineNumbering.Active = False

            .Orientation = wdOrientPortrait

            .TopMargin = CentimetersToPoints(2.54)

            .BottomMargin = CentimetersToPoints(2.54)

            .LeftMargin = CentimetersToPoints(2.5)

            .RightMargin = CentimetersToPoints(2.5)

            .Gutter = CentimetersToPoints(0)

            .HeaderDistance = CentimetersToPoints(1.5)

            .FooterDistance = CentimetersToPoints(1.75)

            .PageWidth = CentimetersToPoints(21)

            .PageHeight = CentimetersToPoints(29.7)

            .FirstPageTray = wdPrinterDefaultBin

            .OtherPagesTray = wdPrinterDefaultBin

            .SectionStart = wdSectionNewPage

            .OddAndEvenPagesHeaderFooter = False

            .DifferentFirstPageHeaderFooter = False

            .VerticalAlignment = wdAlignVerticalTop

            .SuppressEndnotes = False

            .MirrorMargins = False

            .TwoPagesOnOne = False

            .BookFoldPrinting = False

            .BookFoldRevPrinting = False

            .BookFoldPrintingSheets = 1

            .GutterPos = wdGutterPosLeft

            .LayoutMode = wdLayoutModeLineGrid

        End With

'------------------(设置页码)-------------

    With wordApp.Selection.Sections(1).Headers(1).PageNumbers

'--------------------------------------------------------------------------------------

        .NumberStyle = wdPageNumberStyleArabic

        .HeadingLevelForChapter = 0

        .IncludeChapterNumber = False

        .ChapterPageSeparator = wdSeparatorHyphen

        .RestartNumberingAtSection = True

        .StartingNumber = 1

    End With

    wordApp.Selection.Sections(1).Footers(1).PageNumbers.Add PageNumberAlignment:= _

        wdAlignPageNumberCenter, FirstPage:=True

    wordApp.ActiveWindow.ActivePane.VerticalPercentScrolled = 32

   

'-------------------(页码结束)----------------------------------------------------------

'---------------(页眉设置)-------

    wordApp.ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader

    wordApp.Selection.TypeText Text:="膨胀套管力学性能评价()"

    wordApp.Selection.MoveLeft Unit:=wdCharacter, Count:=1

    wordApp.Selection.InsertDateTime DateTimeFormat:="yyyy年Md日,星期W", InsertAsField:= _

        False, DateLanguage:=wdSimplifiedChinese, CalendarType:=wdCalendarWestern _

        , InsertAsFullWidth:=False

    wordApp.Selection.ParagraphFormat.Alignment = wdAlignParagraphRight

'----------------(页眉设置结束)---------------------

 

        Call DrawForm1(wordApp)

'

'---------(设置行间距)--------------------------------------

   wordApp.Selection.WholeStory

    With wordApp.Selection.ParagraphFormat

        .SpaceBeforeAuto = False

        .SpaceAfterAuto = False

        .LineSpacingRule = wdLineSpaceMultiple

        .LineSpacing = LinesToPoints(1.25)

        .WordWrap = True

    End With

    wordApp.Selection.MoveDown Unit:=wdLine, Count:=1

'--------------------------------------------------------

 wordApp.ActiveWindow.DocumentMap = False

         wordApp.Visible = True

        

 

MDI_Main.Mnu_Reports.Enabled = False

'

End Sub

Public Sub DrawForm1(ByRef wordApp As Word.Application)

    Ex_casing.PrgWordOut.Visible = True

    Ex_casing.PrgWordOut.Min = 0

    Ex_casing.PrgWordOut.Max = 7

    Ex_casing.PrgWordOut.Value = 0

   

    wordApp.Selection.GoTo What:=wdGoToPage, Which:=wdGoToLast

    wordApp.Selection.ParagraphFormat.Alignment = wdAlignParagraphCenter

    wordApp.Selection.ParagraphFormat.LineSpacingRule = wdLineSpace1pt5

    wordApp.Selection.Font.Size = 24

    wordApp.Selection.Font.Color = wdColorBlue

    wordApp.Selection.Font.NameFarEast = "楷体_GB2312"

    wordApp.Selection.Font.Bold = wdToggle

   

'

    wordApp.Selection.TypeText Text:="膨胀套管力学性能评价结果"  '主标题

'

    wordApp.Selection.Font.Size = 12

    wordApp.Selection.Font.Color = wdColorRed

    wordApp.Selection.TypeParagraph

    wordApp.Selection.TypeParagraph

'

    wordApp.Selection.TypeText Text:="(" & Ex_casing.Cmb_GJ.Text & "-" & Ex_casing.Cmb_Out_D.Text & "×" _

    & Ex_casing.Cmb_Thickness.Text & "mm," & "膨胀幅度:" & Ex_casing.Expand_Ratio.Text & "%,膨胀锥角:" & Ex_casing.Ex_Angle.Text & "°)"        '副标题

'

    wordApp.Selection.TypeParagraph

    wordApp.Selection.TypeParagraph

 

 

'

    wordApp.Selection.Font.Bold = wdToggle

   

    wordApp.Selection.Font.Size = 10.5

    wordApp.Selection.TypeParagraph

    wordApp.Selection.Font.Color = wdColorBlack

    wordApp.Selection.Font.NameFarEast = "宋体"

    wordApp.Selection.TypeParagraph

'

    Ex_casing.PrgWordOut.Value = Ex_casing.PrgWordOut.Value + 1

   

    Call DrawTable1(wordApp)

    '

 

    wordApp.Selection.TypeParagraph

 

'   MDI_Main_MNU.Mnu_WordReport = False

 

 

End Sub

 

 

Public Sub DrawTable1(ByRef wordApp As Word.Application)

 

    '

    Ex_casing.SetFocus

    Clipboard.Clear

    Clipboard.SetData CaptureClient(Ex_casing)

    wordApp.Selection.Paste

    wordApp.Selection.TypeParagraph

    wordApp.Selection.Font.Bold = wdToggle

    wordApp.Selection.TypeText Text:="图膨胀套管基本参数及其计算结果"

    wordApp.Selection.Font.Bold = wdToggle

    wordApp.Selection.TypeParagraph

    wordApp.Selection.TypeParagraph

    '

    Ex_casing.PrgWordOut.Value = Ex_casing.PrgWordOut.Value + 1

   

    wordApp.Selection.InsertBreak Type:=wdPageBreak   '  插入分页符

    wordApp.Selection.TypeParagraph

    wordApp.Selection.TypeParagraph

    '

    Stress_StrainCurves.SetFocus

    Clipboard.Clear

    Clipboard.SetData CaptureClient(Stress_StrainCurves)

    wordApp.Selection.Paste

    wordApp.Selection.TypeParagraph

    wordApp.Selection.Font.Bold = wdToggle

    wordApp.Selection.TypeText Text:="图膨胀套管应力-应变曲线"

    wordApp.Selection.Font.Bold = wdToggle

    wordApp.Selection.TypeParagraph

    wordApp.Selection.TypeParagraph

    '

    Ex_casing.PrgWordOut.Value = Ex_casing.PrgWordOut.Value + 1

 

'----------------------------------------------------------------

    wordApp.Selection.TypeParagraph

    wordApp.Selection.TypeParagraph

 

    wordApp.Selection.Font.Bold = wdToggle

    wordApp.Selection.TypeText Text:="  表1 膨胀套管基本结构参数"

    wordApp.Selection.Font.Bold = wdToggle

    wordApp.Selection.ParagraphFormat.Alignment = wdAlignParagraphCenter

    wordApp.Selection.TypeParagraph

   

   wordApp.ActiveDocument.Tables.AddRange:=wordApp.Selection.Range, NumRows:=2, NumColumns:= _

            8, DefaultTableBehavior:=wdWord9TableBehavior, AutoFitBehavior:= _

            wdAutoFitFixed   'wdAutoFitContent

'--------------------------------------------------------------

    wordApp.Selection.Tables(1).Rows.Alignment = wdAlignRowCenter

    wordApp.Selection.ParagraphFormat.Alignment = wdAlignParagraphCenter

    wordApp.Selection.Cells.VerticalAlignment = wdCellAlignVerticalCenter

    wordApp.Selection.TypeText Text:="钢级"

'

   

    wordApp.Selection.MoveRight Unit:=wdCell, Count:=1

    wordApp.Selection.TypeText Text:="外径"

    wordApp.Selection.TypeParagraph

    wordApp.Selection.TypeText Text:="(mm)"

'

    wordApp.Selection.MoveRight Unit:=wdCell, Count:=1

    wordApp.Selection.TypeText Text:="内径"

    wordApp.Selection.TypeParagraph

    wordApp.Selection.TypeText Text:="(mm)"

 '

    wordApp.Selection.MoveRight Unit:=wdCell, Count:=1

    wordApp.Selection.TypeText Text:="壁厚"

    wordApp.Selection.TypeParagraph

    wordApp.Selection.TypeText Text:="(mm)"

    '

    wordApp.Selection.MoveRight Unit:=wdCell, Count:=1

    wordApp.Selection.TypeText Text:="膨胀后"

    wordApp.Selection.TypeParagraph

    wordApp.Selection.TypeText Text:="内径(mm)"

'

    wordApp.Selection.MoveRight Unit:=wdCell, Count:=1

    wordApp.Selection.TypeText Text:="膨胀"

    wordApp.Selection.TypeParagraph

    wordApp.Selection.TypeText Text:="幅度(%)"

 

    wordApp.Selection.MoveRight Unit:=wdCell, Count:=1

    wordApp.Selection.TypeText Text:="套管"

    wordApp.Selection.TypeParagraph

    wordApp.Selection.TypeText Text:="长度(m)"

 

    wordApp.Selection.MoveRight Unit:=wdCell, Count:=1

    wordApp.Selection.TypeText Text:="上层套管"

    wordApp.Selection.TypeParagraph

    wordApp.Selection.TypeText Text:="内径(m)"

   

'    wordApp.Selection.MoveRight Unit:=wdCell, Count:=1

    '

    wordApp.Selection.Font.Color = wdColorBlue   ' 字体颜色

    wordApp.Selection.Font.Bold = wdToggle      ' 粗字体

'---------------(输入数值)-------    '

    wordApp.Selection.MoveRight Unit:=wdCell, Count:=1

    wordApp.Selection.TypeText Text:=Ex_casing.Cmb_GJ.Text

'

    wordApp.Selection.MoveRight Unit:=wdCell, Count:=1

    wordApp.Selection.TypeText Text:=Ex_casing.Cmb_Out_D.Text

'

    wordApp.Selection.MoveRight Unit:=wdCell, Count:=1

    wordApp.Selection.TypeText Text:=Ex_casing.Before_In_D.Text

'

    wordApp.Selection.MoveRight Unit:=wdCell, Count:=1

    wordApp.Selection.TypeText Text:=Ex_casing.Cmb_Thickness.Text

'

    wordApp.Selection.MoveRight Unit:=wdCell, Count:=1

    wordApp.Selection.TypeText Text:=Ex_casing.After_In_D.Text

'

    wordApp.Selection.MoveRight Unit:=wdCell, Count:=1

    wordApp.Selection.TypeText Text:=Ex_casing.Expand_Ratio.Text

'

    wordApp.Selection.MoveRight Unit:=wdCell, Count:=1

    wordApp.Selection.TypeText Text:=Ex_casing.Expand_Length.Text

'

    wordApp.Selection.MoveRight Unit:=wdCell, Count:=1

    wordApp.Selection.TypeText Text:=Ex_casing.Up_Casing_In_D.Text

'

'-------------------------

'

    Ex_casing.PrgWordOut.Value = Ex_casing.PrgWordOut.Value + 1

'    PR_Curves.SetFocus

 

    wordApp.Selection.EndKey Unit:=wdStory  '   换新表

 

    wordApp.Selection.TypeParagraph

    wordApp.Selection.TypeParagraph

    wordApp.Selection.TypeParagraph

 

'

    wordApp.Selection.Font.Bold = wdToggle

    wordApp.Selection.TypeText Text:="  表2 膨胀锥基本参数"

    wordApp.Selection.Font.Bold = wdToggle

    wordApp.Selection.ParagraphFormat.Alignment = wdAlignParagraphCenter

    wordApp.Selection.TypeParagraph

   

   wordApp.ActiveDocument.Tables.AddRange:=wordApp.Selection.Range, NumRows:=2, NumColumns:= _

            5, DefaultTableBehavior:=wdWord9TableBehavior, AutoFitBehavior:= _

            wdAutoFitFixed   'wdAutoFitContent

    wordApp.Selection.Tables(1).Rows.Alignment = wdAlignRowCenter

   

'   -----------------(表头)--------------------

    wordApp.Selection.TypeText Text:="膨胀锥"

    wordApp.Selection.TypeParagraph

    wordApp.Selection.TypeText Text:="直径(mm)"

 

    wordApp.Selection.MoveRight Unit:=wdCell, Count:=1

    wordApp.Selection.TypeText Text:="定径区"

    wordApp.Selection.TypeParagraph

    wordApp.Selection.TypeText Text:="长度(mm)"

 

    wordApp.Selection.MoveRight Unit:=wdCell, Count:=1

    wordApp.Selection.TypeText Text:="膨胀锥锥体"

    wordApp.Selection.TypeParagraph

    wordApp.Selection.TypeText Text:="高度(mm)"

   

    wordApp.Selection.MoveRight Unit:=wdCell, Count:=1

    wordApp.Selection.TypeText Text:="膨胀锥"

    wordApp.Selection.TypeParagraph

    wordApp.Selection.TypeText Text:="角度(°)"

 

    wordApp.Selection.MoveRight Unit:=wdCell, Count:=1

    wordApp.Selection.TypeText Text:="润滑摩擦"

    wordApp.Selection.TypeParagraph

    wordApp.Selection.TypeText Text:="系数"

 

 

   

'-------------------------(填入数据)-----------

    wordApp.Selection.MoveRight Unit:=wdCell, Count:=1

    wordApp.Selection.TypeText Text:=Ex_casing.After_In_D.Text

 

    wordApp.Selection.MoveRight Unit:=wdCell, Count:=1

    If Ex_casing.Cmb_Out_D.Text <= 114.3 Then

       wordApp.Selection.TypeText Text:=20               '  定径区长度(mm)

    Else

       wordApp.Selection.TypeText Text:=30               '  定径区长度(mm)

    End If

   

    wordApp.Selection.MoveRight Unit:=wdCell, Count:=1

    wordApp.Selection.TypeText Text:=Round(HH, 2)                '膨胀锥体高度(mm)

    wordApp.Selection.MoveRight Unit:=wdCell, Count:=1

    wordApp.Selection.TypeText Text:=Ex_casing.Ex_Angle.Text

    wordApp.Selection.MoveRight Unit:=wdCell, Count:=1

    wordApp.Selection.TypeText Text:=Ex_casing.Fric_Coef.Text

   

    '--------------------(表2 End)----------------------------------------

        Ex_casing.PrgWordOut.Value = Ex_casing.PrgWordOut.Value + 1

 

    wordApp.Selection.EndKey Unit:=wdStory  '   换新表

 

'

    wordApp.Selection.InsertBreak Type:=wdPageBreak   '  插入分页符

   

    wordApp.Selection.TypeParagraph

    wordApp.Selection.TypeParagraph

   

'

    wordApp.Selection.Font.Bold = wdToggle

    wordApp.Selection.TypeText Text:="  表3锚定参数"

    wordApp.Selection.Font.Bold = wdToggle

    wordApp.Selection.ParagraphFormat.Alignment = wdAlignParagraphCenter

    wordApp.Selection.TypeParagraph

   

   wordApp.ActiveDocument.Tables.AddRange:=wordApp.Selection.Range, NumRows:=2, NumColumns:= _

            6, DefaultTableBehavior:=wdWord9TableBehavior, AutoFitBehavior:= _

            wdAutoFitFixed   'wdAutoFitContent

    wordApp.Selection.Tables(1).Rows.Alignment = wdAlignRowCenter

   

    '   -----------------(表头)--------------------

    wordApp.Selection.ParagraphFormat.Alignment = wdAlignParagraphCenter

    wordApp.Selection.Cells.VerticalAlignment = wdCellAlignVerticalCenter

 

    wordApp.Selection.TypeText Text:="膨胀后"

    wordApp.Selection.TypeParagraph

    wordApp.Selection.TypeText Text:="间隙(mm)"

   

    wordApp.Selection.MoveRight Unit:=wdCell, Count:=1

    wordApp.Selection.ParagraphFormat.Alignment = wdAlignParagraphCenter

    wordApp.Selection.Cells.VerticalAlignment = wdCellAlignVerticalCenter

   

    wordApp.Selection.TypeText Text:="单圈橡胶"

    wordApp.Selection.TypeParagraph

    wordApp.Selection.TypeText Text:="长度(mm)"

   

    wordApp.Selection.MoveRight Unit:=wdCell, Count:=1

    wordApp.Selection.ParagraphFormat.Alignment = wdAlignParagraphCenter

    wordApp.Selection.Cells.VerticalAlignment = wdCellAlignVerticalCenter

 

    wordApp.Selection.TypeText Text:="橡胶"

    wordApp.Selection.TypeParagraph

    wordApp.Selection.TypeText Text:="厚度(mm)"

   

    wordApp.Selection.MoveRight Unit:=wdCell, Count:=1

    wordApp.Selection.TypeText Text:="橡胶圈"

    wordApp.Selection.TypeParagraph

    wordApp.Selection.TypeText Text:="间距(mm)"

  '

    wordApp.Selection.MoveRight Unit:=wdCell, Count:=1

    wordApp.Selection.TypeText Text:="橡胶圈数"

    wordApp.Selection.TypeParagraph

    wordApp.Selection.TypeText Text:="(个)"

 

    wordApp.Selection.MoveRight Unit:=wdCell, Count:=1

    wordApp.Selection.TypeText Text:="橡胶摩擦"

    wordApp.Selection.TypeParagraph

    wordApp.Selection.TypeText Text:="系数"

 

'-------------------------(填入数据)-----------

    wordApp.Selection.MoveRight Unit:=wdCell, Count:=1

    wordApp.Selection.TypeText Text:=Ex_casing.After_Dlt.Text

 

    wordApp.Selection.MoveRight Unit:=wdCell, Count:=1

    wordApp.Selection.TypeText Text:=Ex_casing.Rub_Length.Text

    wordApp.Selection.MoveRight Unit:=wdCell, Count:=1

    wordApp.Selection.TypeText Text:=Ex_casing.Rub_Thinkness.Text

    wordApp.Selection.MoveRight Unit:=wdCell, Count:=1

    wordApp.Selection.TypeText Text:=55

    wordApp.Selection.MoveRight Unit:=wdCell, Count:=1

    wordApp.Selection.TypeText Text:=Ex_casing.Rub_Number.Text

    wordApp.Selection.MoveRight Unit:=wdCell, Count:=1

    wordApp.Selection.TypeText Text:=Ex_casing.Rubber_Fric_Coef.Text

'-----------(表3 End)------------------------------------------------

 

    wordApp.Selection.EndKey Unit:=wdStory  '   换新表

 

    wordApp.Selection.TypeParagraph

    wordApp.Selection.TypeParagraph

    wordApp.Selection.TypeParagraph

   

   

'-------------------------------------------

    wordApp.Selection.Font.Bold = wdToggle

    wordApp.Selection.TypeText Text:="  表4 膨胀前、后强度的结果"

    wordApp.Selection.Font.Bold = wdToggle

    wordApp.Selection.ParagraphFormat.Alignment = wdAlignParagraphCenter

    wordApp.Selection.TypeParagraph

   

   wordApp.ActiveDocument.Tables.AddRange:=wordApp.Selection.Range, NumRows:=4, NumColumns:= _

            6, DefaultTableBehavior:=wdWord9TableBehavior, AutoFitBehavior:= _

            wdAutoFitFixed   'wdAutoFitContent

    wordApp.Selection.Tables(1).Rows.Alignment = wdAlignRowCenter

   

    '   -----------------(表头)--------------------

    wordApp.Selection.ParagraphFormat.Alignment = wdAlignParagraphCenter

    wordApp.Selection.Cells.VerticalAlignment = wdCellAlignVerticalCenter

 

    wordApp.Selection.TypeText Text:="前、后"

   

   

    wordApp.Selection.MoveRight Unit:=wdCell, Count:=1

    wordApp.Selection.ParagraphFormat.Alignment = wdAlignParagraphCenter

    wordApp.Selection.Cells.VerticalAlignment = wdCellAlignVerticalCenter

   

    wordApp.Selection.TypeText Text:="屈服"

    wordApp.Selection.TypeParagraph

    wordApp.Selection.TypeText Text:="应力(MPa)"

   

    wordApp.Selection.MoveRight Unit:=wdCell, Count:=1

    wordApp.Selection.ParagraphFormat.Alignment = wdAlignParagraphCenter

    wordApp.Selection.Cells.VerticalAlignment = wdCellAlignVerticalCenter

 

    wordApp.Selection.TypeText Text:="抗外挤"

    wordApp.Selection.TypeParagraph

    wordApp.Selection.TypeText Text:="强度(MPa)"

   

    wordApp.Selection.MoveRight Unit:=wdCell, Count:=1

    wordApp.Selection.TypeText Text:="抗内压"

    wordApp.Selection.TypeParagraph

    wordApp.Selection.TypeText Text:="强度(MPa)"

  '

    wordApp.Selection.MoveRight Unit:=wdCell, Count:=1

    wordApp.Selection.TypeText Text:="抗拉"

    wordApp.Selection.TypeParagraph

    wordApp.Selection.TypeText Text:="强度(kN)"

 

    wordApp.Selection.MoveRight Unit:=wdCell, Count:=1

    wordApp.Selection.TypeText Text:="挤毁"

    wordApp.Selection.TypeParagraph

    wordApp.Selection.TypeText Text:="形式"

 

'-------------------------(填入数据)-----------

    wordApp.Selection.MoveRight Unit:=wdCell, Count:=1

    wordApp.Selection.TypeText Text:="膨胀前"

 

    wordApp.Selection.MoveRight Unit:=wdCell, Count:=1

    wordApp.Selection.TypeText Text:=Ex_casing.Before_Yp.Text

    wordApp.Selection.MoveRight Unit:=wdCell, Count:=1

    wordApp.Selection.TypeText Text:=Ex_casing.Before_Out_Pressure.Text

    wordApp.Selection.MoveRight Unit:=wdCell, Count:=1

    wordApp.Selection.TypeText Text:=Ex_casing.Before_In_Pressure.Text

    wordApp.Selection.MoveRight Unit:=wdCell, Count:=1

    wordApp.Selection.TypeText Text:=Ex_casing.Before_Tension.Text

    wordApp.Selection.MoveRight Unit:=wdCell, Count:=1

    wordApp.Selection.TypeText Text:=Ex_casing.Collpas_Lab.Caption

'

 '  填入第2行数据

    wordApp.Selection.MoveRight Unit:=wdCell, Count:=1

    wordApp.Selection.TypeText Text:="膨胀后"

 

    wordApp.Selection.MoveRight Unit:=wdCell, Count:=1

    wordApp.Selection.TypeText Text:=Ex_casing.After_Yp.Text

    wordApp.Selection.MoveRight Unit:=wdCell, Count:=1

    wordApp.Selection.TypeText Text:=Ex_casing.After_Out_Pressure.Text

    wordApp.Selection.MoveRight Unit:=wdCell, Count:=1

    wordApp.Selection.TypeText Text:=Ex_casing.After_In_Pressure.Text

    wordApp.Selection.MoveRight Unit:=wdCell, Count:=1

    wordApp.Selection.TypeText Text:=Ex_casing.After_Tension.Text

    wordApp.Selection.MoveRight Unit:=wdCell, Count:=1

    wordApp.Selection.TypeText Text:=Ex_casing.After_Collpas_Lab.Caption

   

 '  填入第3行数据

    wordApp.Selection.MoveRight Unit:=wdCell, Count:=1

    wordApp.Selection.TypeText Text:="强度变化(%)"

 

    wordApp.Selection.MoveRight Unit:=wdCell, Count:=1

    wordApp.Selection.TypeText Text:=Round((Ex_casing.After_Yp.Text - Ex_casing.Before_Yp.Text) / Ex_casing.Before_Yp.Text * 100, 2) ' (%)

    wordApp.Selection.MoveRight Unit:=wdCell, Count:=1

    wordApp.Selection.TypeText Text:=Round((Ex_casing.After_Out_Pressure.Text - Ex_casing.Before_Out_Pressure.Text) / Ex_casing.Before_Out_Pressure.Text * 100, 2)

    wordApp.Selection.MoveRight Unit:=wdCell, Count:=1

    wordApp.Selection.TypeText Text:=Round((Ex_casing.After_In_Pressure.Text - Ex_casing.Before_In_Pressure.Text) / Ex_casing.Before_In_Pressure.Text * 100, 2)

    wordApp.Selection.MoveRight Unit:=wdCell, Count:=1

    wordApp.Selection.TypeText Text:=Round((Ex_casing.After_Tension.Text - Ex_casing.Before_Tension.Text) / Ex_casing.Before_Tension.Text * 100, 2)

    wordApp.Selection.MoveRight Unit:=wdCell, Count:=1

    wordApp.Selection.TypeText Text:=""

   

'---------------(表4 End)--------------------------------

 

    Ex_casing.PrgWordOut.Value = Ex_casing.PrgWordOut.Value + 1

 

    wordApp.Selection.EndKey Unit:=wdStory  '   换新表

 

    wordApp.Selection.TypeParagraph

    wordApp.Selection.EndKey Unit:=wdStory

   

'------------------------------------------------------------------------

    wordApp.Selection.TypeParagraph

    wordApp.Selection.TypeParagraph

 

    wordApp.Selection.Font.Bold = wdToggle

    wordApp.Selection.TypeText Text:="  表5 膨胀套管的计算结果"

    wordApp.Selection.Font.Bold = wdToggle

    wordApp.Selection.ParagraphFormat.Alignment = wdAlignParagraphCenter

    wordApp.Selection.TypeParagraph

   

   wordApp.ActiveDocument.Tables.AddRange:=wordApp.Selection.Range, NumRows:=2, NumColumns:= _

            7, DefaultTableBehavior:=wdWord9TableBehavior, AutoFitBehavior:= _

            wdAutoFitFixed   'wdAutoFitContent

    wordApp.Selection.Tables(1).Rows.Alignment = wdAlignRowCenter

    '   -----------------(表头)--------------------

    wordApp.Selection.TypeText Text:="启动压力"

    wordApp.Selection.TypeParagraph

    wordApp.Selection.TypeText Text:="(MPa)"

   

    wordApp.Selection.MoveRight Unit:=wdCell, Count:=1

    wordApp.Selection.ParagraphFormat.Alignment = wdAlignParagraphCenter

    wordApp.Selection.Cells.VerticalAlignment = wdCellAlignVerticalCenter

   

    wordApp.Selection.TypeText Text:="膨胀压力"

    wordApp.Selection.TypeParagraph

    wordApp.Selection.TypeText Text:="(MPa)"

   

    wordApp.Selection.MoveRight Unit:=wdCell, Count:=1

    wordApp.Selection.ParagraphFormat.Alignment = wdAlignParagraphCenter

    wordApp.Selection.Cells.VerticalAlignment = wdCellAlignVerticalCenter

 

    wordApp.Selection.TypeText Text:="轴向力"

    wordApp.Selection.TypeParagraph

    wordApp.Selection.TypeText Text:="(kN)"

   

    wordApp.Selection.MoveRight Unit:=wdCell, Count:=1

    wordApp.Selection.TypeText Text:="径向推力"

    wordApp.Selection.TypeParagraph

    wordApp.Selection.TypeText Text:="(kN)"

  '

    wordApp.Selection.MoveRight Unit:=wdCell, Count:=1

    wordApp.Selection.TypeText Text:="锚定力"

    wordApp.Selection.TypeParagraph

    wordApp.Selection.TypeText Text:="(kN)"

 

    wordApp.Selection.MoveRight Unit:=wdCell, Count:=1

    wordApp.Selection.TypeText Text:="套管重力"

    wordApp.Selection.TypeParagraph

    wordApp.Selection.TypeText Text:="(kN)"

 

    wordApp.Selection.MoveRight Unit:=wdCell, Count:=1

    wordApp.Selection.TypeText Text:="安全"

    wordApp.Selection.TypeParagraph

    wordApp.Selection.TypeText Text:="系数"

 

 

'-------------------------(填入数据)-----------

    wordApp.Selection.MoveRight Unit:=wdCell, Count:=1

    wordApp.Selection.TypeText Text:=Ex_casing.Start_Pressure.Text

 

    wordApp.Selection.MoveRight Unit:=wdCell, Count:=1

    wordApp.Selection.TypeText Text:=Ex_casing.Expand_Pressure.Text

    wordApp.Selection.MoveRight Unit:=wdCell, Count:=1

    wordApp.Selection.TypeText Text:=Ex_casing.Ex_AxialForce.Text

    wordApp.Selection.MoveRight Unit:=wdCell, Count:=1

    wordApp.Selection.TypeText Text:=Ex_casing.Ex_RadiusForce.Text

    wordApp.Selection.MoveRight Unit:=wdCell, Count:=1

    wordApp.Selection.TypeText Text:=Ex_casing.Fixed_Force.Text                   '  橡胶锚定力参数(kN)

    wordApp.Selection.MoveRight Unit:=wdCell, Count:=1

    wordApp.Selection.TypeText Text:=Ex_casing.Weight.Text

    wordApp.Selection.MoveRight Unit:=wdCell, Count:=1

    wordApp.Selection.TypeText Text:=Ex_casing.S_Coef.Text

'----------(表4 End)-------------------------------------

    Ex_casing.PrgWordOut.Value = Ex_casing.PrgWordOut.Value + 1

 

 

    wordApp.Selection.EndKey Unit:=wdStory  '   换新表

 

    wordApp.Selection.TypeParagraph

    wordApp.Selection.TypeParagraph

    wordApp.Selection.TypeParagraph

 

'

 

'

    wordApp.Selection.Font.Bold = wdToggle

    wordApp.Selection.TypeText Text:="  表6 套管膨胀后的参数结果"

    wordApp.Selection.Font.Bold = wdToggle

    wordApp.Selection.ParagraphFormat.Alignment = wdAlignParagraphCenter

    wordApp.Selection.TypeParagraph

   

   wordApp.ActiveDocument.Tables.AddRange:=wordApp.Selection.Range, NumRows:=2, NumColumns:= _

            7, DefaultTableBehavior:=wdWord9TableBehavior, AutoFitBehavior:= _

            wdAutoFitFixed   'wdAutoFitContent

    wordApp.Selection.Tables(1).Rows.Alignment = wdAlignRowCenter

    '   -----------------(表头)--------------------

    wordApp.Selection.TypeText Text:="外径"

    wordApp.Selection.TypeParagraph

    wordApp.Selection.TypeText Text:="(mm)"

   

    wordApp.Selection.MoveRight Unit:=wdCell, Count:=1

    wordApp.Selection.ParagraphFormat.Alignment = wdAlignParagraphCenter

    wordApp.Selection.Cells.VerticalAlignment = wdCellAlignVerticalCenter

   

    wordApp.Selection.TypeText Text:="内径"

    wordApp.Selection.TypeParagraph

    wordApp.Selection.TypeText Text:="(mm)"

   

    wordApp.Selection.MoveRight Unit:=wdCell, Count:=1

    wordApp.Selection.ParagraphFormat.Alignment = wdAlignParagraphCenter

    wordApp.Selection.Cells.VerticalAlignment = wdCellAlignVerticalCenter

 

    wordApp.Selection.TypeText Text:="厚度"

    wordApp.Selection.TypeParagraph

    wordApp.Selection.TypeText Text:="(mm)"

   

    wordApp.Selection.MoveRight Unit:=wdCell, Count:=1

    wordApp.Selection.TypeText Text:="径向"

    wordApp.Selection.TypeParagraph

    wordApp.Selection.TypeText Text:="回弹量(mm)"

  '

    wordApp.Selection.MoveRight Unit:=wdCell, Count:=1

    wordApp.Selection.TypeText Text:="轴向"

    wordApp.Selection.TypeParagraph

    wordApp.Selection.TypeText Text:="回弹量(mm)"

 

    wordApp.Selection.MoveRight Unit:=wdCell, Count:=1

    wordApp.Selection.TypeText Text:=Ex_casing.Lab_Dlt.Caption

  '

    wordApp.Selection.MoveRight Unit:=wdCell, Count:=1

    wordApp.Selection.TypeText Text:="套管实际"

    wordApp.Selection.TypeParagraph

    wordApp.Selection.TypeText Text:="长度(m)"

 

'-------------------------(填入数据)-----------

    wordApp.Selection.MoveRight Unit:=wdCell, Count:=1

    wordApp.Selection.TypeText Text:=Ex_casing.After_Out_D.Text

 

    wordApp.Selection.MoveRight Unit:=wdCell, Count:=1

    wordApp.Selection.TypeText Text:=Val(Ex_casing.After_In_D.Text) - Val(Ex_casing.Ex_Back_RadiusDlt.Text)

    wordApp.Selection.MoveRight Unit:=wdCell, Count:=1

    wordApp.Selection.TypeText Text:=Ex_casing.Expand_Thickness.Text

    wordApp.Selection.MoveRight Unit:=wdCell, Count:=1

    wordApp.Selection.TypeText Text:=Ex_casing.Ex_Back_RadiusDlt.Text

    wordApp.Selection.MoveRight Unit:=wdCell, Count:=1

    wordApp.Selection.TypeText Text:=Ex_casing.Ex_BackAxialDlt.Text

    wordApp.Selection.MoveRight Unit:=wdCell, Count:=1

    wordApp.Selection.TypeText Text:=Ex_casing.Ex_AxialShortenDlt.Text

    wordApp.Selection.MoveRight Unit:=wdCell, Count:=1

    wordApp.Selection.TypeText Text:=Round(Val(Ex_casing.Expand_Length.Text) - BB / 1000#, 2)

    '

    wordApp.Selection.EndKey Unit:=wdStory  '   换新表

 

'    wordApp.Selection.TypeParagraph

'    wordApp.Selection.TypeParagraph

    '

'    Ex_casing.PrgWordOut.Value = Ex_casing.PrgWordOut.Value + 1

    '

 

 

End Sub

 

 

 

Private Sub Mnu_StressStrainCurves_Click()

Stress_StrainCurves.Show

End Sub

 

VERSION 5.00

Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"

Begin VB.Form Ex_casing

   BorderStyle     =   1  'Fixed Single

   Caption         =   "膨胀套管的力学参数计算"

   ClientHeight    =   8640

   ClientLeft      =   45

   ClientTop       =   435

   ClientWidth     =   8415

   Icon            =   "Ex_CasingMechanics.frx":0000

   LinkTopic       =   "Form1"

   MaxButton       =   0   'False

   MDIChild        =   -1  'True

   MinButton       =   0   'False

   ScaleHeight     =   8640

   ScaleWidth      =   8415

   Begin VB.Frame Frame1

      Height          =   7935

      Index           =   0

      Left            =   120

      TabIndex        =   0

      Top             =   600

      Width           =   8175

      Begin VB.CommandButton Cmd_Clear

         Caption         =   "清除"

         Height          =   375

         Left            =   1320

         TabIndex        =   65

         Top             =   6960

         Width           =   855

      End

      Begin VB.Frame Frame1

         BackColor       =   &H00C0C0FF&

         Caption         =   "膨胀套管前后强度计算比较"

         BeginProperty Font

            Name            =   "楷体_GB2312"

            Size            =   12

            Charset         =   134

            Weight          =   700

            Underline       =   0   'False

            Italic          =   0   'False

            Strikethrough   =   0   'False

         EndProperty

         ForeColor       =   &H00FF0000&

         Height          =   4095

         Index           =   2

         Left            =   3360

         TabIndex        =   45

         Top             =   240

         Width           =   4575

         Begin VB.TextBox Before_Yp

            Alignment       =   2  'Center

            BeginProperty Font

               Name            =   "宋体"

               Size            =   10.5

               Charset         =   134

               Weight          =   700

               Underline       =   0   'False

               Italic          =   0   'False

               Strikethrough   =   0   'False

            EndProperty

            ForeColor       =   &H00FF0000&

            Height          =   270

            Left            =   1440

            Locked          =   -1  'True

            TabIndex        =   53

            Top             =   960

            Width           =   1095

         End

         Begin VB.TextBox After_Yp

            Alignment       =   2  'Center

            BeginProperty Font

               Name            =   "宋体"

               Size            =   10.5

               Charset         =   134

               Weight          =   700

               Underline       =   0   'False

               Italic          =   0   'False

               Strikethrough   =   0   'False

            EndProperty

            ForeColor       =   &H00FF0000&

            Height          =   270

            Left            =   3000

            Locked          =   -1  'True

            TabIndex        =   52

            Top             =   960

            Width           =   1095

         End

         Begin VB.TextBox Before_Tension

            Alignment       =   2  'Center

            BeginProperty Font

               Name            =   "宋体"

               Size            =   10.5

               Charset         =   134

               Weight          =   700

               Underline       =   0   'False

               Italic          =   0   'False

               Strikethrough   =   0   'False

            EndProperty

            ForeColor       =   &H000000FF&

            Height          =   375

            Left            =   1440

            Locked          =   -1  'True

            TabIndex        =   51

            Top             =   1560

            Width           =   1095

         End

         Begin VB.TextBox Before_Out_Pressure

            Alignment       =   2  'Center

            BeginProperty Font

               Name            =   "宋体"

               Size            =   10.5

               Charset         =   134

               Weight          =   700

               Underline       =   0   'False

               Italic          =   0   'False

               Strikethrough   =   0   'False

            EndProperty

            ForeColor       =   &H000000FF&

            Height          =   375

            Left            =   1440

            Locked          =   -1  'True

            TabIndex        =   50

            Top             =   2160

            Width           =   1095

         End

         Begin VB.TextBox Before_In_Pressure

            Alignment       =   2  'Center

            BeginProperty Font

               Name            =   "宋体"

               Size            =   10.5

               Charset         =   134

               Weight          =   700

               Underline       =   0   'False

               Italic          =   0   'False

               Strikethrough   =   0   'False

            EndProperty

            ForeColor       =   &H000000FF&

            Height          =   375

            Left            =   1440

            Locked          =   -1  'True

            TabIndex        =   49

            Top             =   2760

            Width           =   1095

         End

         Begin VB.TextBox After_Tension

            Alignment       =   2  'Center

            BeginProperty Font

               Name            =   "宋体"

               Size            =   10.5

               Charset         =   134

               Weight          =   700

               Underline       =   0   'False

               Italic          =   0   'False

               Strikethrough   =   0   'False

            EndProperty

            ForeColor       =   &H000000FF&

            Height          =   375

            Left            =   3000

            Locked          =   -1  'True

            TabIndex        =   48

            Top             =   1560

            Width           =   1095

         End

         Begin VB.TextBox After_Out_Pressure

            Alignment       =   2  'Center

            BeginProperty Font

               Name            =   "宋体"

               Size            =   10.5

               Charset         =   134

               Weight          =   700

               Underline       =   0   'False

               Italic          =   0   'False

               Strikethrough   =   0   'False

            EndProperty

            ForeColor       =   &H000000FF&

            Height          =   375

            Left            =   3000

            Locked          =   -1  'True

            TabIndex        =   47

            Top             =   2160

            Width           =   1095

         End

         Begin VB.TextBox After_In_Pressure

            Alignment       =   2  'Center

            BeginProperty Font

               Name            =   "宋体"

               Size            =   10.5

               Charset         =   134

               Weight          =   700

               Underline       =   0   'False

               Italic          =   0   'False

               Strikethrough   =   0   'False

            EndProperty

            ForeColor       =   &H000000FF&

            Height          =   375

            Left            =   3000

            Locked          =   -1  'True

            TabIndex        =   46

            Top             =   2760

            Width           =   1095

         End

         Begin VB.Label Label3

            Alignment       =   2  'Center

            BackStyle       =   0  'Transparent

            Caption         =   "屈服应力(MPa)"

            Height          =   375

            Index           =   0

            Left            =   240

            TabIndex        =   63

            Top             =   960

            Width           =   855

         End

         Begin VB.Label Label4

            BackStyle       =   0  'Transparent

            Caption         =   "膨胀前"

            Height          =   255

            Index           =   0

            Left            =   1680

            TabIndex        =   62

            Top             =   480

            Width           =   735

         End

         Begin VB.Label Label5

            BackStyle       =   0  'Transparent

            Caption         =   "膨胀后"

            Height          =   255

            Index           =   0

            Left            =   3240

            TabIndex        =   61

            Top             =   480

            Width           =   615

         End

         Begin VB.Shape Shape1

            Height          =   3495

            Left            =   240

            Top             =   360

            Width           =   4095

         End

         Begin VB.Line Line1

            X1              =   240

            X2              =   4320

            Y1              =   840

            Y2              =   840

         End

         Begin VB.Line Line2

            X1              =   2760

            X2              =   2760

            Y1              =   360

            Y2              =   3840

         End

         Begin VB.Line Line3

            X1              =   1200

            X2              =   1200

            Y1              =   360

            Y2              =   3840

         End

         Begin VB.Label Label6

            BackStyle       =   0  'Transparent

            Caption         =   "参数"

            Height          =   255

            Index           =   0

            Left            =   360

            TabIndex        =   60

            Top             =   480

            Width           =   735

         End

         Begin VB.Label Label7

            Alignment       =   2  'Center

            BackStyle       =   0  'Transparent

            Caption         =   "抗拉强度(kN)"

            Height          =   375

            Index           =   0

            Left            =   240

            TabIndex        =   59

            Top             =   1560

            Width           =   855

         End

         Begin VB.Label Label8

            Alignment       =   2  'Center

            BackStyle       =   0  'Transparent

            Caption         =   "抗挤强度(MPa)"

            Height          =   375

            Index           =   0

            Left            =   240

            TabIndex        =   58

            Top             =   2160

            Width           =   855

         End

         Begin VB.Label Label9

            Alignment       =   2  'Center

            BackStyle       =   0  'Transparent

            Caption         =   "抗内压强度(MPa)"

            Height          =   375

            Index           =   0

            Left            =   360

            TabIndex        =   57

            Top             =   2760

            Width           =   735

         End

         Begin VB.Line Line8

            X1              =   240

            X2              =   4320

            Y1              =   1440

            Y2              =   1440

         End

         Begin VB.Label Collpas_Lab

            BackStyle       =   0  'Transparent

            ForeColor       =   &H00FF0000&

            Height          =   255

            Left            =   1320

            TabIndex        =   56

            Top             =   3480

            Width           =   1335

         End

         Begin VB.Label Label11

            BackStyle       =   0  'Transparent

            Caption         =   "挤毁形式"

            Height          =   255

            Index           =   0

            Left            =   360

            TabIndex        =   55

            Top             =   3480

            Width           =   855

         End

         Begin VB.Line Line10

            X1              =   240

            X2              =   4320

            Y1              =   3240

            Y2              =   3240

         End

         Begin VB.Line Line11

            X1              =   240

            X2              =   4320

            Y1              =   2640

            Y2              =   2640

         End

         Begin VB.Label After_Collpas_Lab

            BackStyle       =   0  'Transparent

            ForeColor       =   &H00FF0000&

            Height          =   255

            Left            =   2880

            TabIndex        =   54

            Top             =   3480

            Width           =   1455

         End

         Begin VB.Line Line6

            X1              =   240

            X2              =   4320

            Y1              =   2040

            Y2              =   2040

         End

      End

      Begin VB.Frame Frame2

         BackColor       =   &H00C0FFC0&

         Caption         =   "计算结果"

         BeginProperty Font

            Name            =   "楷体_GB2312"

            Size            =   12

            Charset         =   134

            Weight          =   700

            Underline       =   0   'False

            Italic          =   0   'False

            Strikethrough   =   0   'False

         EndProperty

         ForeColor       =   &H000000FF&

         Height          =   3375

         Left            =   3360

         TabIndex        =   24

         Top             =   4440

         Width           =   4575

         Begin VB.TextBox S_Coef

            Height          =   270

            Left            =   3360

            TabIndex        =   78

            Top             =   2985

            Width           =   975

         End

         Begin VB.TextBox Fixed_Force

            Height          =   270

            Left            =   3360

            TabIndex        =   68

            Top             =   2160

            Width           =   975

         End

         Begin VB.TextBox Expand_Thickness

            Height          =   270

            Left            =   1200

            Locked          =   -1  'True

            TabIndex        =   34

            Top             =   1440

            Width           =   975

         End

         Begin VB.TextBox Expand_Pressure

            Height          =   270

            Left            =   1200

            Locked          =   -1  'True

            TabIndex        =   33

            Top             =   960

            Width           =   975

         End

         Begin VB.TextBox Start_Pressure

            Height          =   270

            Left            =   1200

            Locked          =   -1  'True

            TabIndex        =   32

            Top             =   480

            Width           =   975

         End

         Begin VB.TextBox After_Out_D

            Height          =   270

            Left            =   1200

            Locked          =   -1  'True

            TabIndex        =   31

            Top             =   1920

            Width           =   975

         End

         Begin VB.TextBox Ex_AxialForce

            Height          =   270

            Left            =   1200

            Locked          =   -1  'True

            TabIndex        =   30

            Top             =   2400

            Width           =   975

         End

         Begin VB.TextBox Ex_RadiusForce

            Height          =   270

            Left            =   1200

            Locked          =   -1  'True

            TabIndex        =   29

            Top             =   2880

            Width           =   975

         End

         Begin VB.TextBox Ex_Back_RadiusDlt

            Height          =   270

            Left            =   3360

            Locked          =   -1  'True

            TabIndex        =   28

            Top             =   480

            Width           =   975

         End

         Begin VB.TextBox Ex_BackAxialDlt

            Height          =   270

            Left            =   3360

            Locked          =   -1  'True

            TabIndex        =   27

            Top             =   960

            Width           =   975

         End

         Begin VB.TextBox Ex_AxialShortenDlt

            Height          =   270

            Left            =   3360

            Locked          =   -1  'True

            TabIndex        =   26

            Top             =   1440

            Width           =   975

         End

         Begin VB.TextBox Weight

            Height          =   270

            Left            =   3360

            Locked          =   -1  'True

            TabIndex        =   25

            Top             =   2520

            Width           =   975

         End

         Begin VB.Label Label27

            BackStyle       =   0  'Transparent

            Caption         =   "安全系数"

            Height          =   255

            Left            =   2400

            TabIndex        =   79

            Top             =   3000

            Width           =   855

         End

         Begin VB.Line Line23

            X1              =   1200

            X2              =   4560

            Y1              =   120

            Y2              =   120

         End

         Begin VB.Line Line22

            X1              =   0

            X2              =   0

            Y1              =   120

            Y2              =   3360

         End

         Begin VB.Line Line21

            X1              =   0

            X2              =   4560

            Y1              =   3360

            Y2              =   3360

         End

         Begin VB.Line Line20

            X1              =   4560

            X2              =   4560

            Y1              =   120

            Y2              =   3360

         End

         Begin VB.Label Label18

            BackStyle       =   0  'Transparent

            Caption         =   "锚定力(kN)"

            Height          =   255

            Left            =   2400

            TabIndex        =   67

            Top             =   2160

            Width           =   1095

         End

         Begin VB.Label Label10

            Alignment       =   2  'Center

            BackStyle       =   0  'Transparent

            Caption         =   "膨胀后壁厚(mm)"

            Height          =   375

            Index           =   1

            Left            =   120

            TabIndex        =   44

            Top             =   1440

            Width           =   1095

         End

         Begin VB.Label Label9

            Alignment       =   2  'Center

            BackStyle       =   0  'Transparent

            Caption         =   "膨胀液压力(MPa)"

            Height          =   375

            Index           =   1

            Left            =   120

            TabIndex        =   43

            Top             =   960

            Width           =   975

         End

         Begin VB.Label Label8

            Alignment       =   2  'Center

            BackStyle       =   0  'Transparent

            Caption         =   "启动液压力(MPa)"

            Height          =   495

            Index           =   1

            Left            =   120

            TabIndex        =   42

            Top             =   480

            Width           =   975

         End

         Begin VB.Label Label14

            Alignment       =   2  'Center

            BackStyle       =   0  'Transparent

            Caption         =   "膨胀后外径(mm)"

            Height          =   375

            Left            =   120

            TabIndex        =   41

            Top             =   1920

            Width           =   975

         End

         Begin VB.Label Label16

            BackStyle       =   0  'Transparent

            Caption         =   "轴向力(kN)"

            Height          =   255

            Left            =   120

            TabIndex        =   40

            Top             =   2400

            Width           =   1335

         End

         Begin VB.Label Label17

            BackStyle       =   0  'Transparent

            Caption         =   "径向推力(kN)"

            Height          =   255

            Left            =   120

            TabIndex        =   39

            Top             =   2880

            Width           =   1455

         End

         Begin VB.Line Line5

            X1              =   2280

            X2              =   2280

            Y1              =   120

            Y2              =   3360

         End

         Begin VB.Label Label19

            Alignment       =   2  'Center

            BackStyle       =   0  'Transparent

            Caption         =   "轴向回弹量(mm)"

            Height          =   375

            Left            =   2280

            TabIndex        =   38

            Top             =   960

            Width           =   1095

         End

         Begin VB.Label Label20

            Alignment       =   2  'Center

            BackStyle       =   0  'Transparent

            Caption         =   "径向回弹量(mm)"

            Height          =   375

            Left            =   2280

            TabIndex        =   37

            Top             =   480

            Width           =   1095

         End

         Begin VB.Label Lab_Dlt

            Alignment       =   2  'Center

            BackStyle       =   0  'Transparent

            Caption         =   "轴向总收缩量(mm)"

            Height          =   375

            Left            =   2400

            TabIndex        =   36

            Top             =   1440

            Width           =   855

         End

         Begin VB.Line Line9

            X1              =   2280

            X2              =   4560

            Y1              =   1920

            Y2              =   1920

         End

         Begin VB.Label Label21

            Alignment       =   2  'Center

            BackStyle       =   0  'Transparent

            Caption         =   "套管重量(kN)"

            Height          =   375

            Left            =   2400

            TabIndex        =   35

            Top             =   2520

            Width           =   855

         End

      End

      Begin VB.Frame Frame1

         BackColor       =   &H00FFC0FF&

         Caption         =   "基本结构参数"

         BeginProperty Font

            Name            =   "楷体_GB2312"

            Size            =   12

            Charset         =   134

            Weight          =   700

            Underline       =   0   'False

            Italic          =   0   'False

            Strikethrough   =   0   'False

         EndProperty

         ForeColor       =   &H00FF0000&

         Height          =   6615

         Index           =   1

         Left            =   240

         TabIndex        =   3

         Top             =   240

         Width           =   3015

         Begin VB.TextBox Rubber_Fric_Coef

            BackColor       =   &H0080FFFF&

            Height          =   270

            Left            =   1680

            TabIndex        =   81

            Text            =   "0.35"

            Top             =   2280

            Width           =   1095

         End

         Begin VB.TextBox Rub_Number

            BackColor       =   &H0080FFFF&

            Height          =   270

            Left            =   1680

            TabIndex        =   77

            Text            =   "5"

            Top             =   1920

            Width           =   1095

         End

         Begin VB.TextBox Rub_Length

            Height          =   270

            Left            =   1680

            Locked          =   -1  'True

            TabIndex        =   76

            Text            =   "150"

            ToolTipText     =   "指单圈橡胶长度"

            Top             =   1200

            Width           =   1095

         End

         Begin VB.TextBox Rub_Thinkness

            BackColor       =   &H0080FFFF&

            Height          =   270

            Left            =   1680

            TabIndex        =   73

            Text            =   "2.0"

            Top             =   1560

            Width           =   1095

         End

         Begin VB.TextBox After_Dlt

            Height          =   270

            Left            =   1680

            Locked          =   -1  'True

            TabIndex        =   71

            Text            =   "1.6"

            ToolTipText     =   "指膨胀后,膨胀套管外径与外层套管内径之间的间隙。"

            Top             =   840

            Width           =   1095

         End

         Begin VB.ComboBox Ex_Angle

            Height          =   300

            Left            =   1680

            TabIndex        =   69

            Text            =   "8"

            Top             =   3960

            Width           =   1095

         End

         Begin VB.TextBox Expand_Length

            BackColor       =   &H0080FFFF&

            Height          =   270

            Left            =   1680

            TabIndex        =   12

            Text            =   "10"

            Top             =   4560

            Width           =   1095

         End

         Begin VB.ComboBox Cmb_Thickness

            Height          =   300

            Left            =   1680

            TabIndex        =   11

            Text            =   "6.35"

            Top             =   3480

            Width           =   1095

         End

         Begin VB.ComboBox Cmb_Out_D

            Height          =   300

            Left            =   1680

            TabIndex        =   10

            Text            =   "114.3"

            Top             =   3120

            Width           =   1095

         End

         Begin VB.ComboBox Cmb_GJ

            Height          =   300

            Left            =   1680

            TabIndex        =   9

            Text            =   "J55"

            Top             =   2760

            Width           =   1095

         End

30

  Begin VB.TextBox Expand_Ratio

            Height          =   270

            Left            =   1680

            Locked          =   -1  'True

            TabIndex        =   8

            Top             =   5400

            Width           =   1095

         End

         Begin VB.TextBox After_In_D

            BackColor       =   &H00FFFFFF&

            Height          =   270

            Left            =   1680

            Locked          =   -1  'True

            TabIndex        =   7

            Top             =   5040

            Width           =   1095

         End

         Begin VB.TextBox Before_In_D

            Height          =   270

            Left            =   1680

            Locked          =   -1  'True

            TabIndex        =   6

            Top             =   5880

            Width           =   1095

         End

         Begin VB.TextBox Fric_Coef

            BackColor       =   &H0080FFFF&

            Height          =   270

            Left            =   1680

            TabIndex        =   5

            Text            =   "0.05"

            Top             =   6240

            Width           =   1095

         End

         Begin VB.TextBox Up_Casing_In_D

            BackColor       =   &H0080FFFF&

            Height          =   270

            Left            =   1680

            TabIndex        =   4

            Text            =   "124.26"

            ToolTipText     =   "1).4.5-5.5×124.3mm2).5.5-7×159.4mm3).7-9.625×220.5mm216.8mm"

            Top             =   360

            Width           =   1095

         End

         Begin VB.Label Label28

            BackStyle       =   0  'Transparent

            Caption         =   "橡胶摩擦系数"

            Height          =   255

            Left            =   240

            TabIndex        =   80

            Top             =   2280

            Width           =   1095

         End

         Begin VB.Line Line4

            X1              =   0

            X2              =   3000

            Y1              =   720

            Y2              =   720

         End

         Begin VB.Label Label26

            BackStyle       =   0  'Transparent

            Caption         =   "橡胶圈个数"

            Height          =   255

            Left            =   240

            TabIndex        =   75

            Top             =   1920

            Width           =   1095

         End

         Begin VB.Label Label25

            BackStyle       =   0  'Transparent

            Caption         =   "橡胶长度(mm)"

            Height          =   375

            Left            =   240

            TabIndex        =   74

            Top             =   1200

            Width           =   1335

         End

         Begin VB.Label Label24

            BackStyle       =   0  'Transparent

            Caption         =   "橡胶厚度(mm)"

            Height          =   255

            Left            =   240

            TabIndex        =   72

            Top             =   1560

            Width           =   1215

         End

         Begin VB.Label Label23

            BackStyle       =   0  'Transparent

            Caption         =   "膨胀后间隙(mm)"

            Height          =   255

            Left            =   240

            TabIndex        =   70

            Top             =   840

            Width           =   1455

         End

         Begin VB.Line Line24

            X1              =   0

            X2              =   3000

            Y1              =   3840

            Y2              =   3840

         End

         Begin VB.Label Label11

            BackStyle       =   0  'Transparent

            Caption         =   "膨胀管长度(m)"

            Height          =   255

            Index           =   1

            Left            =   120

            TabIndex        =   23

            Top             =   4560

            Width           =   1455

         End

         Begin VB.Label Label7

            BackStyle       =   0  'Transparent

            Caption         =   "润滑摩擦系数"

            Height          =   255

            Index           =   1

            Left            =   240

            TabIndex        =   22

            Top             =   6240

            Width           =   1215

         End

         Begin VB.Label Label6

            BackStyle       =   0  'Transparent

            Caption         =   "膨胀幅度(%)"

            Height          =   255

            Index           =   1

            Left            =   240

            TabIndex        =   21

            Top             =   5400

            Width           =   1335

         End

         Begin VB.Label Label5

            BackStyle       =   0  'Transparent

            Caption         =   "膨胀锥外径(mm)"

            Height          =   255

            Index           =   1

            Left            =   120

            TabIndex        =   20

            Top             =   5040

            Width           =   1575

         End

         Begin VB.Label Label4

            BackStyle       =   0  'Transparent

            Caption         =   "膨胀前内径(mm)"

            Height          =   255

            Index           =   1

            Left            =   240

            TabIndex        =   19

            Top             =   5880

            Width           =   1335

         End

         Begin VB.Label Label3

            BackStyle       =   0  'Transparent

            Caption         =   "钢级"

            Height          =   255

            Index           =   1

            Left            =   840

            TabIndex        =   18

            Top             =   2760

            Width           =   495

         End

         Begin VB.Label Label2

            BackStyle       =   0  'Transparent

            Caption         =   "壁厚(mm)"

            Height          =   255

            Index           =   1

            Left            =   720

            TabIndex        =   17

            Top             =   3480

            Width           =   735

         End

         Begin VB.Label Label1

            BackStyle       =   0  'Transparent

            Caption         =   "外径(mm)"

            Height          =   255

            Index           =   1

            Left            =   720

            TabIndex        =   16

            Top             =   3120

            Width           =   855

         End

         Begin VB.Label Label12

            Alignment       =   2  'Center

            BackStyle       =   0  'Transparent

            Caption         =   "上层套管内径(mm)"

            Height          =   255

            Left            =   0

            TabIndex        =   15

            Top             =   360

            Width           =   1575

         End

         Begin VB.Label Label13

            Alignment       =   2  'Center

            BackStyle       =   0  'Transparent

            Caption         =   "膨胀管"

            Height          =   735

            Left            =   240

            TabIndex        =   14

            Top             =   3000

            Width           =   255

         End

         Begin VB.Line Line7

            X1              =   0

            X2              =   3360

            Y1              =   2640

            Y2              =   2640

         End

         Begin VB.Line Line12

            X1              =   0

            X2              =   3360

            Y1              =   5760

            Y2              =   5760

         End

         Begin VB.Line Line13

            X1              =   600

            X2              =   600

            Y1              =   2640

            Y2              =   3840

         End

         Begin VB.Line Line15

            X1              =   3000

            X2              =   3000

            Y1              =   120

            Y2              =   6600

         End

         Begin VB.Line Line16

            X1              =   0

            X2              =   0

            Y1              =   120

            Y2              =   6600

         End

         Begin VB.Line Line17

            X1              =   0

            X2              =   3000

            Y1              =   6600

            Y2              =   6600

         End

         Begin VB.Line Line18

            X1              =   1680

            X2              =   3000

            Y1              =   120

            Y2              =   120

         End

         Begin VB.Line Line19

            X1              =   0

            X2              =   3000

            Y1              =   4440

            Y2              =   4440

         End

         Begin VB.Label Label15

            BackStyle       =   0  'Transparent

            Caption         =   "膨胀锥角度(°)"

            Height          =   255

            Left            =   120

            TabIndex        =   13

            Top             =   4080

            Width           =   1455

         End

      End

      Begin VB.CommandButton Cmd_Computing

         Caption         =   "计算"

         Height          =   375

         Left            =   240

         TabIndex        =   2

         Top             =   6960

         Width           =   855

      End

      Begin VB.CommandButton Command2

         Caption         =   "退出"

         Height          =   375

         Left            =   2400

         TabIndex        =   1

         Top             =   6960

         Width           =   855

      End

      Begin MSComctlLib.ProgressBar PrgWordOut

         Height          =   255

         Left            =   360

         TabIndex        =   66

         Top             =   7560

         Width           =   1935

         _ExtentX        =   3413

         _ExtentY        =   450

         _Version        =   393216

         Appearance      =   1

      End

   End

   Begin VB.Label Label22

      Alignment       =   2  'Center

      BackStyle       =   0  'Transparent

      Caption         =   "膨胀套管力学性能评价"

      BeginProperty Font

         Name            =   "楷体_GB2312"

         Size            =   21.75

         Charset         =   134

         Weight          =   700

         Underline       =   0   'False

         Italic          =   0   'False

         Strikethrough   =   0   'False

      EndProperty

      ForeColor       =   &H00FF0000&

      Height          =   495

      Left            =   1080

      TabIndex        =   64

      Top             =   120

      Width           =   6015

   End

End

Attribute VB_Name = "Ex_casing"

Attribute VB_GlobalNameSpace = False

Attribute VB_Creatable = False

Attribute VB_PredeclaredId = True

Attribute VB_Exposed = False

Option Explicit

 

Private Sub Cmb_GJ_Click()

   Call Strength_Clear

   Call parameter

End Sub

 

Private Sub Cmb_Out_D_click()

 Call Strength_Clear

 Call parameter

 If Val(Cmb_Out_D.Text) <= 114.3 Then

   Ex_Angle.Text = "8"

   Ex_Angle.Locked = True

 Else

   Ex_Angle.Locked = False

 End If

 

End Sub

 

Private Sub Cmd_Clear_Click()

   Call Strength_Clear

End Sub

 

Private Sub Cmd_Computing_Click()

   Dim myrg As String

Dim R1, T, Area, Force As Single

Dim Pressure, Fric_Rub As Single

Dim D01, D02 As Single

Dim D00, Dlt00 As Single

Dim Real_Gap As Single

'

  Fric_Rub = Val(Rubber_Fric_Coef.Text)

  T = Val(Rub_Thinkness.Text)

  R1 = Val(Up_Casing_In_D.Text) / 2# - Val(After_Dlt.Text)

  Area = 2 * 3.1415926 * R1 * Val(Rub_Length.Text)

  Pressure = -3.1653 * T ^ 3 + 19.124 * T ^ 2 - 31.571 * T + 15.46

  Force = Area * Pressure * Val(Rub_Number.Text) * Fric_Rub / 1000#   'kN

  Fixed_Force.Text = Round(Force, 2)

  '

 

' D_ini.Text = Val(Up_Casing_In_D.Text) - 2 * T - 2 * Val(Cmb_Thickness.Text)

 '

 D01 = Val(Cmb_Out_D.Text) - 2 * Val(Cmb_Thickness.Text)

 D02 = Val(Up_Casing_In_D.Text)

  Dlt00 = 0.1                     'mm

  '-------------------------------------------------------------------

  If Val(Expand_Length.Text) = 0# Then

      myrg = MsgBox("请输入膨胀套管长度:", vbYesNo, "请重新输入")

'      GoTo EndLine

    If myrg = vbYes Then

      Expand_Length.Text = ""

      Strength_Clear

      Expand_Length.SetFocus

      GoTo EndLine

    Else

      Strength_Clear

      GoTo EndLine

 

    End If

End If

'

'----------------------------------------

'-------------------------------------------------------------------------

If Val(Fric_Coef.Text) > 0.2 Then

      myrg = MsgBox("请输入摩擦系数正确范围0=<Fric<=0.2", vbYesNo, "请重新输入")

'      GoTo EndLine

    If myrg = vbYes Then

      Fric_Coef.Text = ""

      Strength_Clear

      Fric_Coef.SetFocus

      GoTo EndLine

    Else

      Strength_Clear

      GoTo EndLine

 

    End If

End If

If Val(Ex_Angle.Text) = 0# Then

      myrg = MsgBox("请选膨胀锥角度:", vbYesNo, "请重新输入")

'      GoTo EndLine

    If myrg = vbYes Then

      Ex_Angle.Text = ""

      Strength_Clear

      Ex_Angle.SetFocus

      GoTo EndLine

    Else

      Strength_Clear

      GoTo EndLine

 

    End If

End If

 

 

'---------------------------------

  For D00 = D01 To D02 Step Dlt00

        If Val(Cmb_Out_D.Text) <= 114.3 Then

          Ex_Angle.Text = 8

          Call YangBin(D00)

         

        ElseIf Val(Cmb_Out_D.Text) > 114.3 And Val(Ex_Angle.Text) = 8 Then

          Call YangBin(D00)

        Else

          Call Lian(D00)

        End If

     Real_Gap = Round((Val(Up_Casing_In_D.Text) - Val(After_Out_D.Text)) / 2#, 1)  ' 膨胀后间隙mm

    If Real_Gap = 1.6 Then GoTo 2000                  '

       

   Next D00

   '---------------------------

   '

2000:

 

 After_In_D.Text = Round(D00, 2)

 S_Coef.Text = Round(Force / Val(Weight.Text), 2)

 '

  Stress_StrainCurves.Show

EndLine:

 

End Sub

Private Sub YangBin(D00)

   Dim P_coef As Single

   Dim myrg As String

   Dim Strg_InD As String

   Dim Ex_InD As Single

   Dim F, T, kk As Single

   Dim Coef_Area As Single

   Dim A1, A2 As Single

 

   '

   After_In_D.Text = D00

  

   Ex_InD = Val(Cmb_Out_D.Text) - 2# * Val(Cmb_Thickness.Text)

'

'

'If (Val(After_In_D.Text) >= 0 And Val(After_In_D.Text) < Ex_InD) Or (Val(After_In_D.Text) > 1.2 * Ex_InD) Then

'  Strg_InD = "请输入膨胀后内径范围" & Round(Ex_InD, 2) & "<Ro<" & Round(1.2 * Ex_InD, 2) & "(mm)"

'      myrg = MsgBox(Strg_InD, vbYesNo, "请重新输入")

'    If myrg = vbYes Then

'      After_In_D.Text = ""

'      '

'      Call Strength_Clear

'      '

'      After_In_D.SetFocus

'      GoTo EndLine

'    Else

'    Strength_Clear

'    After_In_D.SetFocus

'      GoTo EndLine

'    End If

'End If

 

''-------------------------------------------------------------------------

'If Val(Fric_Coef.Text) > 0.2 Then

'      myrg = MsgBox("请输入摩擦系数正确范围0=<Fric<=0.2", vbYesNo, "请重新输入")

''      GoTo EndLine

'    If myrg = vbYes Then

'      Fric_Coef.Text = ""

'      Strength_Clear

'      Fric_Coef.SetFocus

'      GoTo EndLine

'    Else

'      Strength_Clear

'      GoTo EndLine

'

'    End If

'End If

'---------------------------------------------------------------------------

'If Val(Expand_Length.Text) = 0# Then

'      myrg = MsgBox("请输入膨胀套管长度:", vbYesNo, "请重新输入")

''      GoTo EndLine

'    If myrg = vbYes Then

'      Expand_Length.Text = ""

'      Strength_Clear

'      Expand_Length.SetFocus

'      GoTo EndLine

'    Else

'      Strength_Clear

'      GoTo EndLine

'

'    End If

'End If

'---------------------------------------------------------------------------

'If Val(Ex_Angle.Text) = 0# Then

'      myrg = MsgBox("请选膨胀锥角度:", vbYesNo, "请重新输入")

''      GoTo EndLine

'    If myrg = vbYes Then

'      Ex_Angle.Text = ""

'      Strength_Clear

'      Ex_Angle.SetFocus

'      GoTo EndLine

'    Else

'      Strength_Clear

'      GoTo EndLine

'

'    End If

'End If

 

 

'---------------------------------------------------------------------------------------------------------------------

        P_coef = 1.15    '  启动压力系数

        

        '

        Before_In_D.Text = Val(Cmb_Out_D.Text) - 2 * Val(Cmb_Thickness.Text)

        Expand_Ratio.Text = Round(100# * (Val(After_In_D.Text) - Val(Before_In_D.Text)) / Val(Before_In_D.Text), 1)

        '

        F = Val(Fric_Coef.Text)

        kk = Val(Expand_Ratio.Text) / 100#

        T = Val(Cmb_Thickness.Text)

      

'

'--------------------( J55套管 )---------------------------------

'

        '

'1.J55-4 1/2"(114.3mm)  膨胀力计算

        If (Cmb_GJ.Text = "J55") And (Val(Cmb_Out_D.Text) = 114.3) Then

       

          Select Case Val(Cmb_Thickness.Text)

         

            Case 5.21

                Expand_Pressure.Text = Round(1.348 + 132.0432 * F + 121.9393 * kk, 2)

                Expand_Thickness.Text = Round(5.187754 - 0.57879 * F - 2.35677 * kk, 2)

                Start_Pressure.Text = Round(P_coef * Val(Expand_Pressure.Text), 2)

                

            Case 5.69

                Expand_Pressure.Text = Round(2.163 + 138.1226 * F + 127.591 * kk, 2)

                Expand_Thickness.Text = Round(5.681925 - 0.3268 * F - 3.11218 * kk, 2)

                Start_Pressure.Text = Round(P_coef * Val(Expand_Pressure.Text), 2)

           

            Case 6.35

                Expand_Pressure.Text = Round(1.942 + 165.0274 * F + 146.539 * kk, 2)

                Expand_Thickness.Text = Round(6.3462 - 0.41959 * F - 3.46736 * kk, 2)

                Start_Pressure.Text = Round(P_coef * Val(Expand_Pressure.Text), 2)

               

          End Select

        End If

       

'2.J55-5 1/2"(139.7mm)  膨胀力计算

        If (Cmb_GJ.Text = "J55") And (Val(Cmb_Out_D.Text) = 139.7) Then

       

          Select Case Val(Cmb_Thickness.Text)

         

            Case 6.2

                Expand_Pressure.Text = Round(1.141 + 122.9457 * F + 113.4784 * kk, 2)

                Expand_Thickness.Text = Round(6.220744 - 0.61385 * F - 3.33697 * kk, 2)

                Start_Pressure.Text = Round(P_coef * Val(Expand_Pressure.Text), 2)

               

            Case 6.99

                Expand_Pressure.Text = Round(0.724 + 139.5743 * F + 135.5657 * kk, 2)

                Expand_Thickness.Text = Round(6.966964 - 0.33709 * F - 3.70363 * kk, 2)

                Start_Pressure.Text = Round(P_coef * Val(Expand_Pressure.Text), 2)

           

            Case 7.72

                Expand_Pressure.Text = Round(1.234 + 156.1801 * F + 148.0904 * kk, 2)

                Expand_Thickness.Text = Round(7.70253 - 0.45068 * F - 4.10786 * kk, 2)

                Start_Pressure.Text = Round(P_coef * Val(Expand_Pressure.Text), 2)

               

          End Select

        End If

       

'3.J55-7"(177.8mm)  膨胀力计算

        If (Cmb_GJ.Text = "J55") And (Val(Cmb_Out_D.Text) = 177.8) Then

       

          Select Case Val(Cmb_Thickness.Text)

         

            Case 6.91

                Expand_Pressure.Text = Round(0.0872 + 102.1646 * F - 102.6172 * kk, 2)

                Expand_Thickness.Text = Round(6.926 - 0.63607 * F - 3.62082 * kk, 2)

                Start_Pressure.Text = Round(P_coef * Val(Expand_Pressure.Text), 2)

               

            Case 8.05

                Expand_Pressure.Text = Round(-0.47917 + 123.7521 * F + 122.4119 * kk, 2)

                Expand_Thickness.Text = Round(8.067 - 0.69714 * F - 4.29265 * kk, 2)

                Start_Pressure.Text = Round(P_coef * Val(Expand_Pressure.Text), 2)

           

            Case 9.19

                Expand_Pressure.Text = Round(-0.0594 + 143.7313 * F + 137.9772 * kk, 2)

                Expand_Thickness.Text = Round(9.219 - 0.96032 * F + 4.87252 * kk, 2)

                Start_Pressure.Text = Round(P_coef * Val(Expand_Pressure.Text), 2)

               

          End Select

        End If

'

'--------------------( N80套管 )---------------------------------

'

'4. N80-4 1/2"(114.3mm)  膨胀力计算

        If (Cmb_GJ.Text = "N80") And (Val(Cmb_Out_D.Text) = 114.3) Then

       

          Select Case Val(Cmb_Thickness.Text)

         

            Case 6.35

                Expand_Pressure.Text = Round(1.13707 + 162.4708 * F + 164.6746 * kk, 2)

                Expand_Thickness.Text = Round(6.305779 - 0.42107 * F - 3.04083 * kk, 2)

                Start_Pressure.Text = Round(P_coef * Val(Expand_Pressure.Text), 2)

               

            Case 7.37

                Expand_Pressure.Text = Round(9.557 + 179.2193 * F + 108.1644 * kk, 2)

                Expand_Thickness.Text = Round(7.347188 - 0.40933 * F - 3.94725 * kk, 2)

                Start_Pressure.Text = Round(P_coef * Val(Expand_Pressure.Text), 2)

              

          End Select

        End If

'

'5. N80-5 1/2"(139.7mm)  膨胀力计算

        If (Cmb_GJ.Text = "N80") And (Val(Cmb_Out_D.Text) = 139.7) Then

       

          Select Case Val(Cmb_Thickness.Text)

          

            Case 7.72

                Expand_Pressure.Text = Round(2.716 + 153.5345 * F + 147.4673 * kk, 2)

                Expand_Thickness.Text = Round(7.705251 - 0.53254 * F - 4.04308 * kk, 2)

                Start_Pressure.Text = Round(P_coef * Val(Expand_Pressure.Text), 2)

               

            Case 9.17

                Expand_Pressure.Text = Round(1.512 + 194.3037 * F + 185.6048 * kk, 2)

                Expand_Thickness.Text = Round(9.137724 - 0.49112 * F - 4.85273 * kk, 2)

                Start_Pressure.Text = Round(P_coef * Val(Expand_Pressure.Text), 2)

               

            Case 10.54

                Expand_Pressure.Text = Round(3.219 + 229.0188 * F + 206.2669 * kk, 2)

                Expand_Thickness.Text = Round(10.50719 - 0.59539 * F - 5.61495 * kk, 2)

                Start_Pressure.Text = Round(P_coef * Val(Expand_Pressure.Text), 2)

              

          End Select

        End If

'

'6. N80-7"(177.8mm)  膨胀力计算

        If (Cmb_GJ.Text = "N80") And (Val(Cmb_Out_D.Text) = 177.8) Then

       

          Select Case Val(Cmb_Thickness.Text)

         

            Case 8.05

                Expand_Pressure.Text = Round(-0.3698 + 124.6305 * F + 128.3163 * kk, 2)

                Expand_Thickness.Text = Round(8.032837 - 0.38713 * F - 4.25725 * kk, 2)

                Start_Pressure.Text = Round(P_coef * Val(Expand_Pressure.Text), 2)

               

            Case 9.19

                Expand_Pressure.Text = Round(0.2336 + 139.6415 * F + 144.6791 * kk, 2)

                Expand_Thickness.Text = Round(9.181898 - 0.7069 * F - 4.74737 * kk, 2)

                Start_Pressure.Text = Round(P_coef * Val(Expand_Pressure.Text), 2)

               

            Case 10.36

                Expand_Pressure.Text = Round(-0.08008 + 164.5936 * F + 166.7787 * kk, 2)

                Expand_Thickness.Text = Round(10.39692 - 0.99872 * F - 5.63824 * kk, 2)

                Start_Pressure.Text = Round(P_coef * Val(Expand_Pressure.Text), 2)

              

            Case 11.51

                Expand_Pressure.Text = Round(1.653248 + 184.1603 * F + 171.788 * kk, 2)

                Expand_Thickness.Text = Round(11.52151 - 1.15272 * F - 5.93087 * kk, 2)

                Start_Pressure.Text = Round(P_coef * Val(Expand_Pressure.Text), 2)

               

            Case 12.65

                Expand_Pressure.Text = Round(2.21797 + 198.9305 * F + 195.7305 * kk, 2)

                Expand_Thickness.Text = Round(12.63074 - 0.79089 * F - 6.75168 * kk, 2)

                Start_Pressure.Text = Round(P_coef * Val(Expand_Pressure.Text), 2)

               

            Case 13.72

                Expand_Pressure.Text = Round(3.167 + 220.535 * F + 209.9444 * kk, 2)

                Expand_Thickness.Text = Round(13.73854 - 1.27376 * F - 7.32641 * kk, 2)

                Start_Pressure.Text = Round(P_coef * Val(Expand_Pressure.Text), 2)

              

          End Select

        End If

'------------------------------------------------------------------------------------

    After_Out_D.Text = Round(Val(After_In_D.Text) + 2# * Val(Expand_Thickness.Text), 2)

'

'  计算二次屈服应力----------------------------------------------------------------------------------------------------

        If Cmb_GJ.Text = "J55" Then

           If Val(Expand_Ratio.Text) <= 5# Then

             After_Yp.Text = Round(-3.8719 * (Val(Expand_Ratio.Text)) ^ 2 + 39.428 * Val(Expand_Ratio.Text) + 371.59, 2)

            ElseIf Val(Expand_Ratio.Text) > 5# Then

             After_Yp.Text = Round(3.0462 * Val(Expand_Ratio.Text) + 457.79, 2)

           End If

        End If

    '-----------------------------------------------------------------------

        If Cmb_GJ.Text = "N80" Then

           If Val(Expand_Ratio.Text) <= 5# Then

             After_Yp.Text = Round(-3.2868 * (Val(Expand_Ratio.Text)) ^ 2 + 42.858 * Val(Expand_Ratio.Text) + 541.09, 2)

            ElseIf Val(Expand_Ratio.Text) > 5# Then

             After_Yp.Text = Round(2.0704 * Val(Expand_Ratio.Text) + 668.81, 2)

            End If

        End If

'  计算二次屈服应力结束------------------------------------------------------------------------------------------------

  Call Before_Strength

  Call After_Strength

  '

  Dim Back_Ratio

  '

  Ex_AxialForce.Text = Round((3.1415926 * (Val(After_In_D.Text)) ^ 2 / 4) * Val(Expand_Pressure.Text) / 1000#, 2)   ' kN

  Ex_RadiusForce.Text = Round(Val(Ex_AxialForce.Text) * Sin(3.14159 * Val(Ex_Angle.Text) / 180#), 2)

  Back_Ratio = Format(Round((Val(After_Yp.Text) / 210000#) * 100#, 3), "0.000") ' 回弹率(%)

  Ex_Back_RadiusDlt.Text = Format(Round((Back_Ratio / 100#) * (Val(After_In_D.Text) / 2), 3), "0.000")   ' 径向回弹量(mm)

  '

 

  A1 = 3.14 * ((Val(Cmb_Out_D.Text)) ^ 2 - (Val(Before_In_D.Text)) ^ 2) / 4#     ' 膨胀前套管横截面积(mm^2)

  A2 = 3.14 * ((Val(After_Out_D.Text)) ^ 2 - (Val(After_In_D.Text)) ^ 2) / 4#    ' 膨胀后套管横截面积(mm^2)

 

  Coef_Area = A1 / A2

    BB = 1000 * Val(Expand_Length.Text) * (1 - Coef_Area)         ' 轴向收缩量(mm)

    If BB < 1000# Then

       Lab_Dlt.Caption = "轴向总收缩量(mm)"

      Ex_AxialShortenDlt.Text = Round(BB, 2)

     

    Else

       Lab_Dlt.Caption = "轴向总收缩量(m)"

      Ex_AxialShortenDlt.Text = Round(BB / 1000#, 2)

    End If

  Ex_BackAxialDlt.Text = Round((Val(Expand_Length.Text) * Coef_Area) * (Back_Ratio / 100#) * 1000#, 2)  ' 轴向回弹量(mm)

'

  Dim Casing_Weight As Single

  Casing_Weight = Round(7.8 * (A1 * 0.000001) * Val(Expand_Length.Text) * 9.8, 2)                   ' 膨胀套管总量kN

'

  Weight.Text = Round(Casing_Weight, 2)

  '

 

  HH = Int((Val(After_In_D.Text) - Val(Before_In_D.Text)) / (2 * Tan(3.14 * Val(Ex_Angle.Text) / 180#)) + 0.5) + 5 ' 膨胀锥高度(mm)

'

MDI_Main.Mnu_Reports.Enabled = True

'  A1 = 9

EndLine:

'--------------------------------------------------------------------------------------------------------------------------

End Sub

 

Private Sub Lian(D00)

'

   Dim P_coef As Single

   Dim myrg As String

   Dim Strg_InD As String

   Dim Ex_InD As Single

   Dim F, T, kk As Single

   Dim Coef_Area As Single

   Dim A1, A2 As Single

 

   '

      After_In_D.Text = D00

 

   Ex_InD = Val(Cmb_Out_D.Text) - 2# * Val(Cmb_Thickness.Text)

'

'   If Val(Cmb_Out_D.Text) <= 114.3 Then

'     Ex_Angle.Text = 8

'   Else

'     Ex_Angle = 8

'   End If

'

'If (Val(After_In_D.Text) >= 0 And Val(After_In_D.Text) < Ex_InD) Or (Val(After_In_D.Text) > 1.2 * Ex_InD) Then

'  Strg_InD = "请输入膨胀后内径范围" & Round(Ex_InD, 2) & "<Ro<" & Round(1.2 * Ex_InD, 2) & "(mm)"

'      myrg = MsgBox(Strg_InD, vbYesNo, "请重新输入")

'    If myrg = vbYes Then

'      After_In_D.Text = ""

'      '

'      Call Strength_Clear

'      '

'      After_In_D.SetFocus

'      GoTo EndLine

'    Else

'    Strength_Clear

'    After_In_D.SetFocus

'      GoTo EndLine

'    End If

'End If

 

'-------------------------------------------------------------------------

'If Val(Fric_Coef.Text) > 0.2 Then

'      myrg = MsgBox("请输入摩擦系数正确范围0=<Fric<=0.2", vbYesNo, "请重新输入")

''      GoTo EndLine

'    If myrg = vbYes Then

'      Fric_Coef.Text = ""

'      Strength_Clear

'      Fric_Coef.SetFocus

'      GoTo EndLine

'    Else

'      Strength_Clear

'      GoTo EndLine

'

'    End If

'End If

'

'If Val(Expand_Length.Text) = 0# Then

'      myrg = MsgBox("请输入膨胀套管长度:", vbYesNo, "请重新输入")

''      GoTo EndLine

'    If myrg = vbYes Then

'      Expand_Length.Text = ""

'      Strength_Clear

'      Expand_Length.SetFocus

'      GoTo EndLine

'    Else

'      Strength_Clear

'      GoTo EndLine

'

'    End If

'End If

 

 

'---------------------------------------------------------------------------------------------------------------------

        P_coef = 1.15    '  启动压力系数

        

        '

        Before_In_D.Text = Val(Cmb_Out_D.Text) - 2 * Val(Cmb_Thickness.Text)

        Expand_Ratio.Text = Round(100# * (Val(After_In_D.Text) - Val(Before_In_D.Text)) / Val(Before_In_D.Text), 1)

        '

        F = Val(Fric_Coef.Text)

        kk = Val(Expand_Ratio.Text) / 15#

        T = Val(Cmb_Thickness.Text)

      

'

'--------------------( J55套管 )---------------------------------

'

        '

'1.J55-4 1/2"(114.3mm)  膨胀力计算

        If (Cmb_GJ.Text = "J55") And (Val(Cmb_Out_D.Text) = 114.3) Then

       

          Select Case Val(Cmb_Thickness.Text)

         

            Case 5.21

                Expand_Pressure.Text = Round(118.72 * F + 13.317 * kk, 2)

                Expand_Thickness.Text = Round(-0.5444 * F + (T - (T - 4.7787) * kk), 2)

                Start_Pressure.Text = Round(P_coef * Val(Expand_Pressure.Text), 2)

               

            Case 5.69

                Expand_Pressure.Text = Round(130.99 * F + 14.408 * kk, 2)

                Expand_Thickness.Text = Round(-0.65 * F + (T - (T - 5.2235) * kk), 2)

                Start_Pressure.Text = Round(P_coef * Val(Expand_Pressure.Text), 2)

           

            Case 6.35

                Expand_Pressure.Text = Round(140.99 * F + 16.498 * kk, 2)

                Expand_Thickness.Text = Round(-0.7658 * F + (T - (T - 5.8309) * kk), 2)

                Start_Pressure.Text = Round(P_coef * Val(Expand_Pressure.Text), 2)

               

          End Select

        End If

       

'2.J55-5 1/2"(139.7mm)  膨胀力计算

        If (Cmb_GJ.Text = "J55") And (Val(Cmb_Out_D.Text) = 139.7) Then

       

          Select Case Val(Cmb_Thickness.Text)

         

            Case 6.2

                Expand_Pressure.Text = Round(84.906 * F + 14.025 * kk, 2)

                Expand_Thickness.Text = Round(-0.5026 * F + (T - (T - 5.6724) * kk), 2)

                Start_Pressure.Text = Round(P_coef * Val(Expand_Pressure.Text), 2)

                

            Case 6.99

                Expand_Pressure.Text = Round(104.08 * F + 15.793 * kk, 2)

                Expand_Thickness.Text = Round(-0.6079 * F + (T - (T - 6.3972) * kk), 2)

                Start_Pressure.Text = Round(P_coef * Val(Expand_Pressure.Text), 2)

           

            Case 7.72

                Expand_Pressure.Text = Round(114.44 * F + 18.028 * kk, 2)

                Expand_Thickness.Text = Round(-0.6789 * F + (T - (T - 7.0558) * kk), 2)

                Start_Pressure.Text = Round(P_coef * Val(Expand_Pressure.Text), 2)

               

          End Select

        End If

       

'3.J55-7"(177.8mm)  膨胀力计算

        If (Cmb_GJ.Text = "J55") And (Val(Cmb_Out_D.Text) = 177.8) Then

       

          Select Case Val(Cmb_Thickness.Text)

         

            Case 6.91

                Expand_Pressure.Text = Round(71.461 * F + 11.759 * kk, 2)

                Expand_Thickness.Text = Round(-0.6132 * F + (T - (T - 6.323) * kk), 2)

                Start_Pressure.Text = Round(P_coef * Val(Expand_Pressure.Text), 2)

               

            Case 8.05

                Expand_Pressure.Text = Round(102.01 * F + 13.36 * kk, 2)

                Expand_Thickness.Text = Round(-0.6816 * F + (T - (T - 7.3682) * kk), 2)

                Start_Pressure.Text = Round(P_coef * Val(Expand_Pressure.Text), 2)

           

            Case 9.19

                Expand_Pressure.Text = Round(111.87 * F + 15.47 * kk, 2)

                Expand_Thickness.Text = Round(-0.7632 * F + (T - (T - 8.4075) * kk), 2)

                Start_Pressure.Text = Round(P_coef * Val(Expand_Pressure.Text), 2)

               

          End Select

        End If

'

'--------------------( N80套管 )---------------------------------

'

'4. N80-4 1/2"(114.3mm)  膨胀力计算

        If (Cmb_GJ.Text = "N80") And (Val(Cmb_Out_D.Text) = 114.3) Then

       

          Select Case Val(Cmb_Thickness.Text)

         

            Case 6.35

                Expand_Pressure.Text = Round(198.33 * F + 22.436 * kk, 2)

                Expand_Thickness.Text = Round(-0.6184 * F + (T - (T - 5.8358) * kk), 2)

                Start_Pressure.Text = Round(P_coef * Val(Expand_Pressure.Text), 2)

               

            Case 7.37

                Expand_Pressure.Text = Round(250.39 * F + 26.52 * kk, 2)

                Expand_Thickness.Text = Round(-0.8237 * F + (T - (T - 6.7756) * kk), 2)

                Start_Pressure.Text = Round(P_coef * Val(Expand_Pressure.Text), 2)

              

          End Select

        End If

'

'5. N80-5 1/2"(139.7mm)  膨胀力计算

        If (Cmb_GJ.Text = "N80") And (Val(Cmb_Out_D.Text) = 139.7) Then

       

          Select Case Val(Cmb_Thickness.Text)

         

            Case 7.72

                Expand_Pressure.Text = Round(165.68 * F + 24.078 * kk, 2)

                Expand_Thickness.Text = Round(-0.4342 * F + (T - (T - 7.0661) * kk), 2)

                Start_Pressure.Text = Round(P_coef * Val(Expand_Pressure.Text), 2)

               

            Case 9.17

                Expand_Pressure.Text = Round(187.88 * F + 30.381 * kk, 2)

                Expand_Thickness.Text = Round(-0.6316 * F + (T - (T - 8.3887) * kk), 2)

                Start_Pressure.Text = Round(P_coef * Val(Expand_Pressure.Text), 2)

               

            Case 10.54

                Expand_Pressure.Text = Round(257.14 * F + 34.057 * kk, 2)

                Expand_Thickness.Text = Round(-0.9053 * F + (T - (T - 9.6388) * kk), 2)

                Start_Pressure.Text = Round(P_coef * Val(Expand_Pressure.Text), 2)

              

          End Select

        End If

'

'6. N80-7"(177.8mm)  膨胀力计算

        If (Cmb_GJ.Text = "N80") And (Val(Cmb_Out_D.Text) = 177.8) Then

       

          Select Case Val(Cmb_Thickness.Text)

         

            Case 8.05

                Expand_Pressure.Text = Round(131.28 * F + 18.645 * kk, 2)

                Expand_Thickness.Text = Round(-0.6553 * F + (T - (T - 7.3773) * kk), 2)

                Start_Pressure.Text = Round(P_coef * Val(Expand_Pressure.Text), 2)

               

            Case 9.19

                Expand_Pressure.Text = Round(141.51 * F + 21.885 * kk, 2)

                Expand_Thickness.Text = Round(-0.8211 * F + (T - (T - 8.4272) * kk), 2)

                Start_Pressure.Text = Round(P_coef * Val(Expand_Pressure.Text), 2)

               

            Case 10.36

                Expand_Pressure.Text = Round(166.94 * F + 23.942 * kk, 2)

                Expand_Thickness.Text = Round(-0.6079 * F + (T - (T - 9.4822) * kk), 2)

                Start_Pressure.Text = Round(P_coef * Val(Expand_Pressure.Text), 2)

              

            Case 11.51

                Expand_Pressure.Text = Round(176.9 * F + 28.201 * kk, 2)

                Expand_Thickness.Text = Round(-0.8211 * F + (T - (T - 10.54) * kk), 2)

                Start_Pressure.Text = Round(P_coef * Val(Expand_Pressure.Text), 2)

               

            Case 12.65

                Expand_Pressure.Text = Round(239.92 * F + 29.895 * kk, 2)

                Expand_Thickness.Text = Round(-1.4658 * F + (T - (T - 11.595) * kk), 2)

                Start_Pressure.Text = Round(P_coef * Val(Expand_Pressure.Text), 2)

               

            Case 13.72

                Expand_Pressure.Text = Round(225.42 * F + 33.179 * kk, 2)

                Expand_Thickness.Text = Round(-0.9868 * F + (T - (T - 12.558) * kk), 2)

                Start_Pressure.Text = Round(P_coef * Val(Expand_Pressure.Text), 2)

              

          End Select

        End If

'------------------------------------------------------------------------------------

    After_Out_D.Text = Round(Val(After_In_D.Text) + 2# * Val(Expand_Thickness.Text), 2)

'

'  计算二次屈服应力----------------------------------------------------------------------------------------------------

        If Cmb_GJ.Text = "J55" Then

           If Val(Expand_Ratio.Text) <= 5# Then

             After_Yp.Text = Round(-3.8719 * (Val(Expand_Ratio.Text)) ^ 2 + 39.428 * Val(Expand_Ratio.Text) + 371.59, 2)

            ElseIf Val(Expand_Ratio.Text) > 5# Then

             After_Yp.Text = Round(3.0462 * Val(Expand_Ratio.Text) + 457.79, 2)

           End If

        End If

    '-----------------------------------------------------------------------

        If Cmb_GJ.Text = "N80" Then

           If Val(Expand_Ratio.Text) <= 5# Then

             After_Yp.Text = Round(-3.2868 * (Val(Expand_Ratio.Text)) ^ 2 + 42.858 * Val(Expand_Ratio.Text) + 541.09, 2)

            ElseIf Val(Expand_Ratio.Text) > 5# Then

             After_Yp.Text = Round(2.0704 * Val(Expand_Ratio.Text) + 668.81, 2)

            End If

        End If

'  计算二次屈服应力结束------------------------------------------------------------------------------------------------

  Call Before_Strength

  Call After_Strength

  '

  Dim Back_Ratio

  '

  Ex_AxialForce.Text = Round((3.1415926 * (Val(After_In_D.Text)) ^ 2 / 4) * Val(Expand_Pressure.Text) / 1000#, 2)   ' kN

  Ex_RadiusForce.Text = Round(Val(Ex_AxialForce.Text) * Sin(3.14159 * Val(Ex_Angle.Text) / 180#), 2)

  Back_Ratio = Format(Round((Val(After_Yp.Text) / 210000#) * 100#, 3), "0.000") ' 回弹率(%)

  Ex_Back_RadiusDlt.Text = Format(Round((Back_Ratio / 100#) * (Val(After_In_D.Text) / 2), 3), "0.000")   ' 径向回弹量(mm)

  '

 

  A1 = 3.14 * ((Val(Cmb_Out_D.Text)) ^ 2 - (Val(Before_In_D.Text)) ^ 2) / 4#     ' 膨胀前套管横截面积(mm^2)

  A2 = 3.14 * ((Val(After_Out_D.Text)) ^ 2 - (Val(After_In_D.Text)) ^ 2) / 4#    ' 膨胀后套管横截面积(mm^2)

 

  Coef_Area = A1 / A2

    BB = 1000 * Val(Expand_Length.Text) * (1 - Coef_Area)         ' 轴向收缩量(mm)

    If BB < 1000# Then

       Lab_Dlt.Caption = "轴向总收缩量(mm)"

      Ex_AxialShortenDlt.Text = Round(BB, 2)

     

    Else

       Lab_Dlt.Caption = "轴向总收缩量(m)"

      Ex_AxialShortenDlt.Text = Round(BB / 1000#, 2)

    End If

  Ex_BackAxialDlt.Text = Round((Val(Expand_Length.Text) * Coef_Area) * (Back_Ratio / 100#) * 1000#, 2)  ' 轴向回弹量(mm)

'

  Dim Casing_Weight As Single

  Casing_Weight = Round(7.8 * (A1 * 0.000001) * Val(Expand_Length.Text) * 9.8, 2)                   ' 膨胀套管总量kN

'

  Weight.Text = Round(Casing_Weight, 2)

  '

 

  HH = Int((Val(After_In_D.Text) - Val(Before_In_D.Text)) / (2 * Tan(3.14 * Val(Ex_Angle.Text) / 180#)) + 0.5) + 5 ' 膨胀锥高度(mm)

'

MDI_Main.Mnu_Reports.Enabled = True

'  A1 = 9

EndLine:

'--------------------------------------------------------------------------------------------------------------------------

End Sub

 

Private Sub Command2_Click()

  End

End Sub

 

Private Sub Form_Load()

    '

        Cmb_GJ.AddItem "J55"

        Cmb_GJ.AddItem "N80"

     If Cmb_GJ.Text = "J55" Then

        Before_Yp.Text = "379.0"    ' J55屈服极限

     Else

        Before_Yp.Text = "551.0"    ' N80屈服极限

   

     End If

    '

        Cmb_Out_D.AddItem "114.3"

        Cmb_Out_D.AddItem "139.7"

        Cmb_Out_D.AddItem "177.8"

        Ex_Angle.AddItem "8"

        Ex_Angle.AddItem "10"

       

    '

    '

    Call parameter

End Sub

 

Private Sub Strength_Clear()

    '---------------------------------

        After_Yp.Text = ""

        Before_Tension.Text = ""

        Before_In_Pressure.Text = ""

        Before_Out_Pressure.Text = ""

        Collpas_Lab.Caption = ""

    '---------------------------------

        After_Tension.Text = ""

        After_In_Pressure.Text = ""

        After_Out_Pressure.Text = ""

        After_Collpas_Lab.Caption = ""

    '---------------------------------

    Before_In_D.Text = ""

    Expand_Ratio.Text = ""

'    Fric_Coef.Text = ""

'    Expand_Length.Text = ""

    Ex_Angle.Text = ""

'    After_In_D.Text = ""

    '

      Start_Pressure.Text = ""

      Expand_Pressure.Text = ""

      Expand_Thickness.Text = ""

      After_Out_D.Text = ""

        Ex_AxialForce.Text = ""

        Ex_RadiusForce.Text = ""

'        Back_Ratio.Text = ""

        Ex_Back_RadiusDlt.Text = ""

        Ex_BackAxialDlt.Text = ""

        Ex_AxialShortenDlt.Text = ""

        Weight.Text = ""

        Fixed_Force.Text = ""

        S_Coef.Text = ""

        After_In_D.Text = ""

'

End Sub

Sub parameter()

'

    Cmb_Thickness.Clear

       

        If (Cmb_GJ.Text = "J55") Then

        Before_Yp.Text = "379.0"    ' J55屈服极限

        '

          Select Case Val(Cmb_Out_D.Text)

        '

                Case 114.3

                    Cmb_Thickness.AddItem "5.21"

                    Cmb_Thickness.AddItem "5.69"

                    Cmb_Thickness.AddItem "6.35"

                    Cmb_Thickness.Text = 6.35

        '

                Case 139.7

                    Cmb_Thickness.AddItem "6.2"

                    Cmb_Thickness.AddItem "6.99"

                    Cmb_Thickness.AddItem "7.72"

                    Cmb_Thickness.Text = 7.72

        '

                Case 177.8

                    Cmb_Thickness.AddItem "6.91"

                    Cmb_Thickness.AddItem "8.05"

                    Cmb_Thickness.AddItem "9.19"

                    Cmb_Thickness.Text = 9.19

            End Select

        ElseIf (Cmb_GJ.Text = "N80") Then

        Before_Yp.Text = "551.0"    ' N80屈服极限

 

               Select Case Val(Cmb_Out_D.Text)

        '

                Case 114.3

                    Cmb_Thickness.AddItem "6.35"

                    Cmb_Thickness.AddItem "7.37"

                    Cmb_Thickness.Text = 6.35

        '

                Case 139.7

                    Cmb_Thickness.AddItem "7.72"

                    Cmb_Thickness.AddItem "9.17"

                    Cmb_Thickness.AddItem "10.54"

                    Cmb_Thickness.Text = 7.72

        '

                Case 177.8

                    Cmb_Thickness.AddItem "8.05"

                    Cmb_Thickness.AddItem "9.19"

                    Cmb_Thickness.AddItem "10.36"

                    Cmb_Thickness.AddItem "11.51"

                    Cmb_Thickness.AddItem "12.65"

                    Cmb_Thickness.AddItem "13.72"

                    Cmb_Thickness.Text = 9.19

           End Select

        End If

    Before_In_D.Text = ""

    After_In_D.Text = ""

    Expand_Ratio.Text = ""

    Expand_Length.Text = ""

   

End Sub

 

'

'---------------------------------------------------------------------------------------------------------------

 Private Sub After_Strength()

Dim D_Out, D_In, Thickness As Single

Dim Yp, Fc, P_in As Single

Dim Pc, P_case As String

 

    D_Out = Val(After_Out_D.Text)

    Thickness = Val(Expand_Thickness.Text)

'

    Yp = Val(After_Yp.Text) * 1000#    ' 屈服强度,kP

    '

'  API管体抗拉强度计算

'

      Fc = 0.07854 * ((D_Out / 10) ^ 2 - ((D_Out - 2 * Thickness) / 10) ^ 2) * Yp * 0.001 '  管体屈服强度 kN

      After_Tension.Text = Round(Fc, 2)

'

'   套管的抗内压API计算方法     ,  管体抗内压强度

   

        P_in = 0.875 * (2 * Yp * Thickness / D_Out) / 1000#           ' 抗内压强度, (MPa)

        After_In_Pressure.Text = Round(P_in, 2)

'Pin---> 管体最小抗内压强度, kPa

   

     Call Collapsing(D_Out, Thickness, Yp, Pc, P_case)

   

     After_Out_Pressure.Text = Round(Pc / 1000#, 2)

     After_Collpas_Lab.Caption = P_case

 

End Sub

'

'--------------------------------------------------------------------------------------------------------------

 Private Sub Before_Strength()

 

Dim D_Out, D_In, Thickness As Single

Dim Yp, Fc, P_in As Single

Dim Pc, P_case As String

 

        D_Out = Val(Cmb_Out_D.Text)

        Thickness = Val(Cmb_Thickness.Text)

'

        Yp = Val(Before_Yp.Text) * 1000#    ' 屈服强度,kP

'

'  API管体抗拉强度计算

'

          Fc = 0.07854 * ((D_Out / 10) ^ 2 - ((D_Out - 2 * Thickness) / 10) ^ 2) * Yp * 0.001 '  管体屈服强度 kN

          Before_Tension.Text = Round(Fc, 2)

'

'   套管的抗内压API计算方法 , 管体抗内压强度

'

            P_in = 0.875 * (2 * Yp * Thickness / D_Out) / 1000#           ' 抗内压强度, (MPa)

           

          Before_In_Pressure.Text = Round(P_in, 2)

'Pin---> 管体最小抗内压强度, kPa

       

         Call Collapsing(D_Out, Thickness, Yp, Pc, P_case)

       

         Before_Out_Pressure.Text = Round(Pc / 1000#, 2)

         Collpas_Lab.Caption = P_case

 

End Sub

 

 

 

回复列表 (共1个回复)

沙发

话说老兄,你既然不懂,要流程图干啥?

我来回复

您尚未登录,请登录后再回复。点此登录或注册