Can someone verify a computational result for me?

  • Context: Undergrad 
  • Thread starter Thread starter cowmoo32
  • Start date Start date
  • Tags Tags
    Computational
Click For Summary
SUMMARY

The discussion centers on a computational physics problem involving the calculation of electrostatic potential from a charged wire segment. Two individuals are using different Python implementations to compute the potential, resulting in vastly different outputs: one yielding approximately 0.0995 and the other 10,596. The charge density is defined as λ=λ0cos(πx/2L) with λ0 set to 1e-6 and L at 0.5m. The discrepancy in results highlights the importance of correctly implementing the charge distribution and understanding the symmetry of the problem.

PREREQUISITES
  • Understanding of electrostatics and potential calculations
  • Familiarity with Python programming and numerical methods
  • Knowledge of charge density functions and their implications
  • Concept of symmetry in physical systems
NEXT STEPS
  • Review Python libraries for numerical integration, such as SciPy
  • Study the principles of electrostatics, focusing on potential due to continuous charge distributions
  • Learn about the implications of symmetry in electrostatic problems
  • Explore debugging techniques in Python to identify discrepancies in computational results
USEFUL FOR

This discussion is beneficial for computational physicists, students in physics courses, and developers working on simulations involving electrostatics and charge distributions.

cowmoo32
Messages
121
Reaction score
0
This is for a computational physics class, but isn't a homework question, per se. My friend and I have two different sets of code trying to achieve the same thing and we're getting vastly different answers, orders of magnitude apart. We haven't covered this sort of problem in our intro E&M class yet so we aren't able to confirm a result by hand.

Using a λ0 value of 1e-6 and L = 0.5m I'm getting V = ~0.0995 and he's getting 10,596.

Write a Python code that computes the electrostatic potential of a finite segment of charged wire of length 2L, at a height H=L above the center of the wire. The charge density along the wire varies as λ=λ0cos[itex]\frac{Pi*x}{2L}[/itex]
http://moodle.wolfware.ncsu.edu/file.php/33699/Lesson12/wire.png
 
Physics news on Phys.org
Isn't that charge distribution antisymmetric, so the charge density at the point L-x along the wire is the negative of the charge density at the point L+x? Since the distance of these points to the point at a distance L in the middle of the wire is the same, the the contributions to the potential of these points cancels.
 
-delete- I did it wrong.
 
Last edited:

Similar threads

  • · Replies 4 ·
Replies
4
Views
2K
Replies
29
Views
6K
  • Sticky
  • · Replies 13 ·
Replies
13
Views
8K
Replies
8
Views
5K
  • · Replies 9 ·
Replies
9
Views
5K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 11 ·
Replies
11
Views
2K
  • · Replies 10 ·
Replies
10
Views
4K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 13 ·
Replies
13
Views
6K