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 void FillVirial(
const std::vector<double> & ri = std::vector<double>(0));
158 void FillAttraction(
const std::vector< std::vector<double> > & aij = std::vector< std::vector<double> >(0));
166 void SetAttraction(
int i,
int j,
double a) {
if (i >= 0 && i < static_cast<int>(
m_Attr.size()) && j >= 0 && j < static_cast<int>(
m_Attr[i].size()))
m_Attr[i][j] = a; }
208 std::vector<double>
ComputeNp(
const std::vector<double>& dmustar);
213 std::vector<double>
ComputeNp(
const std::vector<double>& dmustar,
const std::vector<double>& ns);
251 virtual double MuShift(
int id)
const;
263 std::vector< std::vector<double> >
m_Attr;
293 std::vector< std::vector<double> > m_chi;
295 std::vector<double> m_chiarb;
298 virtual void CalculatePrimordialDensitiesOld();
300 virtual void CalculatePrimordialDensitiesNew();
306 std::vector<double> Equations(
const std::vector<double> &x);
315 std::vector<double> Jacobian(
const std::vector<double> &x);
324 virtual bool IsSolved(
const std::vector<double>& x,
const std::vector<double>& f,
const std::vector<double>& xdelta = std::vector<double>())
const;
Abstract base class for an HRG model implementation.
std::vector< int > m_MapTodMuStar
static const double TOL
Default desired solution accuracy.
void CalculateFluctuations()
Computes the fluctuation observables.
virtual void ChangeTPS(ThermalParticleSystem *TPS)
Change the particle list.
Class implementing the Broyden method to solve a system of non-linear equations.
virtual void SetChemicalPotentials(const std::vector< double > &chem=std::vector< double >(0))
Sets the chemical potentials of all particles.
std::vector< double > SearchMultipleSolutions(int iters=300)
Uses the Broyden method with different initial guesses to look for different possible solutions of th...
std::vector< double > m_scaldens
Vector of scalar densities. Not used.
void FillChemicalPotentials()
Sets the chemical potentials of all particles.
virtual double CalculateMesonMatterEntropyDensity()
The fraction of entropy carried by mesons (Ideal GCE only)
void SetVirial(int i, int j, double b)
Set the excluded volume coefficient .
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 VirialCoefficient(int i, int j) const
Excluded volume coefficient .
virtual void ReadInteractionParameters(const std::string &filename)
Reads the QvdW interaction parameters from a file.
Class containing the particle list.
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...
bool m_TemperatureDependentAB
std::vector< std::vector< int > > m_dMuStarIndices
Structure containing all thermal parameters of the model.
double AttractionCoefficient(int i, int j) const
QvdW mean field attraction coefficient .
double VirialCoefficientdT(int i, int j) const
The temperature derivative of the eigenvolume parameter .
std::vector< std::vector< double > > m_Attr
Matrix of the attractive QvdW coefficients .
Abstract class which defines the system of non-linear equations to be solved by the Broyden's method...
virtual double MuShift(int id) const
The shift in the chemical potential of particle species i due to the QvdW interactions.
virtual ~ThermalModelVDW(void)
Destroy the ThermalModelVDW object.
std::vector< std::vector< double > > m_VirialdT
Class implementing the quantum van der Waals HRG model.
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...
bool IsLastSolutionOK() const
void SetTemperatureDependentAB(bool Tdep)
Sets whether temperature depedence of QvdW parameters should be considered.
std::vector< int > m_MapFromdMuStar
ThermalModelVDW(ThermalParticleSystem *TPS_, const ThermalModelParameters ¶ms=ThermalModelParameters())
Construct a new ThermalModelVDW object.
Sub-class where it is determined whether the required accuracy is achieved in the Broyden's method...
double DensityId(int index)
std::vector< double > ComputeNp(const std::vector< double > &dmustar)
double MuStar(int i) const
The shifted chemical potential of particle species i.
void SetVirialdT(int i, int j, double dbdT)
Set the temperature derivative of the eigenvolume parameter .
virtual double CalculateEnergyDensity()
virtual double CalculateEntropyDensity()
double AttractionCoefficientdT(int i, int j) const
The temperature derivative of the QvdW attraction parameter .
std::vector< std::vector< double > > m_AttrdT
bool TemperatureDependentAB() const
Whether temperature depedence of QvdW parameters is considered.
virtual void CalculatePrimordialDensities()
Calculates the primordial densities of all species.
virtual double CalculatePressure()
Implementation of the equation of state functions.
Class which implements calculation of the Jacobian needed for the Broyden's method.
std::vector< std::vector< double > > m_Virial
virtual std::vector< double > CalculateChargeFluctuations(const std::vector< double > &chgs, int order=4)
Calculates fluctuations (diagonal susceptibilities) of an arbitrary "conserved" charge.
ThermalModelVDW ThermalModelVDWFull
For backward compatibility.
bool m_LastBroydenSuccessFlag
Whether Broyden's method was successfull.
void SetAttractiondT(int i, int j, double dadT)
Set the temperature derivative of the QvdW attraction parameter .
virtual double ParticleScalarDensity(int part)
The scalar density of the particle species i.
void CalculateTwoParticleCorrelations()
Computes the fluctuations and correlations of the primordial particle numbers.
std::vector< double > m_MuStar
Vector of the shifted chemical potentials.
virtual double CalculateBaryonMatterEntropyDensity()
The fraction of entropy carried by baryons (Ideal GCE only)
bool m_SearchMultipleSolutions
Whether multiple solutions are considered.
bool m_LastCalculationSuccessFlag
The main namespace where all classes and functions of the Thermal-FIST library reside.
void SetMultipleSolutionsMode(bool search)
Whether to search for multiple solutions of the QvdW equations by considering different initial guess...
virtual void WriteInteractionParameters(const std::string &filename)
Write the QvdW interaction parameters to a file.
std::vector< double > m_DensitiesId
Vector of ideal gas densities with shifted chemical potentials.
void SetAttraction(int i, int j, double a)
Set the vdW mean field attraction coefficient .
void SetMuStar(const std::vector< double > &MuStar)
Set the vector of shifted chemical potentials.
bool UseMultipleSolutionsMode() const
Whether to search for multiple solutions of the QvdW equations by considering different initial guess...
ThermalParticleSystem * TPS()
std::vector< double > GetMuStar() const
void FillAttraction(const std::vector< std::vector< double > > &aij=std::vector< std::vector< double > >(0))