Question: Language: Python A velocity field in the xy plane is given by Where: (1) (2) a) _Use the function down, Which plots contour lines for
Language: Python
A velocity field in the xy plane is given by
Where:
(1)
(2)

a)_Use the function
down, Which plots contour lines for
when:

_Represent cases (i) and (ii) in their respective diagrams. Compare the plots with point e) in the previous problem and discuss the selected values for n.
b) Write a function (filname velfield.py) that calculates velocities based on equation (1) at the call:

_The function
:
from numpy import linspace, meshgrid, cos, pi def streamfun(n=20): '''Regner ut et grid og en strmfunksjon''' x=linspace(-0.5*pi,0.5*pi,n) #resultatet er en vektor med n elementer, fra -pi/2 til pi/2 [X,Y] = meshgrid(x,x) psi=cos(X)*cos(Y) return X, Y, psi
Other details:
= 
v=vi+vyj Uz = cos(2) sin(y), Vy = -sin :) cos(y). U = cos(2) cos(y). Ar = Ay = n1 streamfun (i) n=5 (ii) n = 30 >> x,y,u,v=velfield(n) v=vi+vyj Uz = cos(2) sin(y), Vy = -sin :) cos(y). U = cos(2) cos(y). Ar = Ay = n1 streamfun (i) n=5 (ii) n = 30 >> x,y,u,v=velfield(n)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
