Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download

All published worksheets from http://sagenb.org

Views: 168756
Image: ubuntu2004

Question1.80

Find an expression for the streamlines of the flow and sketch a few lines

from pylab import * theta = 0.5 cset = [-2,-1,0,1,2] x = arange(-2.1,2.1,0.01) clf() for c in cset: y = tan(theta)*x + c plot(x,y,label='C='+str(c)) legend() axis([-2,2,-2,2],) grid() savefig('1.80.png')

Question 1.83

Find the time-varing streamlines which pass though reference point (x0, y0)

from pylab import * timeslot = [-0.4,-0.2,0,0.5,1.0] x = arange(0,2.1,0.01) clf() for t in timeslot: y = x**(1+2*t) plot(x,y,label='t='+str(t)[0:4]+'s') legend(loc='upper left') axis([0,2,0,2]) xlabel(r'$x/x_0$') ylabel(r'$y/y_0$') grid() savefig('1.83.png')

Question 1.84

Find the equation of the pathline which passes through the point (x0, y0)at t=0

# Scripts to plot the flow pathline in Question 1.84. Written by Aaron Zhang # For MAE 3030 Fluid Mechanics, Department of Mechanical & Automation Engineering # The Chinese University of Hong Kong from pylab import * y = arange(0.1,2,0.01) x = exp(log(y)+log(y)*log(y)) clf() plot(x,y) axis([0,2,0,2]) xlabel(r'$x/x_0$') ylabel(r'$y/y_0$') grid() savefig('1.84.png')