自己编写的VB程序,请大家多指教!(赚一点积分嘿嘿……)
部分代码如下:
Private Sub Command1_Click()
k = 1.4
D = Val(Text1.Text)
S = Val(Text2.Text)
Ne = Val(Text3.Text)
nh = Val(Text4.Text)
ε = Val(Text5.Text)
L = Val(Text6.Text)
R = Val(Text7.Text)
ge = Val(Text8.Text)
P0 = Val(Text13.Text)
T0 = Val(Text12.Text)
gc = Val(Text9.Text)
gh = Val(Text10.Text)
go = Val(Text11.Text)
mt = Val(Text14.Text)
i = Val(Text15.Text)
ι = Val(Text16.Text)
α = Val(Text38.Text)
ξz = Val(Text40.Text)
φi = Val(Text41.Text)
ηm = Val(Text42.Text)
n = Val(Text45.Text)
Vh = (S * 0.01) * 3.14 * (D * 0.01) ^ 2 / 4
'排气过程
Pr = 1 + 0.3 * n / nh
Tr = 850 + 350 * n / nh
Text17.Text = Val(Pr)
Text18.Text = Val(Tr)
'进气过程
δ = 0.5
ΔT = ΔTh * (110 - 0.0125 * n) / (110 - 0.0125 * nh)
Pa = Int(10 ^ 3 * (P0 * (1 - ((10 * n ^ 2 / 520 / 10 ^ 6) / 10.6 ^ 2 / 0.75 ^ 2) * (ε - δ) ^ 2 / (ε - 1) ^ 2) ^ (k / (k - 1)))) / 10 ^ 3
γ = Int(10 ^ 3 * (T0 + ΔT) * Pr / Tr / (ε * Pa - Pr)) / 10 ^ 3
Text44.Text = γ
Text19.Text = Pa
Ta = (T0 + ΔT + γ * Tr) / (1 + γ)
ηv = ε * Pa * T0 / (ε - 1) / P0 / Ta / (1 + γ)
Text20.Text = Val(Int(1000 * Ta) / 1000)
Text21.Text = Val(Int(1000 * ηv) / 1000)
' 压缩过程
n1 = 1.46 - 0.05 * Nn / n
Pc = Pa * ε ^ n1
Tc = Ta * ε ^ (n1 - 1)
Text22.Text = Val(Int(1000 * Pc) / 1000)
Text23.Text = Val(Int(1000 * Tc) / 1000)
'燃烧过程
L0 = (gc / 12 + gh / 4 - go / 32) / 0.21
M1 = α * L0 + 1 / mt
Cv1 = (4.815 + 0.415 * 10 ^ (-3) * Tc) * 4.1868
M2 = 0.79 * α * L0 + gh / 2 + gc / 12
A = (3.7 + 3.3 * α) * 10 ^ (-4) * 4.1868
B = (4.4 + 0.62 * α) * 4.1868
μ0 = M2 / M1
μ = (μ0 + γ)
1