Mathematica, Bose-Einstein

In summary, you are trying to plot the Heat Capacity-Plot in Mathematica. If you have an extraordinarily simple and well done Java implementation that looks like and is organized just like the mathematics in the paper and you wanted to show your code then it should be a pretty simple task of replacing that line by line with Mathematica.
  • #1
Munin
4
0
So, I've managed to get the distribution in a decent way. Using this code;

Code:
hw = 1;
kt = 25;
n = 10000;
dist[b_] := 1/(b*Exp[hw*m/kt] - 1);
normsum[b_] := Sum[dist[b]*(m + 2)*(m + 1)/2, {m, 0, 300}]
q = FindRoot[normsum[b] == n, {b, 0.5}]
occnumber = Table[N[dist[b /. q]*(m + 2)*(m + 1)/2], {m, 0, sumlim}];
Part[occnumber, 1];
ListPlot[occnumber, PlotRange -> {0, 500}]

Now I want to plot the Energy level occupation numbers where

E=Sum[m*hw*(m+1)*(m+2)*0.5/b*Exp[m*hw/kt]-1

But, I've been unable to do so, and then of course I want to get the Heat Capacity as a function of the temperature, but I think I might be able to manage that if I get some help on this.

I've been stuck for hours, please help me!
 
Physics news on Phys.org
  • #2
In your code above you didn't say what value sumlim should have. I'm guessing perhaps 300 to get a reasonable plot.

Are you really saying you want to assign the value of a Sum to E==2.71828?
Or do you want to assign the value of a sum to a variable of your own?

What are you trying to Sum over? I can't see if your problem is with the Sum or the Plot until you give more information. Your Sum appears to be incomplete.
 
  • #3
Yea, the Sum should be 300. It would be easier if I just showed you what I'm trying to do:
The thing I'm trying to do is explained in:
http://www.eg.bucknell.edu/physics/ligare/ajp_bose1.pdf"

I want to get the Heat Capacity-Plot.

I've done it in Java, now all I want to do it in Mathematica as well as I'm trying to learn the language.
 
Last edited by a moderator:
  • #4
If you have an extraordinarily simple and well done Java implementation that looks like and is organized just like the mathematics in the paper and you wanted to show your code then it should be a pretty simple task of replacing that line by line with Mathematica.

Often it is possible to reorganize the result and replace several lines or even whole sections with a single Mathematica function, but that may be optional.
 
  • #5


I understand the frustration of being stuck on a problem for hours. It's great that you have managed to get the distribution in a decent way using Mathematica and the code you provided. However, it seems like you are having trouble plotting the Energy level occupation numbers and obtaining the Heat Capacity as a function of temperature.

Firstly, I would suggest breaking down your problem into smaller steps. Instead of trying to plot the Energy level occupation numbers and obtaining the Heat Capacity all at once, try tackling each step separately. For example, first try to plot the Energy level occupation numbers for a specific temperature, and then try to plot it for a range of temperatures.

Secondly, make sure your code is correct and that you are using the correct formulas and variables. In your code, you have defined "hw" and "kt" as 1 and 25, respectively. However, in your formula for Energy, you are using "m" instead of "n". Make sure you are using the correct variables in your code.

Lastly, if you are still having trouble, try reaching out to other scientists or experts in the field for help. Collaboration and seeking advice from others is a crucial aspect of scientific research. Good luck!
 

1. What is Mathematica?

Mathematica is a software program used for mathematical and scientific calculations, data analysis, and visualization. It is commonly used in fields such as physics, engineering, and finance.

2. What is Bose-Einstein statistics?

Bose-Einstein statistics is a type of statistics that describes the behavior of a collection of indistinguishable particles, such as photons or atoms, at low temperatures. It was first proposed by Satyendra Nath Bose and Albert Einstein in the early 1920s.

3. How does Mathematica handle Bose-Einstein statistics?

Mathematica has built-in functions and tools for handling Bose-Einstein statistics, such as the BoseEinsteinDistribution and BoseEinsteinCondensate functions. These functions allow for calculations and simulations of systems with Bose-Einstein statistics.

4. What are some applications of Mathematica in Bose-Einstein statistics?

Some applications of Mathematica in Bose-Einstein statistics include studying the behavior of Bose-Einstein condensates, simulating quantum systems, and analyzing the properties of materials with Bose-Einstein statistics, such as superconductors.

5. Can I use Mathematica for my research in Bose-Einstein statistics?

Yes, Mathematica is a powerful tool for conducting research in Bose-Einstein statistics. Its versatile functions and visualization capabilities make it a valuable tool for analyzing and simulating systems with Bose-Einstein statistics.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • Linear and Abstract Algebra
Replies
7
Views
813
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
932
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
10
Views
1K
Back
Top