Skip to content

Commit

Permalink
Merge pull request #40 from vlvovch/devel
Browse files Browse the repository at this point in the history
Toward version 1.4.1
  • Loading branch information
vlvovch authored Oct 19, 2022
2 parents 3fe2829 + 0d126ef commit 421a5d6
Show file tree
Hide file tree
Showing 18 changed files with 570 additions and 129 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)

## [Version 1.4.1]

Date: 2022-10-18

- GUI: Added more clarity concerning the loading of the decays list
- GUI: Number of known decays channels shown in the table for unstable hadrons
- Added explicit calculation of Fermi-Dirac integrals at T = 0

## [Version 1.4]

Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ project (ThermalFIST)
# The version number.
set (ThermalFIST_VERSION_MAJOR 1)
set (ThermalFIST_VERSION_MINOR 4)
set (ThermalFIST_VERSION_DEVEL 0)
set (ThermalFIST_VERSION_DEVEL 1)

# configure a header file to pass some of the CMake settings
# to the source code
Expand Down
163 changes: 158 additions & 5 deletions include/HRGBase/IdealGasFunctions.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ namespace thermalfist {
* \brief Identifies the thermodynamic function.
*
*/
enum Quantity { ParticleDensity, EnergyDensity, EntropyDensity, Pressure, chi2, chi3, chi4, ScalarDensity };
enum Quantity { ParticleDensity, EnergyDensity, EntropyDensity, Pressure, chi2, chi3, chi4, ScalarDensity,
chi2difull, chi3difull, chi4difull
};
/**
* \brief Identifies whether quantum statistics
* are to be computed using the cluster expansion
Expand Down Expand Up @@ -109,11 +111,12 @@ namespace thermalfist {
double BoltzmannTdndmu(int N, double T, double mu, double m, double deg);

/**
* \brief Computes the n-th order susceptibility for a Maxwell-Boltzmann gas.
* \brief Computes the n-th order dimensionless susceptibility for a Maxwell-Boltzmann gas.
*
* Computes \f$ \chi_n \equiv \frac{\partial^n p/T^4}{\partial (mu/T)^n} \f$
* for a Maxwell-Boltzmann gas.
*
* \param N Susceptibility order.
* \param T Temperature [GeV].
* \param mu Chemical potential [GeV].
* \param m Particle's mass [GeV].
Expand All @@ -122,6 +125,21 @@ namespace thermalfist {
*/
double BoltzmannChiN(int N, double T, double mu, double m, double deg);

/**
* \brief Computes the n-th order dimensionfull susceptibility for a Maxwell-Boltzmann gas.
*
* Computes \f$ \chi_n \equiv \frac{\partial^n p}{\partial mu^n} \f$
* for a Maxwell-Boltzmann gas.
*
* \param N Susceptibility order.
* \param T Temperature [GeV].
* \param mu Chemical potential [GeV].
* \param m Particle's mass [GeV].
* \param deg Internal degeneracy factor.
* \return \f$ \chi_n \f$.
*/
double BoltzmannChiNDimensionfull(int N, double T, double mu, double m, double deg);

/**
* \brief Computes the particle number density of a quantum ideal gas using cluster expansion.
*
Expand Down Expand Up @@ -191,11 +209,12 @@ namespace thermalfist {
double QuantumClusterExpansionTdndmu(int N, int statistics, double T, double mu, double m, double deg, int order = 1);

/**
* \brief Computes the n-th order susceptibility for a quantum ideal gas using cluster expansion.
* \brief Computes the n-th order dimensionless susceptibility for a quantum ideal gas using cluster expansion.
*
* Computes \f$ \chi_n \equiv \frac{\partial^n p/T^4}{\partial (mu/T)^n} \f$
* for a quantum ideal gas using cluster expansion.
*
* \param N Susceptibility order.
* \param T Temperature [GeV].
* \param mu Chemical potential [GeV].
* \param m Particle's mass [GeV].
Expand All @@ -204,6 +223,21 @@ namespace thermalfist {
*/
double QuantumClusterExpansionChiN(int N, int statistics, double T, double mu, double m, double deg, int order = 1);

/**
* \brief Computes the n-th order dimensionfull susceptibility for a quantum ideal gas using cluster expansion.
*
* Computes \f$ \chi_n \equiv \frac{\partial^n p}{\partial mu^n} \f$
* for a quantum ideal gas using cluster expansion.
*
* \param N Susceptibility order.
* \param T Temperature [GeV].
* \param mu Chemical potential [GeV].
* \param m Particle's mass [GeV].
* \param deg Internal degeneracy factor.
* \return \f$ \chi_n \f$ [GeV^{4-N}].
*/
double QuantumClusterExpansionChiNDimensionfull(int N, int statistics, double T, double mu, double m, double deg, int order = 1);

/**
* \brief Computes the particle number density of a quantum ideal gas using 32-point Gauss-Laguerre quadratures.
*
Expand Down Expand Up @@ -265,11 +299,12 @@ namespace thermalfist {
double QuantumNumericalIntegrationTdndmu(int N, int statistics, double T, double mu, double m, double deg);

/**
* \brief Computes the n-th order susceptibility for a quantum ideal gas using 32-point Gauss-Laguerre quadratures.
* \brief Computes the n-th order dimensionless susceptibility for a quantum ideal gas using 32-point Gauss-Laguerre quadratures.
*
* Computes \f$ \chi_n \equiv \frac{\partial^n p/T^4}{\partial (mu/T)^n} \f$
* for a quantum ideal gas using 32-point Gauss-Laguerre quadratures.
*
* \param N Susceptibility order.
* \param T Temperature [GeV].
* \param mu Chemical potential [GeV].
* \param m Particle's mass [GeV].
Expand All @@ -278,6 +313,21 @@ namespace thermalfist {
*/
double QuantumNumericalIntegrationChiN(int N, int statistics, double T, double mu, double m, double deg);

/**
* \brief Computes the n-th order dimensionfull susceptibility for a quantum ideal gas using 32-point Gauss-Laguerre quadratures.
*
* Computes \f$ \chi_n \equiv \frac{\partial^n p}{\partial mu^n} \f$
* for a quantum ideal gas using 32-point Gauss-Laguerre quadratures.
*
* \param N Susceptibility order.
* \param T Temperature [GeV].
* \param mu Chemical potential [GeV].
* \param m Particle's mass [GeV].
* \param deg Internal degeneracy factor.
* \return \f$ \chi_n \f$ [GeV^{n-4}.
*/
double QuantumNumericalIntegrationChiNDimensionfull(int N, int statistics, double T, double mu, double m, double deg);

/**
* \brief Auxiliary function.
*
Expand Down Expand Up @@ -365,12 +415,13 @@ namespace thermalfist {
double FermiNumericalIntegrationLargeMuTdndmu(int N, double T, double mu, double m, double deg);

/**
* \brief Computes the n-th order susceptibility for a Fermi-Dirac ideal gas
* \brief Computes the n-th order dimensionless susceptibility for a Fermi-Dirac ideal gas
* at mu > m.
*
* Computes \f$ \chi_n \equiv \frac{\partial^n p/T^4}{\partial (mu/T)^n} \f$
* for a Fermi-Dirac ideal gas at mu > m.
*
* \param N Susceptibility order.
* \param T Temperature [GeV].
* \param mu Chemical potential [GeV].
* \param m Particle's mass [GeV].
Expand All @@ -379,6 +430,108 @@ namespace thermalfist {
*/
double FermiNumericalIntegrationLargeMuChiN(int N, double T, double mu, double m, double deg);

/**
* \brief Computes the n-th order dimensionfull susceptibility for a Fermi-Dirac ideal gas
* at mu > m.
*
* Computes \f$ \chi_n \equiv \frac{\partial^n p}{\partial mu^n} \f$
* for a Fermi-Dirac ideal gas at mu > m.
*
* \param N Susceptibility order.
* \param T Temperature [GeV].
* \param mu Chemical potential [GeV].
* \param m Particle's mass [GeV].
* \param deg Internal degeneracy factor.
* \return \f$ \chi_n \f$.
*/
double FermiNumericalIntegrationLargeMuChiNDimensionfull(int N, double T, double mu, double m, double deg);


/**
* \brief Computes the particle number density of a Fermi-Dirac ideal gas at zero temperature.
*
* \param mu Chemical potential [GeV].
* \param m Particle's mass [GeV].
* \param deg Internal degeneracy factor.
* \return Particle number density [fm-3].
*/
double FermiZeroTDensity(double mu, double m, double deg);

/**
* \brief Computes the pressure of a Fermi-Dirac ideal gas at zero temperature.
*
* \param mu Chemical potential [GeV].
* \param m Particle's mass [GeV].
* \param deg Internal degeneracy factor.
* \return Pressure [GeV fm-3].
*/
double FermiZeroTPressure(double mu, double m, double deg);

/**
* \brief Computes the energy density of a Fermi-Dirac ideal gas at zero temperature.
*
* \param mu Chemical potential [GeV].
* \param m Particle's mass [GeV].
* \param deg Internal degeneracy factor.
* \return Energy density [GeV fm-3].
*/
double FermiZeroTEnergyDensity(double mu, double m, double deg);

/**
* \brief Computes the entropy density of a Fermi-Dirac ideal gas at zero temperature.
*
* \param mu Chemical potential [GeV].
* \param m Particle's mass [GeV].
* \param deg Internal degeneracy factor.
* \return Entropy density [GeV fm-3].
*/
double FermiZeroTEntropyDensity(double mu, double m, double deg);

/**
* \brief Computes the scalar density of a Fermi-Dirac ideal gas at zero temperature.
*
* \param T Temperature [GeV].
* \param mu Chemical potential [GeV].
* \param m Particle's mass [GeV].
* \param deg Internal degeneracy factor.
* \return Scalar density [fm-3].
*/
double FermiZeroTScalarDensity(double mu, double m, double deg); // TODO: Check for correctness

double FermiZeroTdn1dmu1(double mu, double m, double deg);
double FermiZeroTdn2dmu2(double mu, double m, double deg);
double FermiZeroTdn3dmu3(double mu, double m, double deg);
double FermiZeroTdndmu(int N, double mu, double m, double deg);

/**
* \brief Computes the n-th order susceptibility for a Fermi-Dirac ideal gas at zero temperature.
*
* Computes \f$ \chi_n \equiv \frac{\partial^n p/T^4}{\partial (mu/T)^n} \f$
* for a Fermi-Dirac ideal gas at mu > m.
*
* \param N Susceptibility order.
* \param mu Chemical potential [GeV].
* \param m Particle's mass [GeV].
* \param deg Internal degeneracy factor.
* \return \f$ \chi_n \f$.
*/
double FermiZeroTChiN(int N, double mu, double m, double deg);

/**
* \brief Computes the n-th order susceptibility scaled by T^n for a Fermi-Dirac ideal gas at zero temperature.
*
* Computes \f$ \chi_n \equiv \frac{\partial^n p}{\partial (mu)^n} \f$
* for a Fermi-Dirac ideal gas at mu > m.
* Useful for zero temperature where the dimensionless susceptibility would be singular.
*
* \param N Susceptibility order.
* \param mu Chemical potential [GeV].
* \param m Particle's mass [GeV].
* \param deg Internal degeneracy factor.
* \return \f$ \chi_n \f$ [GeV^{4-N}].
*/
double FermiZeroTChiNDimensionfull(int N, double mu, double m, double deg);

/**
* \brief Calculation of a generic ideal gas function.
*
Expand Down
9 changes: 9 additions & 0 deletions include/HRGBase/ThermalModelBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,15 @@ namespace thermalfist {
*/
double ChemicalPotential(int i) const;

/**
* \brief Sets the chemical potential of particle species i.
*
*
* \param i 0-based index of particle species
* \param chem value of the chemical potential
*/
virtual void SetChemicalPotential(int i, double chem);

/**
* \brief Chemical potential entering the ideal gas expressions of particle species i.
*
Expand Down
16 changes: 16 additions & 0 deletions include/HRGBase/ThermalParticle.h
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,22 @@ namespace thermalfist {
*/
double chi(int index, const ThermalModelParameters &params, bool useWidth = 0, double mu = 0.) const;

/**
* \brief Computes the ideal gas dimensionfull susceptibility \f$ \chi_n \equiv \frac{\partial^n p}{\partial mu^n} \f$.
*
* Computes the dimensionfull susceptibility \f$ \chi_n \equiv \frac{\partial^n p}{\partial mu^n} \f$
* of the corresponding ideal gas.
* Takes into account chemical non-equilibrium fugacity factors
* and finite resonance widths.
*
* \param index Order of the susceptibility.
* \param params Structure containing the temperature value and the chemical factors.
* \param useWidth Whether finite widths are taken into account.
* \param mu Chemical potential.
* \return Value of the computed susceptility [GeV^{4-n].
*/
double chiDimensionfull(int index, const ThermalModelParameters& params, bool useWidth = 0, double mu = 0.) const;

/**
* \brief Computes the scaled variance of particle number fluctuations
* in the ideal gas.
Expand Down
4 changes: 4 additions & 0 deletions include/HRGPCE/ThermalModelPCE.h
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ namespace thermalfist {
* \return Vector of chemical potentials of all particles species, as resulted from the last CalculatePCE() call
*/
const std::vector<double>& ChemicalPotentials() const { return m_ChemCurrent; }
std::vector<double>& ChemicalPotentials() { return m_ChemCurrent; }

/**
* \return The system volume, as resulted from the last CalculatePCE() call
Expand Down Expand Up @@ -187,6 +188,9 @@ namespace thermalfist {
* This is only necessary if energy-dependent Breit-Wigner widths are used.
*/
void ApplyFixForBoseCondensation();

const std::vector< std::vector<double> >& EffectiveCharges() const { return m_EffectiveCharges; }
const std::vector<int>& StableMapTo() const { return m_StableMapTo; }


protected:
Expand Down
5 changes: 5 additions & 0 deletions input/list/PDG2020_modular/list-charged-leptons.dat
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# leptons
# pdgid name stable mass[GeV] degeneracy statistics B Q S C |S| |C| width[GeV] threshold[GeV]
11 e- 1 5.109989461E-04 2 1 0 -1 0 0 0 0 0 0
13 mu- 1 1.056583745E-01 2 1 0 -1 0 0 0 0 0 0
15 tau- 1 1.77686E+00 2 1 0 -1 0 0 0 0 0 0
Loading

0 comments on commit 421a5d6

Please sign in to comment.