-- AER004: Mécanique des fluides appliquée --

TN n°7

Exploitation des donnée du banc Hydraulique

simon.marie@lecnam.net

Pour ceux qui ne seraient pas familier avec le language python, vous pouvez consulter le Notebook Introduction au Python.

In [1]:
import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline
In [2]:
A=np.loadtxt('Data_expe_Hydro.dat')
In [3]:
Hi=A[0,0];
x=A[1:,0]
y=A[0,1:]
H=A[1:,1:]
M=np.sqrt(2.*((Hi/H)-1.))
In [4]:
plt.contour(y,x,M)
plt.colorbar()
plt.axis('equal')
Out[4]:
(0.0, 40.0, 0.0, 27.0)
In [5]:
def isentropique(M,gamma=2.):
    T=(1.+0.5*(gamma-1.)*M**2)**-1
    rho=T**(1./(gamma-1))
    p=rho**gamma
    S=(1./M)*((2./(gamma+1))+((gamma-1)/(gamma+1))*M**2)**((gamma+1)/(2*(gamma-1)))
    return T,rho,p,S
In [6]:
isentropique(1.35)
Out[6]:
(0.5232177894048398,
 0.5232177894048398,
 0.27375685514968723,
 1.0653825779528099)
In [7]:
180.*np.arcsin(1./1.35)/np.pi
Out[7]:
47.794553596267711
In [1]:
from IPython.core.display import HTML
style=open('notebooks.css', "r").read()
HTML(style)
Out[1]: