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 Language: Python A velocity field in the xy plane is given by Where:

Where: (1) (2) a)_Use the function down, Which plots contour lines for (1)

when: _Represent cases (i) and (ii) in their respective diagrams. Compare the (2)

plots with point e) in the previous problem and discuss the selected

a)_Use the function values for n. b) Write a function (filname velfield.py) that calculates velocities down, Which plots contour lines for based on equation (1) at the call: _The function : from numpy when:

import linspace, meshgrid, cos, pi def streamfun(n=20): '''Regner ut et grid og

_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:

en strmfunksjon''' x=linspace(-0.5*pi,0.5*pi,n) #resultatet er en vektor med n elementer, fra -pi/2

_The function til pi/2 [X,Y] = meshgrid(x,x) psi=cos(X)*cos(Y) return X, Y, psi Other details::

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)

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!