Ideal Gas: Sample discussion

The ideal gas simulation was run for several values of N, from N=50 to 500 in increments of 50. Each run was done with with steps=3000 and totalEnergy=500. This is still considered a small-size experiment and some of the irregularities in the plots may be due to N no larger than 500.

Simulation behavior: simulated system energy versus total energy

The average system energy and total energy were plotted versus N. The plot below includes predicted system energy (yellow) based on the model discussed below.

The plot shows an overall trend for system energy to approach total energy for larger values of N. The table below shows the approximate difference between total energy and system energy for a few values of N:

N 50 100 150 200 250
total-system 20 10 7 5 4

As N increases, one observes that the demon does indeed become a smaller and smaller perturbation of the system (as predicted in class).

Looking at the data and the relationship between total and system energy, one can conclude that a reasonable model for the relationship here is that totalEnergy - systemEnergy ≈ 1000/N (or systemEnergy ≈ totalEnergy - 1000/N). For comparison, the values predicted by this model were plotted against a new set of observed values; the resulting plot shows a strong linear correlation. Correlation between observed and predicted values The pylab.corrcoef() function was used to compute a linear correlation of 0.997.

Final particle velocity distributions

The velocity distribution was plotted for N=500, totalEnergy=500, steps=3000. The distribution appears roughly normal with mean at zero, but there is more density than expected around +3 and the left side of the plot seems skewed towards zero. The overall appearance is consistent with the Boltzmann distribution as predicted in class.

The choice of initial velocities at about +1.4 (sqrt(2*totalEnergy/N)=√2) can explain both of these; velocities closer to 1.4 were more accessible, resulting in the slight right-skewness for values lower than 1.4 and the higher than expected number of velocities around 3.

Demon Energy distribution

The demon energy distribution took on an exponential shape, with the energies mostly concentrated at zero. This is consistent with the statement made in class that the Boltzmann distrtibution governs the energy states in equilibrium.

The demon energy reached as high as about 12.5 during the simulation with N=500, totalEnergy=500, and steps=3000, but this occurred only for a single observation; in contrast, about 50% of energy observations were below roughly 1.3. Given this, the observed average demon energy (i.e., 500-systemEnergy) of about two is not surprising.

cs190c/sample_ideal_gas_discussion.txt · Last modified: 2008/03/24 01:10 (external edit)
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki