Question: Grids will be created with Nx = 1 0 0 Nx = 1 0 0 and Ny = 5 0 Ny = 5 0 In

Grids will be created with Nx=100Nx=100 and Ny=50Ny=50In [2]:import numpy as npimport matplotlib.pyplot as pltIn [3]:xmin =0xmax =6ymin =0ymax =5p1x =2p1y =0p2x =3p2y =0.27p3x =4p3y =0theta = np.arctan(p2y/1)In [6]:fig = plt.figure()ax = fig.add_subplot(111)ax.plot([xmin,p1x,p2x,p3x,xmax],[ymin,p1y,p2y,p3y,ymin],'k')ax.plot([xmin,xmin],[ymin,ymax],'k')ax.plot([xmin,xmax],[ymax,ymax],'k')ax.plot([xmax,xmax],[ymin,ymax],'k')ax.set_xlabel('$x$')ax.set_ylabel('$y$')Out[6]:Text(0,0.5,'$y$')Algebraic GridCreate an algebraic grid with the following grid spacing requirementsyx,0=0.04yx,0=0.04x2,0=x4,0=0.02x2,0=x4,0=0.02Uniform xx,5xx,5Describe how the grid was created i.e. what functions were used for the boundary points and interior pointsDescribe the clustering and why you chose that.Plot the gridPlot the contour of the grid Jacobian JJ. Explain the JacobianPlot xi,j/xi1,jxi,j/xi1,j vs xx at j=0,Ny/2,Nyj=0,Ny/2,Ny.Plot yi,j/yi,j1yi,j/yi,j1 vs yy at j=0,Nx/4,Nx/2j=0,Nx/4,Nx/2.Plot tan(yi,j/xi,j)tan(yi,j/xi,j) vs vs xx at j=0,Ny/2,Nyj=0,Ny/2,Ny.Elliptic GridCreate an elliptic grid solving a Laplace equation.x+x=0y+y=0 x+x=0y+y=0 using the Algebraic grid as the initial condition and boundary points.Describe the algorithm to solve the LaplacianWhat are the differences between the algebraic and elliptic gridsPlot the gridPlot the contour of the grid Jacobian JJ. Explain the JacobianPlot xi,j/xi1,jxi,j/xi1,j vs xx at j=0,Ny/2,Nyj=0,Ny/2,Ny.Plot yi,j/yi,j1yi,j/yi,j1 vs yy at j=0,Nx/4,Nx/2j=0,Nx/4,Nx/2.Plot tan(yi,j/xi,j)tan(yi,j/xi,j) vs vs xx at j=0,Ny/2,Nyj=0,Ny/2,Ny.

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!