Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

5. In this problem, you will be asked to write a program that implements the finite-difference technique in order to solve Laplace's equation for a

image text in transcribed

5. In this problem, you will be asked to write a program that implements the finite-difference technique in order to solve Laplace's equation for a square with voltage applied to one side. A good reference for this problem can be found here http://www.public.iastate.edu/akmitra/aero361/design web/Laplace.pdf This problem is an example of the Dirichlet Problem shown in the reference above a) Begin by defining the simulation grid for this problem. This can be as large as you want but for this problem, let's define the grid to be 50 x 50. Hint: You will need a simulation grid for the voltage at the current iteration and a voltage at the previous iteration of the problem. To define the grid in MATLAB, make 2 empty matrices by using the zeros function (each voltage grid should be one unit larger than the simulation grid in each dimension) b) Now, apply 10 V to one side of the current voltage matrix. You can do this by changing one rovw c) Following the reference above, compute the maximum error between the current iteration matrix d) Now, apply the algorithm in equation 14 and recalculate the maximum error. Continue computing e) Plot the voltage matrix by using the imagesc function in MATLAB. Attach a screenshot of the plot. of the matrix to 10 and the previous iteration matrix. equation 14 until the maximum error is below 0.01. f) Plot the electric field distribution by first computing the gradient of the voltage matrix, then by using the quiver function to plot the vector function. Attach a screenshot of the plot. g) Repeat steps b)-f) but this time, change the constant 10 V applied to one side to a voltage distribution represented by 10*rowNumber* (1-rowNumber). This can be applied in MATLAB with the following code rowNum-1:1:xDim+1; _now (rowNum, yDim+1)-10 ((rowNum-1)/xDim)(1-((rowNum-1)/xDim)) h) Please include the code you wrote for this assignment. 5. In this problem, you will be asked to write a program that implements the finite-difference technique in order to solve Laplace's equation for a square with voltage applied to one side. A good reference for this problem can be found here http://www.public.iastate.edu/akmitra/aero361/design web/Laplace.pdf This problem is an example of the Dirichlet Problem shown in the reference above a) Begin by defining the simulation grid for this problem. This can be as large as you want but for this problem, let's define the grid to be 50 x 50. Hint: You will need a simulation grid for the voltage at the current iteration and a voltage at the previous iteration of the problem. To define the grid in MATLAB, make 2 empty matrices by using the zeros function (each voltage grid should be one unit larger than the simulation grid in each dimension) b) Now, apply 10 V to one side of the current voltage matrix. You can do this by changing one rovw c) Following the reference above, compute the maximum error between the current iteration matrix d) Now, apply the algorithm in equation 14 and recalculate the maximum error. Continue computing e) Plot the voltage matrix by using the imagesc function in MATLAB. Attach a screenshot of the plot. of the matrix to 10 and the previous iteration matrix. equation 14 until the maximum error is below 0.01. f) Plot the electric field distribution by first computing the gradient of the voltage matrix, then by using the quiver function to plot the vector function. Attach a screenshot of the plot. g) Repeat steps b)-f) but this time, change the constant 10 V applied to one side to a voltage distribution represented by 10*rowNumber* (1-rowNumber). This can be applied in MATLAB with the following code rowNum-1:1:xDim+1; _now (rowNum, yDim+1)-10 ((rowNum-1)/xDim)(1-((rowNum-1)/xDim)) h) Please include the code you wrote for this assignment

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intelligent Information And Database Systems Asian Conference Aciids 2012 Kaohsiung Taiwan March 19 21 2012 Proceedings Part 3 Lnai 7198

Authors: Jeng-Shyang Pan ,Shyi-Ming Chen ,Ngoc-Thanh Nguyen

2012th Edition

3642284922, 978-3642284922

More Books

Students also viewed these Databases questions

Question

=+making elaborative inferences and developing situation models?

Answered: 1 week ago

Question

6. Identify characteristics of whiteness.

Answered: 1 week ago

Question

e. What are notable achievements of the group?

Answered: 1 week ago