Reading Assignment Read Chaptes 29 and 30. Poblem Desciption fo Homewok #9 In this homewok, you will solve the inhomogeneous Laplace s equation to calculate the electic scala potential that exists between two lage paallel plates (i.e. a capacito) filled with an unconventional dielectic. A diagam of the poblem is povided below. Using two voltage souces, the bottom plate is held at 1.5 V and the top plate is held at 6 V above the bottom plate. The plates ae sepaated along the z-axis by a distance of 2.0 cm (i.e. z1 = 0 cm and z2 = 2.0 cm). The dielectic between the plates is inhomogeneous and has a elative pemittivity foming a tiangula pofile as quantified in the figue above. This homewok will step you though the thee majo phases fo solving this type of poblem numeically. Fist is the fomulation step whee all the necessay equations ae deived fo solving the poblem. Second is the numeical implementation step whee the equations deived in the fist step ae solved numeically. In this homewok, the finite-diffeence method will be implemented in MATLAB to solve the final diffeential equation. Last is the visualization step whee the esults of the poblem ae visualized in a pofessional manne so that meaningful conclusions can be made about the poblem. Page 1 of 9
Poblem #1: Fomulation Fo poblem #1, you will deive all the necessay equations needed to implement the solution in MATLAB. All of this should be done by hand o in a wod pocesso. MATLAB should not be used at all fo Poblem #1. Ceate a pofessional quality document that looks like you ae explaining and fomulating this poblem on you own. Do not copy/paste anything fom this homewok into you document. Ceate eveything on you own. Pat 1 Deive Diffeential Equation Electostatic poblems have the following govening equations wee D is the electic flux density (C/m 2 ), E is the electic field intensity (V/m), V is the electic scala potential (volts V), is the pemittivity of fee space (F/m), is the elative pemittivity, is the vecto del opeato, and is position. D 0 Gauss Law. (1) E D Constitutive Relation (2) E 0 V Electic Potential (3) The diffeential equation fo this poblem is deived by fist substituting Eq. (3) into Eq. (2) to eliminate E, and then substituting this new expession into Eq. (1) to eliminate D. The final vecto diffeential equation is 0 V Povide Eqs. (1)-(3) in you document. Then pefom all of the steps to deive Eq. (4). Pat 2 Reduce to One-Dimension We wish to educe this to a one-dimensional poblem. This is valid as long as we ae only inteested in finding the electic potential fa away fom the edges of the capacito. To do this mathematically, we assume the functions V ae only a function of z. Unde this assumption, Eq. (4) educes to z and 2 d V z d z dv z 0 2 (5) dz dz dz Add explanation and fill in the steps to deive Eq. (5) fom Eq. (4). (4) Page 2 of 9
Pat 3 Deive Matix Equation To solve Eq. (5) using the finite-diffeence method, z and V z ae known only at discete points along a one-dimensional gid epesenting the z-axis. The matix equation deived fom Eq. (5) has the following fom. 2 D vd v 0 (6) z z Fill in the steps to deive Eq. (6) fom Eq. (5). You should not have to explicitly handle any finite-diffeences. This step should be almost effotless, but add explanations and attempt to visualize the step as best as possible. Pat 4 [A][x]=[0] Fom Equation (6) has the geneal fom [A][x]=[0], whee Av 0 (7) A D 2 D (8) z z Fill in the steps to deive this esult fom Eq. (6). Visualize all of the matices and column vectos in Eq. (8). Fo example, [Dz] might be visualized as D z Pat 5 Apply Bounday Conditions 0 1 1 0 1 1 0 1 1 1 0 1 2z 1 0 1 1 0 1 Equation (7) is not yet solvable because v A 0 0 is a tivial solution. It must be put into the fom [A][x]=[b] by applying the bounday conditions. 1 0 0 0 V1 2 V z1 1.5 V a21 a22 a2, N 1 a 2N V 2 0 an 1,1 an 1,2 an 1,N 1 an 1,N VN 1 0 0 0 0 1 V N 6 V z2 7.5 V A Fill in the steps to deive this esult fom Eqs. (7)-(8). Descibe the opeations that must be pefomed in ode to incopoate the bounday conditions. Visualize and explain this step as best as possible. v b (9) (10) Page 3 of 9
Pat 6 Solve fo [v] Complete you fomulation by stating that the potential function v is calculated fom Eq. (10) as follows. Poblem #2: Implementation 1 v A b (11) In Poblem #2, you will implement the finite-diffeence method that you fomulated in Poblem #1. You implementation should have vey clean MATLAB code that is welloganized and well-c0mmented. At the end, geneate a cude plot of the electic potential V(z) obtained fom you pogam. Do not woy about quality gaphics yet. That will be addessed in Poblem #3. You pogam should follow the steps below. Pat 1 Pogam Heade and Dashboad Stat you MATLAB pogam with the following heade: % HW9_Pob2.m % % Homewok #9, Poblems #2 and #3 % Computational Methods in EE % Univesity of Texas at El Paso % Instucto: D. Raymond C. Rumpf % INITIALIZE MATLAB close all; clc; clea all; % UNITS centimetes = 0.01; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% DASHBOARD %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % BOUNDARY CONDITIONS z1 = 0 * centimetes; Va = 1.5; z2 = 2 * centimetes; Vb = 1.5 + 6; % NUMBER OF GRID POINTS Nz = 100; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% PERFFORM FINITE-DIFFERENCE METHOD %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Pat 2 Calculate Gid Calculate z and calculate a one-dimensional aay of points z descibing the position of each of the points in the inteval z1 z z2. Page 4 of 9
Pat 3 Constuct (z) Constuct an aay ER along z that epesents the pemittivity pofile (z) shown in the figue of the capacito. Pat 4 Calculate Numeical Deivative of (z) Use numeical diffeentiation to calculate the deivative of ER at EVERY point in the one-dimensional gid. Use the following finite-diffeence appoximation to do so. df1 25 f 48 f 36 f 16 f 3 f dz 12z 1 2 3 4 5 df2 3 f 10 f 18 f 6 f f dz 12z 1 2 3 4 5 df f 8f 8f f dz 12z i i2 i1 i1 i2 df f 6 f 18 f 10 f 3 f dz 12z N 1 N 4 N 3 N 2 N 1 N df 3 f 16 f 36 f 48 f 25 f dz 12z N N 4 N 3 N 2 N 1 N DO NOT use deivative matices to do this. Instead, calculate the deivatives like you did in Homewok #7 fo numeical diffeentiation. Pat 5 Constuct Point-by-Point Multiplication Matices Constuct two diagonal matices ER and ERD fom the functions espectively. Pat 6 Constuct Deivative Opeatos z and d z dz Constuct the two deivative matices DZ and DZ2 by calling the fdde1d() function that you wote in Homewok #8. Pat 7 Build [A] Build the matix A you fomulated in Eq. (8). Pat 8 Initialize [b] Initialize a column vecto b to contain all zeos. Pat 9 Apply Bounday Condition at z = z 1 Modify the matix A and the column vecto b consistent with Eq. (10) to incopoate the bounday condition at z = z1. Pat 10 Apply Bounday Condition at z = z 2 Modify the matix A and the column vecto b consistent with Eq. (10) to incopoate the bounday condition at z = z2. (12) (13) (14) (15) (16) Page 5 of 9
Pat 11 Calculate the Potential [v] Calculate the electic scala potential function v by solving Eq. (11). Pat 12 Plot V(z) in the Inteval z 1 z z 2 Plot the scala electic potential with plot(z,v). Use the default MATLAB gaphics fo this. You will make it look pofessional in the next poblem. You plot should look like what is shown below. Page 6 of 9
Poblem #3: Visualization In this poblem, you will geneate pofessional quality gaphics to visualize you poblem and its solution. You figue will contain fou subplots placed hoizontally next to each othe: (1) the device, (2) the pemittivity function (z), (3) the deivative of the pemittivity function, and (4) the electic scala potential V(z). In the end, you figue and esults should look something like the following: Pat 1 Open a New Figue Window Open a new figue window that has a white backgound. Size the window such that the y-axis of all the plots line up and match the device. Pat 2 Open a Subplot to Show the Device Select the fist subplot using the subplot() function in MATLAB. Pat 3 Define the RGB Values fo Coppe A list of many options fo RGB values fo coppe can be found hee: http://simple.wikipedia.og/wiki/coppe_%28colo%29 The values used in the solution fo this homewok wee: c = [0.72 0.45 0.20]; Feel fee to pick you favoite! Pat 4 Daw the Bottom Plate Use the fill() command to daw a ectangle fo the bottom plate. Conside using the following limits fo you ectangle. Use the coppe colo defined in Pat 3. x z x z 1 1 2 2 z z y z y z 20 2 1 1 1 2 1 Page 7 of 9
Pat 5 Daw the Top Plate Use the fill() command to daw a ectangle fo the top plate. Conside using the following limits fo you ectangle. Use the coppe colo defined in Pat 3. Pat 6 Daw the Dielectic x z x z 1 1 2 2 z z y1 z2 y2 z2 20 2 1 Use a loop to daw the dielectic egion one slice (thin ectangle) at a time along the z- axis. Use the fill() command to visualize each dielectic slice with a geen colo. Do not use an edge line fo the ectangles. Scale its shade of geen to convey the magnitude of the elative pemittivity (z), whee the dake shade coesponds to highe pemittivity. Conside calculating an auxiliay function fo colo scale pehaps accoding to f z then calculate the colo fo a slice accoding to z z z z min 0.10.9, max min c = (1-f(nz))*[1 1 1] + f(nz)*[0 0.6 0]; Pat 7 Set the Gaphics View fo the Fist Subplot Set a pofessional view fo the device gaphic by tuning off the axes, giving the subplot the title DEVICE, and pehaps othe options of you choosing. Pat 8 Calculate the Vetical Tick Positions and Labels fo the Remaining Plots You tick maks should go fom 0 to 2.0 in steps of 0.2. You labels should all have the same numbe of digits, except fo zeo which should only have one. Pat 9 Plot the Relative Pemittivity Function (z) In the fist subplot fom the ight of the device, plot the elative pemittivity function (z) using a dak geen line. The units fo the vetical axis should be centimetes. Be sue linewidths ae sufficient, but not ovebeaing. Label the x-axis with (z) and label the y-axis with z (cm). Set the y-axis limits so that the position of the function coesponds to the position of the devices to its left. Give the subplot the title PERMITTIVITY. Dess up anything else in the plot that does not look pofessional and eady fo publication. Page 8 of 9
Pat 10 Plot the Deivative of the Relative Pemittivity Function d (z)/dz In the second subplot fom the ight of the device, plot the deivative of the elative pemittivity function using a blue line. The units fo the vetical axis should be centimetes. Be sue linewidths ae sufficient, but not ovebeaing. Label the x-axis with d(z)/dz and label the y-axis with z (cm). Set the y-axis limits so that the position of the function coesponds to the position of the devices to its left. Give the subplot the title DERIVATIVE. Dess up anything else in the plot that does not look pofessional and eady fo publication. Pat 11 Plot the Electic Scala Potential V(z) In the last subplot on the ight, plot the electic scala potential function V(z) using a ed line. The units fo the vetical axis should be centimetes. Be sue linewidths ae sufficient, but not ovebeaing. Label the x-axis with V(z) and label the y-axis with z (cm). Set the y-axis limits so that the position of the function coesponds to the position of the devices to its left. Give the subplot the title POTENTIAL. Dess up anything else in the plot that does not look pofessional and eady fo publication. Page 9 of 9