classical.h
Go to the documentation of this file.
1 /*
2  -------------------------------------------------------------------
3 
4  Copyright (C) 2006-2017, Andrew W. Steiner
5 
6  This file is part of O2scl.
7 
8  O2scl is free software; you can redistribute it and/or modify
9  it under the terms of the GNU General Public License as published by
10  the Free Software Foundation; either version 3 of the License, or
11  (at your option) any later version.
12 
13  O2scl is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  GNU General Public License for more details.
17 
18  You should have received a copy of the GNU General Public License
19  along with O2scl. If not, see <http://www.gnu.org/licenses/>.
20 
21  -------------------------------------------------------------------
22 */
23 #ifndef O2SCL_CLASSICAL_H
24 #define O2SCL_CLASSICAL_H
25 
26 /** \file classical.h
27  \brief File defining \ref o2scl::classical
28 */
29 
30 #include <string>
31 #include <iostream>
32 #include <fstream>
33 #include <cmath>
34 #include <o2scl/constants.h>
35 #include <o2scl/mroot.h>
36 #include <o2scl/inte.h>
37 #include <o2scl/part.h>
38 
39 #ifndef DOXYGEN_NO_O2NS
40 namespace o2scl {
41 #endif
42 
43  /** \brief Classical particle class
44 
45  \future Write a calc_density_zerot() function for
46  completeness?
47  */
48  class classical {
49 
50  public:
51 
52  /** \brief Create a classical particle with mass \c m
53  and degeneracy \c g
54 
55  \note This class attempts to handle zero temperature limit
56  somewhat gracefully, even though the classical limit doesn't
57  necessarily make physical sense there.
58  */
59  classical();
60 
61  virtual ~classical() {
62  }
63 
64  /** \brief Calculate properties as function of chemical potential
65 
66  If the temperature is less than zero, the error
67  handler will be called.
68 
69  \future Handle the case \f$ \mu/T>308 \f$ properly.
70  */
71  virtual void calc_mu(part &p, double temper);
72 
73  /** \brief Calculate properties as function of density
74 
75  If the density or the temperature is less than zero, the error
76  handler will be called. In the case of zero density, the
77  chemical potential is set to the mass and the energy density,
78  pressure, and entropy are set to zero.
79  */
80  virtual void calc_density(part &p, double temper);
81 
82  /// Return string denoting type ("classical")
83  virtual const char *type() { return "classical"; }
84 
85  };
86 
87 #ifndef DOXYGEN_NO_O2NS
88 }
89 #endif
90 
91 #endif
virtual void calc_mu(part &p, double temper)
Calculate properties as function of chemical potential.
classical()
Create a classical particle with mass m and degeneracy g.
virtual const char * type()
Return string denoting type ("classical")
Definition: classical.h:83
Particle base class.
Definition: part.h:92
virtual void calc_density(part &p, double temper)
Calculate properties as function of density.
Classical particle class.
Definition: classical.h:48

Documentation generated with Doxygen. Provided under the GNU Free Documentation License (see License Information).