Codigo de Solucion Linea fuente en python

download Codigo de Solucion Linea fuente en python

of 1

Transcript of Codigo de Solucion Linea fuente en python

  • 7/26/2019 Codigo de Solucion Linea fuente en python

    1/1

    __author__ = '116 db'import math as OPimport numpy as npimport matplotlib.pyplot as plt

    k=1t=1phi=1mu=1ct=1rw=1E1=[]pD=[]Vec3=[]#eje XtDrD2=[]

    for i in range(-2,4,1): tDrD2+=[1*10**i]

    Vec1 = np.array(tDrD2)Vec2=1/(4*Vec1) #rD2/4tD

    for j in range(0,6,1):

    Vec3+=[Vec2[j]] if 01: E1+=[-0.57721 + (0.9999*Vec2[j])-(0.24991*(Vec2[j])**2)+(0.05519*(Vec2[j])**3)-(0.00976*(Vec2[j])**4)+(0.00107*(Vec2[j])**5)-(OP.log(Vec2[j],2.718281828))] else: E1+=[(((0.26777)+(8.63476*Vec2[j])+(18.05901*(Vec2[j])**2)+(8.57332*(Vec2[j])**3)+((Vec2[j])**4))/((3.95849)+(21.09965*Vec2[j])+(25.63296*(Vec2[j])**2+(9.57332*(Vec2[j])**3)+((Vec2[j])**4))))*(1/(Vec2[j]*(2.718281828**Vec2[j])))]E=np.array(E1)

    for z in range(0,6,1): pD += [0.5*E[z]]

    plt.plot(Vec1,pD)plt.show()