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 ...

Assignment details -need to write a code for connecting

Assignment Details - Need to write a code for connecting segments (Lines) a special case of TSP. The problem is to connect lines in 2d/ 3d space with path obstructions. Can you help me write the code for this? Hope you m ...

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 ...

Question a safe prime is a prime number that can be written

Question : A safe prime is a prime number that can be written in the form 2p + 1 where p is also a prime number. Write a MATLAB script file that finds and displays all safe primes between 1 and 1000.

Question - verify the attached paper with matlab and get

Question - Verify the attached paper with matlab and get all the results in the paper and explain step by step the matlab code. Paper - Improving Massive MIMO Belief Propagation Detector with Deep Neural Network. Attachm ...

Assignment -data is given on which want to do computational

Assignment - Data is given on which want to do computational production planning using Metaheuristic MATLAB Programming: 1) Ant Colony Algorithm on both Partial and Total Flexible Problem. 2) Bee Algorithm on both Partia ...

What comparison of means test was used to answer the

What comparison of means test was used to answer the question

Question 1 manipulate spectral imagehyperspectral images

Question 1. Manipulate spectral image Hyperspectral images can be seen as a generalisation of normal colour images such as RGB images. In a normal RGB colour image, there are 3 channels, i.e. channels for red colour, gre ...

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 ...

  • 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