Thermal-FIST 1.5
Package for hadron resonance gas model applications
Loading...
Searching...
No Matches
IdealGasFunctions.cpp File Reference
#include "HRGBase/IdealGasFunctions.h"
#include <stdio.h>
#include <cmath>
#include <sstream>
#include <stdexcept>
#include <cfloat>
#include <vector>
#include <cassert>
#include "HRGBase/xMath.h"
#include "HRGBase/NumericalIntegration.h"

Go to the source code of this file.

Namespaces

namespace  thermalfist
 The main namespace where all classes and functions of the Thermal-FIST library reside.
 
namespace  thermalfist::IdealGasFunctions
 Contains implementation of the thermodynamic functions corresponding to an ideal gas of particles in the grand-canonical ensemble.
 

Functions

std::vector< double > thermalfist::IdealGasFunctions::GetSpins (double degSpin)
 Calculate all the spin values -S, S+1,...,S-1,S.
 
double thermalfist::IdealGasFunctions::BoltzmannDensity (double T, double mu, double m, double deg, const IdealGasFunctionsExtraConfig &extraConfig=IdealGasFunctionsExtraConfig())
 Computes the particle number density of a Maxwell-Boltzmann gas.
 
double thermalfist::IdealGasFunctions::BoltzmannPressure (double T, double mu, double m, double deg, const IdealGasFunctionsExtraConfig &extraConfig=IdealGasFunctionsExtraConfig())
 Computes the pressure of a Maxwell-Boltzmann gas.
 
double thermalfist::IdealGasFunctions::BoltzmannEnergyDensity (double T, double mu, double m, double deg, const IdealGasFunctionsExtraConfig &extraConfig=IdealGasFunctionsExtraConfig())
 Computes the energy density of a Maxwell-Boltzmann gas.
 
double thermalfist::IdealGasFunctions::BoltzmannEntropyDensity (double T, double mu, double m, double deg, const IdealGasFunctionsExtraConfig &extraConfig=IdealGasFunctionsExtraConfig())
 Computes the entropy density of a Maxwell-Boltzmann gas.
 
double thermalfist::IdealGasFunctions::BoltzmannScalarDensity (double T, double mu, double m, double deg, const IdealGasFunctionsExtraConfig &extraConfig=IdealGasFunctionsExtraConfig())
 Computes the scalar density of a Maxwell-Boltzmann gas.
 
double thermalfist::IdealGasFunctions::BoltzmannTdndmu (int N, double T, double mu, double m, double deg, const IdealGasFunctionsExtraConfig &extraConfig=IdealGasFunctionsExtraConfig())
 Computes the chemical potential derivative of density for a Maxwell-Boltzmann gas.
 
double thermalfist::IdealGasFunctions::BoltzmannChiN (int N, double T, double mu, double m, double deg, const IdealGasFunctionsExtraConfig &extraConfig=IdealGasFunctionsExtraConfig())
 Computes the n-th order dimensionless susceptibility for a Maxwell-Boltzmann gas.
 
double thermalfist::IdealGasFunctions::BoltzmannChiNDimensionfull (int N, double T, double mu, double m, double deg, const IdealGasFunctionsExtraConfig &extraConfig=IdealGasFunctionsExtraConfig())
 Computes the n-th order dimensionfull susceptibility for a Maxwell-Boltzmann gas.
 
double thermalfist::IdealGasFunctions::QuantumClusterExpansionDensity (int statistics, double T, double mu, double m, double deg, int order=1, const IdealGasFunctionsExtraConfig &extraConfig=IdealGasFunctionsExtraConfig())
 Computes the particle number density of a quantum ideal gas using cluster expansion.
 
double thermalfist::IdealGasFunctions::QuantumClusterExpansionPressure (int statistics, double T, double mu, double m, double deg, int order=1, const IdealGasFunctionsExtraConfig &extraConfig=IdealGasFunctionsExtraConfig())
 Computes the pressure of a quantum ideal gas using cluster expansion.
 
double thermalfist::IdealGasFunctions::QuantumClusterExpansionEnergyDensity (int statistics, double T, double mu, double m, double deg, int order=1, const IdealGasFunctionsExtraConfig &extraConfig=IdealGasFunctionsExtraConfig())
 Computes the energy density of a quantum ideal gas using cluster expansion.
 
double thermalfist::IdealGasFunctions::QuantumClusterExpansionEntropyDensity (int statistics, double T, double mu, double m, double deg, int order=1, const IdealGasFunctionsExtraConfig &extraConfig=IdealGasFunctionsExtraConfig())
 Computes the entropy density of a quantum ideal gas using cluster expansion.
 
double thermalfist::IdealGasFunctions::QuantumClusterExpansionScalarDensity (int statistics, double T, double mu, double m, double deg, int order=1, const IdealGasFunctionsExtraConfig &extraConfig=IdealGasFunctionsExtraConfig())
 Computes the scalar density of a quantum ideal gas using cluster expansion.
 
double thermalfist::IdealGasFunctions::QuantumClusterExpansionTdndmu (int N, int statistics, double T, double mu, double m, double deg, int order=1, const IdealGasFunctionsExtraConfig &extraConfig=IdealGasFunctionsExtraConfig())
 Computes the chemical potential derivative of density for a quantum ideal gas using cluster expansion.
 
double thermalfist::IdealGasFunctions::QuantumClusterExpansionChiN (int N, int statistics, double T, double mu, double m, double deg, int order=1, const IdealGasFunctionsExtraConfig &extraConfig=IdealGasFunctionsExtraConfig())
 Computes the n-th order dimensionless susceptibility for a quantum ideal gas using cluster expansion.
 
double thermalfist::IdealGasFunctions::QuantumClusterExpansionChiNDimensionfull (int N, int statistics, double T, double mu, double m, double deg, int order=1, const IdealGasFunctionsExtraConfig &extraConfig=IdealGasFunctionsExtraConfig())
 Computes the n-th order dimensionfull susceptibility for a quantum ideal gas using cluster expansion.
 
double thermalfist::IdealGasFunctions::QuantumNumericalIntegrationDensity (int statistics, double T, double mu, double m, double deg, const IdealGasFunctionsExtraConfig &extraConfig=IdealGasFunctionsExtraConfig())
 Computes the particle number density of a quantum ideal gas using 32-point Gauss-Laguerre quadratures.
 
double thermalfist::IdealGasFunctions::QuantumNumericalIntegrationPressure (int statistics, double T, double mu, double m, double deg, const IdealGasFunctionsExtraConfig &extraConfig=IdealGasFunctionsExtraConfig())
 Computes the pressure of a quantum ideal gas using 32-point Gauss-Laguerre quadratures.
 
double thermalfist::IdealGasFunctions::QuantumNumericalIntegrationEnergyDensity (int statistics, double T, double mu, double m, double deg, const IdealGasFunctionsExtraConfig &extraConfig=IdealGasFunctionsExtraConfig())
 Computes the energy density of a quantum ideal gas using 32-point Gauss-Laguerre quadratures.
 
double thermalfist::IdealGasFunctions::QuantumNumericalIntegrationEntropyDensity (int statistics, double T, double mu, double m, double deg, const IdealGasFunctionsExtraConfig &extraConfig=IdealGasFunctionsExtraConfig())
 Computes the entropy density of a quantum ideal gas using 32-point Gauss-Laguerre quadratures.
 
double thermalfist::IdealGasFunctions::QuantumNumericalIntegrationScalarDensity (int statistics, double T, double mu, double m, double deg, const IdealGasFunctionsExtraConfig &extraConfig=IdealGasFunctionsExtraConfig())
 Computes the scalar density of a quantum ideal gas using 32-point Gauss-Laguerre quadratures.
 
double thermalfist::IdealGasFunctions::QuantumNumericalIntegrationT1dn1dmu1 (int statistics, double T, double mu, double m, double deg, const IdealGasFunctionsExtraConfig &extraConfig=IdealGasFunctionsExtraConfig())
 
double thermalfist::IdealGasFunctions::QuantumNumericalIntegrationT2dn2dmu2 (int statistics, double T, double mu, double m, double deg, const IdealGasFunctionsExtraConfig &extraConfig=IdealGasFunctionsExtraConfig())
 
double thermalfist::IdealGasFunctions::QuantumNumericalIntegrationT3dn3dmu3 (int statistics, double T, double mu, double m, double deg, const IdealGasFunctionsExtraConfig &extraConfig=IdealGasFunctionsExtraConfig())
 
double thermalfist::IdealGasFunctions::QuantumNumericalIntegrationTdndmu (int N, int statistics, double T, double mu, double m, double deg, const IdealGasFunctionsExtraConfig &extraConfig=IdealGasFunctionsExtraConfig())
 
double thermalfist::IdealGasFunctions::QuantumNumericalIntegrationChiN (int N, int statistics, double T, double mu, double m, double deg, const IdealGasFunctionsExtraConfig &extraConfig=IdealGasFunctionsExtraConfig())
 Computes the n-th order dimensionless susceptibility for a quantum ideal gas using 32-point Gauss-Laguerre quadratures.
 
double thermalfist::IdealGasFunctions::QuantumNumericalIntegrationChiNDimensionfull (int N, int statistics, double T, double mu, double m, double deg, const IdealGasFunctionsExtraConfig &extraConfig=IdealGasFunctionsExtraConfig())
 Computes the n-th order dimensionfull susceptibility for a quantum ideal gas using 32-point Gauss-Laguerre quadratures.
 
double thermalfist::IdealGasFunctions::psi (double x)
 Auxiliary function.
 
double thermalfist::IdealGasFunctions::psi2 (double x)
 Auxiliary function.
 
double thermalfist::IdealGasFunctions::FermiNumericalIntegrationLargeMuDensity (double T, double mu, double m, double deg, const IdealGasFunctionsExtraConfig &extraConfig=IdealGasFunctionsExtraConfig())
 Computes the particle number density of a Fermi-Dirac ideal gas at mu > m.
 
double thermalfist::IdealGasFunctions::FermiNumericalIntegrationLargeMuPressure (double T, double mu, double m, double deg, const IdealGasFunctionsExtraConfig &extraConfig=IdealGasFunctionsExtraConfig())
 Computes the pressure of a Fermi-Dirac ideal gas at mu > m.
 
double thermalfist::IdealGasFunctions::FermiNumericalIntegrationLargeMuEnergyDensity (double T, double mu, double m, double deg, const IdealGasFunctionsExtraConfig &extraConfig=IdealGasFunctionsExtraConfig())
 Computes the energy density of a Fermi-Dirac ideal gas at mu > m.
 
double thermalfist::IdealGasFunctions::FermiNumericalIntegrationLargeMuEntropyDensity (double T, double mu, double m, double deg, const IdealGasFunctionsExtraConfig &extraConfig=IdealGasFunctionsExtraConfig())
 Computes the entropy density of a Fermi-Dirac ideal gas at mu > m.
 
double thermalfist::IdealGasFunctions::FermiNumericalIntegrationLargeMuScalarDensity (double T, double mu, double m, double deg, const IdealGasFunctionsExtraConfig &extraConfig=IdealGasFunctionsExtraConfig())
 Computes the scalar density of a Fermi-Dirac ideal gas at mu > m.
 
double thermalfist::IdealGasFunctions::FermiNumericalIntegrationLargeMuT1dn1dmu1 (double T, double mu, double m, double deg, const IdealGasFunctionsExtraConfig &extraConfig=IdealGasFunctionsExtraConfig())
 
double thermalfist::IdealGasFunctions::FermiNumericalIntegrationLargeMuT2dn2dmu2 (double T, double mu, double m, double deg, const IdealGasFunctionsExtraConfig &extraConfig=IdealGasFunctionsExtraConfig())
 
double thermalfist::IdealGasFunctions::FermiNumericalIntegrationLargeMuT3dn3dmu3 (double T, double mu, double m, double deg, const IdealGasFunctionsExtraConfig &extraConfig=IdealGasFunctionsExtraConfig())
 
double thermalfist::IdealGasFunctions::FermiNumericalIntegrationLargeMuTdndmu (int N, double T, double mu, double m, double deg, const IdealGasFunctionsExtraConfig &extraConfig=IdealGasFunctionsExtraConfig())
 
double thermalfist::IdealGasFunctions::FermiNumericalIntegrationLargeMuChiN (int N, double T, double mu, double m, double deg, const IdealGasFunctionsExtraConfig &extraConfig=IdealGasFunctionsExtraConfig())
 Computes the n-th order dimensionless susceptibility for a Fermi-Dirac ideal gas at mu > m.
 
double thermalfist::IdealGasFunctions::FermiNumericalIntegrationLargeMuChiNDimensionfull (int N, double T, double mu, double m, double deg, const IdealGasFunctionsExtraConfig &extraConfig=IdealGasFunctionsExtraConfig())
 Computes the n-th order dimensionfull susceptibility for a Fermi-Dirac ideal gas at mu > m.
 
double thermalfist::IdealGasFunctions::FermiZeroTDensity (double mu, double m, double deg, const IdealGasFunctionsExtraConfig &extraConfig=IdealGasFunctionsExtraConfig())
 Computes the particle number density of a Fermi-Dirac ideal gas at zero temperature.
 
double thermalfist::IdealGasFunctions::FermiZeroTPressure (double mu, double m, double deg, const IdealGasFunctionsExtraConfig &extraConfig=IdealGasFunctionsExtraConfig())
 Computes the pressure of a Fermi-Dirac ideal gas at zero temperature.
 
double thermalfist::IdealGasFunctions::FermiZeroTEnergyDensity (double mu, double m, double deg, const IdealGasFunctionsExtraConfig &extraConfig=IdealGasFunctionsExtraConfig())
 Computes the energy density of a Fermi-Dirac ideal gas at zero temperature.
 
double thermalfist::IdealGasFunctions::FermiZeroTEntropyDensity (double mu, double m, double deg, const IdealGasFunctionsExtraConfig &extraConfig=IdealGasFunctionsExtraConfig())
 Computes the entropy density of a Fermi-Dirac ideal gas at zero temperature.
 
double thermalfist::IdealGasFunctions::FermiZeroTScalarDensity (double mu, double m, double deg, const IdealGasFunctionsExtraConfig &extraConfig=IdealGasFunctionsExtraConfig())
 Computes the scalar density of a Fermi-Dirac ideal gas at zero temperature.
 
double thermalfist::IdealGasFunctions::FermiZeroTdn1dmu1 (double mu, double m, double deg, const IdealGasFunctionsExtraConfig &extraConfig=IdealGasFunctionsExtraConfig())
 
double thermalfist::IdealGasFunctions::FermiZeroTdn2dmu2 (double mu, double m, double deg, const IdealGasFunctionsExtraConfig &extraConfig=IdealGasFunctionsExtraConfig())
 
double thermalfist::IdealGasFunctions::FermiZeroTdn3dmu3 (double mu, double m, double deg, const IdealGasFunctionsExtraConfig &extraConfig=IdealGasFunctionsExtraConfig())
 
double thermalfist::IdealGasFunctions::FermiZeroTdndmu (int N, double mu, double m, double deg, const IdealGasFunctionsExtraConfig &extraConfig=IdealGasFunctionsExtraConfig())
 
double thermalfist::IdealGasFunctions::FermiZeroTChiN (int N, double mu, double m, double deg, const IdealGasFunctionsExtraConfig &extraConfig=IdealGasFunctionsExtraConfig())
 Computes the n-th order susceptibility for a Fermi-Dirac ideal gas at zero temperature.
 
double thermalfist::IdealGasFunctions::FermiZeroTChiNDimensionfull (int N, double mu, double m, double deg, const IdealGasFunctionsExtraConfig &extraConfig=IdealGasFunctionsExtraConfig())
 Computes the n-th order susceptibility scaled by T^n for a Fermi-Dirac ideal gas at zero temperature.
 
double thermalfist::IdealGasFunctions::IdealGasQuantity (Quantity quantity, QStatsCalculationType calctype, int statistics, double T, double mu, double m, double deg, int order=1, const IdealGasFunctionsExtraConfig &extraConfig=IdealGasFunctionsExtraConfig())
 Calculation of a generic ideal gas function.
 
double thermalfist::IdealGasFunctions::BoltzmannMagnetization (double T, double mu, double m, double deg, const IdealGasFunctionsExtraConfig &extraConfig=IdealGasFunctionsExtraConfig())
 Computes the thermal part of the magnetization of a Maxwell-Boltzmann gas, m_B = dP/dB.
 
double thermalfist::IdealGasFunctions::QuantumClusterExpansionMagnetization (int statistics, double T, double mu, double m, double deg, int order=1, const IdealGasFunctionsExtraConfig &extraConfig=IdealGasFunctionsExtraConfig())
 Computes the thermal part of the magnetization of a Maxwell-Boltzmann gas, m_B = dP/dB.
 
double thermalfist::IdealGasFunctions::QuantumNumericalIntegrationMagnetization (int statistics, double T, double mu, double m, double deg, const IdealGasFunctionsExtraConfig &extraConfig=IdealGasFunctionsExtraConfig())
 Computes the magnetization of a quantum ideal gas using 32-point Gauss-Laguerre quadratures.
 
double thermalfist::IdealGasFunctions::FermiNumericalIntegrationLargeMuMagnetization (double T, double mu, double m, double deg, const IdealGasFunctionsExtraConfig &extraConfig=IdealGasFunctionsExtraConfig())
 
double thermalfist::IdealGasFunctions::FermiZeroTMagnetization (double mu, double m, double deg, const IdealGasFunctionsExtraConfig &extraConfig=IdealGasFunctionsExtraConfig())
 
double thermalfist::IdealGasFunctions::BoltzmanndndT (double T, double mu, double m, double deg, const IdealGasFunctionsExtraConfig &extraConfig=IdealGasFunctionsExtraConfig())
 Temperature derivatives.
 
double thermalfist::IdealGasFunctions::Boltzmannd2ndT2 (double T, double mu, double m, double deg, const IdealGasFunctionsExtraConfig &extraConfig=IdealGasFunctionsExtraConfig())
 Computes the 2nd derivative of particle number density wrt T at constant mu for a Maxwell-Boltzmann gas.
 
double thermalfist::IdealGasFunctions::BoltzmanndedT (double T, double mu, double m, double deg, const IdealGasFunctionsExtraConfig &extraConfig=IdealGasFunctionsExtraConfig())
 Computes the derivative of energy density wrt T at constant mu for a Maxwell-Boltzmann gas.
 
double thermalfist::IdealGasFunctions::Boltzmanndedmu (double T, double mu, double m, double deg, const IdealGasFunctionsExtraConfig &extraConfig=IdealGasFunctionsExtraConfig())
 Computes the derivative of energy density wrt mu at constant T for a Maxwell-Boltzmann gas.
 
double thermalfist::IdealGasFunctions::Boltzmanndchi2dT (double T, double mu, double m, double deg, const IdealGasFunctionsExtraConfig &extraConfig=IdealGasFunctionsExtraConfig())
 Computes the derivative of the susceptibility wrt T at constant mu for a Maxwell-Boltzmann gas.
 
double thermalfist::IdealGasFunctions::QuantumClusterExpansiondndT (int statistics, double T, double mu, double m, double deg, int order=1, const IdealGasFunctionsExtraConfig &extraConfig=IdealGasFunctionsExtraConfig())
 Computes the derivative of particle number density wrt T at constant mu for a Maxwell-Boltzmann gas.
 
double thermalfist::IdealGasFunctions::QuantumClusterExpansiond2ndT2 (int statistics, double T, double mu, double m, double deg, int order=1, const IdealGasFunctionsExtraConfig &extraConfig=IdealGasFunctionsExtraConfig())
 Computes the 2nd derivative of particle number density wrt T at constant mu for a Maxwell-Boltzmann gas.
 
double thermalfist::IdealGasFunctions::QuantumClusterExpansiondedT (int statistics, double T, double mu, double m, double deg, int order=1, const IdealGasFunctionsExtraConfig &extraConfig=IdealGasFunctionsExtraConfig())
 Computes the derivative of energy density wrt T at constant mu for a Maxwell-Boltzmann gas.
 
double thermalfist::IdealGasFunctions::QuantumClusterExpansiondedmu (int statistics, double T, double mu, double m, double deg, int order=1, const IdealGasFunctionsExtraConfig &extraConfig=IdealGasFunctionsExtraConfig())
 Computes the derivative of energy density wrt mu at constant T for a Maxwell-Boltzmann gas.
 
double thermalfist::IdealGasFunctions::QuantumClusterExpansiondchi2dT (int statistics, double T, double mu, double m, double deg, int order=1, const IdealGasFunctionsExtraConfig &extraConfig=IdealGasFunctionsExtraConfig())
 Computes the derivative of the susceptibility wrt T at constant mu for a Maxwell-Boltzmann gas.
 
double thermalfist::IdealGasFunctions::QuantumNumericalIntegrationdndT (int statistics, double T, double mu, double m, double deg, const IdealGasFunctionsExtraConfig &extraConfig=IdealGasFunctionsExtraConfig())
 Computes the derivative of particle number density wrt T at constant mu for a Maxwell-Boltzmann gas.
 
double thermalfist::IdealGasFunctions::QuantumNumericalIntegrationd2ndT2 (int statistics, double T, double mu, double m, double deg, const IdealGasFunctionsExtraConfig &extraConfig=IdealGasFunctionsExtraConfig())
 Computes the 2nd derivative of particle number density wrt T at constant mu for a Maxwell-Boltzmann gas.
 
double thermalfist::IdealGasFunctions::QuantumNumericalIntegrationdedT (int statistics, double T, double mu, double m, double deg, const IdealGasFunctionsExtraConfig &extraConfig=IdealGasFunctionsExtraConfig())
 Computes the derivative of energy density wrt T at constant mu for a Maxwell-Boltzmann gas.
 
double thermalfist::IdealGasFunctions::QuantumNumericalIntegrationdedmu (int statistics, double T, double mu, double m, double deg, const IdealGasFunctionsExtraConfig &extraConfig=IdealGasFunctionsExtraConfig())
 Computes the derivative of energy density wrt mu at constant T for a Maxwell-Boltzmann gas.
 
double thermalfist::IdealGasFunctions::QuantumNumericalIntegrationdchi2dT (int statistics, double T, double mu, double m, double deg, const IdealGasFunctionsExtraConfig &extraConfig=IdealGasFunctionsExtraConfig())
 Computes the derivative of the susceptibility wrt T at constant mu for a Maxwell-Boltzmann gas.
 
double thermalfist::IdealGasFunctions::FermiNumericalIntegrationLargeMudndT (double T, double mu, double m, double deg, const IdealGasFunctionsExtraConfig &extraConfig=IdealGasFunctionsExtraConfig())
 Computes the derivative of particle number density wrt T at constant mu for a Maxwell-Boltzmann gas.
 
double thermalfist::IdealGasFunctions::FermiNumericalIntegrationLargeMud2ndT2 (double T, double mu, double m, double deg, const IdealGasFunctionsExtraConfig &extraConfig=IdealGasFunctionsExtraConfig())
 Computes the second derivative of particle number density wrt T at constant mu for a Maxwell-Boltzmann gas.
 
double thermalfist::IdealGasFunctions::FermiNumericalIntegrationLargeMudedT (double T, double mu, double m, double deg, const IdealGasFunctionsExtraConfig &extraConfig=IdealGasFunctionsExtraConfig())
 Computes the derivative of energy density wrt T at constant mu for a Maxwell-Boltzmann gas.
 
double thermalfist::IdealGasFunctions::FermiNumericalIntegrationLargeMudedmu (double T, double mu, double m, double deg, const IdealGasFunctionsExtraConfig &extraConfig=IdealGasFunctionsExtraConfig())
 Computes the derivative of energy density wrt mu at constant T for a Maxwell-Boltzmann gas.
 
double thermalfist::IdealGasFunctions::FermiNumericalIntegrationLargeMudchi2dT (double T, double mu, double m, double deg, const IdealGasFunctionsExtraConfig &extraConfig=IdealGasFunctionsExtraConfig())
 Computes the derivative of the susceptibility wrt T at constant mu for a Maxwell-Boltzmann gas.
 

Variables

const double * thermalfist::IdealGasFunctions::legx32 = NumericalIntegration::coefficients_xleg32_zeroone
 
const double * thermalfist::IdealGasFunctions::legw32 = NumericalIntegration::coefficients_wleg32_zeroone
 
const double * thermalfist::IdealGasFunctions::lagx32 = NumericalIntegration::coefficients_xlag32
 
const double * thermalfist::IdealGasFunctions::lagw32 = NumericalIntegration::coefficients_wlag32