找回密码
 注册
查看: 29113|回复: 31

我有正版phoenics的北京培训资料,内有许多实例讲解,适合从零开始者

[复制链接]
发表于 2005-8-14 19:24:24 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册

x
Dim I, J As Double
Dim NN As Integer, ELE As Integer, MS As Integer
Dim GD As Integer, JZ As Integer, ZC As Integer, PN As Integer
Dim LRN(1 To 12, 1 To 12) As Double, L(1 To 7) As Double, G(1 To 21, 1 To 21) As Double
Dim EA(1 To 7) As Double, EI(1 To 7) As Double, Cn As Double, Sn As Double
Dim X(1 To 7) As Double, Y(1 To 7) As Double, P(1 To 21) As Double
Dim TKE(1 To 21, 1 To 21) As Double, TKE1(1 To 21, 1 To 21) As Double
Dim BKE(1 To 6, 1 To 6) As Double, T(1 To 6, 1 To 6) As Double
Dim TZ(1 To 6, 1 To 6) As Double, Z(1 To 21) As Double
Dim LN(1 To 6) As Integer, RN(1 To 6) As Integer
Dim FX(1 To 7) As Double, FY(1 To 7) As Double, MOMENT(1 To 7) As Double
Private Sub Form_Click()
Open "e:\homework\gginput.txt" For Input As #1
Open "e:\homework\ggoutput.txt" For Output As #2
Call Data ';输入数据
Call ZG  ';总刚度矩阵
Call Boundary '; 输入边界条件
Call load ';输入荷载
Call Result ';计算结果(杆端力)
Close #1
Close #2
End Sub
Public Sub Data() ';数据的准备与输入
Print #2, "平面杆系有限元程序——斜腿刚构计算"
Print #2, "========================================="
Print #2, "原始数据的输入"
Print #2,
Print #2, "结点数"; Spc(3); "单元数"; Spc(3); "固定支座数"; Spc(3); "铰支座数"; Spc(3); "支承数"; Spc(3); "结点荷载数"; Spc(3); "系统总自由度数"
Input #1, NN, GD, JZ, ZC, PN
MS = 3 * NN: ELE = NN - 1
Print #2, NN; Spc(6); ELE; Spc(6); GD; Spc(6); JZ; Spc(6); ZC; Spc(6); PN; Spc(6); MS
Print #2,
Print #2, "========================================="
Print #2, "结点坐标的输入"
Print #2,
Print #2, "结点"; Spc(3); "X"; Spc(6); "Y"; Spc(3); "单位:米"
  For I = 1 To NN
   Input #1, I, X(I), Y(I)
   Print #2, I; Spc(3); X(I); Spc(6); Y(I)
  Next I
Print #2,
Print #2, "========================================="
Print #2, "杆件相关信息的输入"
Print #2,
Print #2, "杆件号"; Spc(3); "左结点号"; Spc(3); "右结点号"; Spc(3); "抗弯刚度"; Spc(3); "抗拉刚度"; Spc(3); "杆件长度"; Spc(3); "E=2.06E+11N/m2"
  For I = 1 To ELE
    Input #1, I, LN(I), RN(I), EI(I), EA(I)
  Next I
  For I = 1 To ELE
   L(I) = Sqr((Y(RN(I)) - Y(LN(I))) ^ 2 + (X(RN(I)) - X(LN(I))) ^ 2)
   Print #2, I; Spc(8); LN(I); Spc(8); RN(I); Spc(8); Format(EI(I), "0.000E+00"); Spc(8); Format(EA(I), "0.000E+00"); Spc(8); (Format(L(I), "0.000"))
  Next I
';输入结点编号
LRN(1, 1) = 3#: LRN(1, 2) = 3#: LRN(1, 3) = 4#
LRN(2, 1) = 1#: LRN(2, 2) = 2#: LRN(2, 3) = 3#
LRN(1, 4) = 5#: LRN(1, 5) = 7#: LRN(1, 6) = 6#
LRN(2, 4) = 4#: LRN(2, 5) = 5#: LRN(2, 6) = 5#
Print #2,
Print #2, "========================================="
Print #2, "输入结点荷载"
Print #2,
Print #2, "结点号"; Spc(3); "FX"; Spc(4); "FY"; Spc(4); "MOMENT"; Spc(4); "单位:N"
For I = 1 To NN
  Input #1, I, FX(I), FY(I), MOMENT(I)
Next I
For I = 1 To NN
  Print #2, I; Spc(3); Format(FX(I), "0.0E+"); Spc(4); Format(FY(I), "0.0E+"); Spc(4); Format(MOMENT(I), "0.0E+")
Next I
Print #2,
Print #2, "========================================="
Print #2, "输入约束条件"

End Sub
Public Sub DG(K) ';形成单元刚度矩阵
';For K = 1 To ELE
For I = 1 To 6
  For J = 1 To 6
   BKE(I, J) = 0#
  Next J
Next I
BKE(1, 1) = EA(K) / L(K)
BKE(2, 1) = 0#
BKE(2, 2) = 12 * EI(K) / L(K) * L(K) * L(K)
BKE(3, 1) = 0#
BKE(3, 2) = 6 * EI(K) / L(K) * L(K)
BKE(3, 3) = 4 * EI(K) / L(K)
BKE(4, 1) = -EA(K) / L(K)
BKE(4, 2) = 0#
BKE(4, 3) = 0#
BKE(4, 4) = EA(K) / L(K)
BKE(5, 1) = 0#
BKE(5, 2) = -12 * EI(K) / L(K) * L(K) * L(K)
BKE(5, 3) = -6 * EI(K) / L(K) * L(K)
BKE(5, 4) = 0#
BKE(5, 5) = 12 * EI(K) / L(K) * L(K) * L(K)
BKE(6, 1) = 0#
BKE(6, 2) = 6 * EI(K) / L(K) * L(K)
BKE(6, 3) = 2 * EI(K) / L(K)
BKE(6, 4) = 0#
BKE(6, 5) = -6 * EI(K) / L(K) * L(K)
BKE(6, 6) = 4 * EI(K) / L(K)
For I = 1 To 6
  For J = 1 To 6
   BKE(I, J) = BKE(J, I)
  Next J
Next I
'rint #2, K, "单刚"
'; For I = 1 To ELE
';  For J = 1 To ELE
';   Print #2, (Format(BKE(I, J), "0.000")); Spc(2);
';  Next J
';  Print #2,
'; Next I
'; Next K
End Sub
Public Sub Translate(K) ';形成坐标变换矩阵
'; For K = 1 To ELE
Cn = (X(RN(K)) - X(LN(K))) / L(K)
Sn = (Y(RN(K)) - Y(LN(K))) / L(K)
For I = 1 To 6
  For J = 1 To 6
   T(I, J) = 0#
  Next J
Next I
T(1, 1) = Cn
T(1, 2) = Sn
T(1, 3) = 0#
T(2, 1) = -Sn
T(2, 2) = Cn
T(2, 3) = 0#
T(3, 1) = 0#
T(3, 2) = 0#
T(3, 3) = 1#
For I = 1 To 3
  For J = 1 To 3
   T(I + 3, J + 3) = T(I, J)
  Next J
Next I
'; Print #2, K; "单元", "坐标变换矩阵"
';  For I = 1 To ELE
';   For J = 1 To ELE
';    Print #2, (Format(T(I, J), "0.000")); Spc(2);
';   Next J
';  Print #2,
';  Next I
'; Next K
';形成坐标变换矩阵的转置矩阵(逆矩阵)
For I = 1 To 6
  For J = 1 To 6
   TZ(I, J) = T(J, I)
  Next J
Next I
End Sub
Public Sub ZG() ';形成总体刚度矩阵
Dim M As Integer, M1 As Integer, H As Integer, H1 As Integer
Dim I As Integer, J As Integer, W As Integer, II As Integer, JJ As Integer
For I = 1 To MS
  For J = 1 To MS
   TKE(I, J) = 0#
  Next J
Next I
For W = 1 To ELE
';形成总体坐标的单元刚度矩阵
Call Translate(W)
Call DG(W)
Call MULT(BKE, T, G, 6, 6, 6)
Call MULT(TZ, G, TKE1, 6, 6, 6)
';形成总体刚度矩阵
For I = 1 To 2
  For II = 1 To 3
   M = 3 * (I - 1) + II
   M1 = 3 * (LRN(I, W) - 1) + I
   For J = 1 To 2
    For JJ = 1 To 3
     H = 3 * (J - 1) + JJ
     H1 = 3 * (LRN(J, W) - 1) + JJ
     TKE(M1, H1) = TKE(M1, H1) + TKE1(M, H)
     Next JJ
    Next J
   Next II
  Next I
Next W
Print #2, "总刚"
For I = 1 To MS
For J = 1 To MS
  Print #2, (Format(TKE(I, J), "0.0E+00")); Spc(2);
Next J
Print #2,
Next I
End Sub
Public Sub MULT(A, B, C, N1, N2, N3) ';矩阵相乘运算
Dim A(N1, N2) As Double, B(N2, N3) As Double, C(N1, N3) As Double
For I = 1 To N1
  For J = 1 To N3
   C(I, J) = 0#
  Next J
Next I
For I = 1 To N1
  For J = 1 To N3
   For K = 1 To N2
    C(I, J) = C(I, J) + A(I, K) * B(K, J)
   Next K
  Next J
Next I
End Sub
Public Sub GAS(A, B, N, X) ';高斯消元法
Dim K As Double, H As Double
For K = 1 To N - 1
For J = K + 1 To N
  A(K, J) = A(K, J) / A(K, K)
Next J
  B(K) = B(K) / A(K, K)
For I = K + 1 To N
  For J = K + 1 To N
   A(I, J) = A(I, J) - A(I, K) * A(K, J)
  Next J
  B(I) = B(I) - A(I, K) * B(K)
Next I
Next K
X(N) = B(N) / A(N, N)
For I = N - 1 To 1 Step -1
H = 0
For J = I + 1 To N
  H = H + A(I, J) * X(J)
Next J
X(I) = B(I) - H
Next I
End Sub
Public Sub load() ';形成结点荷载向量
For I = 1 To MS
  P(I) = 0#
Next I
P(1) = 0#
P(2) = 0#
P(3) = 0#
P(4) = 0#
P(5) = 0#
P(6) = 0#
P(7) = 0#
P(8) = 0#
P(9) = 0#
P(10) = 0#
P(11) = -100000
P(12) = 0#
P(13) = 35000
P(14) = 0#
P(15) = 0#
P(16) = 0#
P(17) = 0#
P(18) = 0#
P(19) = 0#
P(20) = 0#
P(21) = 0#
'rint #2, "结点荷载列向量"
';For I = 1 To MS
'; Print #2, (Format(P(I), "#.##E+"))
';Next I
End Sub
Public Sub Boundary() ';边界条件处理
For I = 4 To 5
  For J = 1 To MS
   TKE(I, J) = 0#
  Next J
Next I
For J = 4 To 5
  For I = 1 To MS
   TKE(I, J) = 0#
  Next I
Next J
For I = 19 To 20
  For J = 1 To MS
   TKE(I, J) = 0#
  Next J
Next I
For J = 19 To 20
  For I = 1 To MS
   TKE(I, J) = 0#
  Next I
Next J
For J = 1 To MS
  TKE(2, J) = 0#
Next J
For I = 1 To MS
  TKE(I, 2) = 0#
Next I
For J = 1 To MS
  TKE(17, J) = 0#
Next J
For I = 1 To MS
  TKE(I, 17) = 0#
Next I
TKE(2, 2) = 1#
TKE(4, 4) = 1#
TKE(5, 5) = 1#
TKE(17, 17) = 1#
TKE(19, 19) = 1#
TKE(20, 20) = 1#
End Sub
Public Sub Result() ';计算杆端位移和杆端力
Dim Q(1 To 6) As Double, F(1 To 6) As Double
Call GAS(TKE, P, MS, Z)
Call MULT(TKE, Z, P, MS, MS)
Print #2, "======================================"
Print #2, "计算数据输出"
Print #2, "======================================"
Print #2, "杆端位移"
Print #2, "结点号", "水平方向u", "垂直方向v", "转角fai"
Print #2, "======================================"
Print #2, "杆端力"
Print #2, "杆件号", "U(左端)"; Spc(4); "V(左端)"; Spc(4); "M(左端)"; Spc(4); "U(右端)"; Spc(4); "V(右端)"; Spc(4); "M(右端)"
For I = 1 To MS
  Print #2, Format(Z(I), "0.00E-00")
Next I
Print #2,
Print #2,
For I = 1 To MS
  Print #2, Format(P(I), "0.00000E+00")
Next I
End Sub
Public Sub MULT1(A, B, C, N1, N2) ';矩阵与向量相乘
For I = 1 To N1
  C(I) = 0#
Next I
For I = 1 To N1
  For J = 1 To N2
   C(I) = C(I) + A(I, J) * B(J)
  Next J
Next I
End Sub
发表于 2005-8-25 10:21:30 | 显示全部楼层

我有正版phoenics的北京培训资料,内有许多实例讲解,适合从零开始者

这个是算什么的啊?
不会是培训资料把
发表于 2005-8-25 10:24:50 | 显示全部楼层

我有正版phoenics的北京培训资料,内有许多实例讲解,适合从零开始者

能不能送一份给我这个初学者呢?万分感谢
zyhzjk1981@163.com
发表于 2005-8-25 15:25:22 | 显示全部楼层

我有正版phoenics的北京培训资料,内有许多实例讲解,适合从零开始者

培训教材应该是让人容易理解的,这些程序代码看不懂哦
能不能介绍些phoenics方面的教程/培训教材,感激不尽!
发表于 2005-9-7 10:56:37 | 显示全部楼层

我有正版phoenics的北京培训资料,内有许多实例讲解,适合从零开始者

能不能也傳一份給我剛接觸phoenics的初學者,tzu.tien@msa.hinet.net
发表于 2006-2-17 18:39:34 | 显示全部楼层

我有正版phoenics的北京培训资料,内有许多实例讲解,适合从零开始者

是什么啊,看不懂啊!
发表于 2006-2-18 20:57:47 | 显示全部楼层

我有正版phoenics的北京培训资料,内有许多实例讲解,适合从零开始者

兄台也传一份给我 yzthreestone@163.com 感谢
发表于 2006-3-18 15:27:07 | 显示全部楼层

我有正版phoenics的北京培训资料,内有许多实例讲解,适合从零开始者

能不能也傳一份給我,sr-77@yahoo.com.tw
发表于 2006-5-14 02:40:21 | 显示全部楼层

我有正版phoenics的北京培训资料,内有许多实例讲解,适合从零开始者

这个论坛很多帖子名不副实。
发表于 2007-1-19 00:18:58 | 显示全部楼层

我有正版phoenics的北京培训资料,内有许多实例讲解,适合从零开始者

这是天书吧?这哪里是给初学者的
发表于 2007-4-20 20:10:58 | 显示全部楼层

我有正版phoenics的北京培训资料,内有许多实例讲解,适合从零开始者

多放楼主,可以传我一份吗?yanghuaqiu@163.com
发表于 2007-12-9 10:46:55 | 显示全部楼层

我有正版phoenics的北京培训资料,内有许多实例讲解,适合从零开始者

我刚接触phoenics软件,希望能得到您的帮助。
能把资料给我传一份么,谢谢。
我的信箱wfzhss@163.com
发表于 2007-12-10 11:16:25 | 显示全部楼层

我有正版phoenics的北京培训资料,内有许多实例讲解,适合从零开始者

我想要一些,适合初学者,pp200023@hotmail.com
发表于 2007-12-14 15:31:55 | 显示全部楼层

我有正版phoenics的北京培训资料,内有许多实例讲解,适合从零开始者

这是什么啊?源程序?不会吧。
发表于 2008-1-2 08:40:20 | 显示全部楼层

我有正版phoenics的北京培训资料,内有许多实例讲解,适合从零开始者

就是啊。这个是什么啊。看不懂啊
再说培训资料也不会就这么少吧
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表