Skip to main content

Plot the following functions with energy at different temperatures. a) Maxwell-Boltzmann distribution b) Fermi-Dirac distribution c) Bose-Einstein distribution , . - Scilab Solution

a) Maxwell-Boltzmann distribution

b) Fermi-Dirac distribution 

c) Bose-Einstein distribution



a) Maxwell-Boltzmann distribution

// Define the constants and energy range

mu = 0.0;

tempE1 = 0.1;

tempE2 = 0.5;

eps = [0.01:0.01:2]';


// Calculate the distribution functions

feps1 = exp(-(eps-mu)/tempE1);

feps2 = exp(-(eps-mu)/tempE2);


// Plot the distribution functions

clf();

plot2d(eps, feps1, style = 2);

plot2d(eps, feps2, style = 3);

xgrid();

xlabel("$\epsilon$", "fontsize", 5, "color", black);

ylabel("$f(\epsilon)$", "fontsize", 5);

title("Maxwell-Boltzmann distribution at different temperatures");


// Display a legend for the two curves

legend(["T = " + string(tempE1), "T = " + string(tempE2)], location = "northwest");


b) Fermi-Dirac distribution 


// Define the constants and energy range

mu = 2.0;

tempE1 = 0.1;

tempE2 = 0.5;

eps = [0.01:0.01:6]';


// Calculate the distribution functions

feps1 = 1.0./(exp((eps-mu)/tempE1) + 1.0);

feps2 = 1.0./(exp((eps-mu)/tempE2) + 1.0);


// Plot the distribution functions

clf();

plot2d(eps, feps1, style = -7);

plot2d(eps, feps2, style = -9);

xgrid();

xlabel("$\epsilon$", "fontsize", 5, "color", black);

ylabel("$f(\epsilon)$", "fontsize", 5);

title("Fermi-Dirac distribution at different temperatures");


// Display a legend for the two curves

legend(["T = " + string(tempE1), "T = " + string(tempE2)], location = "northeast");


c) Bose-Einstein distribution


mu = 2.0;

tempE1 = 0.1;

tempE2 = 0.5;

eps = [0.01:0.01:4.2]';


feps1 = 1.0./(exp((eps-mu)/tempE1)+1.0);

feps2 = 1.0./(exp((eps-mu)/tempE2)+1.0);


plot2d(eps,[feps1],2,rect=[0,0,4,2])

plot2d(eps,[feps2],3,rect=[0,0,4,2])


xlabel("$\epsilon$", "fontsize", 5, "color", "black");

ylabel("$f(\epsilon)$", "fontsize", 5);

title("Bose-Einstein distribution at different temperatures");


legend(["T = " + string(tempE1); "T = " + string(tempE2)], location = "northeast");




Comments

Popular posts from this blog

Symmetric Nature of Dielectric Tensor

Introduction  Have you ever wondered why certain materials exhibit unique optical properties? Why do some materials allow light to pass through them easily, while others reflect or absorb it? The answer lies in the underlying physical properties of these materials, including their dielectric tensor. The dielectric tensor is a mathematical construct that describes the relationship between an electric field and the resulting polarization of a material. It is a crucial parameter in understanding the optical properties of materials and is often used in the design and fabrication of advanced optical devices, such as lenses, filters, and displays. History of Dielectric Tensor The concept of a dielectric tensor dates back to the late 19th century when James Clerk Maxwell first introduced the idea of polarization in dielectric materials. In 1893, the German physicist Heinrich Hertz discovered that when electromagnetic waves pass through a dielectric material, they induce electric and magne...

Food webs

What is a Food Web?  A food web is a graphical representation of the feeding relationships among different species within an ecosystem. It consists of interconnected food chains, which show how energy and nutrients are transferred from one organism to another. In a food web, each organism can have multiple feeding relationships and may occupy different trophic levels. Components of a Food Web: Producers (Autotrophs): Producers are organisms capable of synthesizing their food using sunlight through photosynthesis (plants) or chemical energy (chemosynthetic bacteria). They form the base of the food web and are the primary source of energy for all other organisms. Consumers (Heterotrophs): Consumers are organisms that obtain their energy by consuming other living organisms. They are categorized into different trophic levels based on their position in the food web:Primary consumers (herbivores) eat producers. Secondary consumers (carnivores) eat primary consumers. Tertiary consumers (c...

Thermodynamic Functions of a Two-Energy Levels System,

In a two-energy level system, there are only two possible energy states that the system can occupy. Let's denote these energy levels as E₁ and E₂, with E₂ > E₁. To calculate the thermodynamic functions of this system, such as the partition function (Z), internal energy (U), entropy (S), and free energy (F), we need to consider the probabilities of the system being in each energy state.Partition Function (Z): The partition function is defined as the sum of the Boltzmann factors for each energy state. For a two-energy level system, the partition function can be written as: Z = exp(-E₁ / (k_B * T)) + exp(-E₂ / (k_B * T)) where k_B is the Boltzmann constant and T is the temperature.Internal Energy (U): The internal energy of the system is given by the weighted average of the energy states, weighted by their respective probabilities. In this case, it can be calculated as: U = E₁ * P(E₁) + E₂ * P(E₂) where P(E₁) and P(E₂) are the probabilities of the system being in energy states E₁ a...