Plot the following function with energy at different temperature,
(a) Maxwell-Boltzmann Distribution ,
(b) Fermi-Dirac distribution ,
(c) Bose-Einstein distribution .
In the realm of statistical mechanics, three significant distributions—Maxwell-Boltzmann, Fermi-Dirac, and Bose-Einstein—play a crucial role in understanding the behavior of particles and their energy levels at different temperatures. These distributions provide valuable insights into the quantum nature of particles and their statistical properties. In this article, we will explore each of these distributions and their relationships with temperature.
Maxwell-Boltzmann Distribution:
The Maxwell-Boltzmann distribution describes the distribution of velocities for particles in a gas at a given temperature. It applies to classical particles, such as atoms or molecules, and is governed by the principles of classical statistical mechanics. The distribution function depends on the particle's mass, temperature, and the velocity component in each direction.
The energy distribution in the Maxwell-Boltzmann distribution is continuous, with a smooth decrease as velocities increase. At higher temperatures, the distribution broadens, indicating a wider range of velocities and higher average kinetic energy.
Fermi-Dirac Distribution:
The Fermi-Dirac distribution is applicable to particles with half-integer spin, known as fermions, which obey the Pauli exclusion principle. Examples of fermions include electrons, protons, and neutrons. This distribution describes the occupancy of discrete energy levels by fermions at a given temperature.
At absolute zero temperature (0 Kelvin), the distribution predicts that all energy levels below a specific energy, known as the Fermi energy, are completely occupied, while all higher energy levels remain unoccupied. As the temperature increases, some higher energy levels become occupied due to thermal excitation. The distribution function reflects the statistical behavior of fermions, ensuring that no two identical fermions can occupy the same energy level.
Bose-Einstein Distribution:
The Bose-Einstein distribution applies to particles with integer spin, called bosons. Bosons, unlike fermions, do not obey the Pauli exclusion principle, allowing multiple particles to occupy the same energy level simultaneously. Photons, mesons, and helium-4 atoms are examples of bosons.At very low temperatures, the Bose-Einstein distribution predicts a macroscopic occupation of the lowest energy level, forming a distinct state known as a Bose-Einstein condensate. As the temperature increases, more energy levels become occupied, and the distribution broadens. The distribution function emphasizes the collective behavior of bosons and allows for the formation of coherent states.
The relationship between energy and temperature in these distributions is apparent through their respective equations. For the Maxwell-Boltzmann distribution, the energy dependence is continuous and follows a classical statistical framework. On the other hand, the Fermi-Dirac and Bose-Einstein distributions exhibit quantized energy levels and are characteristic of quantum statistical mechanics.
Understanding these distributions is crucial in many areas of physics, including thermodynamics, solid-state physics, and quantum mechanics. They provide valuable insights into the statistical properties of particles, their energy distributions, and the behavior of systems at different temperatures. From the individual velocities of classical particles to the quantum statistics of fermions and bosons, these distributions unlock the door to a deeper understanding of the microscopic world.
Necessary Formula : The general formula of the three distribution are ,
Algorithm of the program :
Step - 1 : Start
Step - 2 : Importing necessary libraries , such as numpy and matplotlib.pyplot .
Step - 3 : Read the constant value , u = 0 (consider) , k and e(electronic charge equivalent , to convert the whole system in eV) .
Step - 4 : Define an array for energy (E) range , such as linspace(-0.5,0.5,1001) .
Step - 5 : Define a function -----> def Fn with parameter T and a , which returns the generals formula's result .
Step - 6 : Using suptitle() , to create super title for sub plots .
Step - 7 : plot the graph x axis as E and y axis as Fn .
Step - 8 : Show the graph on the screen using show()[matplotlib.pyplot command] .
Step - 9 : Stop .
Source Code :
""" Statistical Mechanics LAB Q. Plot the following functions with energy at different temperatures a) Maxwell-Boltzmann distribution , b)Fermi-Dirac distribution , c) Bose-Einstein distribution """ import numpy as np import matplotlib.pyplot as plt newparams = {'axes.labelsize': 10, 'axes.linewidth': 1.5, 'savefig.dpi': 300, 'lines.linewidth': 2, 'figure.figsize': (12, 10), 'legend.frameon': True, 'legend.handlelength': 0.7} plt.rcParams.update(newparams) E = np.linspace(-0.5,0.5,1001) #energy range e = 1.6e-19 #electric charge k = 1.38e-23 #Boltzmann constant(joule per kelvin) u = 0 # considering chemeical potential of the substance is zero def Fn(T,a): return 1/((np.exp(((E-u)*e)/(k*T)))+a) """ This is the general equation, for Maxwell-Boltxmann distribution a=0, for Bose-Einstein a=-1 and for Fermi-Dirac a=+1 """ plt.suptitle("Plot of the following functions at different temperatures",size = 16,color='b',fontstyle ="italic") plt.subplot(2,2,1) plt.plot(E,Fn(100,0),label='T = 100 K') plt.plot(E,Fn(300,0),label='T = 300 K') plt.plot(E,Fn(500,0),label='T = 500 K') plt.plot(E,Fn(700,0),label='T = 700 K') plt.ylim(0,3) plt.xlabel('Energy(eV)') plt.ylabel('f(E)') plt.legend(loc='best',prop={'size':12}) plt.title("Maxwell-Boltzmann distribution for u=0") plt.subplot(2,2,2) plt.plot(E,Fn(100,-1),label='T = 100 K') plt.plot(E,Fn(300,-1),label='T = 300 K') plt.plot(E,Fn(500,-1),label='T = 500 K') plt.plot(E,Fn(700,-1),label='T = 700 K') plt.xlim(0,1) plt.ylim(0,2) plt.xlabel('Energy(eV)') plt.ylabel('f(E)') plt.legend(loc='best',prop={'size':12}) plt.title("Bose-Einstein distribution for u=0") plt.subplot(2,2,3) plt.plot(E,Fn(100,+1),label='T = 100 K') plt.plot(E,Fn(300,+1),label='T = 300 K') plt.plot(E,Fn(500,+1),label='T = 500 K') plt.plot(E,Fn(700,+1),label='T = 700 K') plt.legend(loc='best',prop={'size':12}) plt.ylim(0,1) plt.xlabel('Energy(eV)') plt.ylabel('f(E)') plt.title("Fermi-Dirac distribution for u=0") plt.subplot(2,2,4) plt.plot(E,Fn(500,0),label='M-B distribution') plt.plot(E,Fn(500,-1),label='B-E distribution') plt.plot(E,Fn(500,+1),label='F-D distribution') plt.legend(loc='best',prop={'size':12}) plt.ylim(0,4) plt.xlabel('Energy(eV)') plt.ylabel('f(E)') plt.title("Temperature = 500 K") """###### Sub plot Adjusting ######""" plt.subplots_adjust(left=0.1, bottom=0.1, right=0.9, top=0.9, wspace=0.4, hspace=0.4) plt.show()
The provided Python code generates a set of plots illustrating different probability distributions in statistical physics: the Maxwell-Boltzmann distribution, the Bose-Einstein distribution, and the Fermi-Dirac distribution. These distributions describe the probabilities of particles in a system having different energy levels at various temperatures.
Let's break down the code step by step:
1. Importing Libraries:
- The code starts by importing the necessary libraries: NumPy for numerical operations and Matplotlib for data visualization.
2. Setting Plotting Parameters:
- It defines a set of parameters to customize the appearance of the plots, such as label font size, line width, and figure size. These parameters are updated using `plt.rcParams.update(newparams)` to apply them to all subsequent plots.
3. Energy Range and Constants:
- It creates an array `E` representing the energy range from -0.5 to 0.5 with 1001 points.
- Constants `e` (electric charge), `k` (Boltzmann constant), and `u` (chemical potential) are defined.
4. Probability Distribution Function:
- The code defines a function `Fn(T, a)` that calculates the probability distribution for a given temperature `T` and parameter `a`. This function corresponds to the Maxwell-Boltzmann distribution when `a = 0`, the Bose-Einstein distribution when `a = -1`, and the Fermi-Dirac distribution when `a = +1`.
5. Plotting:
- The code sets up a 2x2 grid of subplots using `plt.subplot()` for the different distributions and temperatures.
- It then plots each distribution at different temperatures by calling the `Fn` function with various `T` values.
- Titles, labels, legends, and axis limits are appropriately set for each subplot.
6. Subplot Adjustment:
- `plt.subplots_adjust()` is used to adjust the spacing between subplots.
7. Displaying the Plots:
- Finally, `plt.show()` is called to display the set of subplots.
The code aims to visualize how these probability distributions change with temperature. The Maxwell-Boltzmann distribution describes classical particles, the Bose-Einstein distribution applies to bosons (e.g., photons), and the Fermi-Dirac distribution applies to fermions (e.g., electrons). The plots help illustrate how these distributions differ in terms of particle behavior as temperature varies.
In summary, this code is a useful educational tool for visualizing and understanding the behavior of different statistical physics distributions under varying temperature conditions.
Learn Basic of Python |
C programming Tutorial |
Creat Simple calculator using C++ programming |
Find factorial value of any number using java Programming language |
What is newparams in 3rd line?
ReplyDeletenewparams is variable to store about plots better position such as dpi(dots per Inch) , figure size etc. Which is used later in the programming source code.
Delete