nucleus.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_NUCLEUS_H
24 #define O2SCL_NUCLEUS_H
25 
26 /** \file nucleus.h
27  \brief File defining \ref o2scl::nucleus
28 */
29 
30 #include <o2scl/part.h>
31 
32 #ifndef DOXYGEN_NO_O2NS
33 namespace o2scl {
34 #endif
35 
36  /** \brief A simple nucleus class
37 
38  The variable part::m is typically used for the mass of the
39  nucleus with no electrons.
40 
41  The binding energy of the nucleus (\ref be) is typically defined
42  as the mass of the nucleus (without the electrons or their
43  binding energy) minus Z times the mass of the proton minus N
44  times the mass of the neutron.
45 
46  The mass excess (\ref mex) is defined as the mass of the nucleus
47  including the electron contribution (but not including the
48  electron binding energy) minus A times the mass of the atomic
49  mass unit.
50 
51  The variable \ref part::inc_rest_mass is set to \c false by
52  default, to insure that energies and chemical potentials do not
53  include the rest mass. This is typically appropriate for nuclei.
54  */
55  class nucleus : public part {
56 
57  public:
58 
59  nucleus();
60 
61  /// Proton number
62  int Z;
63 
64  /// Neutron number
65  int N;
66 
67  /// Baryon number
68  int A;
69 
70  /// Mass excess (typically in \f$ \mathrm{fm}^{-1} \f$)
71  double mex;
72 
73  /** \brief Binding energy with a minus sign for bound nuclei
74  (typically in \f$ \mathrm{fm}^{-1} \f$)
75  */
76  double be;
77 
78  /// Copy constructor
79  nucleus(const nucleus &p) {
80  g=p.g;
81  m=p.m;
82  ms=p.ms;
83  n=p.n;
84  ed=p.ed;
85  pr=p.pr;
86  mu=p.mu;
87  en=p.en;
88  nu=p.nu;
89  N=p.N;
90  Z=p.Z;
91  A=p.A;
92  mex=p.mex;
93  be=p.be;
96  }
97 
98  /// Copy construction with operator=()
99  nucleus &operator=(const nucleus &p) {
100  if (this!=&p) {
101  g=p.g;
102  m=p.m;
103  ms=p.ms;
104  n=p.n;
105  ed=p.ed;
106  pr=p.pr;
107  mu=p.mu;
108  en=p.en;
109  nu=p.nu;
110  N=p.N;
111  Z=p.Z;
112  A=p.A;
113  mex=p.mex;
114  be=p.be;
117  }
118  return *this;
119  }
120 
121  };
122 
123 #ifndef DOXYGEN_NO_O2NS
124 }
125 #endif
126 
127 #endif
nucleus & operator=(const nucleus &p)
Copy construction with operator=()
Definition: nucleus.h:99
double nu
Effective chemical potential.
Definition: part.h:113
double n
Number density.
Definition: part.h:101
int A
Baryon number.
Definition: nucleus.h:68
double en
Entropy density.
Definition: part.h:109
int Z
Proton number.
Definition: nucleus.h:62
double m
Mass.
Definition: part.h:99
Particle base class.
Definition: part.h:92
double mu
Chemical potential.
Definition: part.h:107
double pr
Pressure.
Definition: part.h:105
double ms
Effective mass (Dirac unless otherwise specified)
Definition: part.h:111
nucleus(const nucleus &p)
Copy constructor.
Definition: nucleus.h:79
double mex
Mass excess (typically in )
Definition: nucleus.h:71
double ed
Energy density.
Definition: part.h:103
double be
Binding energy with a minus sign for bound nuclei (typically in )
Definition: nucleus.h:76
bool non_interacting
True if the particle is non-interacting (default true)
Definition: part.h:119
A simple nucleus class.
Definition: nucleus.h:55
int N
Neutron number.
Definition: nucleus.h:65
bool inc_rest_mass
If true, include the mass in the energy density and chemical potential (default true) ...
Definition: part.h:117
double g
Degeneracy (e.g. spin and color if applicable)
Definition: part.h:97

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