26 #include <Eigen/Dense> 28 using namespace Eigen;
35 ThermalModelBase(TPS_, params), m_SearchMultipleSolutions(false), m_TemperatureDependentAB(false)
38 for(
int i=0;i<6;++i) m_chi[i].resize(3);
47 m_TAG =
"ThermalModelVDW";
60 for(
size_t i = 0; i <
m_MuStar.size(); ++i)
67 for (
size_t i = 0; i <
m_MuStar.size(); ++i)
73 printf(
"**WARNING** %s::FillVirial(const vector<double> & ri): size of ri does not match number of hadrons in the list",
m_TAG.c_str());
84 vector< vector<double> > fVirialTmp =
m_Virial;
87 if (i==j)
m_Virial[i][j] = fVirialTmp[i][j];
88 else if ((fVirialTmp[i][i] + fVirialTmp[j][j]) > 0.0)
m_Virial[i][j] = 2. * fVirialTmp[i][j] * fVirialTmp[i][i] / (fVirialTmp[i][i] + fVirialTmp[j][j]);
98 printf(
"**WARNING** %s::FillVirialEV(const vector<double> & bij): size of bij does not match number of hadrons in the list",
m_TAG.c_str());
107 printf(
"**WARNING** %s::FillAttraction(const vector<double> & aij): size of aij does not match number of hadrons in the list",
m_TAG.c_str());
118 ifstream fin(filename.c_str());
121 fin.getline(cc, 2000);
122 string tmp = string(cc);
124 if (elems.size() < 1)
126 istringstream iss(elems[0]);
129 if (iss >> pdgid1 >> pdgid2 >> b) {
134 if (ind1 != -1 && ind2 != -1) {
136 m_Attr[ind1][ind2] = a;
145 ofstream fout(filename.c_str());
146 fout <<
"# List of the van dar Waals interaction parameters to be used in the QvdW-HRG model" 148 fout <<
"# Only particle pairs with a non-zero QvdW interaction are listed here" 155 fout <<
"#" <<
" " <<
"pdg_i" 157 <<
" " <<
"b_{ij}[fm^3]" 158 <<
" " <<
"a_{ij}[GeV*fm^3]" 171 fout <<
" " <<
m_Attr[i][j];
201 MatrixXd densMatrix(NNdmu, NNdmu);
202 VectorXd solVector(NNdmu), xVector(NNdmu);
204 for (
int i = 0; i < NNdmu; ++i) {
205 for (
int j = 0; j < NNdmu; ++j) {
206 densMatrix(i, j) = 0.;
208 densMatrix(i, j) += 1.;
216 PartialPivLU<MatrixXd> decomp(densMatrix);
218 for (
int kp = 0; kp < NNdmu; ++kp) {
226 solVector = decomp.solve(xVector);
228 vector<double> ntildek(NNdmu, 0.);
229 for (
int i = 0; i < NNdmu; ++i)
230 ntildek[i] = solVector[i];
233 for (
int i = 0; i < NN; ++i) {
235 for (
int k = 0; k < NNdmu; ++k) {
238 np[i] = (1. - np[i]) * ns[i];
249 vector<double> dmuscur(NNdmu, 0.);
250 for (
int i = 0; i < NNdmu; ++i)
253 BroydenEquationsVDW eqs(
this);
254 BroydenJacobianVDW jac(
this);
256 BroydenSolutionCriteriumVDW crit(
this);
258 dmuscur = broydn.
Solve(dmuscur, &crit);
268 vector<double> ret(NN);
269 for (
int i = 0; i < NN; ++i)
281 double dmu = (muBmax - muBmin) / iters;
284 for(
int isol = 0; isol < iters; ++isol) {
285 double tmu = muBmin + (0.5 + isol) * dmu;
286 for(
size_t j = 0; j < curmust.size(); ++j) {
294 for(
size_t i = 0; i < sol.size(); ++i)
295 if (sol[i] != sol[i]) fl =
false;
304 MatrixXd densMatrix(NN, NN);
305 VectorXd solVector(NN), xVector(NN);
307 for(
int i=0;i<NN;++i)
308 for(
int j=0;j<NN;++j) {
310 if (i==j) densMatrix(i,j) += 1.;
313 PartialPivLU<MatrixXd> decomp(densMatrix);
315 for(
int i=0;i<NN;++i)
317 solVector = decomp.solve(xVector);
318 for(
int i=0;i<NN;++i)
328 if (!solved || tP > Psol) {
343 vector<double> muStarInit =
m_MuStar;
345 for(
size_t i=0;i<muStarInit.size();++i) {
359 CalculatePrimordialDensitiesNew();
363 void ThermalModelVDW::CalculatePrimordialDensitiesOld() {
366 map< vector<double> ,
int> m_MapVDW;
377 for (
int i = 0; i < NN; ++i) {
378 vector<double> VDWParam(0);
379 for (
int j = 0; j < NN; ++j) {
382 for (
int j = 0; j < NN; ++j) {
386 if (m_MapVDW.count(VDWParam) == 0) {
387 m_MapVDW[VDWParam] = tind;
399 printf(
"Optimization: %d --> %d\n", NN, static_cast<int>(
m_MapFromdMuStar.size()));
402 clock_t tbeg = clock();
406 vector<double> muStarInit =
m_MuStar;
408 for (
size_t i = 0; i<muStarInit.size(); ++i) {
418 printf(
"Solution time = %lf ms\n", (clock() - tbeg) / (
double)(CLOCKS_PER_SEC) * 1.e3);
425 MatrixXd densMatrix(NN, NN);
426 VectorXd solVector(NN), xVector(NN);
428 for(
int i=0;i<NN;++i)
429 for(
int j=0;j<NN;++j) {
431 if (i==j) densMatrix(i,j) += 1.;
434 PartialPivLU<MatrixXd> decomp(densMatrix);
437 solVector = decomp.solve(xVector);
438 for(
int i=0;i<NN;++i)
m_densities[i] = solVector[i];
442 solVector = decomp.solve(xVector);
444 for(
int i=0;i<NN;++i)
m_scaldens[i] = solVector[i];
452 void ThermalModelVDW::CalculatePrimordialDensitiesNew() {
455 map< vector<double>,
int> m_MapVDW;
466 for (
int i = 0; i < NN; ++i) {
467 vector<double> VDWParam(0);
468 for (
int j = 0; j < NN; ++j) {
471 for (
int j = 0; j < NN; ++j) {
475 if (m_MapVDW.count(VDWParam) == 0) {
476 m_MapVDW[VDWParam] = tind;
489 clock_t tbeg = clock();
501 MatrixXd densMatrix(NNdmu, NNdmu);
502 VectorXd solVector(NNdmu), xVector(NNdmu);
504 for (
int i = 0; i < NNdmu; ++i) {
505 for (
int j = 0; j < NNdmu; ++j) {
506 densMatrix(i, j) = 0.;
508 densMatrix(i, j) += 1.;
516 PartialPivLU<MatrixXd> decomp(densMatrix);
518 for (
int kp = 0; kp < NNdmu; ++kp) {
525 solVector = decomp.solve(xVector);
527 vector<double> ntildek(NNdmu, 0.);
528 for (
int i = 0; i < NNdmu; ++i)
529 ntildek[i] = solVector[i];
532 for (
int i = 0; i < NN; ++i) {
534 for (
int k = 0; k < NNdmu; ++k) {
547 vector<double> ret(order + 1, 0.);
555 if (order<2)
return ret;
558 MatrixXd densMatrix(2*NN, 2*NN);
559 VectorXd solVector(2*NN), xVector(2*NN);
562 for(
int i=0;i<NN;++i)
565 for(
int i=0;i<NN;++i)
566 for(
int j=0;j<NN;++j) {
568 if (i==j) densMatrix(i,j) += 1.;
571 for(
int i=0;i<NN;++i)
572 for(
int j=0;j<NN;++j)
573 densMatrix(i,NN+j) = 0.;
575 for(
int i=0;i<NN;++i) {
576 densMatrix(i,NN+i) = 0.;
577 for(
int k=0;k<NN;++k) {
583 for(
int i=0;i<NN;++i)
584 for(
int j=0;j<NN;++j) {
588 for(
int i=0;i<NN;++i)
589 for(
int j=0;j<NN;++j) {
591 if (i==j) densMatrix(NN+i,NN+j) += 1.;
595 PartialPivLU<MatrixXd> decomp(densMatrix);
598 vector<double> dni(NN, 0.), dmus(NN, 0.);
600 for(
int i=0;i<NN;++i) {
602 xVector[NN+i] = chgs[i];
605 solVector = decomp.solve(xVector);
607 for(
int i=0;i<NN;++i) {
608 dni[i] = solVector[i];
609 dmus[i] = solVector[NN+i];
612 for(
int i=0;i<NN;++i)
613 ret[1] += chgs[i] * dni[i];
617 if (order<3)
return ret;
620 vector<double> d2ni(NN, 0.), d2mus(NN, 0.);
623 for(
int i=0;i<NN;++i)
626 for(
int i=0;i<NN;++i) {
630 for(
int j=0;j<NN;++j) tmp +=
m_Virial[j][i] * dni[j];
639 for(
int i=0;i<NN;++i) {
648 solVector = decomp.solve(xVector);
650 for(
int i=0;i<NN;++i) {
651 d2ni[i] = solVector[i];
652 d2mus[i] = solVector[NN+i];
655 for(
int i=0;i<NN;++i)
656 ret[2] += chgs[i] * d2ni[i];
661 if (order<4)
return ret;
664 vector<double> d3ni(NN, 0.), d3mus(NN, 0.);
667 for (
int i = 0; i < NN; ++i)
670 vector<double> dnis(NN, 0.);
671 for(
int i=0;i<NN;++i) {
675 vector<double> d2nis(NN, 0.);
676 for(
int i=0;i<NN;++i) {
681 for(
int i=0;i<NN;++i) {
685 for(
int j=0;j<NN;++j) tmp +=
m_Virial[j][i] * dni[j];
686 tmp = -3. * tmp * d2nis[i];
690 for(
int j=0;j<NN;++j) tmp +=
m_Virial[j][i] * d2ni[j];
691 tmp = -3. * tmp * dnis[i];
700 tmp = -(tmps - 1.) * chi4id[i] * pow(
xMath::GeVtoifm(), 3) * dmus[i] * dmus[i] * dmus[i];
703 for(
int i=0;i<NN;++i) {
707 for(
int j=0;j<NN;++j) tmp += -2. *
m_Virial[i][j] * d2mus[j] * dnis[j];
708 xVector[NN+i] += tmp;
711 for(
int j=0;j<NN;++j) tmp += -
m_Virial[i][j] * dmus[j] * d2nis[j];
712 xVector[NN+i] += tmp;
715 solVector = decomp.solve(xVector);
717 for(
int i=0;i<NN;++i) {
718 d3ni[i] = solVector[i];
719 d3mus[i] = solVector[NN+i];
722 for(
int i=0;i<NN;++i)
723 ret[3] += chgs[i] * d3ni[i];
732 if (order<1)
return m_chi;
738 for(
size_t i=0;i<chgs.size();++i)
741 for(
int i=0;i<order;++i) m_chi[i][0] = chis[i];
744 for(
size_t i=0;i<chgs.size();++i)
747 for(
int i=0;i<order;++i) m_chi[i][1] = chis[i];
750 for(
size_t i=0;i<chgs.size();++i)
753 for(
int i=0;i<order;++i) m_chi[i][2] = chis[i];
756 for(
size_t i=0;i<chgs.size();++i)
759 for(
int i=0;i<order;++i) m_chiarb[i] = chis[i];
769 for (
int i = 0; i < NN; ++i)
773 MatrixXd densMatrix(2 * NN, 2 * NN);
774 VectorXd solVector(2 * NN), xVector(2 * NN);
777 for (
int i = 0; i<NN; ++i)
780 for (
int i = 0; i<NN; ++i)
781 for (
int j = 0; j<NN; ++j) {
783 if (i == j) densMatrix(i, j) += 1.;
786 for (
int i = 0; i<NN; ++i)
787 for (
int j = 0; j<NN; ++j)
788 densMatrix(i, NN + j) = 0.;
790 for (
int i = 0; i<NN; ++i) {
791 densMatrix(i, NN + i) = 0.;
792 for (
int k = 0; k<NN; ++k) {
798 for (
int i = 0; i<NN; ++i)
799 for (
int j = 0; j<NN; ++j) {
803 for (
int i = 0; i<NN; ++i)
804 for (
int j = 0; j<NN; ++j) {
806 if (i == j) densMatrix(NN + i, NN + j) += 1.;
809 PartialPivLU<MatrixXd> decomp(densMatrix);
811 for (
int k = 0; k < NN; ++k) {
812 vector<double> dni(NN, 0.), dmus(NN, 0.);
814 for (
int i = 0; i < NN; ++i) {
816 xVector[NN + i] =
static_cast<int>(i == k);
819 solVector = decomp.solve(xVector);
821 for (
int i = 0; i < NN; ++i) {
822 dni[i] = solVector[i];
823 dmus[i] = solVector[NN + i];
826 for (
int j = 0; j < NN; ++j) {
831 for (
int i = 0; i < NN; ++i) {
847 for (
size_t i = 0; i <
m_wprim.size(); ++i) {
921 if (
id >= 0. &&
id < static_cast<int>(
m_Virial.size()))
929 if (i<0 || i >= static_cast<int>(
m_Virial.size()) || j < 0 || j >= static_cast<int>(
m_Virial.size()))
936 if (i<0 || i >= static_cast<int>(
m_Attr.size()) || j < 0 || j >= static_cast<int>(
m_Attr.size()))
943 if (i<0 || i >= static_cast<int>(
m_VirialdT.size()) || j < 0 || j >= static_cast<int>(
m_VirialdT.size()))
950 if (i<0 || i >= static_cast<int>(
m_AttrdT.size()) || j < 0 || j >= static_cast<int>(
m_AttrdT.size()))
955 std::vector<double> ThermalModelVDW::BroydenEquationsVDW::Equations(
const std::vector<double>& x)
957 int NN = m_THM->Densities().size();
958 vector<double> Ps(NN, 0.);
959 for (
int i = 0; i < NN; ++i) {
960 Ps[i] = m_THM->TPS()->Particles()[i].Density(m_THM->Parameters(),
963 m_THM->ChemicalPotential(i) + x[m_THM->m_MapTodMuStar[i]]
967 vector<double> ns(NN, 0.);
968 for (
int i = 0; i < NN; ++i) {
969 ns[i] = m_THM->TPS()->Particles()[i].Density(m_THM->Parameters(),
972 m_THM->ChemicalPotential(i) + x[m_THM->m_MapTodMuStar[i]]
976 vector<double> np = m_THM->ComputeNp(x, ns);
979 vector<double> ret(m_N, 0.);
980 for (
size_t i = 0; i < ret.size(); ++i) {
982 for (
int j = 0; j < NN; ++j)
983 ret[i] += m_THM->VirialCoefficient(m_THM->m_MapFromdMuStar[i], j) * Ps[j]
984 - (m_THM->AttractionCoefficient(m_THM->m_MapFromdMuStar[i], j)
985 + m_THM->AttractionCoefficient(j, m_THM->m_MapFromdMuStar[i])) * np[j];
990 std::vector<double> ThermalModelVDW::BroydenJacobianVDW::Jacobian(
const std::vector<double>& x)
992 int NN = m_THM->m_densities.size();
993 int NNdmu = m_THM->m_MapFromdMuStar.size();
996 for (
int i = 0; i < NN; ++i) {
997 for (
int j = 0; j < NN; ++j) {
998 if (m_THM->AttractionCoefficient(i, j) != 0.0) {
1006 MatrixXd densMatrix(NNdmu, NNdmu);
1007 VectorXd solVector(NNdmu), xVector(NNdmu);
1009 std::vector<double> ret(NNdmu*NNdmu, 0.);
1011 vector<double> Ps(NN, 0.);
1012 for (
int i = 0; i<NN; ++i)
1013 Ps[i] = m_THM->TPS()->Particles()[i].Density(m_THM->Parameters(),
1016 m_THM->ChemicalPotential(i) + x[m_THM->m_MapTodMuStar[i]]
1019 vector<double> ns(NN, 0.);
1020 for (
int i = 0; i<NN; ++i)
1021 ns[i] = m_THM->TPS()->Particles()[i].Density(m_THM->Parameters(),
1024 m_THM->ChemicalPotential(i) + x[m_THM->m_MapTodMuStar[i]]
1027 vector<double> chi2s(NN, 0.);
1028 for (
int i = 0; i<NN; ++i)
1029 chi2s[i] = m_THM->TPS()->Particles()[i].chi(2, m_THM->Parameters(),
1031 m_THM->ChemicalPotential(i) + x[m_THM->m_MapTodMuStar[i]]
1034 for (
int i = 0; i < NNdmu; ++i) {
1035 for (
int j = 0; j < NNdmu; ++j) {
1036 densMatrix(i, j) = 0.;
1038 densMatrix(i, j) += 1.;
1040 for (
size_t m = 0; m < m_THM->m_dMuStarIndices[i].size(); ++m) {
1041 densMatrix(i, j) += m_THM->m_Virial[m_THM->m_MapFromdMuStar[j]][m_THM->m_dMuStarIndices[i][m]] * ns[m_THM->m_dMuStarIndices[i][m]];
1046 PartialPivLU<MatrixXd> decomp(densMatrix);
1049 for (
int kp = 0; kp < NNdmu; ++kp) {
1051 for (
size_t m = 0; m < m_THM->m_dMuStarIndices[kp].size(); ++m) {
1052 xVector[kp] += ns[m_THM->m_dMuStarIndices[kp][m]];
1057 solVector = decomp.solve(xVector);
1059 vector<double> ntildek(NNdmu, 0.);
1060 for (
int i = 0; i < NNdmu; ++i)
1061 ntildek[i] = solVector[i];
1063 vector<double> np(NN, 0.);
1064 for (
int i = 0; i < NN; ++i) {
1066 for (
int k = 0; k < NNdmu; ++k) {
1067 np[i] += m_THM->m_Virial[m_THM->m_MapFromdMuStar[k]][i] * solVector[k];
1069 np[i] = (1. - np[i]) * ns[i];
1072 for (
int kp = 0; kp < NNdmu; ++kp) {
1075 for (
int l = 0; l < NNdmu; ++l) {
1077 for (
size_t m = 0; m < m_THM->m_dMuStarIndices[l].size(); ++m) {
1078 int ti = m_THM->m_dMuStarIndices[l][m];
1079 if (m_THM->m_MapTodMuStar[ti] != kp)
1084 tmps = np[ti] / ns[ti];
1085 xVector[l] += chi2s[ti] * m_THM->m_Parameters.T * m_THM->m_Parameters.T * pow(
xMath::GeVtoifm(), 3) * tmps;
1089 solVector = decomp.solve(xVector);
1090 for (
int i = 0; i < NNdmu; ++i)
1091 if (solVector[i] > 1.) solVector[i] = 1.;
1094 vector<double> dnjdmukp(NN, 0.);
1096 for (
int j = 0; j < NN; ++j) {
1097 for (
int kk = 0; kk < NNdmu; ++kk) {
1098 dnjdmukp[j] += -m_THM->m_Virial[m_THM->m_MapFromdMuStar[kk]][j] * solVector[kk] * ns[j];
1101 if (m_THM->m_MapTodMuStar[j] == kp) {
1104 tmps = np[j] / ns[j];
1105 dnjdmukp[j] += tmps * chi2s[j] * m_THM->m_Parameters.T * m_THM->m_Parameters.T * pow(
xMath::GeVtoifm(), 3);
1111 for (
int k = 0; k < NNdmu; ++k) {
1113 ret[k*NNdmu + kp] += 1.;
1114 for (
size_t m = 0; m < m_THM->m_dMuStarIndices[kp].size(); ++m) {
1115 int tj = m_THM->m_dMuStarIndices[kp][m];
1116 ret[k*NNdmu + kp] += m_THM->m_Virial[m_THM->m_MapFromdMuStar[k]][tj] * ns[tj];
1120 for (
int j = 0; j < NN; ++j) {
1121 ret[k*NNdmu + kp] += -(m_THM->m_Attr[m_THM->m_MapFromdMuStar[k]][j] + m_THM->m_Attr[j][m_THM->m_MapFromdMuStar[k]]) * dnjdmukp[j];
1132 bool ThermalModelVDW::BroydenSolutionCriteriumVDW::IsSolved(
const std::vector<double>& x,
const std::vector<double>& f,
const std::vector<double>& xdelta)
const 1134 if (xdelta.size() == x.size()) {
1135 double maxdiff = 0.;
1136 for (
size_t i = 0; i < xdelta.size(); ++i) {
1137 maxdiff = std::max(maxdiff, fabs(xdelta[i]));
1139 return (maxdiff < m_MaximumError);
Abstract base class for an HRG model implementation.
std::vector< int > m_MapTodMuStar
virtual void CalculateTwoParticleFluctuationsDecays()
Computes particle number correlations and fluctuations for all final-state particles which are marked...
std::vector< std::string > split(const std::string &s, char delim)
std::vector< double > m_Chem
Quantum van der Waals model.
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.
double GeVtoifm()
A constant to transform GeV into fm .
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_kurttot
std::vector< double > m_wprim
std::vector< double > m_scaldens
Vector of scalar densities. Not used.
const ThermalParticle & Particle(int id) const
ThermalParticle object corresponding to particle species with a provided 0-based index.
std::vector< double > m_skewprim
bool m_FluctuationsCalculated
void FillChemicalPotentials()
Sets the chemical potentials of all particles.
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...
int PdgToId(long long pdgid)
Transforms PDG ID to a 0-based particle id number.
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.
long long PdgId() const
Particle's Particle Data Group (PDG) ID number.
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...
Grand canonical ensemble.
bool m_TemperatureDependentAB
std::vector< std::vector< int > > m_dMuStarIndices
ThermalModelParameters m_Parameters
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 .
int ComponentsNumber() const
Number of different particle species in the list.
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
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...
virtual void CalculateSusceptibilityMatrix()
Calculates the conserved charges susceptibility matrix.
Contains some extra mathematical functions used in the code.
ThermalParticleSystem * m_TPS
std::vector< int > m_MapFromdMuStar
virtual void FillChemicalPotentials()
Sets the chemical potentials of all particles.
int MaxIterations() const
virtual void CalculateProxySusceptibilityMatrix()
Calculates the susceptibility matrix of conserved charges proxies.
virtual std::vector< double > Solve(const std::vector< double > &x0, BroydenSolutionCriterium *solcrit=NULL, int max_iterations=MAX_ITERS)
double brr(double r1, double r2)
Computes the symmetric 2nd virial coefficient of the classical hard spheres equation of state from t...
std::vector< double > m_kurtprim
const std::vector< ThermalParticle > & Particles() const
Returns the vector of all particle species.
std::vector< std::vector< double > > m_TotalCorrel
std::vector< double > ComputeNp(const std::vector< double > &dmustar)
ThermalModelInteraction m_InteractionModel
virtual void ValidateCalculation()
Checks whether issues have occured during the calculation of particle densities in the CalculateDensi...
Contains some functions do deal with excluded volumes.
double MaxDifference() const
virtual double CalculateEnergyDensity()
virtual double CalculateEntropyDensity()
double AttractionCoefficientdT(int i, int j) const
The temperature derivative of the QvdW attraction parameter .
virtual void CalculateDensities()
Calculates the primordial and total (after decays) densities of all species.
std::vector< std::vector< double > > m_AttrdT
virtual void CalculatePrimordialDensities()
Calculates the primordial densities of all species.
std::vector< double > m_densities
virtual double CalculatePressure()
Implementation of the equation of state functions.
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.
virtual void ChangeTPS(ThermalParticleSystem *TPS)
Change the particle list.
std::vector< std::vector< double > > m_PrimCorrel
ThermalModelEnsemble m_Ensemble
std::vector< double > m_skewtot
virtual void CalculateParticleChargeCorrelationMatrix()
Calculates the matrix of correlators between primordial (and also final) particle numbers and conserv...
bool m_LastBroydenSuccessFlag
Whether Broyden's method was successfull.
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.
bool m_SearchMultipleSolutions
Whether multiple solutions are considered.
double mnucleon()
Nucleon's mass. Value as in UrQMD.
The main namespace where all classes and functions of the Thermal-FIST library reside.
virtual void SetChemicalPotentials(const std::vector< double > &chem=std::vector< double >(0))
Sets the chemical potentials of all particles.
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.
virtual bool IsSolved(const std::vector< double > &x, const std::vector< double > &f, const std::vector< double > &xdelta=std::vector< double >()) const
void FillAttraction(const std::vector< std::vector< double > > &aij=std::vector< std::vector< double > >(0))