Question: Write the program in Python only! ite The Madleung constant (Newman Exercise 2.9, p.74) The Madelung constant gives the total potential felt by an atom
Write the program in Python only!
ite
The Madleung constant (Newman Exercise 2.9, p.74) The Madelung constant gives the total potential felt by an atom in a solid. Consider the case of the sodium chloride crystal, which has atoms arranged on a cubic lattice, but with alternating sodium and chlorine atoms. The sodium atoms have a single positive charge +e and the chlorine atoms have a single negative charge -e, where e is the charge of the electron. If we label each position on the lattice by three integer coordinates (ij, k), then the sodium atoms fall at positions where i +j + k is even, and the chlorine atoms at positons where i +j+kis odd. Consider a sodium atom at the origin, 1 ++ k = O, and let us calculate the Madelung constant. If the spacing of the atoms on the lattice is the origin to the atom at position (i,j, k) is then the distanced from and the potential at the origin created by such an atom is with 0 being the permittivity of the vacuum and the sign of the expression depending on whether i +j + k is even or odd. The total potential felt by the sodium atom is then the sum of this quantity V(i,j,k) over all other atoms Let us assume a cubic box around the sodium at the origin, with L atoms in all directions. Then Votal V(i,j, k) = where M is the Madelung constant, or equivalently At least approximately-technically the Madelung constant is the value of M when L oo, but one can get a good approximation just by using a large value of L.) Write a program to calculate and print the Madelung constant for sodium chloride. Use as large a value of L as you can, while still having your program run in less than a minute. (Start by testing it with small values of L.)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
