Lab 202 Numberical Verification of Gauss' Law

docx

School

New Jersey Institute Of Technology *

*We aren’t endorsed by this school

Course

121A

Subject

Physics

Date

Apr 3, 2024

Type

docx

Pages

18

Uploaded by CountGerbilMaster998

Report
Lab 201: Electrostatics – Electric Field by Point Charges Group ID: 6 Date of Experiment: 10/5/2021 Date of Report Submission: 10/12/2021 Phys 121A 001 Instructor: Sandun Amarasinghe 1. Introduction 1.1 Objectives - In this section, using MATLAB software you will evaluate Gauss’s Law numerically for different surfaces and verify that the integral over the surface multiplied by ε 0 is the value of the enclosed charge. 1.2 Theoretical Background - The purpose of this lab is to justify Gauss’s Law how electric charge is distributed throughout an electric field. By using MATLAB, we can write a code that will distribute the charge that we give it throughout the sides of an imaginary cube. Through this code we can learn how are vector’s function and the general definition of electric flux. 2. Experimental Procedure By using the following code and changing the charge values, we change the results on each side of the cube in certain ways. 1. clear all 2. diary ( 'Lab202' ); %to save your work with file Lab202 3. diary on
4. esp0 = 8.85*10^-12; k = 1/(4*pi*esp0); 5. q1 = 9*10^-9; 6. syms x y z ; 7. E = @(x,y,z) k*q1/((x-0.1)^2 + (y-0.2)^2 + (z-0.3)^2)^(3/2)*[x-0.1, y-0.2, z-0.3]; 8. I = [1, 0, 0]; J = [0, 1, 0]; K = [0, 0, 1]; 9. Etop = dot(K, E(x, y, 1)); 10. Ebottom = dot(-K, E(x, y, -1)); 11. Eleft = dot(-J, E(x, -1, z)); 12. Eright = dot(J, E(x, 1, z)); 13. Efront = dot(I, E(1, y, z)); 14. Eback = dot(-I, E(-1, y, z)); 15. Phitop = int(int(Etop, x, -1, 1), y, -1, 1); 16. Phibottom = int(int(Ebottom, x, -1, 1), y, -1, 1); 17. Phileft = int(int(Eleft, x, -1, 1), z, -1, 1); 18. Phiright = int(int(Eright, x, -1, 1), z, -1, 1); 19. Phifront = int(int(Efront, y, -1, 1), z, -1, 1); 20. Phiback = int(int(Eback, y, -1, 1), z, -1, 1); 21. vpa(Phitop, 10) 22. vpa(Phibottom, 10) 23. vpa(Phileft, 10) 24. vpa(Phiright, 10) 25. vpa(Phifront, 10) 26. vpa(Phiback, 10) 27. All_Phi = Phitop + Phibottom + Phileft + Phiright +Phifront + Phiback; 28. vpa(All_Phi, 10) 29. vpa(esp0*All_Phi, 5) The results of this initial code should come out to this, giving a fair idea on what to expect when we change the charge values for the next steps.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
1. Line 7 was changed to remove the subtraction to x,y,z 2. Line 7 subtracted ½ (0.5) to x 3. Line 7 subtracted ½ (0.5) to y
4. Line 5’s charge is changed to be negative 5. Line 5 had its magnitude doubled from 9*10^-9 to 1.8*10^-8 6. The following are three separate changes done in lines 10 – 21. The first is increasing the size of the cube from 1 to 2. The second is increasing the size from 1 to 10. The last is increasing the size from 1 to 100.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
7. With the cube’s size back at 1, line 7 has z be multiplied by 2 to double its value
3. Results 3.1 Experimental Data 1. When placing the q1 charge at the center of the cube the result is:
2. Placing the same charge q1 on x axis at position x = ½ a results to:
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
3. Placing the same charge q1 on y axis at position y = ½ a result to:
4. Changing the charge from positive to negative in order to change the flux results to:
5. Doubling the magnitude of charge q1 results to:
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
6. All 3 inputs (2, 10, 100) give you the same results shown:
7. Placing a positive charge on z axis at z = 2a results to:
3.2 Calculations No calculations were made in this lab experiment. 4. Analysis and Discussion Analysis: - By changing the value of either the x, y, or z axis we can yield different flux results. These experiments have shown that the flux adjusts depending on the plane that is being changed. X changing the front and back values, Y changing the left and right values, and Z the top and bottom. Changing the size of the cube would affect these values but when the size is distributed evenly then the flux is also distributed evenly as if nothing changed.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Questions: 1. Place the charge q1 at the center of the cube. Confirm that flux through each surface is the same. - With the charge at the center of the cube we can confirm that the flux is the same since the top to back of the cube were all the same value being 169.4915254. 2. Place the same charge on x axis at position x = ½ a. What flux is the largest? What flux is the smallest? Are there any values identical? Which ones? Have the total flux changed? How would you explain that? - The flux at the front of the cube is the largest at 600.3401396. The flux at the back is the smallest being 67.49609469. The rest of the fluxes (top, bottom, left, right) were the same value. This is because since we are changing x only, the front and back values get affected while the rest of the sides are unaffected. 3. Place the same charge on y axis at position y = ½ a. What flux is the largest? What flux is the smallest? Are there any values identical? Which ones? Have the flux changed? How would you explain that? - The flux at the right of the cube is the largest at 600.3401396. The flux at the left is the smallest being 67.49609469. The rest of the fluxes (top, bottom, front, back) were the same value. This is because since we are changing y only, the left and right values get affected while the rest of the sides are unaffected. 4. Choose any location inside the cube. How does the flux change? Explain why.
- Changing the sign of the charge, changes the flux to become negative. The resulting values are the same as the flux in which it turns negative, but the sides have the same value. 5. Double the magnitude of charge q1. By what factor does the flux change? Explain why. - Doubling the magnitude of charge q1 also doubles the flux on each side as well. Since q is directly proportional to Φ it scales off each other. 6. Increase the size of the cube to a = 2, then a = 10, then a = 100. Does the flux change? Does Gauss’s law appear to hold? Explain. - Despite increasing the size of the cube from 2 to 10 to 100, all three changes bring the same results. Gauss’s Law does appear to hold from this though since we are increasing the size of the cube, the flux does change, but the distance is increasing along with it. Since the distance is increasing, the Φ is decreasing alongside it. 7. Change the size of the cube back to 1 and place a positive charge on z axis at z = 2a (a charge is placed outside of the cube). How does the total flux change? Explain why. - The total flux goes from having a value of 1016.949153 to 508.4745763, roughly half of what it was originally. This is due to the change in z causing the distance to go further away from the cube. 5. Conclusions - In these experiments, changes in distance or axis shows to alter the size of the cube yet the values of the flux remain to be distributed properly. I learned that even though the size of the cube and the flux may change, Φ will adjust accordingly as they are shown
to be parallel. This further upholds Gauss’s Theory in which electric flux ΦE is a dot product of electric field vector and area vector. The charge and magnitude may change, be it via doubling, turning negative, etc., but the Φ will work to fit with what changes so long as the size of the cube is even throughout its planes.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help