Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask MATLAB Expert

1. The magnetic field generated from a time-varying electric field in a medium with electric permittivity ε and electric conductivity σ is given by Ampere's Law:

∇ x H¯ = ε ∂E¯/∂t + σE¯.       (1)

If the medium is invariant in z (∂/∂z = 0) and the electric field has only a z component (Ez), then the magnetic field is confined to the 2D x-y plane (i.e., Hz = 0). The above equation is to be discretized using the Finite Volume method on a 2D mesh composed of equilateral triangles of side d as shown below. Suppose the electric field Ez is assigned to each node i in the mesh and time level n, Ez ( xi , yi ,tn ) = Ezn.

(a) Define the finite volume Vi of node i and indicate the appropriate location assignment of the magnetic field H in the mesh.

(b) By applying Ampere's law to the finite volume Vi of node i, obtain a Finite Volume discrete equation for Eq. (1) that is accurate to 2nd-order in time. Express all coefficients in the discrete equation in terms of the length d of the triangle and the time step Δt. (Hint: use Stokes' theorem to convert the surface integral of a curl to a contour integral.)

2. A microfluidic channel has a cross-sectional geometry in the x-y plane as shown Figure 2.1. The channel is assumed to have infinite length. Suppose fluid flow in the channel is modeled by the steady-state Navier-Stokes equation for incompressible flow:

(v¯.∇)v¯ - 1/Re∇2v¯ = -∇p,

where v¯ is the flow velocity, p is the pressure and Re is Reynolds number.

1433_Figure.jpg

(a) If the flow is driven by a constant pressure gradient in the z-direction, ∇p = - pzzˆ, then the flow velocity can be assumed to have only a z-component, in this case the above Navier-Stokes equation reduces to v¯ = v(x, y)zˆ. Show that in this 

Re ∇ v( x, y) = - pz , (pz = ∂p/∂z) (1)

(b) Show that the Finite Volume discretization of Eq. (1) for a general node i on a triangular mesh can be written as
ni wik ni wik

- viΣnik=1wik/lik + Σnik=1wik/lik = vk = -Re.pz Ai , (2)

where vi = v(xi, yi), Ai is the area of the Voronoi polygon associated with node i, ni is the number of neighbour nodes of node i, lik is the length of edge i-k connecting nodes i and k, and wik is the length of the side of the Voronoi polygon perpendicular to edge i-k (see Figure 2.3).

(c) Write a MatLab program to implement the discrete system given by Eq. (2) and solve for the cross-sectional velocity field v(x, y). A triangular mesh for the cross section of the channel is shown in Figure 2.2. The P and T arrays describing the mesh can be downloaded from eClass website (MatLab data file channel_mesh.mat). Assume Re = 1, pz = 1. The boundary condition on the walls of the channel is specified as v = 0 (this is known as the no-slip flow condition). An outline of the MatLab program is given on the next page. Refer to Figure 2.4 for various parameters in the algorithm as well as the formula for calculating the circumcenter of a triangle.

(d) Display the solution v(x, y) on a 3D plot using the trimesh or trisurf function. Hand in a copy of your MatLab program.

492_Figure1.jpg

 

Outline of the Finite Volume Program

% ---- load mesh files: load channel_mesh
Ne = length(T); Npts = length(P);

% ---- construct matrix A and RHS vector b: A = zeros(Npts,Npts);
b = zeros(Npts,1);

for Δe = 1 : Ne, % scan through each triangle element Δe Compute coordinates of the circumcenter of triangle Δe
for qi = 1 : 3,

% local node numbers qj and qk (e.g., if qi = 2 then qj = 3, qk = 1) qj = mod(qi,3) + 1;
qk = mod(qj,3) + 1;

% Get global node numbers ni, nj, nk ni = T(Δe,qi);
nj = T(Δe,qj);
nk = T(Δe,qk);

% Compute contributions to matrix elements from triangle Δe: Compute Lij and Wije for edge i-j
A(ni,nj) = A(ni,nj) + Wije/Lij; A(ni,ni) = A(ni,ni) - Wije/Lij;

Compute Lik and Wike for edge i-k A(ni,nk) = A(ni,nk) + Wike/Lik; A(ni,ni) = A(ni,ni) - Wike/Lik;

% ---- Contribution to RHS vector b from triangle Δe: Compute area Aicb of triangle Δicb
Compute area Aiac of triangle Δiac b(ni) = b(ni) - Re*Pz*(Aicb + Aiac);
end
end

MATLAB, Engineering

  • Category:- MATLAB
  • Reference No.:- M92018588
  • Price:- $165

Guranteed 48 Hours Delivery, In Price:- $165

Have any Question?


Related Questions in MATLAB

Assignment matlab programmingusing appropriate matlab

Assignment: MatLab Programming Using appropriate MatLab syntax, write the code required to analyse and display the data as per the problem description. The order of the MatLab Program should be as follows: Variables and ...

Discrete optimisation- solve the following two problems

Discrete Optimisation - Solve the following two problems with both exhaustive enumeration and branch and bound - Problem 1 is a mixed integer linear optimisation problem (the problem has both discrete and continuous vari ...

Assignment -matlab codes and simulated model in

Assignment - Matlab codes and simulated model in simulink/matlab and truetime. 1. Matlab codes and simulink model for pid controller optimization using particle swarm optimization (PSO) my plant is integer order 1000/(s^ ...

Assignment - matlab programmingusing appropriate matlab

Assignment - MatLab Programming Using appropriate MatLab syntax, write the code required to analyse and display the data as per the problem description. The order of the MatLab Program should be as follows: Variables and ...

Prepare a 3 - 10 pages long reportprepare a presentation

Prepare a 3 - 10 pages long report Prepare a presentation with 5 - 9 slides. The slides will include introduction (need and similar work), theoretical background (tested neural networks), Data, Results (Comparison of the ...

Suppose that you have used some concept learning algorithm

Suppose that you have used some concept learning algorithm to learn a hypothesis h1 from some training data. You are interested in knowing the accuracy that the hypothesis can be expected to achieve on the underlying pop ...

Assignmentq1 find the laplace transforms of the following

Assignment Q.1 Find the Laplace transforms of the following functions: (a) t 2 + at + b and (b) sin(2nΠt/T) Q.2 Find f (t) for the following F(s) = α[ f (t)]. (i) 5/(s + 3), (ii) 1/s 2 + 25, (iii) 1/s(s+1) Q.3 Find the L ...

Recitation problems -1 determine the highest real root of

Recitation Problems - 1. Determine the highest real root of f(x) = 2x 3 - 11.7x 2 + 17.7x - 5 using the Newton-Raphson method with at least four iterations. Start with an initial guess of x 0 = 3. 2. Determine the real r ...

Assignment - matlab programmingusing appropriate matlab

Assignment - MatLab Programming Using appropriate MatLab syntax, write the code required to analyse and display the data as per the problem description. The order of the MatLab Program should be as follows: Variables and ...

Assignment -we have daily gridded rainfall data of 40 years

Assignment - We have daily gridded rainfall data of 40 years and structure of the dataset is like below; Lat = [6.5:0.25:38.5]; Lon = [66.5:0.25:100]; Rainfall (135x129x365x40) (Lon, Lat, days, years). Now, we looking fo ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As