Sei sulla pagina 1di 5

File:C:\Users\PC\Desktop\PROGRAMACION TRANSFER EES.EES 17/11/2017 10:43:41 a. m.

Page 1
EES Ver. 8.400: #91: Educational version distributed by McGraw-Hill

"PROGRAMA MTODOS NUMERICOS TC"


"Ejemplo 5-5 Cengel"

{"Mtodo explicito"
PROCEDURE MetodoExplicito(entrada:T1i;T2i)

"Datos"
L=0,04
M=3
DX=L/(M-1)
Dt=15 "segundos"
alpha=12,5e-6
e_dot=5e6
k=28
h=45
To=0 "Condicin de frontera"
Tinf=30
tao=(alpha*Dt)/(DX^2)

"Condiciones iniciales"
T1i=200
T2i=200
iter=0

Repeat
"-----------------------------------------------------------------------------------------------"
"Nodo interior"
T1ii= tao*(To+T2i)+(1-2*tao)*T1i + tao*(e_dot*DX^2)/k
"Nodo frontera"
T2ii= (1-2*tao-2*tao*(h*DX/k))*T2i + tao*(2*T1i + 2*(h*DX/k)*Tinf + (e_dot*DX^2/k))
T1i=T1ii
T2i=T2ii
iter:=iter+1
"------------------------------------------------------------------------------------------------"
until(iter>9)

END

"Llamo a la funcin para calcular las Temperaturas"


CALL MetodoExplicito(1:T1i;T2i)}

"&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&"
"Mtodo implicito"
PROCEDURE MetodoImplicito(entrada:T1i;T2i)

"Condiciones iniciales"
T1i=200
T2i=200
iter=0

"Bucle - Ciclo"
Repeat
"-----------------------------------------------------------------------------------------------"
"Nodo frontera"
T2ii= ( -34,386 - T2i - 0,48387*T1i - 16,2009 ) / ( -1,7408 )
"Nodo interior"
File:C:\Users\PC\Desktop\PROGRAMACION TRANSFER EES.EES 17/11/2017 10:43:41 a. m. Page 2
EES Ver. 8.400: #91: Educational version distributed by McGraw-Hill

T1ii= ( -34,386 - T2i + 1,9676*T2ii )/(0,9375 )


"Actualizo T1i y T2i"
T1i=T1ii
T2i=T2ii
iter:=iter+1
"------------------------------------------------------------------------------------------------"
until(iter>9)
"10 iteraciones - cada iter son 15 seg."
END

"Llamo a la funcin para calcular las Temperaturas"


CALL MetodoImplicito(1:T1i;T2i)

"&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&"
"TRANSFERENCIA DE CALOR"
"Mtodos Numericos - Ejemplo 5.1 Cengel"

"Estado estacionario, 3 nodos."

"Datos"
L=0,04
M=3
DX=L/(M-1)
e_dot=5e6
k=28
h=45
To=0 "Condicin de frontera"
Tinf=30

"Ecuaciones"
"Nodo 1"
2*T1-T2= e_dot*DX^2/k
"Nodo 2"
T1 -(1+h*DX/k)*T2=-h*DX*Tinf/k - e_dot*DX^2/(2*k)

PROGRAMA MTODOS NUMERICOS TC

Ejemplo 5-5 Cengel


File:C:\Users\PC\Desktop\PROGRAMACION TRANSFER EES.EES 17/11/2017 10:43:41 a. m. Page 3
EES Ver. 8.400: #91: Educational version distributed by McGraw-Hill

&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&

Mtodo implicito

Procedure MetodoImplicito (entrada : T1iT2i)

Condiciones iniciales

T1i := 200

T2i := 200

iter := 0

Bucle - Ciclo

Repeat

-----------------------------------------------------------------------------------------------

Nodo frontera

34,386 T2i 0,48387 T1i 16,2009


T2ii :=
1,7408

Nodo interior

34,386 T2i + 1,9676 T2ii


T1ii :=
0,9375

Actualizo T1i y T2i

T1i := T1ii

T2i := T2ii

iter := iter + 1

------------------------------------------------------------------------------------------------

Until iter > 9

10 iteraciones - cada iter son 15 seg.

End MetodoImplicito

Llamo a la funcin para calcular las Temperaturas

Call MetodoImplicito 1 : T1i ; T2i

&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&

TRANSFERENCIA DE CALOR
File:C:\Users\PC\Desktop\PROGRAMACION TRANSFER EES.EES 17/11/2017 10:43:41 a. m. Page 4
EES Ver. 8.400: #91: Educational version distributed by McGraw-Hill

Mtodos Numericos - Ejemplo 5.1 Cengel

Estado estacionario, 3 nodos.

Datos

L = 0,04

M = 3

L
DX =
M 1

6
e = 5, x 10

k = 28

h = 45

To = 0 Condicin de frontera

Tinf = 30

Ecuaciones

Nodo 1

2
DX
2 T1 T2 = e
k

Nodo 2

2
DX Tinf DX
T1 1 + h T2 = h DX e
k k 2 k

SOLUTION
Unit Settings: [J]/[C]/[Pa]/[kg]/[degrees]
DX = 0,02 e = 5,000E+06 h = 45 k = 28
L = 0,04 M=3 T1 = 103,7 T1i = 109,4
T2 = 136 T2i = 143,9 Tinf = 30 To = 0

No unit problems were detected.

Local variables in Procedure MetodoImplicito (1 call, 0,02 sec)


entrada =1 iter =10 T1i =109,4 T1ii =109,4 T2i =143,9
T2ii =143,9

There are a total of 12 equations in 4 blocks.


Block Rel. Res. Abs. Res. Units Calls Equations
0 0.000E+00 0.000E+00 OK 1 L=0,04
File:C:\Users\PC\Desktop\PROGRAMACION TRANSFER EES.EES 17/11/2017 10:43:41 a. m. Page 5
EES Ver. 8.400: #91: Educational version distributed by McGraw-Hill

0 0.000E+00 0.000E+00 OK 1 M=3


0 0.000E+00 0.000E+00 OK 1 e_dot=5e6
0 0.000E+00 0.000E+00 OK 1 k=28
0 0.000E+00 0.000E+00 OK 1 h=45
0 0.000E+00 0.000E+00 OK 1 To=0
0 0.000E+00 0.000E+00 OK 1 Tinf=30
0 0.000E+00 0.000E+00 OK 4 DX=L/(M-1)
1 3,008E-13 -3,290E-11 OK 3 T1i=MetodoImplicito(1;1)
2 3,876E-13 5,576E-11 OK 3 T2i=MetodoImplicito(1;2)
3 6,987E-13 4,991E-11 OK 4 2*T1-T2=e_dot*DX^2/k
3 2,623E-13 9,622E-12 OK 4 T1-(1+h*DX/k)*T2=-h*DX*Tinf/k-e_dot*DX^2/(2*k)