yacimientos 2
DESCRIPTION
prueba del separadorTRANSCRIPT
-
REPASO DE LA PRUEBA DEL SEPARADORStock TankLiquidoHg PbSEPARADORGasGasLiquidoPor: Diego A. Castellanos SantamariaTy
-
CELDASEPARADORSTOCK TANK435126
Volumen de aceite a Presin de burbuja y temperatura de yacimiento.Volumen de gas removido del separador.
3) Volumen de gas removido del Stock tank.Volumen de liquido del Stock tank ( 0 psig y 60 F) Volumen de liquido del separador.
6) Volumen del liquido a presin standard pero a temperatura del separador.
-
RESULTADOS TIPICOS DE UNA PRUEBA DEL SEPARADORDatos de Moses 1986 SPE-AIME
Hoja1
TemperaturaRssbStock tankBosbfactor volu.Gravedad
Presiondel separadorGas / aceiteAPIFVFseparadorEspecifica
50757371.0310.84
a40.51.481
075411.0071.338
778
100756761.0620.768
a40.71.474
075921.0071.363
768
200756021.1120.732
a40.41.483
0751781.0071.329
780
300755491.1480.704
a40.11.495
0752461.0071.268
795
Hoja2
Hoja3
-
Condiciones para la optima presin del separadorRsSb MinimoBoSb MinimoAPI Maximo
Grfico1
40.5
40.7
40.4
40.1
API
Hoja1
5040.5
10040.7
20040.4
30040.1
5077840.51.481
10076840.71.474
20078040.41.483
30079540.11.495
1.48114.81
1001.47414.74
2001.48314.83
3001.49514.95
Hoja1
0
0
0
0
RsSb
Hoja2
0
0
0
0
API
Hoja3
0
0
0
0
BoSb
Grfico2
1.481
1.474
1.483
1.495
BoSb
Hoja1
5040.5
10040.7
20040.4
30040.1
5077840.51.481
10076840.71.474
20078040.41.483
30079540.11.495
1.48114.81
1001.47414.74
2001.48314.83
3001.49514.95
Hoja1
0
0
0
0
RsSb
Hoja2
0
0
0
0
API
Hoja3
0
0
0
0
BoSb
Grfico1
778
768
780
795
RsSb
Hoja1
PVZLZVFLFVDELTAFT (R)
1.49428326290.00051537410.99362580741.47590664721.4848143979-0.00890775084600
1.98464899450.00067448060.99197814241.96079378171.9688457689-0.008051987247010
2.72550984440.00091333520.98954509972.56900539552.6972875849-0.128282189448020
3.92573109250.00129806530.98567906753.3225549143.8702446907-0.547689776749030
8305.12417801890.00167298370.98221479544.24462075645.0345142309-0.789893474450040
4606.37971590350.00205805820.97891879675.3604105016.2477853922-0.887374891351050
7.75121002630.00247236330.97559637336.69662466887.5662044745-0.869579805652060
Etano (c2)n-Hexano (n-c6)9.29752566740.00293424020.97208626028.28123219739.0444833506-0.763251153353070
Propano (c3)n-Heptano (n-c7)11.07752810670.00346144950.968255583810.143216170610.7358259288-0.592609758254080
i-Butano (ic4)13.15008262430.00407132040.963995285112.312295419112.6917334094-0.379437990355090
n-Butano (n-c4)15.57405450010.00478089890.959216069314.818627910114.961734675-0.1431067648560100
n-Pentano (n-c5)18.51830901410.00564058650.953558139517.693094755417.6933244043-0.0002296489570110
22.09171144640.00668170940.946867054320.966430688520.9723096944-0.0058790058580120
26.17312707690.00786646830.939569450924.66745880324.674329971-0.006871168590130
Temperatura ( F )36030.81142118570.00920964550.931637642928.824917994428.829124909-0.0042069146600140
36.06545905270.01072958090.923026024733.466472801633.4722386811-0.0057658796610150
Presion de vapor (Psia)394.778041.97410595790.01243942890.91373965938.618139528238.6188954385-0.0007559103620160
48.60622718140.01436225240.90371913444.304501775244.3067123679-0.0022105927630170
Temperatura debe estar56.01068800310.01651644590.892953418950.54794872750.5527806608-0.0048319338640180
entre064.2363537030.01892202790.881432192857.368595974657.3710964005-0.0025004259650190
y37573.35208956120.02160689710.869105177964.784436081664.7879444136-0.003508332660200
83.41676085770.0245985160.85594441972.81072277672.8175042811-0.0067815051670210
94.47923287240.02792455990.841941035481.459693808481.4628490575-0.0031552491680220
106.61837088530.03162545480.827026592590.74136026790.7452626532-0.0039023862690230
119.89304017640.03574076860.811169938100.6623196405100.6669390427-0.0046194022700240
134.36210602580.04031644410.7943358043111.2260320006111.2264744539-0.0004424533710250
150.18443371350.04543631260.7762974769122.4364333582122.4823677555-0.0459343973720260
167.58888851930.05121633180.7566906442134.2986237113134.5223558597-0.2237321484730270
186.40433572350.05766794520.7358759829146.7993479163147.180415529-0.3810676127740280
206.68964060580.06488983630.7137668172159.929723779160.4390607144-0.5093369354750
228.50366844640.07300742260.6902511907173.6775153001174.2783620868-0.6008467867760
251.90528452520.08218446240.6651812326188.0270681931188.6763132359-0.6492450428770
276.95335412230.09264196220.6383561743202.959214677203.6092491758-0.6500344987780
303.70674251760.10469093520.6094936262218.4511185331219.052340917-0.6012223839790
332.22431499120.11879393510.5781773799234.4760057045234.9802148195-0.5042091149800
362.5649368230.13569417520.5437531645251.0026627024251.367805246-0.3651425436810
394.7874732930.15673461450.5050915034267.9943997842268.1917191354-0.1973193512820
428.95078968130.18489661450.4599348342285.4064474409285.433017287-0.0265698462830
488.10.26967019740.2696701974
Hoja1
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
00
Hoja2
Hoja2
i-Butano
Hoja3
MBD00000108.unknown
Attribute VB_Name = "Hoja1"Attribute VB_Base = "0{00020820-0000-0000-C000-000000000046}"Attribute VB_GlobalNameSpace = FalseAttribute VB_Creatable = FalseAttribute VB_PredeclaredId = TrueAttribute VB_Exposed = TrueAttribute VB_TemplateDerived = FalseAttribute VB_Customizable = TrueAttribute VB_Control = "CommandButton1, 1, 0, MSForms, CommandButton"Attribute VB_Control = "CommandButton2, 16, 1, MSForms, CommandButton"Attribute VB_Control = "OptionButton1, 17, 2, MSForms, OptionButton"Attribute VB_Control = "OptionButton2, 18, 3, MSForms, OptionButton"Attribute VB_Control = "OptionButton3, 20, 4, MSForms, OptionButton"Attribute VB_Control = "OptionButton4, 21, 5, MSForms, OptionButton"Attribute VB_Control = "OptionButton5, 22, 6, MSForms, OptionButton"Attribute VB_Control = "OptionButton6, 23, 7, MSForms, OptionButton"Attribute VB_Control = "OptionButton7, 24, 8, MSForms, OptionButton"Private Sub CommandButton1_Click()Dim cox3, cox2, cox, coind, XI, Xva, xli, fli, fva As DoubleDim a, b, tc, pc, error, errort As DoubleDim ALFApr, Mpr, Wpr, vc, zc As DoubleDim bmay, amay, pant, aa, bb, cc, dd, ii As DoubleDim delta, tlim, i, e, res, pl, pu, mul, fp, fl, flil, fval, absoluto, fpant As Double
Dim aviso As Integerr = 10.732ii = 0If OptionButton1.Value = True Then'propanovc = 0.0727tc = 666pc = 616.3Wpr = 0.1524pm = 44.097zc = pc * vc * pm / (r * tc)resi = 3tini = 465aa = 36.861114bb = 0.81955086cc = 0.0042410469dd = 0.000026245677tlim = 665Sheets("Hoja1").Cells(21, 2).Value = tini - 460Sheets("Hoja1").Cells(22, 2).Value = tlim - 460End If
If OptionButton2.Value = True Then'ibutanovc = 0.0714tc = 274.41 + 459.67pc = 527.9Wpr = 0.1852pm = 58.123zc = pc * vc * pm / (r * tc)resi = 0.6tini = 465aa = 10.452317bb = 0.33095835cc = 0.0012663153dd = 0.000015996642tlim = 725Sheets("Hoja1").Cells(21, 2).Value = tini - 460Sheets("Hoja1").Cells(22, 2).Value = tlim - 460End If
If OptionButton3.Value = True Then'n hexanovc = 0.0688tc = 451.68 + 460pc = 439.5Wpr = 0.299pm = 86.177zc = pc * vc * pm / (r * tc)resi = 2.21
tini = 525aa = -2.6111926bb = 0.15331891cc = -0.0013638154dd = 0.0000069844974
tlim = 880Sheets("Hoja1").Cells(21, 2).Value = tini - 460Sheets("Hoja1").Cells(22, 2).Value = tlim - 460End If
If OptionButton4.Value = True Then'Etanovc = 0.0783tc = 90.07 + 460pc = 707.8Wpr = 0.0972pm = 30.07zc = pc * vc * pm / (r * tc)resi = 1.5
tini = 460aa = 219.74623bb = 3.3665728cc = 0.018361742dd = 0.000049109669tlim = 460 + 80Sheets("Hoja1").Cells(21, 2).Value = tini - 460Sheets("Hoja1").Cells(22, 2).Value = tlim - 460End If
If OptionButton6.Value = True Then'npentanovc = 0.0695tc = 385.7 + 460pc = 488.1Wpr = 0.251pm = 72.15zc = pc * vc * pm / (r * tc)resi = 0.4
tini = 460aa = 0.43601437bb = 0.14656582cc = -0.00090156358dd = 0.00000981088tlim = 460 + 375Sheets("Hoja1").Cells(21, 2).Value = tini - 460Sheets("Hoja1").Cells(22, 2).Value = tlim - 460End IfIf OptionButton5.Value = True Then'nbutanovc = 0.0703tc = 305.51 + 460pc = 548.8Wpr = 0.1981pm = 58.123zc = pc * vc * pm / (r * tc)resi = 1
tini = 460aa = 6.5155946bb = 0.2450658cc = 0.00055792289dd = 0.00001451968tlim = 460 + 290Sheets("Hoja1").Cells(21, 2).Value = tini - 460Sheets("Hoja1").Cells(22, 2).Value = tlim - 460End If
t = tiniDo While (t < tlim)Sheets("Hoja1").Cells(7, 1).Value = ta = 0.45724 * (r ^ 2) * (tc ^ 2) / pcb = 0.0778 * r * tc / pcMpr = 0.379642 + (1.54226 * Wpr) - (0.2699 * (Wpr ^ 2)) + (0.016667 * (Wpr ^ 3))ALFApr = (1 + Mpr * (1 - ((t / tc) ^ 0.5))) ^ 2e = 2.71828182845905errort = 100p = (aa + (bb * (t - 459.67)) + cc * ((t - 459.67) ^ 2) + dd * ((t - 459.67) ^ 3)) - resifp = 500aviso = 0Do While (aviso = 0)fpant = fp
amay = a * ALFApr * p / ((r * t) ^ 2)bmay = (b * p) / (r * t)cox3 = 1cox2 = -(1 - bmay)cox = ((amay) - (2 * bmay) - (3 * (bmay ^ 2)))coxind = -((amay * bmay) - (bmay ^ 2) - (bmay ^ 3))XI = -1error = 100Do While (error > 0.000000000165602)
xli = XI - (((cox3 * (XI ^ 3)) + (cox2 * (XI ^ 2)) + (cox * XI) + (coxind)) / ((3 * cox3 * (XI ^ 2)) + (2 * cox2 * XI) + cox))
error = Abs((xli - XI) / xli) * 100
XI = xliLoop
XI = 1error = 100
Do While (error > 0.000000000165602)
Xva = XI - (((cox3 * (XI ^ 3)) + (cox2 * (XI ^ 2)) + (cox * XI) + (coxind)) / ((3 * cox3 * (XI ^ 2)) + (2 * cox2 * XI) + cox))
error = Abs((Xva - XI) / Xva) * 100
XI = XvaLoop
fli = p * (e ^ (xli - 1 - (Log(xli - bmay)) - ((amay / (bmay * 2.8284271)) * (Log((xli + (bmay * 2.4142135)) / (xli - (bmay * 0.4142135)))))))fva = p * (e ^ (Xva - 1 - (Log(Xva - bmay)) - ((amay / (bmay * 2.8284271)) * (Log((Xva + (bmay * 2.4142135)) / (Xva - (bmay * 0.4142135)))))))
fp = fli - fvaIf Abs(fp) > 0.0001 ThenIf (fp * fpant) < 0 Thenaviso = 1End IfEnd If
p = p + 0.01
LoopSheets("Hoja1").Cells(6, 1).Value = tSheets("Hoja1").Cells(2 + ii, 3).Value = (p - 0.01)Sheets("Hoja1").Cells(2 + ii, 4).Value = xliSheets("Hoja1").Cells(2 + ii, 5).Value = XvaSheets("Hoja1").Cells(2 + ii, 6).Value = fliSheets("Hoja1").Cells(2 + ii, 7).Value = fvaSheets("Hoja1").Cells(2 + ii, 8).Value = fpSheets("Hoja1").Cells(2 + ii, 9).Value = tii = ii + 1t = t + 10LoopSheets("Hoja1").Cells(2 + ii, 3).Value = pcSheets("Hoja1").Cells(2 + ii, 4).Value = zcSheets("Hoja1").Cells(2 + ii, 5).Value = zc'una solo temperatura
t = Sheets("Hoja1").Cells(16, 2).Value + 460If t > tini And t < tlim Thena = 0.45724 * (r ^ 2) * (tc ^ 2) / pcb = 0.0778 * r * tc / pcMpr = 0.379642 + (1.54226 * Wpr) - (0.2699 * (Wpr ^ 2)) + (0.016667 * (Wpr ^ 3))ALFApr = (1 + Mpr * (1 - ((t / tc) ^ 0.5))) ^ 2e = 2.71828182845905errort = 100p = (aa + (bb * (t - 459.67)) + cc * ((t - 459.67) ^ 2) + dd * ((t - 459.67) ^ 3)) - resifp = 500aviso = 0Do While (aviso = 0)fpant = fp
amay = a * ALFApr * p / ((r * t) ^ 2)bmay = (b * p) / (r * t)cox3 = 1cox2 = -(1 - bmay)cox = ((amay) - (2 * bmay) - (3 * (bmay ^ 2)))coxind = -((amay * bmay) - (bmay ^ 2) - (bmay ^ 3))XI = -1error = 100Do While (error > 0.000000000165602)
xli = XI - (((cox3 * (XI ^ 3)) + (cox2 * (XI ^ 2)) + (cox * XI) + (coxind)) / ((3 * cox3 * (XI ^ 2)) + (2 * cox2 * XI) + cox))
error = Abs((xli - XI) / xli) * 100
XI = xliLoop
XI = 1error = 100
Do While (error > 0.000000000165602)
Xva = XI - (((cox3 * (XI ^ 3)) + (cox2 * (XI ^ 2)) + (cox * XI) + (coxind)) / ((3 * cox3 * (XI ^ 2)) + (2 * cox2 * XI) + cox))
error = Abs((Xva - XI) / Xva) * 100
XI = XvaLoop
fli = p * (e ^ (xli - 1 - (Log(xli - bmay)) - ((amay / (bmay * 2.8284271)) * (Log((xli + (bmay * 2.4142135)) / (xli - (bmay * 0.4142135)))))))fva = p * (e ^ (Xva - 1 - (Log(Xva - bmay)) - ((amay / (bmay * 2.8284271)) * (Log((Xva + (bmay * 2.4142135)) / (Xva - (bmay * 0.4142135)))))))fp = fli - fvaIf Abs(fp) > 0.00001 ThenIf (fp * fpant) < 0 Thenaviso = 1End IfEnd If
p = p + 0.0005
Loop
Sheets("Hoja1").Cells(18, 2).Value = (p - 0.01)
ElseSheets("Hoja1").Cells(21, 2).Value = tini - 460Sheets("Hoja1").Cells(22, 2).Value = tlim - 460End If
End Sub
Private Sub CommandButton2_Click()For i = 2 To 100For j = 3 To 8Sheets("Hoja1").Cells(i, j).Value = ClearNext jNext i
End Sub
Attribute VB_Name = "ThisWorkbook"Attribute VB_Base = "0{00020819-0000-0000-C000-000000000046}"Attribute VB_GlobalNameSpace = FalseAttribute VB_Creatable = FalseAttribute VB_PredeclaredId = TrueAttribute VB_Exposed = TrueAttribute VB_TemplateDerived = FalseAttribute VB_Customizable = True
Attribute VB_Name = "Hoja2"Attribute VB_Base = "0{00020820-0000-0000-C000-000000000046}"Attribute VB_GlobalNameSpace = FalseAttribute VB_Creatable = FalseAttribute VB_PredeclaredId = TrueAttribute VB_Exposed = TrueAttribute VB_TemplateDerived = FalseAttribute VB_Customizable = True
Attribute VB_Name = "Hoja3"Attribute VB_Base = "0{00020820-0000-0000-C000-000000000046}"Attribute VB_GlobalNameSpace = FalseAttribute VB_Creatable = FalseAttribute VB_PredeclaredId = TrueAttribute VB_Exposed = TrueAttribute VB_TemplateDerived = FalseAttribute VB_Customizable = True
MBD000002B8.unknown
Attribute VB_Name = "Hoja1"Attribute VB_Base = "0{00020820-0000-0000-C000-000000000046}"Attribute VB_GlobalNameSpace = FalseAttribute VB_Creatable = FalseAttribute VB_PredeclaredId = TrueAttribute VB_Exposed = TrueAttribute VB_TemplateDerived = FalseAttribute VB_Customizable = TrueAttribute VB_Control = "CommandButton1, 1, 0, MSForms, CommandButton"Attribute VB_Control = "CommandButton2, 16, 1, MSForms, CommandButton"Attribute VB_Control = "OptionButton1, 17, 2, MSForms, OptionButton"Attribute VB_Control = "OptionButton2, 18, 3, MSForms, OptionButton"Attribute VB_Control = "OptionButton3, 20, 4, MSForms, OptionButton"Attribute VB_Control = "OptionButton4, 21, 5, MSForms, OptionButton"Attribute VB_Control = "OptionButton5, 22, 6, MSForms, OptionButton"Attribute VB_Control = "OptionButton6, 23, 7, MSForms, OptionButton"Attribute VB_Control = "OptionButton7, 24, 8, MSForms, OptionButton"Private Sub CommandButton1_Click()Dim cox3, cox2, cox, coind, XI, Xva, xli, fli, fva As DoubleDim a, b, tc, pc, error, errort As DoubleDim ALFApr, Mpr, Wpr, vc, zc As DoubleDim bmay, amay, pant, aa, bb, cc, dd, ii As DoubleDim delta, tlim, i, e, res, pl, pu, mul, fp, fl, flil, fval, absoluto, fpant As Double
Dim aviso As Integerr = 10.732ii = 0If OptionButton1.Value = True Then'propanovc = 0.0727tc = 666pc = 616.3Wpr = 0.1524pm = 44.097zc = pc * vc * pm / (r * tc)resi = 3tini = 465aa = 36.861114bb = 0.81955086cc = 0.0042410469dd = 0.000026245677tlim = 665Sheets("Hoja1").Cells(21, 2).Value = tini - 460Sheets("Hoja1").Cells(22, 2).Value = tlim - 460End If
If OptionButton2.Value = True Then'ibutanovc = 0.0714tc = 274.41 + 459.67pc = 527.9Wpr = 0.1852pm = 58.123zc = pc * vc * pm / (r * tc)resi = 0.6tini = 465aa = 10.452317bb = 0.33095835cc = 0.0012663153dd = 0.000015996642tlim = 725Sheets("Hoja1").Cells(21, 2).Value = tini - 460Sheets("Hoja1").Cells(22, 2).Value = tlim - 460End If
If OptionButton3.Value = True Then'n hexanovc = 0.0688tc = 451.68 + 460pc = 439.5Wpr = 0.299pm = 86.177zc = pc * vc * pm / (r * tc)resi = 2.21
tini = 525aa = -2.6111926bb = 0.15331891cc = -0.0013638154dd = 0.0000069844974
tlim = 880Sheets("Hoja1").Cells(21, 2).Value = tini - 460Sheets("Hoja1").Cells(22, 2).Value = tlim - 460End If
If OptionButton4.Value = True Then'Etanovc = 0.0783tc = 90.07 + 460pc = 707.8Wpr = 0.0972pm = 30.07zc = pc * vc * pm / (r * tc)resi = 1.5
tini = 460aa = 219.74623bb = 3.3665728cc = 0.018361742dd = 0.000049109669tlim = 460 + 80Sheets("Hoja1").Cells(21, 2).Value = tini - 460Sheets("Hoja1").Cells(22, 2).Value = tlim - 460End If
If OptionButton6.Value = True Then'npentanovc = 0.0695tc = 385.7 + 460pc = 488.1Wpr = 0.251pm = 72.15zc = pc * vc * pm / (r * tc)resi = 0.4
tini = 460aa = 0.43601437bb = 0.14656582cc = -0.00090156358dd = 0.00000981088tlim = 460 + 375Sheets("Hoja1").Cells(21, 2).Value = tini - 460Sheets("Hoja1").Cells(22, 2).Value = tlim - 460End IfIf OptionButton5.Value = True Then'nbutanovc = 0.0703tc = 305.51 + 460pc = 548.8Wpr = 0.1981pm = 58.123zc = pc * vc * pm / (r * tc)resi = 1
tini = 460aa = 6.5155946bb = 0.2450658cc = 0.00055792289dd = 0.00001451968tlim = 460 + 290Sheets("Hoja1").Cells(21, 2).Value = tini - 460Sheets("Hoja1").Cells(22, 2).Value = tlim - 460End If
t = tiniDo While (t < tlim)Sheets("Hoja1").Cells(7, 1).Value = ta = 0.45724 * (r ^ 2) * (tc ^ 2) / pcb = 0.0778 * r * tc / pcMpr = 0.379642 + (1.54226 * Wpr) - (0.2699 * (Wpr ^ 2)) + (0.016667 * (Wpr ^ 3))ALFApr = (1 + Mpr * (1 - ((t / tc) ^ 0.5))) ^ 2e = 2.71828182845905errort = 100p = (aa + (bb * (t - 459.67)) + cc * ((t - 459.67) ^ 2) + dd * ((t - 459.67) ^ 3)) - resifp = 500aviso = 0Do While (aviso = 0)fpant = fp
amay = a * ALFApr * p / ((r * t) ^ 2)bmay = (b * p) / (r * t)cox3 = 1cox2 = -(1 - bmay)cox = ((amay) - (2 * bmay) - (3 * (bmay ^ 2)))coxind = -((amay * bmay) - (bmay ^ 2) - (bmay ^ 3))XI = -1error = 100Do While (error > 0.000000000165602)
xli = XI - (((cox3 * (XI ^ 3)) + (cox2 * (XI ^ 2)) + (cox * XI) + (coxind)) / ((3 * cox3 * (XI ^ 2)) + (2 * cox2 * XI) + cox))
error = Abs((xli - XI) / xli) * 100
XI = xliLoop
XI = 1error = 100
Do While (error > 0.000000000165602)
Xva = XI - (((cox3 * (XI ^ 3)) + (cox2 * (XI ^ 2)) + (cox * XI) + (coxind)) / ((3 * cox3 * (XI ^ 2)) + (2 * cox2 * XI) + cox))
error = Abs((Xva - XI) / Xva) * 100
XI = XvaLoop
fli = p * (e ^ (xli - 1 - (Log(xli - bmay)) - ((amay / (bmay * 2.8284271)) * (Log((xli + (bmay * 2.4142135)) / (xli - (bmay * 0.4142135)))))))fva = p * (e ^ (Xva - 1 - (Log(Xva - bmay)) - ((amay / (bmay * 2.8284271)) * (Log((Xva + (bmay * 2.4142135)) / (Xva - (bmay * 0.4142135)))))))
fp = fli - fvaIf Abs(fp) > 0.0001 ThenIf (fp * fpant) < 0 Thenaviso = 1End IfEnd If
p = p + 0.01
LoopSheets("Hoja1").Cells(6, 1).Value = tSheets("Hoja1").Cells(2 + ii, 3).Value = (p - 0.01)Sheets("Hoja1").Cells(2 + ii, 4).Value = xliSheets("Hoja1").Cells(2 + ii, 5).Value = XvaSheets("Hoja1").Cells(2 + ii, 6).Value = fliSheets("Hoja1").Cells(2 + ii, 7).Value = fvaSheets("Hoja1").Cells(2 + ii, 8).Value = fpSheets("Hoja1").Cells(2 + ii, 9).Value = tii = ii + 1t = t + 10LoopSheets("Hoja1").Cells(2 + ii, 3).Value = pcSheets("Hoja1").Cells(2 + ii, 4).Value = zcSheets("Hoja1").Cells(2 + ii, 5).Value = zc'una solo temperatura
t = Sheets("Hoja1").Cells(16, 2).Value + 460If t > tini And t < tlim Thena = 0.45724 * (r ^ 2) * (tc ^ 2) / pcb = 0.0778 * r * tc / pcMpr = 0.379642 + (1.54226 * Wpr) - (0.2699 * (Wpr ^ 2)) + (0.016667 * (Wpr ^ 3))ALFApr = (1 + Mpr * (1 - ((t / tc) ^ 0.5))) ^ 2e = 2.71828182845905errort = 100p = (aa + (bb * (t - 459.67)) + cc * ((t - 459.67) ^ 2) + dd * ((t - 459.67) ^ 3)) - resifp = 500aviso = 0Do While (aviso = 0)fpant = fp
amay = a * ALFApr * p / ((r * t) ^ 2)bmay = (b * p) / (r * t)cox3 = 1cox2 = -(1 - bmay)cox = ((amay) - (2 * bmay) - (3 * (bmay ^ 2)))coxind = -((amay * bmay) - (bmay ^ 2) - (bmay ^ 3))XI = -1error = 100Do While (error > 0.000000000165602)
xli = XI - (((cox3 * (XI ^ 3)) + (cox2 * (XI ^ 2)) + (cox * XI) + (coxind)) / ((3 * cox3 * (XI ^ 2)) + (2 * cox2 * XI) + cox))
error = Abs((xli - XI) / xli) * 100
XI = xliLoop
XI = 1error = 100
Do While (error > 0.000000000165602)
Xva = XI - (((cox3 * (XI ^ 3)) + (cox2 * (XI ^ 2)) + (cox * XI) + (coxind)) / ((3 * cox3 * (XI ^ 2)) + (2 * cox2 * XI) + cox))
error = Abs((Xva - XI) / Xva) * 100
XI = XvaLoop
fli = p * (e ^ (xli - 1 - (Log(xli - bmay)) - ((amay / (bmay * 2.8284271)) * (Log((xli + (bmay * 2.4142135)) / (xli - (bmay * 0.4142135)))))))fva = p * (e ^ (Xva - 1 - (Log(Xva - bmay)) - ((amay / (bmay * 2.8284271)) * (Log((Xva + (bmay * 2.4142135)) / (Xva - (bmay * 0.4142135)))))))fp = fli - fvaIf Abs(fp) > 0.00001 ThenIf (fp * fpant) < 0 Thenaviso = 1End IfEnd If
p = p + 0.0005
Loop
Sheets("Hoja1").Cells(18, 2).Value = (p - 0.01)
ElseSheets("Hoja1").Cells(21, 2).Value = tini - 460Sheets("Hoja1").Cells(22, 2).Value = tlim - 460End If
End Sub
Private Sub CommandButton2_Click()For i = 2 To 100For j = 3 To 8Sheets("Hoja1").Cells(i, j).Value = ClearNext jNext i
End Sub
Attribute VB_Name = "ThisWorkbook"Attribute VB_Base = "0{00020819-0000-0000-C000-000000000046}"Attribute VB_GlobalNameSpace = FalseAttribute VB_Creatable = FalseAttribute VB_PredeclaredId = TrueAttribute VB_Exposed = TrueAttribute VB_TemplateDerived = FalseAttribute VB_Customizable = True
Attribute VB_Name = "Hoja2"Attribute VB_Base = "0{00020820-0000-0000-C000-000000000046}"Attribute VB_GlobalNameSpace = FalseAttribute VB_Creatable = FalseAttribute VB_PredeclaredId = TrueAttribute VB_Exposed = TrueAttribute VB_TemplateDerived = FalseAttribute VB_Customizable = True
Attribute VB_Name = "Hoja3"Attribute VB_Base = "0{00020820-0000-0000-C000-000000000046}"Attribute VB_GlobalNameSpace = FalseAttribute VB_Creatable = FalseAttribute VB_PredeclaredId = TrueAttribute VB_Exposed = TrueAttribute VB_TemplateDerived = FalseAttribute VB_Customizable = True
MBD0000E9AC.unknown
Attribute VB_Name = "Hoja1"Attribute VB_Base = "0{00020820-0000-0000-C000-000000000046}"Attribute VB_GlobalNameSpace = FalseAttribute VB_Creatable = FalseAttribute VB_PredeclaredId = TrueAttribute VB_Exposed = TrueAttribute VB_TemplateDerived = FalseAttribute VB_Customizable = TrueAttribute VB_Control = "CommandButton1, 1, 0, MSForms, CommandButton"Attribute VB_Control = "CommandButton2, 16, 1, MSForms, CommandButton"Attribute VB_Control = "OptionButton1, 17, 2, MSForms, OptionButton"Attribute VB_Control = "OptionButton2, 18, 3, MSForms, OptionButton"Attribute VB_Control = "OptionButton3, 20, 4, MSForms, OptionButton"Attribute VB_Control = "OptionButton4, 21, 5, MSForms, OptionButton"Attribute VB_Control = "OptionButton5, 22, 6, MSForms, OptionButton"Attribute VB_Control = "OptionButton6, 23, 7, MSForms, OptionButton"Attribute VB_Control = "OptionButton7, 24, 8, MSForms, OptionButton"Private Sub CommandButton1_Click()Dim cox3, cox2, cox, coind, XI, Xva, xli, fli, fva As DoubleDim a, b, tc, pc, error, errort As DoubleDim ALFApr, Mpr, Wpr, vc, zc As DoubleDim bmay, amay, pant, aa, bb, cc, dd, ii As DoubleDim delta, tlim, i, e, res, pl, pu, mul, fp, fl, flil, fval, absoluto, fpant As Double
Dim aviso As Integerr = 10.732ii = 0If OptionButton1.Value = True Then'propanovc = 0.0727tc = 666pc = 616.3Wpr = 0.1524pm = 44.097zc = pc * vc * pm / (r * tc)resi = 3tini = 465aa = 36.861114bb = 0.81955086cc = 0.0042410469dd = 0.000026245677tlim = 665Sheets("Hoja1").Cells(21, 2).Value = tini - 460Sheets("Hoja1").Cells(22, 2).Value = tlim - 460End If
If OptionButton2.Value = True Then'ibutanovc = 0.0714tc = 274.41 + 459.67pc = 527.9Wpr = 0.1852pm = 58.123zc = pc * vc * pm / (r * tc)resi = 0.6tini = 465aa = 10.452317bb = 0.33095835cc = 0.0012663153dd = 0.000015996642tlim = 725Sheets("Hoja1").Cells(21, 2).Value = tini - 460Sheets("Hoja1").Cells(22, 2).Value = tlim - 460End If
If OptionButton3.Value = True Then'n hexanovc = 0.0688tc = 451.68 + 460pc = 439.5Wpr = 0.299pm = 86.177zc = pc * vc * pm / (r * tc)resi = 2.21
tini = 525aa = -2.6111926bb = 0.15331891cc = -0.0013638154dd = 0.0000069844974
tlim = 880Sheets("Hoja1").Cells(21, 2).Value = tini - 460Sheets("Hoja1").Cells(22, 2).Value = tlim - 460End If
If OptionButton4.Value = True Then'Etanovc = 0.0783tc = 90.07 + 460pc = 707.8Wpr = 0.0972pm = 30.07zc = pc * vc * pm / (r * tc)resi = 1.5
tini = 460aa = 219.74623bb = 3.3665728cc = 0.018361742dd = 0.000049109669tlim = 460 + 80Sheets("Hoja1").Cells(21, 2).Value = tini - 460Sheets("Hoja1").Cells(22, 2).Value = tlim - 460End If
If OptionButton6.Value = True Then'npentanovc = 0.0695tc = 385.7 + 460pc = 488.1Wpr = 0.251pm = 72.15zc = pc * vc * pm / (r * tc)resi = 0.4
tini = 460aa = 0.43601437bb = 0.14656582cc = -0.00090156358dd = 0.00000981088tlim = 460 + 375Sheets("Hoja1").Cells(21, 2).Value = tini - 460Sheets("Hoja1").Cells(22, 2).Value = tlim - 460End IfIf OptionButton5.Value = True Then'nbutanovc = 0.0703tc = 305.51 + 460pc = 548.8Wpr = 0.1981pm = 58.123zc = pc * vc * pm / (r * tc)resi = 1
tini = 460aa = 6.5155946bb = 0.2450658cc = 0.00055792289dd = 0.00001451968tlim = 460 + 290Sheets("Hoja1").Cells(21, 2).Value = tini - 460Sheets("Hoja1").Cells(22, 2).Value = tlim - 460End If
t = tiniDo While (t < tlim)Sheets("Hoja1").Cells(7, 1).Value = ta = 0.45724 * (r ^ 2) * (tc ^ 2) / pcb = 0.0778 * r * tc / pcMpr = 0.379642 + (1.54226 * Wpr) - (0.2699 * (Wpr ^ 2)) + (0.016667 * (Wpr ^ 3))ALFApr = (1 + Mpr * (1 - ((t / tc) ^ 0.5))) ^ 2e = 2.71828182845905errort = 100p = (aa + (bb * (t - 459.67)) + cc * ((t - 459.67) ^ 2) + dd * ((t - 459.67) ^ 3)) - resifp = 500aviso = 0Do While (aviso = 0)fpant = fp
amay = a * ALFApr * p / ((r * t) ^ 2)bmay = (b * p) / (r * t)cox3 = 1cox2 = -(1 - bmay)cox = ((amay) - (2 * bmay) - (3 * (bmay ^ 2)))coxind = -((amay * bmay) - (bmay ^ 2) - (bmay ^ 3))XI = -1error = 100Do While (error > 0.000000000165602)
xli = XI - (((cox3 * (XI ^ 3)) + (cox2 * (XI ^ 2)) + (cox * XI) + (coxind)) / ((3 * cox3 * (XI ^ 2)) + (2 * cox2 * XI) + cox))
error = Abs((xli - XI) / xli) * 100
XI = xliLoop
XI = 1error = 100
Do While (error > 0.000000000165602)
Xva = XI - (((cox3 * (XI ^ 3)) + (cox2 * (XI ^ 2)) + (cox * XI) + (coxind)) / ((3 * cox3 * (XI ^ 2)) + (2 * cox2 * XI) + cox))
error = Abs((Xva - XI) / Xva) * 100
XI = XvaLoop
fli = p * (e ^ (xli - 1 - (Log(xli - bmay)) - ((amay / (bmay * 2.8284271)) * (Log((xli + (bmay * 2.4142135)) / (xli - (bmay * 0.4142135)))))))fva = p * (e ^ (Xva - 1 - (Log(Xva - bmay)) - ((amay / (bmay * 2.8284271)) * (Log((Xva + (bmay * 2.4142135)) / (Xva - (bmay * 0.4142135)))))))
fp = fli - fvaIf Abs(fp) > 0.0001 ThenIf (fp * fpant) < 0 Thenaviso = 1End IfEnd If
p = p + 0.01
LoopSheets("Hoja1").Cells(6, 1).Value = tSheets("Hoja1").Cells(2 + ii, 3).Value = (p - 0.01)Sheets("Hoja1").Cells(2 + ii, 4).Value = xliSheets("Hoja1").Cells(2 + ii, 5).Value = XvaSheets("Hoja1").Cells(2 + ii, 6).Value = fliSheets("Hoja1").Cells(2 + ii, 7).Value = fvaSheets("Hoja1").Cells(2 + ii, 8).Value = fpSheets("Hoja1").Cells(2 + ii, 9).Value = tii = ii + 1t = t + 10LoopSheets("Hoja1").Cells(2 + ii, 3).Value = pcSheets("Hoja1").Cells(2 + ii, 4).Value = zcSheets("Hoja1").Cells(2 + ii, 5).Value = zc'una solo temperatura
t = Sheets("Hoja1").Cells(16, 2).Value + 460If t > tini And t < tlim Thena = 0.45724 * (r ^ 2) * (tc ^ 2) / pcb = 0.0778 * r * tc / pcMpr = 0.379642 + (1.54226 * Wpr) - (0.2699 * (Wpr ^ 2)) + (0.016667 * (Wpr ^ 3))ALFApr = (1 + Mpr * (1 - ((t / tc) ^ 0.5))) ^ 2e = 2.71828182845905errort = 100p = (aa + (bb * (t - 459.67)) + cc * ((t - 459.67) ^ 2) + dd * ((t - 459.67) ^ 3)) - resifp = 500aviso = 0Do While (aviso = 0)fpant = fp
amay = a * ALFApr * p / ((r * t) ^ 2)bmay = (b * p) / (r * t)cox3 = 1cox2 = -(1 - bmay)cox = ((amay) - (2 * bmay) - (3 * (bmay ^ 2)))coxind = -((amay * bmay) - (bmay ^ 2) - (bmay ^ 3))XI = -1error = 100Do While (error > 0.000000000165602)
xli = XI - (((cox3 * (XI ^ 3)) + (cox2 * (XI ^ 2)) + (cox * XI) + (coxind)) / ((3 * cox3 * (XI ^ 2)) + (2 * cox2 * XI) + cox))
error = Abs((xli - XI) / xli) * 100
XI = xliLoop
XI = 1error = 100
Do While (error > 0.000000000165602)
Xva = XI - (((cox3 * (XI ^ 3)) + (cox2 * (XI ^ 2)) + (cox * XI) + (coxind)) / ((3 * cox3 * (XI ^ 2)) + (2 * cox2 * XI) + cox))
error = Abs((Xva - XI) / Xva) * 100
XI = XvaLoop
fli = p * (e ^ (xli - 1 - (Log(xli - bmay)) - ((amay / (bmay * 2.8284271)) * (Log((xli + (bmay * 2.4142135)) / (xli - (bmay * 0.4142135)))))))fva = p * (e ^ (Xva - 1 - (Log(Xva - bmay)) - ((amay / (bmay * 2.8284271)) * (Log((Xva + (bmay * 2.4142135)) / (Xva - (bmay * 0.4142135)))))))fp = fli - fvaIf Abs(fp) > 0.00001 ThenIf (fp * fpant) < 0 Thenaviso = 1End IfEnd If
p = p + 0.0005
Loop
Sheets("Hoja1").Cells(18, 2).Value = (p - 0.01)
ElseSheets("Hoja1").Cells(21, 2).Value = tini - 460Sheets("Hoja1").Cells(22, 2).Value = tlim - 460End If
End Sub
Private Sub CommandButton2_Click()For i = 2 To 100For j = 3 To 8Sheets("Hoja1").Cells(i, j).Value = ClearNext jNext i
End Sub
Attribute VB_Name = "ThisWorkbook"Attribute VB_Base = "0{00020819-0000-0000-C000-000000000046}"Attribute VB_GlobalNameSpace = FalseAttribute VB_Creatable = FalseAttribute VB_PredeclaredId = TrueAttribute VB_Exposed = TrueAttribute VB_TemplateDerived = FalseAttribute VB_Customizable = True
Attribute VB_Name = "Hoja2"Attribute VB_Base = "0{00020820-0000-0000-C000-000000000046}"Attribute VB_GlobalNameSpace = FalseAttribute VB_Creatable = FalseAttribute VB_PredeclaredId = TrueAttribute VB_Exposed = TrueAttribute VB_TemplateDerived = FalseAttribute VB_Customizable = True
Attribute VB_Name = "Hoja3"Attribute VB_Base = "0{00020820-0000-0000-C000-000000000046}"Attribute VB_GlobalNameSpace = FalseAttribute VB_Creatable = FalseAttribute VB_PredeclaredId = TrueAttribute VB_Exposed = TrueAttribute VB_TemplateDerived = FalseAttribute VB_Customizable = True
MBD0007DB3A.unknown
Attribute VB_Name = "Hoja1"Attribute VB_Base = "0{00020820-0000-0000-C000-000000000046}"Attribute VB_GlobalNameSpace = FalseAttribute VB_Creatable = FalseAttribute VB_PredeclaredId = TrueAttribute VB_Exposed = TrueAttribute VB_TemplateDerived = FalseAttribute VB_Customizable = TrueAttribute VB_Control = "CommandButton1, 1, 0, MSForms, CommandButton"Attribute VB_Control = "CommandButton2, 16, 1, MSForms, CommandButton"Attribute VB_Control = "OptionButton1, 17, 2, MSForms, OptionButton"Attribute VB_Control = "OptionButton2, 18, 3, MSForms, OptionButton"Attribute VB_Control = "OptionButton3, 20, 4, MSForms, OptionButton"Attribute VB_Control = "OptionButton4, 21, 5, MSForms, OptionButton"Attribute VB_Control = "OptionButton5, 22, 6, MSForms, OptionButton"Attribute VB_Control = "OptionButton6, 23, 7, MSForms, OptionButton"Attribute VB_Control = "OptionButton7, 24, 8, MSForms, OptionButton"Private Sub CommandButton1_Click()Dim cox3, cox2, cox, coind, XI, Xva, xli, fli, fva As DoubleDim a, b, tc, pc, error, errort As DoubleDim ALFApr, Mpr, Wpr, vc, zc As DoubleDim bmay, amay, pant, aa, bb, cc, dd, ii As DoubleDim delta, tlim, i, e, res, pl, pu, mul, fp, fl, flil, fval, absoluto, fpant As Double
Dim aviso As Integerr = 10.732ii = 0If OptionButton1.Value = True Then'propanovc = 0.0727tc = 666pc = 616.3Wpr = 0.1524pm = 44.097zc = pc * vc * pm / (r * tc)resi = 3tini = 465aa = 36.861114bb = 0.81955086cc = 0.0042410469dd = 0.000026245677tlim = 665Sheets("Hoja1").Cells(21, 2).Value = tini - 460Sheets("Hoja1").Cells(22, 2).Value = tlim - 460End If
If OptionButton2.Value = True Then'ibutanovc = 0.0714tc = 274.41 + 459.67pc = 527.9Wpr = 0.1852pm = 58.123zc = pc * vc * pm / (r * tc)resi = 0.6tini = 465aa = 10.452317bb = 0.33095835cc = 0.0012663153dd = 0.000015996642tlim = 725Sheets("Hoja1").Cells(21, 2).Value = tini - 460Sheets("Hoja1").Cells(22, 2).Value = tlim - 460End If
If OptionButton3.Value = True Then'n hexanovc = 0.0688tc = 451.68 + 460pc = 439.5Wpr = 0.299pm = 86.177zc = pc * vc * pm / (r * tc)resi = 2.21
tini = 525aa = -2.6111926bb = 0.15331891cc = -0.0013638154dd = 0.0000069844974
tlim = 880Sheets("Hoja1").Cells(21, 2).Value = tini - 460Sheets("Hoja1").Cells(22, 2).Value = tlim - 460End If
If OptionButton4.Value = True Then'Etanovc = 0.0783tc = 90.07 + 460pc = 707.8Wpr = 0.0972pm = 30.07zc = pc * vc * pm / (r * tc)resi = 1.5
tini = 460aa = 219.74623bb = 3.3665728cc = 0.018361742dd = 0.000049109669tlim = 460 + 80Sheets("Hoja1").Cells(21, 2).Value = tini - 460Sheets("Hoja1").Cells(22, 2).Value = tlim - 460End If
If OptionButton6.Value = True Then'npentanovc = 0.0695tc = 385.7 + 460pc = 488.1Wpr = 0.251pm = 72.15zc = pc * vc * pm / (r * tc)resi = 0.4
tini = 460aa = 0.43601437bb = 0.14656582cc = -0.00090156358dd = 0.00000981088tlim = 460 + 375Sheets("Hoja1").Cells(21, 2).Value = tini - 460Sheets("Hoja1").Cells(22, 2).Value = tlim - 460End IfIf OptionButton5.Value = True Then'nbutanovc = 0.0703tc = 305.51 + 460pc = 548.8Wpr = 0.1981pm = 58.123zc = pc * vc * pm / (r * tc)resi = 1
tini = 460aa = 6.5155946bb = 0.2450658cc = 0.00055792289dd = 0.00001451968tlim = 460 + 290Sheets("Hoja1").Cells(21, 2).Value = tini - 460Sheets("Hoja1").Cells(22, 2).Value = tlim - 460End If
t = tiniDo While (t < tlim)Sheets("Hoja1").Cells(7, 1).Value = ta = 0.45724 * (r ^ 2) * (tc ^ 2) / pcb = 0.0778 * r * tc / pcMpr = 0.379642 + (1.54226 * Wpr) - (0.2699 * (Wpr ^ 2)) + (0.016667 * (Wpr ^ 3))ALFApr = (1 + Mpr * (1 - ((t / tc) ^ 0.5))) ^ 2e = 2.71828182845905errort = 100p = (aa + (bb * (t - 459.67)) + cc * ((t - 459.67) ^ 2) + dd * ((t - 459.67) ^ 3)) - resifp = 500aviso = 0Do While (aviso = 0)fpant = fp
amay = a * ALFApr * p / ((r * t) ^ 2)bmay = (b * p) / (r * t)cox3 = 1cox2 = -(1 - bmay)cox = ((amay) - (2 * bmay) - (3 * (bmay ^ 2)))coxind = -((amay * bmay) - (bmay ^ 2) - (bmay ^ 3))XI = -1error = 100Do While (error > 0.000000000165602)
xli = XI - (((cox3 * (XI ^ 3)) + (cox2 * (XI ^ 2)) + (cox * XI) + (coxind)) / ((3 * cox3 * (XI ^ 2)) + (2 * cox2 * XI) + cox))
error = Abs((xli - XI) / xli) * 100
XI = xliLoop
XI = 1error = 100
Do While (error > 0.000000000165602)
Xva = XI - (((cox3 * (XI ^ 3)) + (cox2 * (XI ^ 2)) + (cox * XI) + (coxind)) / ((3 * cox3 * (XI ^ 2)) + (2 * cox2 * XI) + cox))
error = Abs((Xva - XI) / Xva) * 100
XI = XvaLoop
fli = p * (e ^ (xli - 1 - (Log(xli - bmay)) - ((amay / (bmay * 2.8284271)) * (Log((xli + (bmay * 2.4142135)) / (xli - (bmay * 0.4142135)))))))fva = p * (e ^ (Xva - 1 - (Log(Xva - bmay)) - ((amay / (bmay * 2.8284271)) * (Log((Xva + (bmay * 2.4142135)) / (Xva - (bmay * 0.4142135)))))))
fp = fli - fvaIf Abs(fp) > 0.0001 ThenIf (fp * fpant) < 0 Thenaviso = 1End IfEnd If
p = p + 0.01
LoopSheets("Hoja1").Cells(6, 1).Value = tSheets("Hoja1").Cells(2 + ii, 3).Value = (p - 0.01)Sheets("Hoja1").Cells(2 + ii, 4).Value = xliSheets("Hoja1").Cells(2 + ii, 5).Value = XvaSheets("Hoja1").Cells(2 + ii, 6).Value = fliSheets("Hoja1").Cells(2 + ii, 7).Value = fvaSheets("Hoja1").Cells(2 + ii, 8).Value = fpSheets("Hoja1").Cells(2 + ii, 9).Value = tii = ii + 1t = t + 10LoopSheets("Hoja1").Cells(2 + ii, 3).Value = pcSheets("Hoja1").Cells(2 + ii, 4).Value = zcSheets("Hoja1").Cells(2 + ii, 5).Value = zc'una solo temperatura
t = Sheets("Hoja1").Cells(16, 2).Value + 460If t > tini And t < tlim Thena = 0.45724 * (r ^ 2) * (tc ^ 2) / pcb = 0.0778 * r * tc / pcMpr = 0.379642 + (1.54226 * Wpr) - (0.2699 * (Wpr ^ 2)) + (0.016667 * (Wpr ^ 3))ALFApr = (1 + Mpr * (1 - ((t / tc) ^ 0.5))) ^ 2e = 2.71828182845905errort = 100p = (aa + (bb * (t - 459.67)) + cc * ((t - 459.67) ^ 2) + dd * ((t - 459.67) ^ 3)) - resifp = 500aviso = 0Do While (aviso = 0)fpant = fp
amay = a * ALFApr * p / ((r * t) ^ 2)bmay = (b * p) / (r * t)cox3 = 1cox2 = -(1 - bmay)cox = ((amay) - (2 * bmay) - (3 * (bmay ^ 2)))coxind = -((amay * bmay) - (bmay ^ 2) - (bmay ^ 3))XI = -1error = 100Do While (error > 0.000000000165602)
xli = XI - (((cox3 * (XI ^ 3)) + (cox2 * (XI ^ 2)) + (cox * XI) + (coxind)) / ((3 * cox3 * (XI ^ 2)) + (2 * cox2 * XI) + cox))
error = Abs((xli - XI) / xli) * 100
XI = xliLoop
XI = 1error = 100
Do While (error > 0.000000000165602)
Xva = XI - (((cox3 * (XI ^ 3)) + (cox2 * (XI ^ 2)) + (cox * XI) + (coxind)) / ((3 * cox3 * (XI ^ 2)) + (2 * cox2 * XI) + cox))
error = Abs((Xva - XI) / Xva) * 100
XI = XvaLoop
fli = p * (e ^ (xli - 1 - (Log(xli - bmay)) - ((amay / (bmay * 2.8284271)) * (Log((xli + (bmay * 2.4142135)) / (xli - (bmay * 0.4142135)))))))fva = p * (e ^ (Xva - 1 - (Log(Xva - bmay)) - ((amay / (bmay * 2.8284271)) * (Log((Xva + (bmay * 2.4142135)) / (Xva - (bmay * 0.4142135)))))))fp = fli - fvaIf Abs(fp) > 0.00001 ThenIf (fp * fpant) < 0 Thenaviso = 1End IfEnd If
p = p + 0.0005
Loop
Sheets("Hoja1").Cells(18, 2).Value = (p - 0.01)
ElseSheets("Hoja1").Cells(21, 2).Value = tini - 460Sheets("Hoja1").Cells(22, 2).Value = tlim - 460End If
End Sub
Private Sub CommandButton2_Click()For i = 2 To 100For j = 3 To 8Sheets("Hoja1").Cells(i, j).Value = ClearNext jNext i
End Sub
Attribute VB_Name = "ThisWorkbook"Attribute VB_Base = "0{00020819-0000-0000-C000-000000000046}"Attribute VB_GlobalNameSpace = FalseAttribute VB_Creatable = FalseAttribute VB_PredeclaredId = TrueAttribute VB_Exposed = TrueAttribute VB_TemplateDerived = FalseAttribute VB_Customizable = True
Attribute VB_Name = "Hoja2"Attribute VB_Base = "0{00020820-0000-0000-C000-000000000046}"Attribute VB_GlobalNameSpace = FalseAttribute VB_Creatable = FalseAttribute VB_PredeclaredId = TrueAttribute VB_Exposed = TrueAttribute VB_TemplateDerived = FalseAttribute VB_Customizable = True
Attribute VB_Name = "Hoja3"Attribute VB_Base = "0{00020820-0000-0000-C000-000000000046}"Attribute VB_GlobalNameSpace = FalseAttribute VB_Creatable = FalseAttribute VB_PredeclaredId = TrueAttribute VB_Exposed = TrueAttribute VB_TemplateDerived = FalseAttribute VB_Customizable = True
MBD00074DE9.unknown
Attribute VB_Name = "Hoja1"Attribute VB_Base = "0{00020820-0000-0000-C000-000000000046}"Attribute VB_GlobalNameSpace = FalseAttribute VB_Creatable = FalseAttribute VB_PredeclaredId = TrueAttribute VB_Exposed = TrueAttribute VB_TemplateDerived = FalseAttribute VB_Customizable = TrueAttribute VB_Control = "CommandButton1, 1, 0, MSForms, CommandButton"Attribute VB_Control = "CommandButton2, 16, 1, MSForms, CommandButton"Attribute VB_Control = "OptionButton1, 17, 2, MSForms, OptionButton"Attribute VB_Control = "OptionButton2, 18, 3, MSForms, OptionButton"Attribute VB_Control = "OptionButton3, 20, 4, MSForms, OptionButton"Attribute VB_Control = "OptionButton4, 21, 5, MSForms, OptionButton"Attribute VB_Control = "OptionButton5, 22, 6, MSForms, OptionButton"Attribute VB_Control = "OptionButton6, 23, 7, MSForms, OptionButton"Attribute VB_Control = "OptionButton7, 24, 8, MSForms, OptionButton"Private Sub CommandButton1_Click()Dim cox3, cox2, cox, coind, XI, Xva, xli, fli, fva As DoubleDim a, b, tc, pc, error, errort As DoubleDim ALFApr, Mpr, Wpr, vc, zc As DoubleDim bmay, amay, pant, aa, bb, cc, dd, ii As DoubleDim delta, tlim, i, e, res, pl, pu, mul, fp, fl, flil, fval, absoluto, fpant As Double
Dim aviso As Integerr = 10.732ii = 0If OptionButton1.Value = True Then'propanovc = 0.0727tc = 666pc = 616.3Wpr = 0.1524pm = 44.097zc = pc * vc * pm / (r * tc)resi = 3tini = 465aa = 36.861114bb = 0.81955086cc = 0.0042410469dd = 0.000026245677tlim = 665Sheets("Hoja1").Cells(21, 2).Value = tini - 460Sheets("Hoja1").Cells(22, 2).Value = tlim - 460End If
If OptionButton2.Value = True Then'ibutanovc = 0.0714tc = 274.41 + 459.67pc = 527.9Wpr = 0.1852pm = 58.123zc = pc * vc * pm / (r * tc)resi = 0.6tini = 465aa = 10.452317bb = 0.33095835cc = 0.0012663153dd = 0.000015996642tlim = 725Sheets("Hoja1").Cells(21, 2).Value = tini - 460Sheets("Hoja1").Cells(22, 2).Value = tlim - 460End If
If OptionButton3.Value = True Then'n hexanovc = 0.0688tc = 451.68 + 460pc = 439.5Wpr = 0.299pm = 86.177zc = pc * vc * pm / (r * tc)resi = 2.21
tini = 525aa = -2.6111926bb = 0.15331891cc = -0.0013638154dd = 0.0000069844974
tlim = 880Sheets("Hoja1").Cells(21, 2).Value = tini - 460Sheets("Hoja1").Cells(22, 2).Value = tlim - 460End If
If OptionButton4.Value = True Then'Etanovc = 0.0783tc = 90.07 + 460pc = 707.8Wpr = 0.0972pm = 30.07zc = pc * vc * pm / (r * tc)resi = 1.5
tini = 460aa = 219.74623bb = 3.3665728cc = 0.018361742dd = 0.000049109669tlim = 460 + 80Sheets("Hoja1").Cells(21, 2).Value = tini - 460Sheets("Hoja1").Cells(22, 2).Value = tlim - 460End If
If OptionButton6.Value = True Then'npentanovc = 0.0695tc = 385.7 + 460pc = 488.1Wpr = 0.251pm = 72.15zc = pc * vc * pm / (r * tc)resi = 0.4
tini = 460aa = 0.43601437bb = 0.14656582cc = -0.00090156358dd = 0.00000981088tlim = 460 + 375Sheets("Hoja1").Cells(21, 2).Value = tini - 460Sheets("Hoja1").Cells(22, 2).Value = tlim - 460End IfIf OptionButton5.Value = True Then'nbutanovc = 0.0703tc = 305.51 + 460pc = 548.8Wpr = 0.1981pm = 58.123zc = pc * vc * pm / (r * tc)resi = 1
tini = 460aa = 6.5155946bb = 0.2450658cc = 0.00055792289dd = 0.00001451968tlim = 460 + 290Sheets("Hoja1").Cells(21, 2).Value = tini - 460Sheets("Hoja1").Cells(22, 2).Value = tlim - 460End If
t = tiniDo While (t < tlim)Sheets("Hoja1").Cells(7, 1).Value = ta = 0.45724 * (r ^ 2) * (tc ^ 2) / pcb = 0.0778 * r * tc / pcMpr = 0.379642 + (1.54226 * Wpr) - (0.2699 * (Wpr ^ 2)) + (0.016667 * (Wpr ^ 3))ALFApr = (1 + Mpr * (1 - ((t / tc) ^ 0.5))) ^ 2e = 2.71828182845905errort = 100p = (aa + (bb * (t - 459.67)) + cc * ((t - 459.67) ^ 2) + dd * ((t - 459.67) ^ 3)) - resifp = 500aviso = 0Do While (aviso = 0)fpant = fp
amay = a * ALFApr * p / ((r * t) ^ 2)bmay = (b * p) / (r * t)cox3 = 1cox2 = -(1 - bmay)cox = ((amay) - (2 * bmay) - (3 * (bmay ^ 2)))coxind = -((amay * bmay) - (bmay ^ 2) - (bmay ^ 3))XI = -1error = 100Do While (error > 0.000000000165602)
xli = XI - (((cox3 * (XI ^ 3)) + (cox2 * (XI ^ 2)) + (cox * XI) + (coxind)) / ((3 * cox3 * (XI ^ 2)) + (2 * cox2 * XI) + cox))
error = Abs((xli - XI) / xli) * 100
XI = xliLoop
XI = 1error = 100
Do While (error > 0.000000000165602)
Xva = XI - (((cox3 * (XI ^ 3)) + (cox2 * (XI ^ 2)) + (cox * XI) + (coxind)) / ((3 * cox3 * (XI ^ 2)) + (2 * cox2 * XI) + cox))
error = Abs((Xva - XI) / Xva) * 100
XI = XvaLoop
fli = p * (e ^ (xli - 1 - (Log(xli - bmay)) - ((amay / (bmay * 2.8284271)) * (Log((xli + (bmay * 2.4142135)) / (xli - (bmay * 0.4142135)))))))fva = p * (e ^ (Xva - 1 - (Log(Xva - bmay)) - ((amay / (bmay * 2.8284271)) * (Log((Xva + (bmay * 2.4142135)) / (Xva - (bmay * 0.4142135)))))))
fp = fli - fvaIf Abs(fp) > 0.0001 ThenIf (fp * fpant) < 0 Thenaviso = 1End IfEnd If
p = p + 0.01
LoopSheets("Hoja1").Cells(6, 1).Value = tSheets("Hoja1").Cells(2 + ii, 3).Value = (p - 0.01)Sheets("Hoja1").Cells(2 + ii, 4).Value = xliSheets("Hoja1").Cells(2 + ii, 5).Value = XvaSheets("Hoja1").Cells(2 + ii, 6).Value = fliSheets("Hoja1").Cells(2 + ii, 7).Value = fvaSheets("Hoja1").Cells(2 + ii, 8).Value = fpSheets("Hoja1").Cells(2 + ii, 9).Value = tii = ii + 1t = t + 10LoopSheets("Hoja1").Cells(2 + ii, 3).Value = pcSheets("Hoja1").Cells(2 + ii, 4).Value = zcSheets("Hoja1").Cells(2 + ii, 5).Value = zc'una solo temperatura
t = Sheets("Hoja1").Cells(16, 2).Value + 460If t > tini And t < tlim Thena = 0.45724 * (r ^ 2) * (tc ^ 2) / pcb = 0.0778 * r * tc / pcMpr = 0.379642 + (1.54226 * Wpr) - (0.2699 * (Wpr ^ 2)) + (0.016667 * (Wpr ^ 3))ALFApr = (1 + Mpr * (1 - ((t / tc) ^ 0.5))) ^ 2e = 2.71828182845905errort = 100p = (aa + (bb * (t - 459.67)) + cc * ((t - 459.67) ^ 2) + dd * ((t - 459.67) ^ 3)) - resifp = 500aviso = 0Do While (aviso = 0)fpant = fp
amay = a * ALFApr * p / ((r * t) ^ 2)bmay = (b * p) / (r * t)cox3 = 1cox2 = -(1 - bmay)cox = ((amay) - (2 * bmay) - (3 * (bmay ^ 2)))coxind = -((amay * bmay) - (bmay ^ 2) - (bmay ^ 3))XI = -1error = 100Do While (error > 0.000000000165602)
xli = XI - (((cox3 * (XI ^ 3)) + (cox2 * (XI ^ 2)) + (cox * XI) + (coxind)) / ((3 * cox3 * (XI ^ 2)) + (2 * cox2 * XI) + cox))
error = Abs((xli - XI) / xli) * 100
XI = xliLoop
XI = 1error = 100
Do While (error > 0.000000000165602)
Xva = XI - (((cox3 * (XI ^ 3)) + (cox2 * (XI ^ 2)) + (cox * XI) + (coxind)) / ((3 * cox3 * (XI ^ 2)) + (2 * cox2 * XI) + cox))
error = Abs((Xva - XI) / Xva) * 100
XI = XvaLoop
fli = p * (e ^ (xli - 1 - (Log(xli - bmay)) - ((amay / (bmay * 2.8284271)) * (Log((xli + (bmay * 2.4142135)) / (xli - (bmay * 0.4142135)))))))fva = p * (e ^ (Xva - 1 - (Log(Xva - bmay)) - ((amay / (bmay * 2.8284271)) * (Log((Xva + (bmay * 2.4142135)) / (Xva - (bmay * 0.4142135)))))))fp = fli - fvaIf Abs(fp) > 0.00001 ThenIf (fp * fpant) < 0 Thenaviso = 1End IfEnd If
p = p + 0.0005
Loop
Sheets("Hoja1").Cells(18, 2).Value = (p - 0.01)
ElseSheets("Hoja1").Cells(21, 2).Value = tini - 460Sheets("Hoja1").Cells(22, 2).Value = tlim - 460End If
End Sub
Private Sub CommandButton2_Click()For i = 2 To 100For j = 3 To 8Sheets("Hoja1").Cells(i, j).Value = ClearNext jNext i
End Sub
Attribute VB_Name = "ThisWorkbook"Attribute VB_Base = "0{00020819-0000-0000-C000-000000000046}"Attribute VB_GlobalNameSpace = FalseAttribute VB_Creatable = FalseAttribute VB_PredeclaredId = TrueAttribute VB_Exposed = TrueAttribute VB_TemplateDerived = FalseAttribute VB_Customizable = True
Attribute VB_Name = "Hoja2"Attribute VB_Base = "0{00020820-0000-0000-C000-000000000046}"Attribute VB_GlobalNameSpace = FalseAttribute VB_Creatable = FalseAttribute VB_PredeclaredId = TrueAttribute VB_Exposed = TrueAttribute VB_TemplateDerived = FalseAttribute VB_Customizable = True
Attribute VB_Name = "Hoja3"Attribute VB_Base = "0{00020820-0000-0000-C000-000000000046}"Attribute VB_GlobalNameSpace = FalseAttribute VB_Creatable = FalseAttribute VB_PredeclaredId = TrueAttribute VB_Exposed = TrueAttribute VB_TemplateDerived = FalseAttribute VB_Customizable = True
MBD00000324.unknown
Attribute VB_Name = "Hoja1"Attribute VB_Base = "0{00020820-0000-0000-C000-000000000046}"Attribute VB_GlobalNameSpace = FalseAttribute VB_Creatable = FalseAttribute VB_PredeclaredId = TrueAttribute VB_Exposed = TrueAttribute VB_TemplateDerived = FalseAttribute VB_Customizable = TrueAttribute VB_Control = "CommandButton1, 1, 0, MSForms, CommandButton"Attribute VB_Control = "CommandButton2, 16, 1, MSForms, CommandButton"Attribute VB_Control = "OptionButton1, 17, 2, MSForms, OptionButton"Attribute VB_Control = "OptionButton2, 18, 3, MSForms, OptionButton"Attribute VB_Control = "OptionButton3, 20, 4, MSForms, OptionButton"Attribute VB_Control = "OptionButton4, 21, 5, MSForms, OptionButton"Attribute VB_Control = "OptionButton5, 22, 6, MSForms, OptionButton"Attribute VB_Control = "OptionButton6, 23, 7, MSForms, OptionButton"Attribute VB_Control = "OptionButton7, 24, 8, MSForms, OptionButton"Private Sub CommandButton1_Click()Dim cox3, cox2, cox, coind, XI, Xva, xli, fli, fva As DoubleDim a, b, tc, pc, error, errort As DoubleDim ALFApr, Mpr, Wpr, vc, zc As DoubleDim bmay, amay, pant, aa, bb, cc, dd, ii As DoubleDim delta, tlim, i, e, res, pl, pu, mul, fp, fl, flil, fval, absoluto, fpant As Double
Dim aviso As Integerr = 10.732ii = 0If OptionButton1.Value = True Then'propanovc = 0.0727tc = 666pc = 616.3Wpr = 0.1524pm = 44.097zc = pc * vc * pm / (r * tc)resi = 3tini = 465aa = 36.861114bb = 0.81955086cc = 0.0042410469dd = 0.000026245677tlim = 665Sheets("Hoja1").Cells(21, 2).Value = tini - 460Sheets("Hoja1").Cells(22, 2).Value = tlim - 460End If
If OptionButton2.Value = True Then'ibutanovc = 0.0714tc = 274.41 + 459.67pc = 527.9Wpr = 0.1852pm = 58.123zc = pc * vc * pm / (r * tc)resi = 0.6tini = 465aa = 10.452317bb = 0.33095835cc = 0.0012663153dd = 0.000015996642tlim = 725Sheets("Hoja1").Cells(21, 2).Value = tini - 460Sheets("Hoja1").Cells(22, 2).Value = tlim - 460End If
If OptionButton3.Value = True Then'n hexanovc = 0.0688tc = 451.68 + 460pc = 439.5Wpr = 0.299pm = 86.177zc = pc * vc * pm / (r * tc)resi = 2.21
tini = 525aa = -2.6111926bb = 0.15331891cc = -0.0013638154dd = 0.0000069844974
tlim = 880Sheets("Hoja1").Cells(21, 2).Value = tini - 460Sheets("Hoja1").Cells(22, 2).Value = tlim - 460End If
If OptionButton4.Value = True Then'Etanovc = 0.0783tc = 90.07 + 460pc = 707.8Wpr = 0.0972pm = 30.07zc = pc * vc * pm / (r * tc)resi = 1.5
tini = 460aa = 219.74623bb = 3.3665728cc = 0.018361742dd = 0.000049109669tlim = 460 + 80Sheets("Hoja1").Cells(21, 2).Value = tini - 460Sheets("Hoja1").Cells(22, 2).Value = tlim - 460End If
If OptionButton6.Value = True Then'npentanovc = 0.0695tc = 385.7 + 460pc = 488.1Wpr = 0.251pm = 72.15zc = pc * vc * pm / (r * tc)resi = 0.4
tini = 460aa = 0.43601437bb = 0.14656582cc = -0.00090156358dd = 0.00000981088tlim = 460 + 375Sheets("Hoja1").Cells(21, 2).Value = tini - 460Sheets("Hoja1").Cells(22, 2).Value = tlim - 460End IfIf OptionButton5.Value = True Then'nbutanovc = 0.0703tc = 305.51 + 460pc = 548.8Wpr = 0.1981pm = 58.123zc = pc * vc * pm / (r * tc)resi = 1
tini = 460aa = 6.5155946bb = 0.2450658cc = 0.00055792289dd = 0.00001451968tlim = 460 + 290Sheets("Hoja1").Cells(21, 2).Value = tini - 460Sheets("Hoja1").Cells(22, 2).Value = tlim - 460End If
t = tiniDo While (t < tlim)Sheets("Hoja1").Cells(7, 1).Value = ta = 0.45724 * (r ^ 2) * (tc ^ 2) / pcb = 0.0778 * r * tc / pcMpr = 0.379642 + (1.54226 * Wpr) - (0.2699 * (Wpr ^ 2)) + (0.016667 * (Wpr ^ 3))ALFApr = (1 + Mpr * (1 - ((t / tc) ^ 0.5))) ^ 2e = 2.71828182845905errort = 100p = (aa + (bb * (t - 459.67)) + cc * ((t - 459.67) ^ 2) + dd * ((t - 459.67) ^ 3)) - resifp = 500aviso = 0Do While (aviso = 0)fpant = fp
amay = a * ALFApr * p / ((r * t) ^ 2)bmay = (b * p) / (r * t)cox3 = 1cox2 = -(1 - bmay)cox = ((amay) - (2 * bmay) - (3 * (bmay ^ 2)))coxind = -((amay * bmay) - (bmay ^ 2) - (bmay ^ 3))XI = -1error = 100Do While (error > 0.000000000165602)
xli = XI - (((cox3 * (XI ^ 3)) + (cox2 * (XI ^ 2)) + (cox * XI) + (coxind)) / ((3 * cox3 * (XI ^ 2)) + (2 * cox2 * XI) + cox))
error = Abs((xli - XI) / xli) * 100
XI = xliLoop
XI = 1error = 100
Do While (error > 0.000000000165602)
Xva = XI - (((cox3 * (XI ^ 3)) + (cox2 * (XI ^ 2)) + (cox * XI) + (coxind)) / ((3 * cox3 * (XI ^ 2)) + (2 * cox2 * XI) + cox))
error = Abs((Xva - XI) / Xva) * 100
XI = XvaLoop
fli = p * (e ^ (xli - 1 - (Log(xli - bmay)) - ((amay / (bmay * 2.8284271)) * (Log((xli + (bmay * 2.4142135)) / (xli - (bmay * 0.4142135)))))))fva = p * (e ^ (Xva - 1 - (Log(Xva - bmay)) - ((amay / (bmay * 2.8284271)) * (Log((Xva + (bmay * 2.4142135)) / (Xva - (bmay * 0.4142135)))))))
fp = fli - fvaIf Abs(fp) > 0.0001 ThenIf (fp * fpant) < 0 Thenaviso = 1End IfEnd If
p = p + 0.01
LoopSheets("Hoja1").Cells(6, 1).Value = tSheets("Hoja1").Cells(2 + ii, 3).Value = (p - 0.01)Sheets("Hoja1").Cells(2 + ii, 4).Value = xliSheets("Hoja1").Cells(2 + ii, 5).Value = XvaSheets("Hoja1").Cells(2 + ii, 6).Value = fliSheets("Hoja1").Cells(2 + ii, 7).Value = fvaSheets("Hoja1").Cells(2 + ii, 8).Value = fpSheets("Hoja1").Cells(2 + ii, 9).Value = tii = ii + 1t = t + 10LoopSheets("Hoja1").Cells(2 + ii, 3).Value = pcSheets("Hoja1").Cells(2 + ii, 4).Value = zcSheets("Hoja1").Cells(2 + ii, 5).Value = zc'una solo temperatura
t = Sheets("Hoja1").Cells(16, 2).Value + 460If t > tini And t < tlim Thena = 0.45724 * (r ^ 2) * (tc ^ 2) / pcb = 0.0778 * r * tc / pcMpr = 0.379642 + (1.54226 * Wpr) - (0.2699 * (Wpr ^ 2)) + (0.016667 * (Wpr ^ 3))ALFApr = (1 + Mpr * (1 - ((t / tc) ^ 0.5))) ^ 2e = 2.71828182845905errort = 100p = (aa + (bb * (t - 459.67)) + cc * ((t - 459.67) ^ 2) + dd * ((t - 459.67) ^ 3)) - resifp = 500aviso = 0Do While (aviso = 0)fpant = fp
amay = a * ALFApr * p / ((r * t) ^ 2)bmay = (b * p) / (r * t)cox3 = 1cox2 = -(1 - bmay)cox = ((amay) - (2 * bmay) - (3 * (bmay ^ 2)))coxind = -((amay * bmay) - (bmay ^ 2) - (bmay ^ 3))XI = -1error = 100Do While (error > 0.000000000165602)
xli = XI - (((cox3 * (XI ^ 3)) + (cox2 * (XI ^ 2)) + (cox * XI) + (coxind)) / ((3 * cox3 * (XI ^ 2)) + (2 * cox2 * XI) + cox))
error = Abs((xli - XI) / xli) * 100
XI = xliLoop
XI = 1error = 100
Do While (error > 0.000000000165602)
Xva = XI - (((cox3 * (XI ^ 3)) + (cox2 * (XI ^ 2)) + (cox * XI) + (coxind)) / ((3 * cox3 * (XI ^ 2)) + (2 * cox2 * XI) + cox))
error = Abs((Xva - XI) / Xva) * 100
XI = XvaLoop
fli = p * (e ^ (xli - 1 - (Log(xli - bmay)) - ((amay / (bmay * 2.8284271)) * (Log((xli + (bmay * 2.4142135)) / (xli - (bmay * 0.4142135)))))))fva = p * (e ^ (Xva - 1 - (Log(Xva - bmay)) - ((amay / (bmay * 2.8284271)) * (Log((Xva + (bmay * 2.4142135)) / (Xva - (bmay * 0.4142135)))))))fp = fli - fvaIf Abs(fp) > 0.00001 ThenIf (fp * fpant) < 0 Thenaviso = 1End IfEnd If
p = p + 0.0005
Loop
Sheets("Hoja1").Cells(18, 2).Value = (p - 0.01)
ElseSheets("Hoja1").Cells(21, 2).Value = tini - 460Sheets("Hoja1").Cells(22, 2).Value = tlim - 460End If
End Sub
Private Sub CommandButton2_Click()For i = 2 To 100For j = 3 To 8Sheets("Hoja1").Cells(i, j).Value = ClearNext jNext i
End Sub
Attribute VB_Name = "ThisWorkbook"Attribute VB_Base = "0{00020819-0000-0000-C000-000000000046}"Attribute VB_GlobalNameSpace = FalseAttribute VB_Creatable = FalseAttribute VB_PredeclaredId = TrueAttribute VB_Exposed = TrueAttribute VB_TemplateDerived = FalseAttribute VB_Customizable = True
Attribute VB_Name = "Hoja2"Attribute VB_Base = "0{00020820-0000-0000-C000-000000000046}"Attribute VB_GlobalNameSpace = FalseAttribute VB_Creatable = FalseAttribute VB_PredeclaredId = TrueAttribute VB_Exposed = TrueAttribute VB_TemplateDerived = FalseAttribute VB_Customizable = True
Attribute VB_Name = "Hoja3"Attribute VB_Base = "0{00020820-0000-0000-C000-000000000046}"Attribute VB_GlobalNameSpace = FalseAttribute VB_Creatable = FalseAttribute VB_PredeclaredId = TrueAttribute VB_Exposed = TrueAttribute VB_TemplateDerived = FalseAttribute VB_Customizable = True
MBD000001E0.unknown
Attribute VB_Name = "Hoja1"Attribute VB_Base = "0{00020820-0000-0000-C000-000000000046}"Attribute VB_GlobalNameSpace = FalseAttribute VB_Creatable = FalseAttribute VB_PredeclaredId = TrueAttribute VB_Exposed = TrueAttribute VB_TemplateDerived = FalseAttribute VB_Customizable = TrueAttribute VB_Control = "CommandButton1, 1, 0, MSForms, CommandButton"Attribute VB_Control = "CommandButton2, 16, 1, MSForms, CommandButton"Attribute VB_Control = "OptionButton1, 17, 2, MSForms, OptionButton"Attribute VB_Control = "OptionButton2, 18, 3, MSForms, OptionButton"Attribute VB_Control = "OptionButton3, 20, 4, MSForms, OptionButton"Attribute VB_Control = "OptionButton4, 21, 5, MSForms, OptionButton"Attribute VB_Control = "OptionButton5, 22, 6, MSForms, OptionButton"Attribute VB_Control = "OptionButton6, 23, 7, MSForms, OptionButton"Attribute VB_Control = "OptionButton7, 24, 8, MSForms, OptionButton"Private Sub CommandButton1_Click()Dim cox3, cox2, cox, coind, XI, Xva, xli, fli, fva As DoubleDim a, b, tc, pc, error, errort As DoubleDim ALFApr, Mpr, Wpr, vc, zc As DoubleDim bmay, amay, pant, aa, bb, cc, dd, ii As DoubleDim delta, tlim, i, e, res, pl, pu, mul, fp, fl, flil, fval, absoluto, fpant As Double
Dim aviso As Integerr = 10.732ii = 0If OptionButton1.Value = True Then'propanovc = 0.0727tc = 666pc = 616.3Wpr = 0.1524pm = 44.097zc = pc * vc * pm / (r * tc)resi = 3tini = 465aa = 36.861114bb = 0.81955086cc = 0.0042410469dd = 0.000026245677tlim = 665Sheets("Hoja1").Cells(21, 2).Value = tini - 460Sheets("Hoja1").Cells(22, 2).Value = tlim - 460End If
If OptionButton2.Value = True Then'ibutanovc = 0.0714tc = 274.41 + 459.67pc = 527.9Wpr = 0.1852pm = 58.123zc = pc * vc * pm / (r * tc)resi = 0.6tini = 465aa = 10.452317bb = 0.33095835cc = 0.0012663153dd = 0.000015996642tlim = 725Sheets("Hoja1").Cells(21, 2).Value = tini - 460Sheets("Hoja1").Cells(22, 2).Value = tlim - 460End If
If OptionButton3.Value = True Then'n hexanovc = 0.0688tc = 451.68 + 460pc = 439.5Wpr = 0.299pm = 86.177zc = pc * vc * pm / (r * tc)resi = 2.21
tini = 525aa = -2.6111926bb = 0.15331891cc = -0.0013638154dd = 0.0000069844974
tlim = 880Sheets("Hoja1").Cells(21, 2).Value = tini - 460Sheets("Hoja1").Cells(22, 2).Value = tlim - 460End If
If OptionButton4.Value = True Then'Etanovc = 0.0783tc = 90.07 + 460pc = 707.8Wpr = 0.0972pm = 30.07zc = pc * vc * pm / (r * tc)resi = 1.5
tini = 460aa = 219.74623bb = 3.3665728cc = 0.018361742dd = 0.000049109669tlim = 460 + 80Sheets("Hoja1").Cells(21, 2).Value = tini - 460Sheets("Hoja1").Cells(22, 2).Value = tlim - 460End If
If OptionButton6.Value = True Then'npentanovc = 0.0695tc = 385.7 + 460pc = 488.1Wpr = 0.251pm = 72.15zc = pc * vc * pm / (r * tc)resi = 0.4
tini = 460aa = 0.43601437bb = 0.14656582cc = -0.00090156358dd = 0.00000981088tlim = 460 + 375Sheets("Hoja1").Cells(21, 2).Value = tini - 460Sheets("Hoja1").Cells(22, 2).Value = tlim - 460End IfIf OptionButton5.Value = True Then'nbutanovc = 0.0703tc = 305.51 + 460pc = 548.8Wpr = 0.1981pm = 58.123zc = pc * vc * pm / (r * tc)resi = 1
tini = 460aa = 6.5155946bb = 0.2450658cc = 0.00055792289dd = 0.00001451968tlim = 460 + 290Sheets("Hoja1").Cells(21, 2).Value = tini - 460Sheets("Hoja1").Cells(22, 2).Value = tlim - 460End If
t = tiniDo While (t < tlim)Sheets("Hoja1").Cells(7, 1).Value = ta = 0.45724 * (r ^ 2) * (tc ^ 2) / pcb = 0.0778 * r * tc / pcMpr = 0.379642 + (1.54226 * Wpr) - (0.2699 * (Wpr ^ 2)) + (0.016667 * (Wpr ^ 3))ALFApr = (1 + Mpr * (1 - ((t / tc) ^ 0.5))) ^ 2e = 2.71828182845905errort = 100p = (aa + (bb * (t - 459.67)) + cc * ((t - 459.67) ^ 2) + dd * ((t - 459.67) ^ 3)) - resifp = 500aviso = 0Do While (aviso = 0)fpant = fp
amay = a * ALFApr * p / ((r * t) ^ 2)bmay = (b * p) / (r * t)cox3 = 1cox2 = -(1 - bmay)cox = ((amay) - (2 * bmay) - (3 * (bmay ^ 2)))coxind = -((amay * bmay) - (bmay ^ 2) - (bmay ^ 3))XI = -1error = 100Do While (error > 0.000000000165602)
xli = XI - (((cox3 * (XI ^ 3)) + (cox2 * (XI ^ 2)) + (cox * XI) + (coxind)) / ((3 * cox3 * (XI ^ 2)) + (2 * cox2 * XI) + cox))
error = Abs((xli - XI) / xli) * 100
XI = xliLoop
XI = 1error = 100
Do While (error > 0.000000000165602)
Xva = XI - (((cox3 * (XI ^ 3)) + (cox2 * (XI ^ 2)) + (cox * XI) + (coxind)) / ((3 * cox3 * (XI ^ 2)) + (2 * cox2 * XI) + cox))
error = Abs((Xva - XI) / Xva) * 100
XI = XvaLoop
fli = p * (e ^ (xli - 1 - (Log(xli - bmay)) - ((amay / (bmay * 2.8284271)) * (Log((xli + (bmay * 2.4142135)) / (xli - (bmay * 0.4142135)))))))fva = p * (e ^ (Xva - 1 - (Log(Xva - bmay)) - ((amay / (bmay * 2.8284271)) * (Log((Xva + (bmay * 2.4142135)) / (Xva - (bmay * 0.4142135)))))))
fp = fli - fvaIf Abs(fp) > 0.0001 ThenIf (fp * fpant) < 0 Thenaviso = 1End IfEnd If
p = p + 0.01
LoopSheets("Hoja1").Cells(6, 1).Value = tSheets("Hoja1").Cells(2 + ii, 3).Value = (p - 0.01)Sheets("Hoja1").Cells(2 + ii, 4).Value = xliSheets("Hoja1").Cells(2 + ii, 5).Value = XvaSheets("Hoja1").Cells(2 + ii, 6).Value = fliSheets("Hoja1").Cells(2 + ii, 7).Value = fvaSheets("Hoja1").Cells(2 + ii, 8).Value = fpSheets("Hoja1").Cells(2 + ii, 9).Value = tii = ii + 1t = t + 10LoopSheets("Hoja1").Cells(2 + ii, 3).Value = pcSheets("Hoja1").Cells(2 + ii, 4).Value = zcSheets("Hoja1").Cells(2 + ii, 5).Value = zc'una solo temperatura
t = Sheets("Hoja1").Cells(16, 2).Value + 460If t > tini And t < tlim Thena = 0.45724 * (r ^ 2) * (tc ^ 2) / pcb = 0.0778 * r * tc / pcMpr = 0.379642 + (1.54226 * Wpr) - (0.2699 * (Wpr ^ 2)) + (0.016667 * (Wpr ^ 3))ALFApr = (1 + Mpr * (1 - ((t / tc) ^ 0.5))) ^ 2e = 2.71828182845905errort = 100p = (aa + (bb * (t - 459.67)) + cc * ((t - 459.67) ^ 2) + dd * ((t - 459.67) ^ 3)) - resifp = 500aviso = 0Do While (aviso = 0)fpant = fp
amay = a * ALFApr * p / ((r * t) ^ 2)bmay = (b * p) / (r * t)cox3 = 1cox2 = -(1 - bmay)cox = ((amay) - (2 * bmay) - (3 * (bmay ^ 2)))coxind = -((amay * bmay) - (bmay ^ 2) - (bmay ^ 3))XI = -1error = 100Do While (error > 0.000000000165602)
xli = XI - (((cox3 * (XI ^ 3)) + (cox2 * (XI ^ 2)) + (cox * XI) + (coxind)) / ((3 * cox3 * (XI ^ 2)) + (2 * cox2 * XI) + cox))
error = Abs((xli - XI) / xli) * 100
XI = xliLoop
XI = 1error = 100
Do While (error > 0.000000000165602)
Xva = XI - (((cox3 * (XI ^ 3)) + (cox2 * (XI ^ 2)) + (cox * XI) + (coxind)) / ((3 * cox3 * (XI ^ 2)) + (2 * cox2 * XI) + cox))
error = Abs((Xva - XI) / Xva) * 100
XI = XvaLoop
fli = p * (e ^ (xli - 1 - (Log(xli - bmay)) - ((amay / (bmay * 2.8284271)) * (Log((xli + (bmay * 2.4142135)) / (xli - (bmay * 0.4142135)))))))fva = p * (e ^ (Xva - 1 - (Log(Xva - bmay)) - ((amay / (bmay * 2.8284271)) * (Log((Xva + (bmay * 2.4142135)) / (Xva - (bmay * 0.4142135)))))))fp = fli - fvaIf Abs(fp) > 0.00001 ThenIf (fp * fpant) < 0 Thenaviso = 1End IfEnd If
p = p + 0.0005
Loop
Sheets("Hoja1").Cells(18, 2).Value = (p - 0.01)
ElseSheets("Hoja1").Cells(21, 2).Value = tini - 460Sheets("Hoja1").Cells(22, 2).Value = tlim - 460End If
End Sub
Private Sub CommandButton2_Click()For i = 2 To 100For j = 3 To 8Sheets("Hoja1").Cells(i, j).Value = ClearNext jNext i
End Sub
Attribute VB_Name = "ThisWorkbook"Attribute VB_Base = "0{00020819-0000-0000-C000-000000000046}"Attribute VB_GlobalNameSpace = FalseAttribute VB_Creatable = FalseAttribute VB_PredeclaredId = TrueAttribute VB_Exposed = TrueAttribute VB_TemplateDerived = FalseAttribute VB_Customizable = True
Attribute VB_Name = "Hoja2"Attribute VB_Base = "0{00020820-0000-0000-C000-000000000046}"Attribute VB_GlobalNameSpace = FalseAttribute VB_Creatable = FalseAttribute VB_PredeclaredId = TrueAttribute VB_Exposed = TrueAttribute VB_TemplateDerived = FalseAttribute VB_Customizable = True
Attribute VB_Name = "Hoja3"Attribute VB_Base = "0{00020820-0000-0000-C000-000000000046}"Attribute VB_GlobalNameSpace = FalseAttribute VB_Creatable = FalseAttribute VB_PredeclaredId = TrueAttribute VB_Exposed = TrueAttribute VB_TemplateDerived = FalseAttribute VB_Customizable = True
MBD0000024C.unknown
Attribute VB_Name = "Hoja1"Attribute VB_Base = "0{00020820-0000-0000-C000-000000000046}"Attribute VB_GlobalNameSpace = FalseAttribute VB_Creatable = FalseAttribute VB_PredeclaredId = TrueAttribute VB_Exposed = TrueAttribute VB_TemplateDerived = FalseAttribute VB_Customizable = TrueAttribute VB_Control = "CommandButton1, 1, 0, MSForms, CommandButton"Attribute VB_Control = "CommandButton2, 16, 1, MSForms, CommandButton"Attribute VB_Control = "OptionButton1, 17, 2, MSForms, OptionButton"Attribute VB_Control = "OptionButton2, 18, 3, MSForms, OptionButton"Attribute VB_Control = "OptionButton3, 20, 4, MSForms, OptionButton"Attribute VB_Control = "OptionButton4, 21, 5, MSForms, OptionButton"Attribute VB_Control = "OptionButton5, 22, 6, MSForms, OptionButton"Attribute VB_Control = "OptionButton6, 23, 7, MSForms, OptionButton"Attribute VB_Control = "OptionButton7, 24, 8, MSForms, OptionButton"Private Sub CommandButton1_Click()Dim cox3, cox2, cox, coind, XI, Xva, xli, fli, fva As DoubleDim a, b, tc, pc, error, errort As DoubleDim ALFApr, Mpr, Wpr, vc, zc As DoubleDim bmay, amay, pant, aa, bb, cc, dd, ii As DoubleDim delta, tlim, i, e, res, pl, pu, mul, fp, fl, flil, fval, absoluto, fpant As Double
Dim aviso As Integerr = 10.732ii = 0If OptionButton1.Value = True Then'propanovc = 0.0727tc = 666pc = 616.3Wpr = 0.1524pm = 44.097zc = pc * vc * pm / (r * tc)resi = 3tini = 465aa = 36.861114bb = 0.81955086cc = 0.0042410469dd = 0.000026245677tlim = 665Sheets("Hoja1").Cells(21, 2).Value = tini - 460Sheets("Hoja1").Cells(22, 2).Value = tlim - 460End If
If OptionButton2.Value = True Then'ibutanovc = 0.0714tc = 274.41 + 459.67pc = 527.9Wpr = 0.1852pm = 58.123zc = pc * vc * pm / (r * tc)resi = 0.6tini = 465aa = 10.452317bb = 0.33095835cc = 0.0012663153dd = 0.000015996642tlim = 725Sheets("Hoja1").Cells(21, 2).Value = tini - 460Sheets("Hoja1").Cells(22, 2).Value = tlim - 460End If
If OptionButton3.Value = True Then'n hexanovc = 0.0688tc = 451.68 + 460pc = 439.5Wpr = 0.299pm = 86.177zc = pc * vc * pm / (r * tc)resi = 2.21
tini = 525aa = -2.6111926bb = 0.15331891cc = -0.0013638154dd = 0.0000069844974
tlim = 880Sheets("Hoja1").Cells(21, 2).Value = tini - 460Sheets("Hoja1").Cells(22, 2).Value = tlim - 460End If
If OptionButton4.Value = True Then'Etanovc = 0.0783tc = 90.07 + 460pc = 707.8Wpr = 0.0972pm = 30.07zc = pc * vc * pm / (r * tc)resi = 1.5
tini = 460aa = 219.74623bb = 3.3665728cc = 0.018361742dd = 0.000049109669tlim = 460 + 80Sheets("Hoja1").Cells(21, 2).Value = tini - 460Sheets("Hoja1").Cells(22, 2).Value = tlim - 460End If
If OptionButton6.Value = True Then'npentanovc = 0.0695tc = 385.7 + 460pc = 488.1Wpr = 0.251pm = 72.15zc = pc * vc * pm / (r * tc)resi = 0.4
tini = 460aa = 0.43601437bb = 0.14656582cc = -0.00090156358dd = 0.00000981088tlim = 460 + 375Sheets("Hoja1").Cells(21, 2).Value = tini - 460Sheets("Hoja1").Cells(22, 2).Value = tlim - 460End IfIf OptionButton5.Value = True Then'nbutanovc = 0.0703tc = 305.51 + 460pc = 548.8Wpr = 0.1981pm = 58.123zc = pc * vc * pm / (r * tc)resi = 1
tini = 460aa = 6.5155946bb = 0.2450658cc = 0.00055792289dd = 0.00001451968tlim = 460 + 290Sheets("Hoja1").Cells(21, 2).Value = tini - 460Sheets("Hoja1").Cells(22, 2).Value = tlim - 460End If
t = tiniDo While (t < tlim)Sheets("Hoja1").Cells(7, 1).Value = ta = 0.45724 * (r ^ 2) * (tc ^ 2) / pcb = 0.0778 * r * tc / pcMpr = 0.379642 + (1.54226 * Wpr) - (0.2699 * (Wpr ^ 2)) + (0.016667 * (Wpr ^ 3))ALFApr = (1 + Mpr * (1 - ((t / tc) ^ 0.5))) ^ 2e = 2.71828182845905errort = 100p = (aa + (bb * (t - 459.67)) + cc * ((t - 459.67) ^ 2) + dd * ((t - 459.67) ^ 3)) - resifp = 500aviso = 0Do While (aviso = 0)fpant = fp
amay = a * ALFApr * p / ((r * t) ^ 2)bmay = (b * p) / (r * t)cox3 = 1cox2 = -(1 - bmay)cox = ((amay) - (2 * bmay) - (3 * (bmay ^ 2)))coxind = -((amay * bmay) - (bmay ^ 2) - (bmay ^ 3))XI = -1error = 100Do While (error > 0.000000000165602)
xli = XI - (((cox3 * (XI ^ 3)) + (cox2 * (XI ^ 2)) + (cox * XI) + (coxind)) / ((3 * cox3 * (XI ^ 2)) + (2 * cox2 * XI) + cox))
error = Abs((xli - XI) / xli) * 100
XI = xliLoop
XI = 1error = 100
Do While (error > 0.000000000165602)
Xva = XI - (((cox3 * (XI ^ 3)) + (cox2 * (XI ^ 2)) + (cox * XI) + (coxind)) / ((3 * cox3 * (XI ^ 2)) + (2 * cox2 * XI) + cox))
error = Abs((Xva - XI) / Xva) * 100
XI = XvaLoop
fli = p * (e ^ (xli - 1 - (Log(xli - bmay)) - ((amay / (bmay * 2.8284271)) * (Log((xli + (bmay * 2.4142135)) / (xli - (bmay * 0.4142135)))))))fva = p * (e ^ (Xva - 1 - (Log(Xva - bmay)) - ((amay / (bmay * 2.8284271)) * (Log((Xva + (bmay * 2.4142135)) / (Xva - (bmay * 0.4142135)))))))
fp = fli - fvaIf Abs(fp) > 0.0001 ThenIf (fp * fpant) < 0 Thenaviso = 1End IfEnd If
p = p + 0.01
LoopSheets("Hoja1").Cells(6, 1).Value = tSheets("Hoja1").Cells(2 + ii, 3).Value = (p - 0.01)Sheets("Hoja1").Cells(2 + ii, 4).Value = xliSheets("Hoja1").Cells(2 + ii, 5).Value = XvaSheets("Hoja1").Cells(2 + ii, 6).Value = fliSheets("Hoja1").Cells(2 + ii, 7).Value = fvaSheets("Hoja1").Cells(2 + ii, 8).Value = fpSheets("Hoja1").Cells(2 + ii, 9).Value = tii = ii + 1t = t + 10LoopSheets("Hoja1").Cells(2 + ii, 3).Value = pcSheets("Hoja1").Cells(2 + ii, 4).Value = zcSheets("Hoja1").Cells(2 + ii, 5).Value = zc'una solo temperatura
t = Sheets("Hoja1").Cells(16, 2).Value + 460If t > tini And t < tlim Thena = 0.45724 * (r ^ 2) * (tc ^ 2) / pcb = 0.0778 * r * tc / pcMpr = 0.379642 + (1.54226 * Wpr) - (0.2699 * (Wpr ^ 2)) + (0.016667 * (Wpr ^ 3))ALFApr = (1 + Mpr * (1 - ((t / tc) ^ 0.5))) ^ 2e = 2.71828182845905errort = 100p = (aa + (bb * (t - 459.67)) + cc * ((t - 459.67) ^ 2) + dd * ((t - 459.67) ^ 3)) - resifp = 500aviso = 0Do While (aviso = 0)fpant = fp
amay = a * ALFApr * p / ((r * t) ^ 2)bmay = (b * p) / (r * t)cox3 = 1cox2 = -(1 - bmay)cox = ((amay) - (2 * bmay) - (3 * (bmay ^ 2)))coxind = -((amay * bmay) - (bmay ^ 2) - (bmay ^ 3))XI = -1error = 100Do While (error > 0.000000000165602)
xli = XI - (((cox3 * (XI ^ 3)) + (cox2 * (XI ^ 2)) + (cox * XI) + (coxind)) / ((3 * cox3 * (XI ^ 2)) + (2 * cox2 * XI) + cox))
error = Abs((xli - XI) / xli) * 100
XI = xliLoop
XI = 1error = 100
Do While (error > 0.000000000165602)
Xva = XI - (((cox3 * (XI ^ 3)) + (cox2 * (XI ^ 2)) + (cox * XI) + (coxind)) / ((3 * cox3 * (XI ^ 2)) + (2 * cox2 * XI) + cox))
error = Abs((Xva - XI) / Xva) * 100
XI = XvaLoop
fli = p * (e ^ (xli - 1 - (Log(xli - bmay)) - ((amay / (bmay * 2.8284271)) * (Log((xli + (bmay * 2.4142135)) / (xli - (bmay * 0.4142135)))))))fva = p * (e ^ (Xva - 1 - (Log(Xva - bmay)) - ((amay / (bmay * 2.8284271)) * (Log((Xva + (bmay * 2.4142135)) / (Xva - (bmay * 0.4142135)))))))fp = fli - fvaIf Abs(fp) > 0.00001 ThenIf (fp * fpant) < 0 Thenaviso = 1End IfEnd If
p = p + 0.0005
Loop
Sheets("Hoja1").Cells(18, 2).Value = (p - 0.01)
ElseSheets("Hoja1").Cells(21, 2).Value = tini - 460Sheets("Hoja1").Cells(22, 2).Value = tlim - 460End If
End Sub
Private Sub CommandButton2_Click()For i = 2 To 100For j = 3 To 8Sheets("Hoja1").Cells(i, j).Value = ClearNext jNext i
End Sub
Attribute VB_Name = "ThisWorkbook"Attribute VB_Base = "0{00020819-0000-0000-C000-000000000046}"Attribute VB_GlobalNameSpace = FalseAttribute VB_Creatable = FalseAttribute VB_PredeclaredId = TrueAttribute VB_Exposed = TrueAttribute VB_TemplateDerived = FalseAttribute VB_Customizable = True
Attribute VB_Name = "Hoja2"Attribute VB_Base = "0{00020820-0000-0000-C000-000000000046}"Attribute VB_GlobalNameSpace = FalseAttribute VB_Creatable = FalseAttribute VB_PredeclaredId = TrueAttribute VB_Exposed = TrueAttribute VB_TemplateDerived = FalseAttribute VB_Customizable = True
Attribute VB_Name = "Hoja3"Attribute VB_Base = "0{00020820-0000-0000-C000-000000000046}"Attribute VB_GlobalNameSpace = FalseAttribute VB_Creatable = FalseAttribute VB_PredeclaredId = TrueAttribute VB_Exposed = TrueAttribute VB_TemplateDerived = FalseAttribute VB_Customizable = True
MBD00000174.unknown
Attribute VB_Name = "Hoja1"Attribute VB_Base = "0{00020820-0000-0000-C000-000000000046}"Attribute VB_GlobalNameSpace = FalseAttribute VB_Creatable = FalseAttribute VB_PredeclaredId = TrueAttribute VB_Exposed = TrueAttribute VB_TemplateDerived = FalseAttribute VB_Customizable = TrueAttribute VB_Control = "CommandButton1, 1, 0, MSForms, CommandButton"Attribute VB_Control = "CommandButton2, 16, 1, MSForms, CommandButton"Attribute VB_Control = "OptionButton1, 17, 2, MSForms, OptionButton"Attribute VB_Control = "OptionButton2, 18, 3, MSForms, OptionButton"Attribute VB_Control = "OptionButton3, 20, 4, MSForms, OptionButton"Attribute VB_Control = "OptionButton4, 21, 5, MSForms, OptionButton"Attribute VB_Control = "OptionButton5, 22, 6, MSForms, OptionButton"Attribute VB_Control = "OptionButton6, 23, 7, MSForms, OptionButton"Attribute VB_Control = "OptionButton7, 24, 8, MSForms, OptionButton"Private Sub CommandButton1_Click()Dim cox3, cox2, cox, coind, XI, Xva, xli, fli, fva As DoubleDim a, b, tc, pc, error, errort As DoubleDim ALFApr, Mpr, Wpr, vc, zc As DoubleDim bmay, amay, pant, aa, bb, cc, dd, ii As DoubleDim delta, tlim, i, e, res, pl, pu, mul, fp, fl, flil, fval, absoluto, fpant As Double
Dim aviso As Integerr = 10.732ii = 0If OptionButton1.Value = True Then'propanovc = 0.0727tc = 666pc = 616.3Wpr = 0.1524pm = 44.097zc = pc * vc * pm / (r * tc)resi = 3tini = 465aa = 36.861114bb = 0.81955086cc = 0.0042410469dd = 0.000026245677tlim = 665Sheets("Hoja1").Cells(21, 2).Value = tini - 460Sheets("Hoja1").Cells(22, 2).Value = tlim - 460End If
If OptionButton2.Value = True Then'ibutanovc = 0.0714tc = 274.41 + 459.67pc = 527.9Wpr = 0.1852pm = 58.123zc = pc * vc * pm / (r * tc)resi = 0.6tini = 465aa = 10.452317bb = 0.33095835cc = 0.0012663153dd = 0.000015996642tlim = 725Sheets("Hoja1").Cells(21, 2).Value = tini - 460Sheets("Hoja1").Cells(22, 2).Value = tlim - 460End If
If OptionButton3.Value = True Then'n hexanovc = 0.0688tc = 451.68 + 460pc = 439.5Wpr = 0.299pm = 86.177zc = pc * vc * pm / (r * tc)resi = 2.21
tini = 525aa = -2.6111926bb = 0.15331891cc = -0.0013638154dd = 0.0000069844974
tlim = 880Sheets("Hoja1").Cells(21, 2).Value = tini - 460Sheets("Hoja1").Cells(22, 2).Value = tlim - 460End If
If OptionButton4.Value = True Then'Etanovc = 0.0783tc = 90.07 + 460pc = 707.8Wpr = 0.0972pm = 30.07zc = pc * vc * pm / (r * tc)resi = 1.5
tini = 460aa = 219.74623bb = 3.3665728cc = 0.018361742dd = 0.000049109669tlim = 460 + 80Sheets("Hoja1").Cells(21, 2).Value = tini - 460Sheets("Hoja1").Cells(22, 2).Value = tlim - 460End If
If OptionButton6.Value = True Then'npentanovc = 0.0695tc = 385.7 + 460pc = 488.1Wpr = 0.251pm = 72.15zc = pc * vc * pm / (r * tc)resi = 0.4
tini = 460aa = 0.43601437bb = 0.14656582cc = -0.00090156358dd = 0.00000981088tlim = 460 + 375Sheets("Hoja1").Cells(21, 2).Value = tini - 460Sheets("Hoja1").Cells(22, 2).Value = tlim - 460End IfIf OptionButton5.Value = True Then'nbutanovc = 0.0703tc = 305.51 + 460pc = 548.8Wpr = 0.1981pm = 58.123zc = pc * vc * pm / (r * tc)resi = 1
tini = 460aa = 6.5155946bb = 0.2450658cc = 0.00055792289dd = 0.00001451968tlim = 460 + 290Sheets("Hoja1").Cells(21, 2).Value = tini - 460Sheets("Hoja1").Cells(22, 2).Value = tlim - 460End If
t = tiniDo While (t < tlim)Sheets("Hoja1").Cells(7, 1).Value = ta = 0.45724 * (r ^ 2) * (tc ^ 2) / pcb = 0.0778 * r * tc / pcMpr = 0.379642 + (1.54226 * Wpr) - (0.2699 * (Wpr ^ 2)) + (0.016667 * (Wpr ^ 3))ALFApr = (1 + Mpr * (1 - ((t / tc) ^ 0.5))) ^ 2e = 2.71828182845905errort = 100p = (aa + (bb * (t - 459.67)) + cc * ((t - 459.67) ^ 2) + dd * ((t - 459.67) ^ 3)) - resifp = 500aviso = 0Do While (aviso = 0)fpant = fp
amay = a * ALFApr * p / ((r * t) ^ 2)bmay = (b * p) / (r * t)cox3 = 1cox2 = -(1 - bmay)cox = ((amay) - (2 * bmay) - (3 * (bmay ^ 2)))coxind = -((amay * bmay) - (bmay ^ 2) - (bmay ^ 3))XI = -1error = 100Do While (error > 0.000000000165602)
xli = XI - (((cox3 * (XI ^ 3)) + (cox2 * (XI ^ 2)) + (cox * XI) + (coxind)) / ((3 * cox3 * (XI ^ 2)) + (2 * cox2 * XI) + cox))
error = Abs((xli - XI) / xli) * 100
XI = xliLoop
XI = 1error = 100
Do While (error > 0.000000000165602)
Xva = XI - (((cox3 * (XI ^ 3)) + (cox2 * (XI ^ 2)) + (cox * XI) + (coxind)) / ((3 * cox3 * (XI ^ 2)) + (2 * cox2 * XI) + cox))
error = Abs((Xva - XI) / Xva) * 100
XI = XvaLoop
fli = p * (e ^ (xli - 1 - (Log(xli - bmay)) - ((amay / (bmay * 2.8284271)) * (Log((xli + (bmay * 2.4142135)) / (xli - (bmay * 0.4142135)))))))fva = p * (e ^ (Xva - 1 - (Log(Xva - bmay)) - ((amay / (bmay * 2.8284271)) * (Log((Xva + (bmay * 2.4142135)) / (Xva - (bmay * 0.4142135)))))))
fp = fli - fvaIf Abs(fp) > 0.0001 ThenIf (fp * fpant) < 0 Thenaviso = 1End IfEnd If
p = p + 0.01
LoopSheets("Hoja1").Cells(6, 1).Value = tSheets("Hoja1").Cells(2 + ii, 3).Value = (p - 0.01)Sheets("Hoja1").Cells(2 + ii, 4).Value = xliSheets("Hoja1").Cells(2 + ii, 5).Value = XvaSheets("Hoja1").Cells(2 + ii, 6).Value = fliSheets("Hoja1").Cells(2 + ii, 7).Value = fvaSheets("Hoja1").Cells(2 + ii, 8).Value = fpSheets("Hoja1").Cells(2 + ii, 9).Value = tii = ii + 1t = t + 10LoopSheets("Hoja1").Cells(2 + ii, 3).Value = pcSheets("Hoja1").Cells(2 + ii, 4).Value = zcSheets("Hoja1").Cells(2 + ii, 5).Value = zc'una solo temperatura
t = Sheets("Hoja1").Cells(16, 2).Value + 460If t > tini And t < tlim Thena = 0.45724 * (r ^ 2) * (tc ^ 2) / pcb = 0.0778 * r * tc / pcMpr = 0.379642 + (1.54226 * Wpr) - (0.2699 * (Wpr ^ 2)) + (0.016667 * (Wpr ^ 3))ALFApr = (1 + Mpr * (1 - ((t / tc) ^ 0.5))) ^ 2e = 2.71828182845905errort = 100p = (aa + (bb * (t - 459.67)) + cc * ((t - 459.67) ^ 2) + dd * ((t - 459.67) ^ 3)) - resifp = 500aviso = 0Do While (aviso = 0)fpant = fp
amay = a * ALFApr * p / ((r * t) ^ 2)bmay = (b * p) / (r * t)cox3 = 1cox2 = -(1 - bmay)cox = ((amay) - (2 * bmay) - (3 * (bmay ^ 2)))coxind = -((amay * bmay) - (bmay ^ 2) - (bmay ^ 3))XI = -1error = 100Do While (error > 0.000000000165602)
xli = XI - (((cox3 * (XI ^ 3)) + (cox2 * (XI ^ 2)) + (cox * XI) + (coxind)) / ((3 * cox3 * (XI ^ 2)) + (2 * cox2 * XI) + cox))
error = Abs((xli - XI) / xli) * 100
XI = xliLoop
XI = 1error = 100
Do While (error > 0.000000000165602)
Xva = XI - (((cox3 * (XI ^ 3)) + (cox2 * (XI ^ 2)) + (cox * XI) + (coxind)) / ((3 * cox3 * (XI ^ 2)) + (2 * cox2 * XI) + cox))
error = Abs((Xva - XI) / Xva) * 100
XI = XvaLoop
fli = p * (e ^ (xli - 1 - (Log(xli - bmay)) - ((amay / (bmay * 2.8284271)) * (Log((xli + (bmay * 2.4142135)) / (xli - (bmay * 0.4142135)))))))fva = p * (e ^ (Xva - 1 - (Log(Xva - bmay)) - ((amay / (bmay * 2.8284271)) * (Log((Xva + (bmay * 2.4142135)) / (Xva - (bmay * 0.4142135)))))))fp = fli - fvaIf Abs(fp) > 0.00001 ThenIf (fp * fpant) < 0 Thenaviso = 1End IfEnd If
p = p + 0.0005
Loop
Sheets("Hoja1").Cells(18, 2).Value = (p - 0.01)
ElseSheets("Hoja1").Cells(21, 2).Value = tini - 460Sheets("Hoja1").Cells(22, 2).Value = tlim - 460End If
End Sub
Private Sub CommandButton2_Click()For i = 2 To 100For j = 3 To 8Sheets("Hoja1").Cells(i, j).Value = ClearNext jNext i
End Sub
Attribute VB_Name = "ThisWorkbook"Attribute VB_Base = "0{00020819-0000-0000-C000-000000000046}"Attribute VB_GlobalNameSpace = FalseAttribute VB_Creatable = FalseAttribute VB_PredeclaredId = TrueAttribute VB_Exposed = TrueAttribute VB_TemplateDerived = FalseAttribute VB_Customizable = True
Attribute VB_Name = "Hoja2"Attribute VB_Base = "0{00020820-0000-0000-C000-000000000046}"Attribute VB_GlobalNameSpace = FalseAttribute VB_Creatable = FalseAttribute VB_PredeclaredId = TrueAttribute VB_Exposed = TrueAttribute VB_TemplateDerived = FalseAttribute VB_Customizable = True
Attribute VB_Name = "Hoja3"Attribute VB_Base = "0{00020820-0000-0000-C000-000000000046}"Attribute VB_GlobalNameSpace = FalseAttribute VB_Creatable = FalseAttribute VB_PredeclaredId = TrueAttribute VB_Exposed = TrueAttribute VB_TemplateDerived = FalseAttribute VB_Customizable = True
MBD00000054.unknown
Attribute VB_Name = "Hoja1"Attribute VB_Base = "0{00020820-0000-0000-C000-000000000046}"Attribute VB_GlobalNameSpace = FalseAttribute VB_Creatable = FalseAttribute VB_PredeclaredId = TrueAttribute VB_Exposed = TrueAttribute VB_TemplateDerived = FalseAttribute VB_Customizable = TrueAttribute VB_Control = "CommandButton1, 1, 0, MSForms, CommandButton"Attribute VB_Control = "CommandButton2, 16, 1, MSForms, CommandButton"Attribute VB_Control = "OptionButton1, 17, 2, MSForms, OptionButton"Attribute VB_Control = "OptionButton2, 18, 3, MSForms, OptionButton"Attribute VB_Control = "OptionButton3, 20, 4, MSForms, OptionButton"Attribute VB_Control = "OptionButton4, 21, 5, MSForms, OptionButton"Attribute VB_Control = "OptionButton5, 22, 6, MSForms, OptionButton"Attribute VB_Control = "OptionButton6, 23, 7, MSForms, OptionButton"Attribute VB_Control = "OptionButton7, 24, 8, MSForms, OptionButton"Private Sub CommandButton1_Click()Dim cox3, cox2, cox, coind, XI, Xva, xli, fli, fva As DoubleDim a, b, tc, pc, error, errort As DoubleDim ALFApr, Mpr, Wpr, vc, zc As DoubleDim bmay, amay, pant, aa, bb, cc, dd, ii As DoubleDim delta, tlim, i, e, res, pl, pu, mul, fp, fl, flil, fval, absoluto, fpant As Double
Dim aviso As Integerr = 10.732ii = 0If OptionButton1.Value = True Then'propanovc = 0.0727tc = 666pc = 616.3Wpr = 0.1524pm = 44.097zc = pc * vc * pm / (r * tc)resi = 3tini = 465aa = 36.861114bb = 0.81955086cc = 0.0042410469dd = 0.000026245677tlim = 665Sheets("Hoja1").Cells(21, 2).Value = tini - 460Sheets("Hoja1").Cells(22, 2).Value = tlim - 460End If
If OptionButton2.Value = True Then'ibutanovc = 0.0714tc = 274.41 + 459.67pc = 527.9Wpr = 0.1852pm = 58.123zc = pc * vc * pm / (r * tc)resi = 0.6tini = 465aa = 10.452317bb = 0.33095835cc = 0.0012663153dd = 0.000015996642tlim = 725Sheets("Hoja1").Cells(21, 2).Value = tini - 460Sheets("Hoja1").Cells(22, 2).Value = tlim - 460End If
If OptionButton3.Value = True Then'n hexanovc = 0.0688tc = 451.68 + 460pc = 439.5Wpr = 0.299pm = 86.177zc = pc * vc * pm / (r * tc)resi = 2.21
tini = 525aa = -2.6111926bb = 0.15331891cc = -0.0013638154dd = 0.0000069844974
tlim = 880Sheets("Hoja1").Cells(21, 2).Value = tini - 460Sheets("Hoja1").Cells(22, 2).Value = tlim - 460End If
If OptionButton4.Value = True Then'Etanovc = 0.0783tc = 90.07 + 460pc = 707.8Wpr = 0.0972pm = 30.07zc = pc * vc * pm / (r * tc)resi = 1.5
tini = 460aa = 219.74623bb = 3.3665728cc = 0.018361742dd = 0.000049109669tlim = 460 + 80Sheets("Hoja1").Cells(21, 2).Value = tini - 460Sheets("Hoja1").Cells(22, 2).Value = tlim - 460End If
If OptionButton6.Value = True Then'npentanovc = 0.0695tc = 385.7 + 460pc = 488.1Wpr = 0.251pm = 72.15zc = pc * vc * pm / (r * tc)resi = 0.4
tini = 460aa = 0.43601437bb = 0.14656582cc = -0.00090156358dd = 0.00000981088tlim = 460 + 375Sheets("Hoja1").Cells(21, 2).Value = tini - 460Sheets("Hoja1").Cells(22, 2).Value = tlim - 460End IfIf OptionButton5.Value = True Then'nbutanovc = 0.0703tc = 305.51 + 460pc = 548.8Wpr = 0.1981pm = 58.123zc = pc * vc * pm / (r * tc)resi = 1
tini = 460aa = 6.5155946bb = 0.2450658cc = 0.00055792289dd = 0.00001451968tlim = 460 + 290Sheets("Hoja1").Cells(21, 2).Value = tini - 460Sheets("Hoja1").Cells(22, 2).Value = tlim - 460End If
t = tiniDo While (t < tlim)Sheets("Hoja1").Cells(7, 1).Value = ta = 0.45724 * (r ^ 2) * (tc ^ 2) / pcb = 0.0778 * r * tc / pcMpr = 0.379642 + (1.54226 * Wpr) - (0.2699 * (Wpr ^ 2)) + (0.016667 * (Wpr ^ 3))ALFApr = (1 + Mpr * (1 - ((t / tc) ^ 0.5))) ^ 2e = 2.71828182845905errort = 100p = (aa + (bb * (t - 459.67)) + cc * ((t - 459.67) ^ 2) + dd * ((t - 459.67) ^ 3)) - resifp = 500aviso = 0Do While (aviso = 0)fpant = fp
amay = a * ALFApr * p / ((r * t) ^ 2)bmay = (b * p) / (r * t)cox3 = 1cox2 = -(1 - bmay)cox = ((amay) - (2 * bmay) - (3 * (bmay ^ 2)))coxind = -((amay * bmay) - (bmay ^ 2) - (bmay ^ 3))XI = -1error = 100Do While (error > 0.000000000165602)
xli = XI - (((cox3 * (XI ^ 3)) + (cox2 * (XI ^ 2)) + (cox * XI) + (coxind)) / ((3 * cox3 * (XI ^ 2)) + (2 * cox2 * XI) + cox))
error = Abs((xli - XI) / xli) * 100
XI = xliLoop
XI = 1error = 100
Do While (error > 0.000000000165602)
Xva = XI - (((cox3 * (XI ^ 3)) + (cox2 * (XI ^ 2)) + (cox * XI) + (coxind)) / ((3 * cox3 * (XI ^ 2)) + (2 * cox2 * XI) + cox))
error = Abs((Xva - XI) / Xva) * 100
XI = XvaLoop
fli = p * (e ^ (xli - 1 - (Log(xli - bmay)) - ((amay / (bmay * 2.8284271)) * (Log((xli + (bmay * 2.4142135)) / (xli - (bmay * 0.4142135)))))))fva = p * (e ^ (Xva - 1 - (Log(Xva - bmay)) - ((amay / (bmay * 2.8284271)) * (Log((Xva + (bmay * 2.4142135)) / (Xva - (bmay * 0.4142135)))))))
fp = fli - fvaIf Abs(fp) > 0.0001 ThenIf (fp * fpant) < 0 Thenaviso = 1End IfEnd If
p = p + 0.01
LoopSheets("Hoja1").Cells(6, 1).Value = tSheets("Hoja1").Cells(2 + ii, 3).Value = (p - 0.01)Sheets("Hoja1").Cells(2 + ii, 4).Value = xliSheets("Hoja1").Cells(2 + ii, 5).Value = XvaSheets("Hoja1").Cells(2 + ii, 6).Value = fliSheets("Hoja1").Cells(2 + ii, 7).Value = fvaSheets("Hoja1").Cells(2 + ii, 8).Value = fpSheets("Hoja1").Cells(2 + ii, 9).Value = tii = ii + 1t = t + 10LoopSheets("Hoja1").Cells(2 + ii, 3).Value = pcSheets("Hoja1").Cells(2 + ii, 4).Value = zcSheets("Hoja1").Cells(2 + ii, 5).Value = zc'una solo temperatura
t = Sheets("Hoja1").Cells(16, 2).Value + 460If t > tini And t < tlim Thena = 0.45724 * (r ^ 2) * (tc ^ 2) / pcb = 0.0778 * r * tc / pcMpr = 0.379642 + (1.54226 * Wpr) - (0.2699 * (Wpr ^ 2)) + (0.016667 * (Wpr ^ 3))ALFApr = (1 + Mpr * (1 - ((t / tc) ^ 0.5))) ^ 2e = 2.71828182845905errort = 100p = (aa + (bb * (t - 459.67)) + cc * ((t - 459.67) ^ 2) + dd * ((t - 459.67) ^ 3)) - resifp = 500aviso = 0Do While (aviso = 0)fpant = fp
amay = a * ALFApr * p / ((r * t) ^ 2)bmay = (b * p) / (r * t)cox3 = 1cox2 = -(1 - bmay)cox = ((amay) - (2 * bmay) - (3 * (bmay ^ 2)))coxind = -((amay * bmay) - (bmay ^ 2) - (bmay ^ 3))XI = -1error = 100Do While (error > 0.000000000165602)
xli = XI - (((cox3 * (XI ^ 3)) + (cox2 * (XI ^ 2)) + (cox * XI) + (coxind)) / ((3 * cox3 * (XI ^ 2)) + (2 * cox2 * XI) + cox))
error = Abs((xli - XI) / xli) * 100
XI = xliLoop
XI = 1error = 100
Do While (error > 0.000000000165602)
Xva = XI - (((cox3 * (XI ^ 3)) + (cox2 * (XI ^ 2)) + (cox * XI) + (coxind)) / ((3 * cox3 * (XI ^ 2)) + (2 * cox2 * XI) + cox))
error = Abs((Xva - XI) / Xva) * 100
XI = XvaLoop
fli = p * (e ^ (xli - 1 - (Log(xli - bmay)) - ((amay / (bmay * 2.8284271)) * (Log((xli + (bmay * 2.4142135)) / (xli - (bmay * 0.4142135)))))))fva = p * (e ^ (Xva - 1 - (Log(Xva - bmay)) - ((amay / (bmay * 2.8284271)) * (Log((Xva + (bmay * 2.4142135)) / (Xva - (bmay * 0.4142135)))))))fp = fli - fvaIf Abs(fp) > 0.00001 ThenIf (fp * fpant) < 0 Thenaviso = 1End IfEnd If
p = p + 0.0005
Loop
Sheets("Hoja1").Cells(18, 2).Value = (p - 0.01)
ElseSheets("Hoja1").Cells(21, 2).Value = tini - 460Sheets("Hoja1").Cells(22, 2).Value = tlim - 460End If
End Sub
Private Sub CommandButton2_Click()For i = 2 To 100For j = 3 To 8Sheets("Hoja1").Cells(i, j).Value = ClearNext jNext i
End Sub
Attribute VB_Name = "ThisWorkbook"Attribute VB_Base = "0{00020819-0000-0000-C000-000000000046}"Attribute VB_GlobalNameSpace = FalseAttribute VB_Creatable = FalseAttribute VB_PredeclaredId = TrueAttribute VB_Exposed = TrueAttribute VB_TemplateDerived = FalseAttribute VB_Customizable = True
Attribute VB_Name = "Hoja2"Attribute VB_Base = "0{00020820-0000-0000-C000-000000000046}"Attribute VB_GlobalNameSpace = FalseAttribute VB_Creatable = FalseAttribute VB_PredeclaredId = TrueAttribute VB_Exposed = TrueAttribute VB_TemplateDerived = FalseAttribute VB_Customizable = True
Attribute VB_Name = "Hoja3"Attribute VB_Base = "0{00020820-0000-0000-C000-000000000046}"Attribute VB_GlobalNameSpace = FalseAttribute VB_Creatable = FalseAttribute VB_PredeclaredId = TrueAttribute VB_Exposed = TrueAttribute VB_TemplateDerived = FalseAttribute VB_Customizable = True
MBD0000009C.unknown
Attribute VB_Name = "Hoja1"Attribute VB_Base = "0{00020820-0000-0000-C000-000000000046}"Attribute VB_GlobalNameSpace = FalseAttribute VB_Creatable = FalseAttribute VB_PredeclaredId = TrueAttribute VB_Exposed = TrueAttribute VB_TemplateDerived = FalseAttribute VB_Customizable = TrueAttribute VB_Control = "CommandButton1, 1, 0, MSForms, CommandButton"Attribute VB_Control = "CommandButton2, 16, 1, MSForms, CommandButton"Attribute VB_Control = "OptionButton1, 17, 2, MSForms, OptionButton"Attribute VB_Control = "OptionButton2, 18, 3, MSForms, OptionButton"Attribute VB_Control = "OptionButton3, 20, 4, MSForms, OptionButton"Attribute VB_Control = "OptionButton4, 21, 5, MSForms, OptionButton"Attribute VB_Control = "OptionButton5, 22, 6, MSForms, OptionButton"Attribute VB_Control = "OptionButton6, 23, 7, MSForms, OptionButton"Attribute VB_Control = "OptionButton7, 24, 8, MSForms, OptionButton"Private Sub CommandButton1_Click()Dim cox3, cox2, cox, coind, XI, Xva, xli, fli, fva As DoubleDim a, b, tc, pc, error, errort As DoubleDim ALFApr, Mpr, Wpr, vc, zc As DoubleDim bmay, amay, pant, aa, bb, cc, dd, ii As DoubleDim delta, tlim, i, e, res, pl, pu, mul, fp, fl, flil, fval, absoluto, fpant As Double
Dim aviso As Integerr = 10.732ii = 0If OptionButton1.Value = True Then'propanovc = 0.0727tc = 666pc = 616.3Wpr = 0.1524pm = 44.097zc = pc * vc * pm / (r * tc)resi = 3tini = 465aa = 36.861114bb = 0.81955086cc = 0.0042410469dd = 0.000026245677tlim = 665Sheets("Hoja1").Cells(21, 2).Value = tini - 460Sheets("Hoja1").Cells(22, 2).Value = tlim - 460End If
If OptionButton2.Value = True Then'ibutanovc = 0.0714tc = 274.41 + 459.67pc = 527.9Wpr = 0.1852pm = 58.123zc = pc * vc * pm / (r * tc)resi = 0.6tini = 465aa = 10.452317bb = 0.33095835cc = 0.0012663153dd = 0.000015996642tlim = 725Sheets("Hoja1").Cells(21, 2).Value = tini - 460Sheets("Hoja1").Cells(22, 2).Value = tlim - 460End If
If OptionButton3.Value = True Then'n hexanovc = 0.0688tc = 451.68 + 460pc = 439.5Wpr = 0.299pm = 86.177zc = pc * vc * pm / (r * tc)resi = 2.21
tini = 525aa = -2.6111926bb = 0.15331891cc = -0.0013638154dd = 0.0000069844974
tlim = 880Sheets("Hoja1").Cells(21, 2).Value = tini - 460Sheets("Hoja1").Cells(22, 2).Value = tlim - 460End If
If OptionButton4.Value = True Then'Etanovc = 0.0783tc = 90.07 + 460pc = 707.8Wpr = 0.0972pm = 30.07zc = pc * vc * pm / (r * tc)resi = 1.5
tini = 460aa = 219.74623bb = 3.3665728cc = 0.018361742dd = 0.0000491