Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please use python (and suitable modules such as math and numpy) 1. The Madelung constant In condensed matter physics the Madelung constant gives the total

Please use python (and suitable modules such as math and numpy)image text in transcribed

image text in transcribed

1. The Madelung constant In condensed matter physics the Madelung constant gives the total electric potential felt by an atom in a solid. It depends on the charges on the other atoms nearby and their locations Consider for instance solid sodium chloride-table salt. The sodium chloride crystal has atoms arranged on a cubic lattice, but with alternating sodium and chlorine atoms, the sodium ones having a single positive charge +e and the chlorine ones a single negative charge -e, where e is the charge on the electron. If we label each position on the lattice by three integer coordinates (i, j, k), then the sodium atoms fall at positions where i +j+ kis even, and the chlorine atoms at positions where i +j + k is odd Consider a sodium atom at the origin, i = j k 0, and let us calculate the Madelung constant. If the spacing of atoms on the lattice is a, then the distance from the origin to the atom at position (i,j, k) is (ia)2 + (ja)2 + (ka)2-a V i2 + + k2. 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 over all other atoms. Let us assume a cubic box around the sodium at the origin, with L atoms in all directions. Then i,jk--L where M is the Madelung constant, 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 M for sodium chloride and plot (using matplotlib.pyplot) log|M vs log L for various L. Use as large a value of L as you can, while still having your program run in reasonable time-say in a minute or less. 2. Hints 1. It's totally OK to write 3 loops to calculate Madelung constant. But there's more faster way than pure Python loop, i.e. Using Numpy array or the consider symmetry of this problem. 2. You are required to submit your Python code along with a short report. The report should contain your results with a short description. If you like add something else like what you learn from the assignment, feel free to do so. 3. Make sure your code can be run. 4. When submit, submit your file separately instead of a "zip" or "rar" form. Submission after due day will lead to deduction on marks

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

Practical Azure SQL Database For Modern Developers Building Applications In The Microsoft Cloud

Authors: Davide Mauri, Silvano Coriani, Anna Hoffma, Sanjay Mishra, Jovan Popovic

1st Edition

1484263693, 978-1484263693

More Books

Students also viewed these Databases questions

Question

3. Explain why sales-volume variance could be helpful to managers.

Answered: 1 week ago