You are on page 1of 3

6/10/21 10:26 Untitled9 - Jupyter Notebook

In [ ]: Problema 8.46

In [ ]: Xiomara Giselle Valdez Gómez

localhost:8888/notebooks/Untitled9.ipynb?kernel_name=python3 1/3
6/10/21 10:26 Untitled9 - Jupyter Notebook

In [5]: import math as m


import numpy as np
import pandas as pd
from matplotlib import pyplot as plt

T=40
d=1252
Miu=0.27
D=[0.01,0.02,0.03,0.04,0.05,0.06,0.07,0.08,0.09,0.1]
v=3.5
L=10
Ac1=[1,1,1,1,1,1,1,1,1,1]
Re1=[1,1,1,1,1,1,1,1,1,1]
Pt1=[1,1,1,1,1,1,1,1,1,1]
i=0
while i<10:
Ac=(m.pi*(D[i]**2))/4
V=v*Ac
Re=(d*v*D[i])/Miu
f=64/Re
Pt=f*(L/D[i])*((d*v**2)/2)
Ac1[i]=Ac
Re1[i]=Re
Pt1[i]=Pt/1000
i=i+1
print(Pt1)
datos1={"Diámetro de tubería(m)":D,"Caída de presión (Kpa)":Pt1}
df1=pd.DataFrame(datos1)
print("\n"*1)
print(df1)

plt.ion()
plt.clf()
plt.xlim(0,0.12)
plt.ylim(30,3025)
plt.plot(D,Pt1,color='pink', linestyle='dashed', linewidth =3,
marker='*', markerfacecolor='silver', markersize=10, label="Caída de pre
plt.legend()
plt.xlabel("Diámetro de tubería(m)")
plt.ylabel("Caída de presión(kPa)")

[3024.0000000000005, 756.0000000000001, 336.0, 189.00000000000003, 120.959999


99999998, 84.0, 61.714285714285694, 47.25000000000001, 37.333333333333336, 3
0.239999999999995]

Diámetro de tubería(m) Caída de presión (Kpa)

0 0.01 3024.000000

1 0.02 756.000000

2 0.03 336.000000

3 0.04 189.000000

4 0.05 120.960000

5 0.06 84.000000

6 0.07 61.714286

7 0.08 47.250000

localhost:8888/notebooks/Untitled9.ipynb?kernel_name=python3 2/3
6/10/21 10:26 Untitled9 - Jupyter Notebook

8 0.09 37.333333

9 0.10 30.240000

Out[5]: Text(0, 0.5, 'Caída de presión(kPa)')

In [ ]: ​

localhost:8888/notebooks/Untitled9.ipynb?kernel_name=python3 3/3

You might also like