Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

BOOK: Computational Physics, 2nd edition, by Nicholas Giordano and Hisao Nakanishi The problem is similar to Ex.5.7 in the textbook. PLEASE CODE A, B, C,

BOOK: "Computational Physics", 2nd edition, by Nicholas Giordano and Hisao Nakanishi

The problem is similar to Ex.5.7 in the textbook.

PLEASE CODE A, B, C, AND D correctly

image text in transcribed
Poisson Equation for Electric Dipole Write a PYTHON program to numerically calculate the potential of an electric dipole, i.e., two opposite point charges, Q/co = 12, separated by a distance a=1 around the origin (e.g., at x = 10.5, y=z=0). Solve the 3D Poisson equation in Cartesian coordinates but impose spherical boundary conditions, V(R)=0, at a large distance R=20 or so. (a) Starting from an initial condition of zero potential use the Jacobi relaxation algorithm with appropriate numerical tolerance and grid density to obtain the (converged) solution. Plot the equipotential lines, as well as V(r) for x=y=z. (b) Compute the magnitude of the electric field, [E(r) | (r: distance from dipole center) along the x=y=z-axis and extract the exponent n for the large-distance behavior, E(r) o ran for large r, through an eyeball fit. Do you find the theoretically expected n-value for the dipole? (c) Investigate how the number of required iteration steps, Niter, increases with reducing the tolerance (error) limit, "tol", and plot Niter(tol). d) Write a program by modifying the algorithm using the Simultaneous Over Relaxation (SOR) method, and study the convergence behavior for varying grid density (fixed total size) in different relaxation runs, focusing on the 2D problem in the x-y plane (for which the optimal value of a is close to 2). For fixed point-by-point accuracy in the solution (not total tolerance!), investigate (and plot) how the number of iteration steps, Niter, depends on the number n=nx=ny of grid points. Do you find the expected behavior of Niter o n2 and Niter on, for the Jacobi and SOR method, respectively

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

Lasers And Electro-optics Fundamentals And Engineering

Authors: Christopher C Davis

2nd Edition

1107722608, 9781107722606

More Books

Students also viewed these Physics questions

Question

d. Is it part of a concentration, minor, or major program?

Answered: 1 week ago