Thermo/Stat Mech (comments to: moloney@nextwork.rose-hulman.edu)  [*.ms = maple, *.xls = excel]

MAPLE text, input lines, and file downloads


Stastistical model, mostly distinguishable harmonic oscillators

(combin1.ms)

Download combin1.ms [Use'Save File']



(comb2osc.ms)

Download comb2osc.ms [Use'Save File']


(degfree4.ms)

The heat capacity of metals in the early 1800's was known to lie near 3R per mole for a lot of different metals. This the rule of Dulong and Petit. The gas constant R is boltzmann's constant k multiplied by avogadro's number. Another way of saying it is that R is the gas constant per mole, and k is the gas constant per atom. The 'Einstein solid' is a theoretical model from around 1905 which treated a solid as a collection of atoms each of which was a harmonic oscillator which could vibrate in 3 different directions. The model for N atoms had 3N harmonic oscillators (one for each of the directions). Each oscillator had equally-spaced energy levels of size e. This model gave the heat capacity per atom as

Download degfree4.ms [Use'Save File']


(chempot.ms)

Download chempot.ms [Use'Save File']


(match.ms) (maple version of statme1.xls)

This program matches the statistical model of N oscillators to the einstein model of a solid, and shows the two models agree very well for the specific heat

This plot tells the temperature and heat capacity based on n the number of energy units. Use it to guide the temperature range of the next plot coming up.

With 100 oscillators, both models are approaching a heat capacity of 1 per oscillator at n=100 energy units. Would this also be true if we had 500 oscillators and 100 energy units? Make a prediction before you try it!

Set t range to that of last plot.

Download match.ms [Use'Save File']


statme1.ms 1/1/97 mjm sharing energy among groups of oscillators

Consider a group of harmonic oscillators, equally spaced levels, ground state energy of zero. The number of ways of sharing n energy units (1 energy unit is the spacing between oscillator energy levels) among N such oscillators is

W = (n+N-1)!/[ n! (N-1)! ]

The entropy is S = k ln W .

We will be sharing a total of n energy units between a group of N1 oscillators, and another group of N2 oscillators. In the implementation below, n=100, N1=300, and N2 = 200. n1 is the number of energy units shared among the group of N1=300 oscillators. We will let n1 vary from 0 to n (n=100), and plot individual entropies s1 and s2 of the subgroups, and the total system entropy s1+s2. We will also plot the total number of ways (the total microstates) by plotting the exponential of S=s1+s2.

This is a reduced system of units, further discussed in xxxx.ms .

From this notion, we can go on to temperature as the derivative of entropy with respect to energy (ds1/dn1, ds2/dn2, etc.).

From there we can examine heat capacity, and chemical potential.

When the groups of oscillators are different, (one group has one spacing, the other group has a different spacing), we can discuss 'freezing out' of degrees of freedom.


Download statme1.ms [Use'Save File']


van der Waals gas

(vander.ms)

Download vander.ms [Use'Save File']


(vdwcrit.ms) (Could be assigned as several problems)

Download vdwcrit.ms [Use'Save File']


(joulthom.ms)

Download joulthom.ms [Use'Save File']


Maxwell velocity distribution

(maxwell.ms)

Download maxwell.ms [Use'Save File']


boltzmann distribution (rotsteps.ms)

Download rotsteps.ms [Use'Save File']


Classic cycle of two isotherms and two adiabats using ideal gas. Easily modified for other kinds of cycles.

cycle1.mws Plot and calculate a thermodynamic cycle. Determine efficiency.

isotherm is now 1->2 and not adiabat! This is correct order of cycles.

restart;with(plots):
adiabat:= pa*Va^(5/3)= pb*Vb^(5/3);
isotherm:= pa*Va = pb*Vb;
idealgas:= pa*Va = 831/100*T;
p1:=2.5*10^5; V1:=0.0226; V2:=0.05; V3:=0.07;
startpV:={pa=p1,Va=V1};
T1:=solve(subs(startpV,idealgas),T);
p2:= solve(subs(pa=p1,Va=V1,Vb=V2,isotherm),pb);
p3:=solve(subs(pa=p2,Va=V2,Vb=V3,adiabat),pb); sol:=solve({subs(pa=p3,Va=V3,isotherm),subs(pa=p1,Va=V1,adiabat)},{pb,Vb});
assign(sol);
p4:=pb; V4:=Vb;
p_adiabat:=p0*(V0/V)^(5/3);
p_isothermal:=p0*V0/V;


plot12:=plot(subs(p0=p1,V0=V1,p_isothermal),V=V1..V2): work12:=int(subs(p0=p1,V0=V1,p_isothermal),V=V1..V2); plot23:=plot(subs(p0=p2,V0=V2,p_adiabat),V=V2..V3):
work23:=int(subs(p0=p2,V0=V2,p_adiabat),V=V2..V3);
display({plot12,plot23});


plot34:=plot(subs(p0=p3,V0=V3,p_isothermal),V=V3..V4): work34:=int(subs(p0=p3,V0=V3,p_isothermal),V=V3..V4);
display({plot12,plot23,plot34});


plot41:=plot(subs(p0=p4,V0=V4,p_adiabat),V=V4..V1):
work41:=int(subs(p0=p4,V0=V4,p_adiabat),V=V4..V1);
display({plot12,plot23,plot34,plot41});
work:=work12+work23+work34+work41;
T2:=solve(subs(pa=p3,Va=V3,idealgas),T);

Maximum efficiency in a Carnot cycle
EffMax :=1-T2/T1;

Efficiency is net work done divided by heat input (from 1->2 at higher temperature)
EffEngine := work/work12;

Download cycle1.mws [Use'Save File']