Rev. | 2957f3555ae842d04275e37a93084dbb2acbcaad |
---|---|
Tamanho | 751 bytes |
Hora | 2007-03-16 17:59:37 |
Autor | iselllo |
Mensagem de Log | I added the code Python-codes/BC.py which simply reads a data file and
|
#! /usr/bin/env python
from scipy import *
import pylab # used to read the .csv file
from scipy.special import * # to be able to use the error function
def asym(x,v,L):
asym=(x-v+L)*exp(-(v**2.)/2.)
return asym
vec_prof=vectorize(asym)
#my_result2=pylab.load("wall_T9000.txt")
my_result2=pylab.load("steady-x10.txt")
v=linspace(-8.,8.,20000)
x=10.
L=1.46
v_asym=vec_prof(x,v,L)
pylab.plot(my_result2[:,0],my_result2[:,1]/max(my_result2[:,1])\
,-v,v_asym/max(v_asym),linewidth=1.5)
pylab.legend(('steady, x_source=0, x=10, x_wall=20', 'asymptotics-Titulaer'))
pylab.xlabel('velocity')
#pylab.ylabel('Expectation value of Vx')
pylab.title('Green function')
pylab.grid(True)
pylab.savefig('green_function_wall-comparison-Titulaer')
pylab.show()