Académique Documents
Professionnel Documents
Culture Documents
RESOLUCION DE EXAMEN
1
2. INTRODUCCIÓN
Una red de distribución de agua potable es el conjunto de tuberı́as trabajando a presión,
que se instalan en las vı́as de comunicación de los urbanismos y a partir de las cuales
serán abastecidas las diferentes parcelas o edificaciones de un desarrollo.
El primer paso en el diseño de la red de distribución de agua potable es la definición de
su trazado en planta para lo cual es necesario estudiar las caracterı́sticas de la viabilidad,
de la topografı́a y de la ubicación de los puntos de alimentación y estanques
Proyecto de Urbanismo del sector a dotar con la Red de Distribución. Especı́fica-
mente, es necesaria la configuración de la vialidad que da acceso a las distintas
parcelas y edificaciones, dado que el trazado se realizará principalmente siguiendo
dicha configuración. Esto con miras a garantizar el libre acceso a la infraestructura
para eventuales reparaciones y sustituciones por parte de la empresa operadora del
sistema.
2
3. OBJETIVO
Elaborar el calculo de demanda para una proyección futura de agua potable.
4. OBJETIVOS ESPECÍFICOS
Actualizar la base de datos estadı́sticos de la población.
3
5. EXAMEN
5.1. Pregunta N◦ 01
4
5
5.2. resolución
para la solución dela pregunta hallaremos con los datos y formulas. teniendo como
código 2011151122, lo cual termina en ”2”. este dato se reemplazara en el valor de ”x”.
también según la norma para obtener la ”k2”si la población es mayor a 100000, k2 es
igual a 1.8 y cuando la población es menor o igual a 100000 ”k2”. usaremos la formula.
6
en el sistema N◦ 2 tenemos con un Ubs arrastre hidráulico. Teniendo datos obtendremos
”Pf”
7
2) DESARROLLO POR PYTHON PARA AMBOS SISTEMAS
en el sistema N◦ 1 tenemos con un sistema alcantarillado. Teniendo datos obtendremos
”Pf”
8
en el sistema N◦ 2 tenemos con un Ubs arrastre hidráulico. Teniendo datos obtendremos
”Pf”
9
en el sistema N◦ 2 tenemos con un Ubs arrastre hidráulico. Teniendo datos obtendremos
”Pf”
10
calculamos las dotaciones del hospital
qu = 1, 25lt/s/ha
A = 20ha
Q = 1, 25lt/s/ha ∗ 20ha
Q = 25lt/s
para una institución educativa
cantidad dotación
2660 alumno 50 lt/pers./dia
V p = 2660alum ∗ 50lt/pers./dia
V p = 133000lt/dia
11
hallamos:
Qm = 133000lt/dia ∗ 1dia/86400s
Qm = 1,539lt/s
determinamos caudal diario y horario teniendo ”k1=1.3”, ”k2=2.659”
C)Calculo de Qmd
Agregando la demanda de los demas Servicios, Sumando al caudal diario los demas
servicios para obtener un (Qmd).
Qm datos
Qmd (edificio) 0.27083 lt/s
Qm (hospital) 8.33333 lt/s
Qmd (sistema 1) 45.833 lt/s
Qmd (sistema 2) 14.654 lt/s
entonces sumando:
Qmd = 0,27083 + 8,33333 + 45,833 + 14,654lt/s
Qmh = 69,09143lt/s :: 69,09lt/s
12
5.3. DISEÑO DE LINEA DE CONDUCCIÓN
Para poder calcular la linea de conducción asumiremos una perdida de carga de para
obtener alturas con diferencias de las cotas que tenemos como datos:
13
5.3.3. calculo para el tercer tramo
14
5.3.6. calculo del sistema N◦ 1 para el tercer tramo
Reduciendo el caudal por el área de riego según a la demanda. por lo tanto usaremos:
15
5.3.8. calculo del sistema N◦ 2 para el segundo tramo
por lo tanto usaremos: D = 6”(5comercial)parauna : P resion = 19m
16
5.4.1. simulación del reservorio para un periodo extendido
analizamos el periodo extendido según a los factores proporcionados que se muestran
en la siguiente tabla. teniendo el caudal maximo horario: 148.205 obtenemos los datos
para poder diseñar el reservorio.
RESERVORIO TIPO TRONCO CONO
hora factor Qf Qdif Vol(m3) Volacum(m3) Hacum(m)
0 0.4 59.282 88.923 640.246 640.246 0.75
2 0.4 59.282 88.923 640.246 1280.491 1.5
4 0.6 88.923 59.282 426.830 1707.322 2
6 0.9 133.385 14.821 106.708 1814.029 2.12
8 1.2 177.846 -29.641 -213.415 1600.614 1.87
10 1 148.205 0.000 0.000 1600.614 1.87
12 1.3 192.667 -44.462 -320.123 1280.491 1.5
14 0.8 118.564 29.641 213.415 1493.906 1.75
16 0.8 118.564 29.641 213.415 1707.322 2
18 1.2 177.846 -29.641 -213.415 1493.906 1.75
20 0.9 133.385 14.821 106.708 1600.614 1.87
22 0.9 133.385 14.821 106.708 1707.322 2
determinamos el máximo volumen de la tabla:
1814,029m3
Entonces dimensionamos para el máximo volumen el reservorio tronco cono(considerando
contra incendio):
1914,0292m3
hallamos el volumen para el reservorio:
17
Figura 1:
calculo del volumen de diseño
18
nodo Área de Influencia Peso Area*Peso Caudal del area(m3/s) Caudal total (m3/s)
1 3293.07 60 1975.842 0.002613963 0.002613963
2 2896.52 100 2896.52 0.003831985 0.003831985
3 1847.59 78 1441.1202 0.001906547 0.001906547
4 2158.48 80 1726.784 0.002284469 0.002284469
5 1806.59 70 1264.613 0.001673035 0.001673035
6 2554.23 100 2554.23 0.003379148 0.003379148
7 2853.58 100 0.00042495
8 2505.66 100 2505.66 0.003314892 0.003314892
9 2701.84 90 2431.656 0.003216988 0.003216988
10 3460.89 85 2941.7565 0.003891831 0.003891831
11 4925.98 100 4925.98 0.006516883 0.006516883
12 3005.93 70 2104.151 0.002783711 0.002783711
13 6076.3 85 5164.855 0.006832905 0.006832905
14 4655.78 90 4190.202 0.005543477 0.005543477
15 6227.54 100 6227.54 0.008238797 0.008238797
16 2941.18 100 0.0124995
17 2664.92 85 2265.182 0.002996749 0.002996749
18 3418.14 95 3247.233 0.004295965 0.004295965
19 2323.16 100 2323.16 0.003073452 0.003073452
20 3005.37 60 1803.222 0.002385594 0.002385594
21 4409.12 30 1322.736 0.001749929 0.001749929
22 2011.74 65 1307.631 0.001729946 0.001729946
23 2209.17 85 1877.7945 0.00248425 0.00248425
24 1119.19 75 839.3925 0.001110484 0.001110484
TOTAL 57337.2607 0.075855 0.08877945
45,5130Lt/s
19
nodo Área de Influencia Peso Area*Peso Caudal del area(m3/s) Caudal total (m3/s)
1 3293.07 60 1975.842 0.001568378 0.001568378
2 2896.52 100 2896.52 0.002299191 0.002299191
3 1847.59 78 1441.1202 0.001143928 0.001143928
4 2158.48 80 1726.784 0.001370681 0.001370681
5 1806.59 70 1264.613 0.001003821 0.001003821
6 2554.23 100 2554.23 0.002027489 0.002027489
7 2853.58 100 0.00025497
8 2505.66 100 2505.66 0.001988935 0.001988935
9 2701.84 90 2431.656 0.001930193 0.001930193
10 3460.89 85 2941.7565 0.002335099 0.002335099
11 4925.98 100 4925.98 0.00391013 0.00391013
12 3005.93 70 2104.151 0.001670227 0.001670227
13 6076.3 85 5164.855 0.004099743 0.004099743
14 4655.78 90 4190.202 0.003326086 0.003326086
15 6227.54 100 6227.54 0.004943278 0.004943278
16 2941.18 100 0.0074997
17 2664.92 85 2265.182 0.001798049 0.001798049
18 3418.14 95 3247.233 0.002577579 0.002577579
19 2323.16 100 2323.16 0.001844071 0.001844071
20 3005.37 60 1803.222 0.001431356 0.001431356
21 4409.12 30 1322.736 0.001049957 0.001049957
22 2011.74 65 1307.631 0.001037967 0.001037967
23 2209.17 85 1877.7945 0.00149055 0.00149055
24 1119.19 75 839.3925 0.00066629 0.00066629
TOTAL 57337.2607 0.045513 0.05326767
20
Figura 2:
enumerando las lineas.
21
Figura 3:
teniendo los diámetros de tuberı́as.
22
Figura 4:
introduciendo datos y diametros para nuestro calculo
23
Figura 5:
obtenemos las iteraciones
24
Figura 6:
obteniendo las velocidades y preciones
Figura 7:
datos de las lineas
25
Figura 8:
datos nudos
26
LResutados.insert(5,”)
Resutados.insert(6,ÇRECIMIENTO ARITMÉTICO ”)
LResutados.insert(7,”FORMULA: PF = Po ( 1 + r * t )”)
LResutados.insert(8,”DESAROLLO:”)
LResutados.insert(9,”
PF = -str(Po)+”( 1 + ( -str(R)+”* -str(Pd)+”) ) / 100”)
LResutados.insert(10,”
PF = -str(CA)+”hab.”)LResutados.insert(11,)
LResutados.insert(12,”
CRECIMIENTO GEOMÉTRICO ”)
LResutados.insert(13,”FORMULA: PF = Po ( 1 + r ) t”)
LResutados.insert(14,”DESAROLLO:”)
LResutados.insert(15,”
PF = -str(Po)+”( 1 + ( -str(R)+/ 100 ) ) -str(Pd)+)
LResutados.insert(16,”PF = -str(CG)+”hab.”)
LResutados.insert(42,”
DOTACIÓN ”)
LResutados.insert(43,)
LResutados.insert
CAUDAL MEDIO ”)
LResutados.insert(45,”FORMULA: Qm = ( PFT * Dot) / 86400”)
LResutados.insert(46,”DESAROLLO:”)
LResutados.insert(47,”
Qm = ( -str(PFt)+”* -str(D)+”) / 86400 ”)
LResutados.insert(48,”
Qm = -str(round(Qm,4))+”Lt/s”)
LResutados.insert(49,”
LResutados.insert(50,”
?? CAUDAL MÁXIMO DIARIO ”)
LResutados.insert(51,”FORMULA: Qmd = k1 * Qm ”)
LResutados.insert(52,”DESAROLLO:”)
LResutados.insert(53,”
Qmd = -str(k1)+”* -str(Qm)+)
LResutados.insert(54,”
Qmd = -str(round(Qmd,4))+”Lt/s”)
LResutados.insert(55,”
”)
LResutados.insert(56,”
CAUDAL MÁXIMO HORARIO ”)
LResutados.insert(57,”
”)
LResutados.insert(58,”FACTOR DE DEMANDA HORARIO: ”)
if PFt ¿100000:
k2=1.8
LResutados.insert(59,”FORMULA: Si PFT ¿
10000 k2 = 1.8 ”)
LResutados.insert(60,”k2 = -str(k2)+)
LResutados.insert(61,”
27
”)
LResutados.insert(62,”FORMULA: Qmh = k2 * Qm ”)
LResutados.insert(63,”DESAROLLO:”)
LResutados.insert(64,”
Qmh = -str(k2)+”* -str(Qm)+)
LResutados.insert(65,”
Qmh = -str(round(k2*Qm,4))+”Lt/s”)
LResutados.insert(66,”
LResutados.insert(67,”
CAUDAL MÁXIMO MAXIMÓRUM ”)
LResutados.insert(62,”FORMULA: Qmh = Qm * k1 * k2 ”)
LResutados.insert(63,”DESAROLLO:”)
LResutados.insert(64,”
Qmh = -str(Qm)+”* -str(k2)+”* -str(k1)+)
LResutados.insert(65,”
Qmh = -str(round(Qm*k1*k2,4))+”Lt/s”)
LResutados.insert(66,”
else:
k2=(275-((0.75*PFt)/1000))/100
LResutados.insert(67,”FORMULA: Si PFT ¡
10000 —-¿k2 = ( 275 - ( ( 0.75 * PFT ) / 1000 ) / 100 )”)
LResutados.insert(68,”
k2 = -str(round(k2,4))+)
LResutados.insert(69,”FORMULA: Qmh = k2 * Qm ”)
LResutados.insert(70,”DESAROLLO:”)
LResutados.insert(71,”
Qmh = -str(k2)+”* -str(Qm)+)
LResutados.insert(72,”
Qmh = -str(round(k2*Qm,4))+”Lt/s”)
LResutados.insert(73,”
LResutados.insert(74,”
CAUDAL MÁXIMO MAXIMÓRUM )
LResutados.insert(75,”FORMULA: Qmh = Qm * k1 * k2 ”)
LResutados.insert(76,”DESAROLLO:”)
LResutados.insert(78,”
Qmaxmax = -str(Qm)+”* -str(k2)+”* -str(k1)+)
LResutados.insert(79,”
t/s”) LResutados.insert(80,”
def ENTRAR():
Ventana1.withdraw()
Ventana.deiconify()
def SALIR():
Ventana1.withdraw()
Ventana.withdraw()
def LIMPIAR():
LResutados.delete(0, END)
*Creamos nuestra ventana.
Ventana=Tk()
28
Ventana1=Toplevel()
*Dando la geometria de nuestra ventana.
Ventana.geometry(”730x570+440+120”
Ventana1.geometry(”400x400+610+200”)
*Dando un titulo a nuestra ventana.
Ventana.title(.ABASTECIMIENTO DE AGUA Y ALCANTARILLADO”)
Ventana1.title(”DATOS”)
*Configurando nuestra ventana.
Ventana.config(bg=.orange”,cursor=”mouse”)
Ventana1.config(bg=”white”,cursor=”mouse”)
*Creando etiquetas para la primera Ventana.
Usuario=Label(Ventana1,
text=ÜNIVERSIDAD NACIONAL DE HUANCAVELICA”,font=(
.arial”,6,”bold”,ı̈talic”),bg=”white”,
fg=”1A0AF9”).place(x=110,y=15)
Usuario2=Label(Ventana1,
text=”(Creada por Ley Nro. 25265)”,font=(
.arial”,6,”bold”,ı̈talic”),bg=”white”,
fg=”33D0FF”).place(x=145,y=26)
Usuario3=Label(Ventana1, text=.ESCUELA
ACADÉMICA DE INGENIERIA CIVIL - HUANCAVELICA”
,font=(.arial”,5,”bold”,ı̈talic”),bg=”
white”, fg=”1A0AF9”).place(x=88,y=37)
UsuarioX1=Label(Ventana1, text=
,bg=”white”, fg=”FF8033”).place(x=60,y=55)
UsuarioX2=Label(Ventana1, text=
,bg=”white”, fg=”1A0AF9”).place(x=51,y=55)
UsuarioX3=Label(Ventana1, text=
,bg=”white”, fg=”1A0AF9”).place(x=326,y=55)
UsuarioX4=Label(Ventana1, text=ÇÁLCULO
DE LA POBLACIÓN FUTURA Y CAUDAL”
,font=(.arial”,8,”bold”),bg=”white”, fg=”33A9FF”).place(x=68,y=68)
UsuarioX5=Label(Ventana1, text=
,bg=”white”, fg=”1A0AF9”).place(x=326,y=82)
UsuarioX6=Label(Ventana1, text=
,bg=”white”, fg=”1A0AF9”).place(x=51,y=82)
UsuarioX7=Label(Ventana1, text=
,bg=”white”, fg=”FF8033”).place(x=68,y=82)
UsuarioX8=Label(Ventana1, text=
,bg=”white”, fg=”FF8033”).place(x=15,y=210)
Usuario10=Label(Ventana1, text=ÇÁTEDRA
:”,font=(.arial”,8,”bold”),bg=”white”,
fg=”1A0AF9”).place(x=20,y=230)
Usuario11=Label(Ventana1,
text=.ABASTECIMIENTO
DE AGUA Y ALCANTARILLADO”,
font=(.arial”,8,”bold”),bg=”white”,
fg=”1A0AF9”).place(x=110,y=230)
29
Usuario12=Label(Ventana1, text=ÇATEDRÁTICO :
”,font=(.arial”,8,”bold”),bg=”white”,
fg=”1A0AF9”).place(x=20,y=245)
Usuario13=Label(Ventana1, text=Ïng. Ivan,
ALAYA BIZARRO”,font=(.arial”,8,”bold”),bg=”white”,
fg=”1A0AF9”).place(x=110,y=245)
Usuario14=Label(Ventana1, text=”GRUPO
:”,font=(.arial”,8,”bold”),bg=”white”,
fg=”1A0AF9”).place(x=20,y=262)
Usuario15=Label(Ventana1, text=”DARCY”,font=
(.arial”,8,”bold”),bg=”white”,
fg=”1A0AF9”).place(x=110,y=262)
Usuario16=Label(Ventana1, text=ÇICLO
: ”,font=(.arial”,8,”bold”),bg=”white”,
fg=”1A0AF9”).place(x=20,y=277)
Usuario17=Label(Ventana1, text=”VIII”,font=(.a
rial”,8,”bold”),bg=”white”,
fg=”1A0AF9”).place(x=110,y=277)
Usuario18=Label(Ventana1, text=”SECCIÓN
:”,font=(.arial”,8,”bold”),bg=”white”,
fg=”1A0AF9”).place(x=20,y=292)
Usuario19=Label(Ventana1, text=Ç”,font=(.arial”
,8,”bold”),bg=”white”,
fg=”1A0AF9”).place(x=110,y=292)
UsuarioX8=Label(Ventana1, text=
,bg=”white”, fg=”FF8033”).place(x=15,y=312)
Agregando una imagen para la primera Ventana.
Imagen=PhotoImage(file=ÇIVIL.gif”)
lblImagen=Label(Ventana1,image=Imagen)
.place(x=20,y=2)
Imagen1=PhotoImage(file=ÜNH.gif”)
lblImagen=Label(Ventana1,image=Imagen1).
place(x=318,y=2)
Imagen2=PhotoImage(file=”gotall.png”)
lblImagen=Label(Ventana1,image=Imagen2).
place(x=160,y=99)
ImagenBoton=PhotoImage(file=”boton1.png”)
SalirAut=Button(Ventana1,image=ImagenBoto
n,command=ENTRAR ,height=50,width=175
cursor=”mouse”).place(x=115,y=335)
*Creando etiquetas para la segunda Ventana1.
Usuario20=Label(Ventana, text=ÇÁLCULO DE LA POBLACIÓN FUTURA Y CAUDAL”,font=(.aria
,bg=”white”,
fg=”1A0AF9”).place(x=80,y=10)
Usuario21=Label(Ventana, text=ÏNGRESE LA POBLACIÓN ACTUAL
:”,font=(.arial”,11,”bold”),bg=”white”,
fg=”1A0AF9”).place(x=10,y=70)
Usuario22=Label(Ventana, text=ÏNGRESE TASA ANUAL DE CRECIEMIENTO
30
:”,font=(.arial”,11,”bold”),bg=”white”,
Usuario23=Label(Ventana, text=ÏNGRESE EL PERIODO DE DISEÑO
:”,font=(.arial”,11,”bold”),bg=”white”,
fg=”1A0AF9”).place(x=10,y=130)
Usuario24=Label(Ventana, text=ÏNGRESE LA DOTACIÓN DE AGUA
:”,font=(.arial”,11,”bold”),bg=”white”,
fg=”1A0AF9”).place(x=10,y=160)
Usuario25=Label(Ventana, text=ÏNGRESE EL FACTOR DIARIO K1
:”,font=(.arial”,11,”bold”),bg=”white”,
fg=”1A0AF9”).place(x=10,y=190)
Usuario26=Label(Ventana, text=RESULTADOS”,font=(.arial”
,11,”bold”),bg=”white”,
fg=”1A0AF9”).place(x=2,y=245)
*Creando un campo de texto para usuario.
Población=StringVar()
Población.set(30000)
TUsuario=Entry(Ventana,textvariable=Población,
font=(.ARIAL”, 13),bg=”fff”, width=15,
justify=RIGHT).place(x=340, y=70)
TasaDc=StringVar()
TasaDc.set(3)
TUsuario1=Entry(Ventana,textvariable=TasaDc,
font=(.ARIAL”, 13),bg=”fff”, width=15,
justify=RIGHT).place(x=340, y=100)
PerioD=StringVar()
PerioD.set(20)
TUsuario2=Entry(Ventana,textvariable=PerioD,
font=(.ARIAL”, 13),bg=”fff”, width=15,
justify=RIGHT).place(x=340, y=130)
Dotación=StringVar()
Dotación.set(180)
TUsuario3=Entry(Ventana,textvariable=Dotación, f
ont=(.ARIAL”, 13),bg=”fff”, width=15,
justify=RIGHT).place(x=340, y=160)
factor=StringVar()
factor.set(1.3)
TUsuario4=Entry(Ventana,textvariable=factor,
font=(.ARIAL”, 13),bg=”fff”, width=15,
justify=RIGHT).place(x=340, y=190)
ImagenBoton1=PhotoImage(file=ÇALCULAR.gif”)
CalcularAut=Button(Ventana,image=ImagenBoton1
,command=ABAST1,height=45,width=190,
cursor=”mouse”).place(x=500,y=65)
ImagenBoton2=PhotoImage(file=”LIMPIAR.gif”)
CalcularAut=Button(Ventana,image=ImagenBoton2,
command=LIMPIAR,height=40,width=140,
cursor=”mouse”).place(x=525,y=120)
ImagenBoton3=PhotoImage(file=”SALIR.gif”)
31
CalcularAut=Button(Ventana,image=ImagenBoton3,
command=SALIR,height=40,width=140,
cursor=”mouse”).place(x=525,y=170)
LResutados= Listbox(Ventana,fg=”47D542”,bg=”b
lack”,font=(.ARIAL”,11), width=90, height=15,r
elief=RAISED,cursor=”mouse”)
LResutados.place(x=3,y=270)
Ventana.mainloop
32
for II in range (0,2*a):
REST.append(COMPR[II]-MULT[II])
A.remove(A[I])
A.insert(I,REST)
ANUEVO=[]
for FI in range (0,len(A)):
ANUEVO.append(A[FI][a:2*a])
return ANUEVO
def CALCULAR1():
K=eval(RUGOSI.get())
v=eval(VISCOSID.get())
L=eval(LONG.get())
Q=eval(CAUDAL.get())
Hf=eval(HFm.get())
EEEEEE=eval(error.get())
DEDE=eval(decimal.get())
ERROR=1
n=1
f=0.011
d=0.277
texto.insert(INSERT)
texto.insert(INSERT, ÏTERACIÓN-”
MATRIZ DE DERIVADAS -”
MATRIZ DE [-F1,-F2] -”f -”
diámetro(m)-”
ERROR(Norma))
while (ERROR¿0.000000001):
FUNCIONES DE DARCY Y DERIVADAS
CF1=-8*L*Q**2/(9.81*math.pi**2)
F1=Hf+CF1*f/d**5
DFF1=CF1*d**(-5)
DDF1=CF1*f*(-5)*d**-6
FUNCIONES DE COLEBOK WHITE Y DERIVADAS
b=2.51*math.pi*v/(4*Q)
c=K/(3.71*d)
XF=f**-0.5
XD=f**-1.5
F2=XF+2*math.log10(b*XF*d+c)
DFF2=-0.5*XD-1/(math.log(10))*(b*d*XD)/(b*XF*d+c)
DDF2=2*(-c*1/d+b*XF)/((math.log(10))*(b*XF*d+c)
MAM=[[DFF1,DDF1],[DFF2,DDF2]]
MAINV=MATRINV(MAM)
MFUN=[-F1,-F2]
MPE=[]
for MI in range (0,2):
a=0
for FI in range (0,2):
a=a+MAINV[MI][FI]*MFUN[FI]
33
MPE.append(a)
fm=f+MPE[0]
dm=d+MPE[1] ERROR=((fm-f)**2+(dm-d)**2)**0.5 texto.insert(INSERT, +str(n)+”t
-str([[round(DFF1,4),round(DDF1,4)], [round(DFF2,4),round(DDF2,4)]])++str([round(-
F1,4),round(-F2,4)])++str (round(f,4))+””+str(round(d,6))++str(round(ERROR,12))+
) n=n+1 f=fm d=dm texto.insert(INSERT, RESULTULTADOS DE LA ITERACIÓN
FINAL)
texto.insert(INSERT, ”
DIÁMETRO EXACTO(m.): -str(d)+)
texto.insert(INSERT, ”VELOCIDAD(m/s): -str(4*Q/(math.pi*d**2))+)vv
texto.insert(INSERT, ”v
Hf(m.):-str(Hf))
texto.config(state=DISABLED)
def SALIR1():
Metodo1.withdraw()
def ACEPTARA():
Autor.withdraw()
ventana.deiconify()
def INFO():
Autor.deiconify()
ventana.withdraw()
ventana = Tk()
Metodo1=Toplevel()
Autor=Toplevel()v
ventana.resizable(0,0)
Metodo1.resizable(0,0)v
Autor.resizable(0,0)
Xv = int((ventana.winf os creenwidth()−300)/2)Xv1 = int((ventana.winf os creenwidth()−
730)/2)Y v = int((ventana.winf os creenheight()−300)/2)Y v1 = int((ventana.winf os creenheight()−
570)/2)ventana.geometry(”300x300+”+str(Xv)+”+”+str(Y v))ventana.conf ig(bg =
”477dcd”, cursor = ”mouse”)ventana.title(”M ECAN ICADEF LU IDOS”)M etodo1.geometry(”820x
”+str(Xv1)+”+”+str(Y v1))M etodo1.conf ig(bg = ”477dcd”, cursor = ”mouse”)M etodo1.title(”T IP O
” + str(Xv) + ” + ” + str(Y v))
Autor.conf ig(bg = ”477dcd”, cursor = ”mouse”)
Autor.title(”IN F O”)
Autor.protocol(”W MD ELET EW IN DOW ”, ”onexit”)v
U suario230 = Label(M etodo1,
text=”LÍNEA DE CONDUCCIÓN POR NEWTON”,font=(.Aharoni”,17,”bold”,ı̈talic”),bg=”black”,vv
fg=”339FFF”).place(x=200,y=10)
Lcaudal=Label(Metodo1,
text=Ïngrese el coef. de rugosidad(m): ”,font=(.ARIAL”, 13),
bg=”477dcd”).place(x=10, y=50)
Llongitud=Label(Metodo1,
text=Ïngrese la viscocidad cinemática: ”,font=(.ARIAL”, 13),
bg=”477dcd”).place(x=10, y=75)
Ldiametro=Label(Metodo1,
text=Ïngrese longitd(m): ”,font=(.ARIAL”, 13),v bg=”477dcd”).place(x=10, y=100)v
Lviscocidad=Label(Metodo1,
34
text=Ïngrese caudal: ”,font=(.ARIAL”, 13),
bg=”477dcd”).place(x=10, y=125) Lrugosidad=Label(Metodo1,
text=Ïngrese pérdida de carga: ”,font=(.ARIAL”, 13)
, bg=”477dcd”).place(x=10, y=150)
Lerror=Label(Metodo1,
text=Ïngrese el error: ”,font=(.ARIAL”, 13),
bg=”477dcd”).place(x=10, y=175)
Ldecimales=Label(Metodo1,
text=”Numero de decimales: ”,font=(.ARIAL”, 13),
bg=”477dcd”).place(x=370, y=110)
RUGOSI=StringVar()
RUGOSI.set(0.00000115)
Ecaudal=Entry(Metodo1,textvariable=RUGOSI,
font=(.ARIAL”, 13),
bg=”fff”, width=10, justify=RIGHT).place(x=260, y=50)
VISCOSID=StringVar()
VISCOSID.set(0.00000114)
Elongitud=Entry(Metodo1,textvariable=VISCOSID,
font=(.ARIAL”, 13),
bg=”fff”, width=10, justify=RIGHT).place(x=260, y=75)
LONG=StringVar()LONG.set(5000)
Ediametro=Entry(Metodo1,textvariable=LONG,
font=(.ARIAL”, 13),bg=”fff”, width=10,
justify=RIGHT).place(x=260, y=100)
CAUDAL=StringVar()CAUDAL.set(0.3)
Eviscocidad=Entry(Metodo1,textvariable=CAUDAL
,font=(.ARIAL”, 13),bg=”fff”, width=10,
justify=RIGHT).place(x=260, y=125)
HFm=StringVar()HFm.set(251.3451) font=(.ARIAL”, 13),bg=”fff”, width=10, justify=RIGHT).place(x
y=150)
error=StringVar()
error.set(0.000001)Eerror=Entry(Metodo1, textvariable=error,font=(.ARIAL”, 13),bg=”fff”,
width=10,justify=RIGHT).place(x=260, y=175)
decimal=StringVar()decimal.set(4)Edecimal=Entry(Metodo1,textvariable=decimal,
font=(.ARIAL”, 13),bg=”fff”, width=10,
justify=RIGHT).place(x=550, y=110)
Metodo1B=Button(ventana,
text=”PROBLEMAS TIPO I”, font=(.ARIAL”, 15), command=METODO1F,cursor=”mouse”).place(x
y=60) CalcularB1=Button(Metodo1,
text=ÇALCULAR?”, font=(.ARIAL”,14),
command=CALCULAR1,cursor=”mouse”).place(x=190,y=215)
SalirM1=Button(Metodo1,
text=¿SALIR”, font=(.ARIAL”,14),
command=SALIR1,cursor=”mouse”).place(x=450,y=215)
SalirAut=Button(Autor,text=.ACEPTAR?”, font=(.ARIAL”,14),
command=ACEPTARA,cursor=”mouse”).place(x=100,y=170)
info = Button(ventana,
text =ı̈nfo”, relief=RAISED,
35
bitmap=ı̈nfo”,
command=INFO, width=25, height=25).place(x=250,y=260)
ventana.withdraw()
Metodo1.withdraw()
texto= Text(Metodo1, font=(.ARIAL”,9,”bold”,ı̈talic”)
,width=120, height=20,relief=RAISED,cursor=”mouse”)
texto.place(x=0,y=255)
texto.config(state=DISABLED)
ventana.mainloop()
36