Skip to content

Commit

Permalink
cleaning up and adding the logo.svg
Browse files Browse the repository at this point in the history
  • Loading branch information
arm61 committed Dec 6, 2018
1 parent b0a5f91 commit 5ef7ace
Show file tree
Hide file tree
Showing 11 changed files with 2,927 additions and 0 deletions.
Binary file added examples/ideal_gas_law/figures/fig1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
100 changes: 100 additions & 0 deletions examples/ideal_gas_law/first_principles.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Ideal gas law from first principles\n",
"\n",
"The partition function, $Q$ for $N$ particles in a 3-dimensional box is, \n",
"\n",
"$$\n",
"Q = \\frac{V^N}{N!\\Lambda^{3N}},\n",
"$$\n",
"\n",
"where, $V$ is the volume of the system and $\\Lambda$ is the de Broglie thermal wavelength, \n",
"\n",
"$$\n",
"\\Lambda = \\bigg(\\frac{\\beta h^2}{2\\pi m}\\bigg)^{1/2}.\n",
"$$\n",
"\n",
"The most useful way to work with the partition function is in its logarithmic form, \n",
"\n",
"$$\n",
"\\ln Q = \\ln \\bigg(\\frac{V^N}{N!\\Lambda^{3N}}\\bigg) = \\ln V^N - \\ln N! - \\ln\\Lambda^{3N}.\n",
"$$\n",
"\n",
"Using Stirling's approximation,\n",
"\n",
"$$\n",
"\\ln Q = N\\ln V - (N\\ln N - N) - N\\ln\\Lambda^3,\n",
"$$\n",
"\n",
"and substituting the de Broglie thermal wavelength,\n",
"\n",
"$$\n",
"\\ln Q = N\\ln V - (N\\ln N - N) - \\frac{3}{2}N\\Bigg[\\ln \\beta + \\ln \\bigg(\\frac{\\beta h^2}{2\\pi m}\\bigg) \\Bigg].\n",
"$$\n",
"\n",
"The partition function can give information about thermodynamics of the system, \n",
"\n",
"$$\n",
"p = k_bT\\bigg(\\frac{\\partial\\ln Q}{\\partial V}\\bigg)_T,\n",
"$$\n",
"\n",
"This means, using the version of the partition function outlined above we can obtain the ideal gas law, \n",
"\n",
"$$\n",
"p = k_BT\\frac{N}{V} = \\frac{Nk_BT}{V}.\n",
"$$"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"author": "Ideal gas law from first principles",
"kernelspec": {
"display_name": "Python [conda root]",
"language": "python",
"name": "conda-root-py"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.2"
},
"latex_envs": {
"LaTeX_envs_menu_present": true,
"autoclose": false,
"autocomplete": true,
"bibliofile": "biblio.bib",
"cite_by": "apalike",
"current_citInitial": 1,
"eqLabelWithNumbers": true,
"eqNumInitial": 1,
"hotkeys": {
"equation": "Ctrl-E",
"itemize": "Ctrl-I"
},
"labels_anchors": false,
"latex_user_defs": false,
"report_style_numbering": false,
"user_envs_cfg": false
}
},
"nbformat": 4,
"nbformat_minor": 2
}
Loading

0 comments on commit 5ef7ace

Please sign in to comment.