油库上机报告_第1页
油库上机报告_第2页
油库上机报告_第3页
油库上机报告_第4页
油库上机报告_第5页
已阅读5页,还剩8页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、 油库上机报告题目油库自流装卸系统 学生姓名刘和益学 号201431010464教学院系石油与天然气工程学院专业年级油气储运工程2014级指导教师宋晓琴职称单位油气储运教研室辅导教师职 称单位完成日期 2017年06月目录1. 题目2.框图3程序31该程序执行顺序如下:32程序代码及其对应的窗体截图:4 模型评价与改进1题目来源某油库的自流装卸系统,如图所示,装油管设置在集油管中部,且两侧鹤管同时装油,两侧鹤管对称布置。油库油料为车用汽油,操作条件下车用汽油的粘度为 0.610-6m2/s,鹤管采用1084的钢管,鹤管计算长度为25m,鹤管间距为12.5m,集油管为2736,输油管为1595,

2、输油管计算长度为1500m,油库库容为30000m3,单个罐的容量为3000m3,油罐内径为16m,罐壁高度为15.85,罐出油口与装油鹤管出口之间的高差为30m。(1) 计算鹤分别管数为20和30,液位高度为3m和10m时所对应的各鹤管流量?(2)操作鹤管数为30,发油量为1500m3,开始发油时液位高度为12m,计算发油时间?。2.框图开 机输入参数 n 计算常数 =+V(1) (1) hf1(1) u(1) hf2(1)i=2 to n/2(i)= (i-1)+ hf1(i) (i)+ YESu(i-1) (i) hf2(i) in/2=2(+); = +hf1(1)+hf2(1)+hf

3、2(n/2)+ +Z YES输出Q1(1)Q1(n/2); 输入发油量V0 算Z1=Z0-V0/F;调用过程再算Q1T=2V0/(Q1+Q0)结 束还需要另外调用过程算摩阻3. 程序代码31该程序执行顺序如下:3.1.1 进入启动窗体,显示“开始计算”和“结束程序”按钮 。点击“开始计算”进入基本参数窗体,点击“技术程序”结束3.1.2 基本参数窗体。显示“计算发油时间”,“计算鹤管流量”和“返回”以及需要输入的参数。输入各项参数后,点击“计算发油时间”进入计算时间窗体。点击“计算鹤管流量”进入鹤管窗体。点击“返回”返回上级页面3.1.3计算时间窗体. 显示“确定”和“返回”按钮,以及计算发油

4、时间所需参数。点击“确定”文本框显示发油时间,点击“返回”返回上级页面3.1.4 鹤管窗体.显示“画曲线”和“计算流量”,“返回”按钮。点击“画曲线”进入图形窗体,点击“计算流量”进入流量窗体,点击“返回”返回上级页面3.1.5 图形窗体 ,显示流量-位能关系图与“返回”按钮3.1.6 流量窗体,显示流量 与“返回”按钮32程序代码及其对应的窗体截图:Private Sub Command1_Click()Form2.ShowForm1.HideEnd SubPrivate Sub Command2_Click()EndEnd Sub33基本参数窗体程序:Private Sub Command

5、1_Click()Form3.ShowForm2.HideEnd SubPrivate Sub Command2_Click()Form4.ShowForm2.HideEnd SubPrivate Sub Command3_Click()Form1.ShowForm2.HideEnd Sub34计算时间窗体程序:Private Sub Command1_Click() Cls AutoRedraw = TrueDim hf As Single, V() As Single, u() As Single, hf1() As SingleDim hf2() As Single, hf0 As Si

6、ngle, Q1() As Single, Q2() As Single d1 = Val(Form2.Text1.Text): d2 = Val(Form2.Text2.Text): d0 = Val(Form2.Text3.Text) L1 = Val(Form2.Text4.Text): L2 = Val(Form2.Text5.Text): L0 = Val(Form2.Text6.Text) pi = 3.14: t1 = 0.00001: t2 = 0.00001: e = 0.0002: g = 9.8 p = Val(Form2.Text7.Text): H0 = Val(Fo

7、rm2.Text8.Text) n = Val(Form3.Text1.Text): Z0 = Val(Form3.Text2.Text): V0 = Val(Form3.Text3.Text) A1 = (pi * d1 2) / 4: A2 = (pi * d2 2) / 4: A0 = (pi * d0 2) / 4 B1 = L1 / (2 * g * d1): B2 = L2 / (2 * g * d2): B0 = L0 / (2 * g * d0) Z1 = Z0 - (V0 / 201) m = n / 2 Call Module1.liul(Z0) Q00 = Q0 If V

8、0 0 Then Call Module1.liul(Z1) Q01 = Q0 t = (2 * V0) / (3600 * (Q01 + Q00) Else t = 0End If Text4.Text = tEnd SubPrivate Sub Command2_Click()Form2.ShowForm3.HideEnd Sub35鹤管窗体程序:Dim hf As Single, V() As Single, u() As Single, hf1() As SingleDim hf2() As Single, hf0 As Single, Q2() As Single Private S

9、ub Command1_Click()Form5.ShowForm4.HideForm5.Cls d1 = Val(Form2.Text1.Text): d2 = Val(Form2.Text2.Text): d0 = Val(Form2.Text3.Text) L1 = Val(Form2.Text4.Text): L2 = Val(Form2.Text5.Text): L0 = Val(Form2.Text6.Text) pi = 3.14: t1 = 0.00001: t2 = 0.00001: e = 0.0002: g = 9.8 p = Val(Form2.Text7.Text):

10、 H0 = Val(Form2.Text8.Text) n = Val(Form4.Text1.Text): Z0 = Val(Form4.Text2.Text): V0 = 0 A1 = (pi * d1 2) / 4: A2 = (pi * d2 2) / 4: A0 = (pi * d0 2) / 4 B1 = L1 / (2 * g * d1): B2 = L2 / (2 * g * d2): B0 = L0 / (2 * g * d0) Z1 = Z0 - (V0 / 201) m = n / 2 AutoRedraw = True Form5.Scale (-0.1, 30)-(0

11、.1, -30) Form5.Line (0, 30)-(0, -30) Form5.Line (0.1, 0)-(-0.1, 0) Form5.Line (0, 0)-(0, -30) Call Module1.liul(Z0)End SubPrivate Sub Command2_Click()Form6.ShowForm4.Hide Form6.Cls d1 = Val(Form2.Text1.Text): d2 = Val(Form2.Text2.Text): d0 = Val(Form2.Text3.Text) L1 = Val(Form2.Text4.Text): L2 = Val

12、(Form2.Text5.Text): L0 = Val(Form2.Text6.Text) pi = 3.14: t1 = 0.00001: t2 = 0.00001: e = 0.0002: g = 9.8 p = Val(Form2.Text7.Text): H0 = Val(Form2.Text8.Text) n = Val(Form4.Text1.Text): Z0 = Val(Form4.Text2.Text): V0 = 0 A1 = (pi * d1 2) / 4: A2 = (pi * d2 2) / 4: A0 = (pi * d0 2) / 4 B1 = L1 / (2

13、* g * d1): B2 = L2 / (2 * g * d2): B0 = L0 / (2 * g * d0) Z1 = Z0 - (V0 / 201) m = n / 2 Call Module1.liul(Z0) For i = 1 To m Form6.Print i, Q1(i) Next iEnd SubPrivate Sub Command3_Click()Form2.ShowForm4.HideEnd Sub36图形窗体程序:Private Sub Command1_Click()Form4.ShowForm5.HideEnd Sub37流量窗体程序:Private Sub

14、Command1_Click()Form4.ShowForm6.HideEnd Sub38调用模块程序:Public d1 As Single, d2 As Single, d0 As Single, L1 As Single, L2 As Single, L0 As SinglePublic A1 As Single, A2 As Single, A0 As Single, B1 As Single, B2 As Single, B0 As SinglePublic t1 As Single, t2 As Single, p As Single, e As Single, g As Sing

15、le, t As SinglePublic Z1 As Single, V0 As Single, H0 As Single, u0 As Single, pi As Single, f As SinglePublic n As Single, e1 As Single, m As Single, Z0 As Single, Q0 As Single, B3 As SinglePublic Q01 As Single, Q00 As Single, Q1() As Singled1,d2,d0,是鹤管;集油管;输油管的直径。L1,L2,L0是鹤管;集油管;输油管的计算长度Q1()是各鹤管流量,

16、Q2()是各段集油管流量,Q0是过程中输油管的流量Q00,Q01是输油管流量,hf是集油管线总摩阻,hf1()是各鹤管的摩阻,hf2()是各段集油管的摩阻。hf0是输油管摩阻,t1,t2是计算中的两个增量,p为粘度,e绝对粗糙度,e1是相对粗糙度V0是发油量,pi是3.14, t是发油时间Public Sub mozu(u As Single, d As Single, B As Single)Dim Re As Single, Re1 As Single, Re2 As Single Re = (d * u) / p e1 = (2 * e) / d Re1 = 59.7 / e1 1.14

17、 Re2 = 665 - 765 * (Log(e1) / Log(10) / e1If Re 2000 And Re 3000 Re1 And Re Re2 Then f1 = 1 / (1.74 - 2 * Log(e1) / Log(10) 2 f = f1 * (u 2) * BEnd IfEnd SubPublic Sub liul(z As Single)ReDim V(1 To m) As Single, u(1 To m) As Single, hf1(1 To m) As SingleReDim hf2(1 To m) As Single, Q1(1 To m) As Single, Q2(1 To m) As Single Q1(1) = 0 Do Q0 = 0: hf = 0 Q1(1) = Q1(1) + t1 V(1) = Q1(1) / A1 u(1) = Q1(1) / A2 Call Module1.mozu(V(1), d1, B1) hf1(1) = f Call Module1.mozu(u(1), d2, B2) hf2(1) = f For i = 2 To m c = 0 D

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论