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

Uniaxial and Biaxial Crystals: Understanding Their Properties and Applications

Introduction Have you ever wondered why some crystals appear differently when viewed from different angles? Or how they can bend and refract light in different ways? The answer lies in their unique internal structure, which can be classified into two types: uniaxial and biaxial crystals. In this blog post, we'll explore the properties of these crystals, their differences, and their applications in various fields. Why do we study uniaxial and biaxial crystals? Crystals are fascinating materials with unique properties that make them valuable in various fields, including optics, electronics, and medicine. The way a crystal interacts with light depends on its internal structure, which can be classified into different types based on the symmetry of its optical properties. Uniaxial and biaxial crystals are two types, each with distinct characteristics and applications. History The study of crystal properties dates back to ancient Greece, where philosophers like Pythagoras and Plato explo...

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...