The MATLAB code for #4 is;
x=-4:0.2:4;
y=-4:0.2:4;
[X,Y]=meshgrid(x,y);
for i=1:length(x)
for j=1:length(y)
vx(i,j)=1/sqrt(X(i).^2+Y(j).^2);
vy(i,j)=-(X(i)*Y(j))./sqrt(X(i).^2+Y(j).^2);
end;
end;
cav=curl(X,Y,vx,vy);
contour(X,Y,cav)
xlabel('x');
ylabel('y');
have 3 need help with #4 3. For the following two-dimensional flow, plot the velocity vectors...
I need help with this. Thank you for your time.
4.1 Consider the following two-dimensional vector fields: х F(x, y) = i + 1x² + y² х Ĝ(x,y) = i + (x2 + y2) Vx2 + y2 y 1x² + y² (x2 + y2 Sketch † (x, y) and Ĝ(x,y) on two separate graphs. Plot the field vectors at the following square grid of 25 points: The first upper row of points is (-2,2),(-1,2) (2,2) The last lower row of...
2. Using the MATLAB "integral" command, numerically determine the Fourier Cosine series of the following function. Assume each case has an even extension (b,-0) Last Name N-Z: f= 2xcos (Vx+4), 0<x<3 (Hint: after extension L-3) Have your code plot both the analytical function (as a red line) and the numerical Fourier series (in blue circles -spaced appropriately). Use the Legend command to identify the two items. It is suggested to use a series with 15 terms.
Problem #2: Consider the following vectors, which you can copy and paste directly into Matlab. x=[3 4 4 3 5 5 1 2 32); y [2 4 4622 4 2 4] Use the vectors x and y to create the following matrix. 3 2 0 0 0 0 0 0 0 o Such a matrix is called a tri-diagonal matrix. Hint: Use the diag command three times, and then add the resulting matrices. To check that you have correctly created...
Thank you!
A three dimensional flow has a velocity field given by 5. Vasin(t)itycos(t)jtzcos(t/2)k. What is the speed of the flow at t-z/3, x = 4, y =3, z-2.5? (Note, take sines and cosines with radians!). 6. A two-dimensional flow has a velocity field V given by V = (1/y)/ +x3/2, what is the slope of the streamline at (2,3)?
3. (30 points) Consider a two-dimensional flow of a Newtonian fluid in which the velocity field is given by 2ry (a) (5 points) Is this flow incompressible? b) (10 points) Use the x-momentum equation to determine ap/aa (e) (10 points) Use the y-momentum equation to determine ap/dy (d) (5 points) Use the above results to integrate and solve for p(x, y). Evaluate constant of integration by setting p(0,0- Pa as a condition (e) (45 Bonus points) Determine the viscouas stress...
Converging duct flow is modeled by the steady, two-dimensional velocity fieldV(u, v)Uo+ bx) i - byj For the case in which Uo 5.0 ft/s and b 4.6s-1, consider an initially square fluid particle of edge dimension 0.5 ft. centered at x 0.5 ft and y 1.0 ft at t0, as shown in the figure. Carefully calculate and plot where the fluid particle will be and what it will look like at time t 0.2 s later. Comment on the fluid...
Let the two vectors x & y and the matrix z be defined as follows 1.2 2.2 4.1 x-| 2.21, y-| 1.51,2-12.1-3.2 1.9 3.1 1.2 3.2 0.35 Write a script in Matlab and save it as .m file with name HW19_2. The script will execute the following tasks 1 Enter the vectors x &y and the Matrix z into the script. 2- Evaluate L2 lx2 3- Evaluate L1xl1 4- Evaluate Linf- l 5- Evaluate the dot product N-(x,y) 6- evaluated...
Please could you answer 3. Question please clearly write
Q3. For a closed surface defined by the surfaces 3,p-5, ф z = 5, Calculate, by writing the respective integrations, 100. ф 130, z 3, and (a) The volume enclosed by the given surfaces (b) The total area of the enclosing surface (c) The total length of the twelve edges of the surfaces (d) The length of the longest straight line that lies entirely within the volume (a) Verify divergence theorem...
3.
3. State the magnitude and direction of each of the vectors given below. a) r-30 m (displacement vector) b) v 60 m/s west (velocity vector) c) F-20N at-45° (force vector) d) p50 kg /s at 25° (linear momentum vector) 4. Provide a graphical example of a 1-dimensional vector (ID) and one of a 2- dimensional vector (2D). Be sure to include reference axes with labels in each case. 5. 1D Vectors. Let vector A +3 units and let vector...
I need help with these two Matlab question (1)Write a script that will 1. prompt the user for a maximum x value. 2. create an x vector from 1 to the user’s maximum in steps of 0.1 3. create a y vector which is sin(x) 4. plot the x and y vectors using blue *s, using appropriate x and y labels and a title (2)Write a fives function that will receive two arguments for the number of rows and columns...