8#ifndef THERMALMODELVDW_H
9#define THERMALMODELVDW_H
59 void FillVirialEV(
const std::vector< std::vector<double> > & bij = std::vector< std::vector<double> >(0));
156 virtual void FillVirial(
const std::vector<double> & ri = std::vector<double>(0));
158 virtual void FillAttraction(
const std::vector< std::vector<double> > & aij = std::vector< std::vector<double> >(0));
217 std::vector<double>
ComputeNp(
const std::vector<double>& dmustar);
222 std::vector<double>
ComputeNp(
const std::vector<double>& dmustar,
const std::vector<double>& ns);
263 virtual double MuShift(
int id)
const;
275 std::vector< std::vector<double> >
m_Attr;
307 std::vector< std::vector<double> >
m_chi;
313 virtual void CalculatePrimordialDensitiesOld();
315 virtual void CalculatePrimordialDensitiesNew();
321 std::vector<double> Equations(
const std::vector<double> &x);
326 class BroydenJacobianVDW :
public BroydenJacobian
330 std::vector<double> Jacobian(
const std::vector<double> &x);
335 class BroydenSolutionCriteriumVDW :
public Broyden::BroydenSolutionCriterium
339 virtual bool IsSolved(
const std::vector<double>& x,
const std::vector<double>& f,
const std::vector<double>& xdelta = std::vector<double>())
const;
map< string, double > params
BroydenSolutionCriterium(double maximum_error=TOL)
Abstract class which defines the system of non-linear equations to be solved by the Broyden's method.
int m_N
The number of equations.
static const double TOL
Default desired solution accuracy.
BroydenJacobian(BroydenEquations *eqs=NULL)
Construct a new BroydenJacobian object.
Abstract base class for an HRG model implementation.
ThermalModelBase(ThermalParticleSystem *TPS, const ThermalModelParameters ¶ms=ThermalModelParameters())
Construct a new ThermalModelBase object.
Class implementing the quantum van der Waals HRG model.
virtual void SetChemicalPotentials(const std::vector< double > &chem=std::vector< double >(0))
Sets the chemical potentials of all particles.
std::vector< double > m_chiarb
virtual double CalculateEnergyDensityDerivativeT()
virtual void WriteInteractionParameters(const std::string &filename)
Write the QvdW interaction parameters to a file.
double VirialCoefficientdT(int i, int j) const
The temperature derivative of the eigenvolume parameter .
virtual void ChangeTPS(ThermalParticleSystem *TPS)
Change the particle list.
bool m_VDWComponentMapCalculated
Whether the mapping to components with the same VDW parameters has been calculated.
virtual std::vector< double > CalculateChargeFluctuations(const std::vector< double > &chgs, int order=4)
Calculates fluctuations (diagonal susceptibilities) of an arbitrary "conserved" charge.
virtual double CalculateMesonMatterEntropyDensity()
virtual std::vector< double > SearchSingleSolution(const std::vector< double > &muStarInit)
Uses the Broyden method with a provided initial guess to determine the shifted chemical potentials by...
std::vector< double > GetMuStar() const
virtual void SetAttraction(int i, int j, double a)
Set the vdW mean field attraction coefficient .
virtual double MuShift(int id) const
The shift in the chemical potential of particle species i due to the QvdW interactions.
void SetTemperatureDependentAB(bool Tdep)
Sets whether temperature depedence of QvdW parameters should be considered.
std::vector< double > m_DensitiesId
Vector of ideal gas densities with shifted chemical potentials.
virtual void ReadInteractionParameters(const std::string &filename)
Reads the QvdW interaction parameters from a file.
double MuStar(int i) const
The shifted chemical potential of particle species i.
double DensityId(int index)
void FillVirialEV(const std::vector< std::vector< double > > &bij=std::vector< std::vector< double > >(0))
Same as FillVirial() but uses the matrix of excluded-volume coefficients as input instead of radii.
double AttractionCoefficient(int i, int j) const
QvdW mean field attraction coefficient .
void SetVirialdT(int i, int j, double dbdT)
Set the temperature derivative of the eigenvolume parameter .
virtual double CalculateEntropyDensity()
std::vector< int > m_MapTodMuStar
void CalculateVDWComponentsMap()
Partitions particles species into sets that have identical VDW parameters.
const std::vector< std::vector< int > > & VDWComponentIndices() const
virtual void SetMultipleSolutionsMode(bool search)
Whether to search for multiple solutions of the QvdW equations by considering different initial guess...
virtual double CalculateEnergyDensity()
void FillChemicalPotentials()
Sets the chemical potentials of all particles.
virtual double CalculatePressure()
std::vector< std::vector< double > > m_AttrdT
void CalculateTwoParticleCorrelations()
Computes the fluctuations and correlations of the primordial particle numbers.
bool m_TemperatureDependentAB
virtual void SetVirial(int i, int j, double b)
Set the excluded volume coefficient .
virtual double DeltaMu(int i) const
std::vector< double > ComputeNp(const std::vector< double > &dmustar)
const std::vector< std::vector< double > > & VirialMatrix() const
virtual void FillAttraction(const std::vector< std::vector< double > > &aij=std::vector< std::vector< double > >(0))
double AttractionCoefficientdT(int i, int j) const
The temperature derivative of the QvdW attraction parameter .
const std::vector< std::vector< double > > & AttractionMatrix() const
std::vector< std::vector< int > > m_dMuStarIndices
virtual ~ThermalModelVDW(void)
Destroy the ThermalModelVDW object.
virtual void CalculateTemperatureDerivatives()
Computes the temperature derivatives of densities, shifted chemical potentials, and primordial hadron...
std::vector< int > m_MapFromdMuStar
std::vector< std::vector< double > > m_Virial
bool IsLastSolutionOK() const
bool UseMultipleSolutionsMode() const
Whether to search for multiple solutions of the QvdW equations by considering different initial guess...
std::vector< double > m_MuStar
Vector of the shifted chemical potentials.
void CalculateFluctuations()
Computes the fluctuation observables.
bool TemperatureDependentAB() const
Whether temperature depedence of QvdW parameters is considered.
virtual double ParticleScalarDensity(int part)
void SetAttractiondT(int i, int j, double dadT)
Set the temperature derivative of the QvdW attraction parameter .
std::vector< double > m_scaldens
Vector of scalar densities. Not used.
virtual void CalculatePrimordialDensities()
Calculates the primordial densities of all species.
std::vector< std::vector< double > > m_chi
std::vector< std::vector< double > > m_VirialdT
bool m_SearchMultipleSolutions
Whether multiple solutions are considered.
ThermalModelVDW(ThermalParticleSystem *TPS_, const ThermalModelParameters ¶ms=ThermalModelParameters())
Construct a new ThermalModelVDW object.
bool m_LastBroydenSuccessFlag
Whether Broyden's method was successfull.
double VirialCoefficient(int i, int j) const
Excluded volume coefficient .
virtual double CalculateBaryonMatterEntropyDensity()
virtual void FillVirial(const std::vector< double > &ri=std::vector< double >(0))
Fills the excluded volume coefficients based on the provided radii parameters for all species.
void SetMuStar(const std::vector< double > &MuStar)
Set the vector of shifted chemical potentials.
std::vector< std::vector< double > > m_Attr
Matrix of the attractive QvdW coefficients .
std::vector< double > SearchMultipleSolutions(int iters=300)
Uses the Broyden method with different initial guesses to look for different possible solutions of th...
Class containing the particle list.
The main namespace where all classes and functions of the Thermal-FIST library reside.
ThermalModelVDW ThermalModelVDWFull
For backward compatibility.
void SetVDWHRGInteractionParameters(ThermalModelBase *model, double a, double b)
Sets vdW interactions for baryon-baryon and antibaryon-antibaryon pairs as in https://arxiv....
Structure containing all thermal parameters of the model.