Vous êtes sur la page 1sur 6

POR: LUIS LAVERDE CASTILLO

Sub Macro1()
' Macro1 Macro
r = (10 - 7) * Rnd + 10
qat = (900 - 600) * Rnd + 900
qap = (450 - 250) * Rnd + 450
p1 = (100 - 60) * Rnd + 100
t1 = (25 - 8) * Rnd + 25
vol = (3000 - 1000) * Rnd + 3000
rev = (4500 - 3500) * Rnd + 4500
Selection.TypeText Text:= _
"Un ciclo dual con una relacin de compresin de " & Round(r, 3) & ",
una adicin"
Selection.TypeText Text:= _
" de calor total de " & Round(qat, 3) & " kJ/kgK en la que la adicin de
calor a pr"
Selection.TypeText Text:= _
"esin constante es de " & Round(qap, 3) & " kJ/kgK , admite aire
atmosfrico a " & Round(p1, 3) & "kPa"
Selection.MoveLeft Unit:=wdCharacter, Count:=3
Selection.TypeText Text:=" "
Selection.MoveRight Unit:=wdCharacter, Count:=3
Selection.TypeText Text:= _
" y " & Round(t1, 3) & "C tiene " & Round(vol, 3) & "cc, es de dos
tiempos y gira a " & Round(rev, 3) & " rpm .Resolver por"
Selection.TypeText Text:=" el mtodo aproximado y determinar"
Selection.MoveLeft Unit:=wdWord, Count:=19, Extend:=wdExtend
Selection.MoveUp Unit:=wdParagraph, Count:=1, Extend:=wdExtend
Selection.ParagraphFormat.Alignment = wdAlignParagraphJustify
Selection.Font.Size = 12
Selection.Font.Name = "Arial"
Selection.Font.Bold = wdToggle
Selection.MoveRight Unit:=wdCharacter, Count:=1

POR: LUIS LAVERDE CASTILLO


Selection.TypeParagraph
With ListGalleries(wdBulletGallery).ListTemplates(1).ListLevels(1)
.NumberFormat = ChrW(61623)
.TrailingCharacter = wdTrailingTab
.NumberStyle = wdListNumberStyleBullet
.NumberPosition = CentimetersToPoints(0.63)
.Alignment = wdListLevelAlignLeft
.TextPosition = CentimetersToPoints(1.27)
.TabPosition = wdUndefined
.ResetOnHigher = 0
.StartAt = 1
With .Font
.Bold = wdUndefined
.Italic = wdUndefined
.StrikeThrough = wdUndefined
.Subscript = wdUndefined
.Superscript = wdUndefined
.Shadow = wdUndefined
.Outline = wdUndefined
.Emboss = wdUndefined
.Engrave = wdUndefined
.AllCaps = wdUndefined
.Hidden = wdUndefined
.Underline = wdUndefined
.Color = wdUndefined
.Size = wdUndefined
.Animation = wdUndefined
.DoubleStrikeThrough = wdUndefined
.Name = "Symbol"
End With
.LinkedStyle = ""

POR: LUIS LAVERDE CASTILLO


End With
ListGalleries(wdBulletGallery).ListTemplates(1).Name = ""
Selection.Range.ListFormat.ApplyListTemplateWithLevel ListTemplate:= _
ListGalleries(wdBulletGallery).ListTemplates(1), ContinuePreviousList:=
_
False, ApplyTo:=wdListApplyToWholeList, DefaultListBehavior:= _
wdWord10ListBehavior
Selection.TypeText Text:="El rendimiento trmico"
Selection.TypeParagraph
Selection.TypeText Text:="La potencia del motor"
Selection.TypeParagraph
Selection.Range.ListFormat.RemoveNumbers
NumberType:=wdNumberParagraph
Selection.TypeText Text:= _
"RESOLUCION DEL PROBLEMA "
' RESOLUCION DEL PROBLEMA
p2 = p1 * r ^ 1.4
t2 = (p2 * t1) / (p1 * r)
qav = qat - qap
t3 = (qav / 0.72) + t2
p3 = (p2 * t3) / t2
t4 = (qav / 1.005) + t3
rc = t4 / t3
relv = r / rc
p5 = p3 / (relv ^ 1.4)
t5 = (p5 * t1) / p1
Qr = 0.718 * (t5 - t1)
Wneto = qat - Qr
efic = (Wneto / qat) * 100
potencia = Wneto / 60
Selection.TypeParagraph
Selection.TypeParagraph

POR: LUIS LAVERDE CASTILLO


With ListGalleries(wdBulletGallery).ListTemplates(1).ListLevels(1)
.NumberFormat = ChrW(61623)
.TrailingCharacter = wdTrailingTab
.NumberStyle = wdListNumberStyleBullet
.NumberPosition = CentimetersToPoints(0.63)
.Alignment = wdListLevelAlignLeft
.TextPosition = CentimetersToPoints(1.27)
.TabPosition = wdUndefined
.ResetOnHigher = 0
.StartAt = 1
With .Font
.Bold = wdUndefined
.Italic = wdUndefined
.StrikeThrough = wdUndefined
.Subscript = wdUndefined
.Superscript = wdUndefined
.Shadow = wdUndefined
.Outline = wdUndefined
.Emboss = wdUndefined
.Engrave = wdUndefined
.AllCaps = wdUndefined
.Hidden = wdUndefined
.Underline = wdUndefined
.Color = wdUndefined
.Size = wdUndefined
.Animation = wdUndefined
.DoubleStrikeThrough = wdUndefined
.Name = "Symbol"
End With
.LinkedStyle = ""
End With

POR: LUIS LAVERDE CASTILLO


ListGalleries(wdBulletGallery).ListTemplates(1).Name = ""
Selection.Range.ListFormat.ApplyListTemplateWithLevel ListTemplate:= _
ListGalleries(wdBulletGallery).ListTemplates(1), ContinuePreviousList:=
_
False, ApplyTo:=wdListApplyToWholeList, DefaultListBehavior:= _
wdWord10ListBehavior
Selection.TypeText Text:="PRESION 2 : " & Round(p2, 3) & " kPa"
Selection.TypeParagraph
Selection.TypeParagraph
Selection.Range.ListFormat.RemoveNumbers
NumberType:=wdNumberParagraph
Selection.TypeText Text:= _
"Utilizando Ley de los Gases "
Selection.TypeText Text:="TEMPERATURA 2 : " & Round(t2, 3) & " C"
Selection.TypeParagraph
Selection.TypeText Text:="CALOR AADIDO A VOLUMEN CONSTANTE 2 : "
& Round(qav, 3) & " kJ/kgK"
Selection.TypeParagraph
Selection.TypeText Text:="TEMPERATURA 3 : " & Round(t3, 3) & " C"
Selection.TypeParagraph
Selection.TypeParagraph
Selection.Range.ListFormat.RemoveNumbers
NumberType:=wdNumberParagraph
Selection.TypeText Text:= _
"Utilizando Ley de los Gases "
Selection.TypeText Text:="PRESION 3 : " & Round(p3, 3) & " kPa"
Selection.TypeParagraph
Selection.TypeText Text:="TEMPERATURA 4 : " & Round(t4, 3) & " C"
Selection.TypeParagraph
Selection.TypeText Text:="PRESION 5 : " & Round(p5, 3) & " kPa"
Selection.TypeParagraph
Selection.TypeParagraph

POR: LUIS LAVERDE CASTILLO


Selection.Range.ListFormat.RemoveNumbers
NumberType:=wdNumberParagraph
Selection.TypeText Text:= _
"Utilizando Ley de los Gases "
Selection.TypeText Text:="TEMPERATURA 5 : " & Round(t5, 3) & " C"
Selection.TypeParagraph
Selection.TypeText Text:="trabajo neto : " & Round(Wneto, 3) & " kJ/kgK"
Selection.TypeParagraph
Selection.TypeText Text:="eficiencia trmica : " & Round(efic, 3) & " %"
Selection.TypeParagraph
Selection.TypeText Text:="La potnecia del motor : " & Round(potencia, 3)
& " kWth"
End Sub

Vous aimerez peut-être aussi