Commit 24a2ca54 authored by Matheus Müller's avatar Matheus Müller

Funcao que gera distribuição de concentraçao

parent d5cdd069
from pylab import * from pylab import *
def montaperfil( arquivo, step, modo, xmax): u = 0
x,y = loadtxt(arquivo, unpack=True) def montaperfil( x, y , step, modo):
profundidade = arange(0, xmax, step)
profundidade = arange(0, len(x), step)
concent = profundidade*0 concent = profundidade*0
u = 0
if modo == 'step': if modo == 'step':
global u global u
for i in x: for i in x:
for j in arange (u, i, step) for j in arange (u, i, step):
concent[int(j/step)] = y[i] concent[int(j/step)] = y[i]
u = i u = i
if modo == 'reta': if modo == 'reta':
global u global u
for i in x: for i in x:
for j in arange (u, i, step) for j in arange (u, i, step):
concent[int(j/step)] = (j-u)*(y[i]-y[u])/(x[i]-x[u]) concent[int(j/step)] = (j-u)*(y[i]-y[u])/(x[i]-x[u])
u = i u = i
......
from concentracao import *
x,y = np.loadtxt('H2.py', unpack=True)
modo = 'step'
modo2 = 'reta'
montaperfil( x, y, 0.05, modo)
#montaperfil( x, y, 0.05, modo2)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment