38 m_Ps.resize(m_TPS->Particles().size());
39 FillVirial(std::vector<double>(m_TPS->Particles().size(), 0.));
40 m_TAG =
"ThermalModelEVCrosstermsLegacy";
51 if (ri.size() != m_TPS->Particles().size()) {
52 std::cerr <<
"**WARNING** " << m_TAG <<
"::FillVirial(const std::vector<double> & ri): size " <<
static_cast<int>(ri.size()) <<
" of ri does not match number of hadrons " <<
static_cast<int>(m_TPS->Particles().size()) <<
" in the list" << std::endl;
55 m_Virial.resize(m_TPS->Particles().size());
56 for (
int i = 0; i < m_TPS->ComponentsNumber(); ++i) {
57 m_Virial[i].resize(m_TPS->Particles().size());
58 for (
int j = 0; j < m_TPS->ComponentsNumber(); ++j)
63 std::vector< std::vector<double> > fVirialTmp =
m_Virial;
64 for (
int i = 0; i < m_TPS->ComponentsNumber(); ++i)
65 for (
int j = 0; j < m_TPS->ComponentsNumber(); ++j) {
66 if (i == j)
m_Virial[i][j] = fVirialTmp[i][j];
67 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]);
73 m_Virial = std::vector< std::vector<double> >(m_TPS->Particles().size(), std::vector<double>(m_TPS->Particles().size(), 0.));
75 ifstream fin(filename.c_str());
78 fin.getline(cc, 2000);
79 string tmp = string(cc);
83 istringstream iss(elems[0]);
86 if (iss >> pdgid1 >> pdgid2 >> b) {
87 int ind1 = m_TPS->PdgToId(pdgid1);
88 int ind2 = m_TPS->PdgToId(pdgid2);
89 if (ind1 != -1 && ind2 != -1)
98 ofstream fout(filename.c_str());
99 fout <<
"# List of crossterms parameters to be used in the Crossterms excluded-volume HRG model"
101 fout <<
"# Only particle pairs with a non-zero eigenvolume parameter are listed here"
107 fout <<
"#" <<
" " <<
"pdg_i"
109 <<
" " <<
"b_{ij}[fm^3]"
111 for (
int i = 0; i < m_TPS->ComponentsNumber(); ++i) {
112 for (
int j = 0; j < m_TPS->ComponentsNumber(); ++j) {
117 fout <<
" " << m_TPS->Particle(i).PdgId();
118 fout <<
" " << m_TPS->Particle(j).PdgId();
128 FillVirial(vector<double>(m_TPS->Particles().size(), rad));
132 if (i < 0 || i >=
static_cast<int>(
m_Virial.size()) || j < 0 || j >
static_cast<int>(
m_Virial.size()))
138 if (i >= 0 && i <
static_cast<int>(
m_Virial.size()) && j >= 0 && j <
static_cast<int>(
m_Virial.size()))
140 else std::cerr <<
"**WARNING** Index overflow in ThermalModelEVCrosstermsLegacy::SetVirial" << std::endl;
152 if (pstars.size() == m_TPS->Particles().size())
153 for (
int j = 0; j < m_TPS->ComponentsNumber(); ++j)
156 for (
int j = 0; j < m_TPS->ComponentsNumber(); ++j)
165 if (pstars.size() == m_TPS->Particles().size())
166 for (
int j = 0; j < m_TPS->ComponentsNumber(); ++j)
169 for (
int j = 0; j < m_TPS->ComponentsNumber(); ++j)
177 for (
int j = 0; j < m_TPS->ComponentsNumber(); ++j) dMu += -
m_Virial[i][j] *
m_Ps[j];
179 return m_TPS->Particles()[i].ScaledVariance(m_Parameters, m_UseWidth, m_Chem[i] + dMu);
192 for (
int i = 0; i < m_TPS->ComponentsNumber(); ++i)
198 BroydenEquationsCRSDEV eqs(
this);
206 std::vector<double> x(1, x0);
208 x = broydn.
Solve(x, &crit);
211 for (
size_t i = 0; i <
m_Ps.size(); ++i)
218 m_Ps.resize(m_TPS->Particles().size());
219 for (
size_t i = 0; i <
m_Ps.size(); ++i)
m_Ps[i] = 0.;
223 BroydenEquationsCRS eqs(
this);
224 BroydenJacobianCRS jac(
this);
226 BroydenSolutionCriteriumCRS crit(
this);
230 for (
size_t i = 0; i <
m_Ps.size(); ++i)
234 m_LastCalculationSuccessFlag =
false;
235 else m_LastCalculationSuccessFlag =
true;
241 m_FluctuationsCalculated =
false;
243 map< vector<double>,
int> m_MapEVcomponent;
246 int NN = m_densities.size();
249 m_MapEVcomponent.clear();
253 for (
int i = 0; i < NN; ++i) {
254 vector<double> EVParam(0);
255 for (
int j = 0; j < NN; ++j) {
260 if (m_MapEVcomponent.count(EVParam) == 0) {
261 m_MapEVcomponent[EVParam] = tind;
276 vector<double> tN(m_densities.size());
277 for (
size_t i = 0; i <
m_Ps.size(); ++i)
282 int NN = m_densities.size();
284 MatrixXd densMatrix(NN, NN);
285 VectorXd solVector(NN), xVector(NN);
287 for (
int i = 0; i < NN; ++i)
288 for (
int j = 0; j < NN; ++j) {
289 densMatrix(i, j) =
m_Virial[i][j] * tN[i];
290 if (i == j) densMatrix(i, j) += 1.;
293 PartialPivLU<MatrixXd> decomp(densMatrix);
295 for (
int i = 0; i < NN; ++i) xVector[i] = 0.;
296 for (
int i = 0; i < NN; ++i) {
298 solVector = decomp.solve(xVector);
301 for (
int j = 0; j < NN; ++j)
302 m_densities[i] += solVector[j];
305 std::cerr <<
"**WARNING** Could not recover m_densities from partial pressures!\n";
310 std::vector<double> fEntropyP(m_densities.size());
311 for (
int i = 0; i < NN; ++i) {
313 for (
int j = 0; j < m_TPS->ComponentsNumber(); ++j) dMu += -
m_Virial[i][j] *
m_Ps[j];
317 solVector = decomp.solve(xVector);
321 for (
int i = 0; i < NN; ++i)
325 std::cerr <<
"**WARNING** Could not recover m_densities from partial pressures!\n";
335 vector<double> tN(m_densities.size());
336 for (
size_t i = 0; i <
m_Ps.size(); ++i)
341 int NN = m_densities.size();
343 MatrixXd densMatrix(NN, NN);
344 VectorXd solVector(NN), xVector(NN);
346 for (
int i = 0; i < NN; ++i)
347 for (
int j = 0; j < NN; ++j) {
348 densMatrix(i, j) =
m_Virial[i][j] * tN[i];
349 if (i == j) densMatrix(i, j) += 1.;
352 PartialPivLU<MatrixXd> decomp(densMatrix);
354 for (
int i = 0; i < NN; ++i) xVector[i] = 0.;
355 for (
int i = 0; i < NN; ++i) {
358 solVector = decomp.solve(xVector);
363 for (
int j = 0; j < NN; ++j)
364 m_densities[i] += solVector[j];
367 std::cerr <<
"**WARNING** Could not recover m_densities from partial pressures!\n";
373 std::vector<double> fEntropyP(m_densities.size());
374 for (
int i = 0; i < NN; ++i) {
376 for (
int j = 0; j < m_TPS->ComponentsNumber(); ++j) dMu += -
m_Virial[i][j] *
m_Ps[j];
380 solVector = decomp.solve(xVector);
386 for (
int i = 0; i < NN; ++i)
390 std::cerr <<
"**WARNING** Could not recover m_densities from partial pressures!\n";
402 m_Ps.resize(m_TPS->Particles().size());
403 for (
size_t i = 0; i <
m_Ps.size(); ++i)
406 vector<double> Pstmp =
m_Ps;
409 for (iter = 0; iter < 1000; ++iter)
412 for (
size_t i = 0; i <
m_Ps.size(); ++i) {
414 maxdiff = max(maxdiff, fabs((Pstmp[i] -
m_Ps[i]) / Pstmp[i]));
418 if (maxdiff < 1.e-10)
break;
420 if (iter == 1000) std::cerr << iter <<
"\t" << maxdiff <<
"\n";
422 for (
size_t i = 0; i <
m_Ps.size(); ++i)
430 int NN = m_densities.size();
431 vector<double> tN(NN);
432 for (
int i = 0; i < NN; ++i) tN[i] =
DensityId(i);
434 MatrixXd densMatrix(NN, NN);
435 for (
int i = 0; i < NN; ++i)
436 for (
int j = 0; j < NN; ++j) {
437 densMatrix(i, j) =
m_Virial[j][i] * tN[i];
438 if (i == j) densMatrix(i, j) += 1.;
442 VectorXd solVector(NN), xVector(NN);
443 for (
int i = 0; i < NN; ++i) xVector[i] = tN[i];
445 PartialPivLU<MatrixXd> decomp(densMatrix);
447 solVector = decomp.solve(xVector);
451 for (
int i = 0; i < NN; ++i)
452 m_densities[i] = solVector[i];
455 std::cerr <<
"**WARNING** Could not recover m_densities from partial pressures!\n";
460 for (
int i = 0; i < NN; ++i)
461 for (
int j = 0; j < NN; ++j) {
462 densMatrix(i, j) =
m_Virial[i][j] * tN[i];
463 if (i == j) densMatrix(i, j) += 1.;
466 std::vector<double> fEntropyP(m_densities.size());
467 for (
int i = 0; i < NN; ++i) {
469 for (
int j = 0; j < m_TPS->ComponentsNumber(); ++j) dMu += -
m_Virial[i][j] *
m_Ps[j];
473 decomp = PartialPivLU<MatrixXd>(densMatrix);
474 solVector = decomp.solve(xVector);
479 for (
int i = 0; i < NN; ++i)
483 std::cerr <<
"Could not recover entropy m_densities from partial pressures!\n";
490 int NN = m_densities.size();
491 vector<double> tN(NN);
492 for (
int i = 0; i < NN; ++i) tN[i] =
DensityId(i);
494 vector<double> chi2id(NN);
495 for (
int i = 0; i < NN; ++i) {
497 for (
int j = 0; j < m_TPS->ComponentsNumber(); ++j) dMu += -
m_Virial[i][j] *
m_Ps[j];
498 chi2id[i] = m_densities[i] / tN[i] * m_TPS->Particles()[i].chiDimensionfull(2, m_Parameters, m_UseWidth, m_Chem[i] + dMu) *
xMath::GeVtoifm3();
501 MatrixXd densMatrix(NN, NN);
502 VectorXd solVector(NN), xVector(NN), xVector2(NN);
504 for (
int i = 0; i < NN; ++i)
505 for (
int j = 0; j < NN; ++j) {
506 densMatrix(i, j) =
m_Virial[i][j] * tN[i];
507 if (i == j) densMatrix(i, j) += 1.;
510 PartialPivLU<MatrixXd> decomp(densMatrix);
512 vector< vector<double> > ders, coefs;
517 for (
int i = 0; i < NN; ++i) {
522 for (
int i = 0; i < NN; ++i) xVector[i] = 0.;
523 for (
int i = 0; i < NN; ++i) {
525 solVector = decomp.solve(xVector);
528 for (
int j = 0; j < NN; ++j) {
529 ders[j][i] = solVector[j];
532 for (
int l = 0; l < NN; ++l) {
534 for (
int k = 0; k < NN; ++k) {
535 coefs[l][i] += -
m_Virial[l][k] * ders[k][i];
537 if (l == i) coefs[l][i] += 1.;
541 std::cerr <<
"**WARNING** Could not recover fluctuations!\n";
547 m_PrimCorrel.resize(NN);
548 for (
int i = 0; i < NN; ++i) m_PrimCorrel[i].resize(NN);
549 m_TotalCorrel = m_PrimCorrel;
551 for (
int i = 0; i < NN; ++i)
552 for (
int j = i; j < NN; ++j) {
553 for (
int l = 0; l < NN; ++l)
555 xVector[l] = chi2id[l] * coefs[l][i] * coefs[l][j];
556 solVector = decomp.solve(xVector);
559 m_PrimCorrel[i][j] = 0.;
560 for (
int k = 0; k < NN; ++k) {
561 m_PrimCorrel[i][j] += solVector[k];
563 m_PrimCorrel[j][i] = m_PrimCorrel[i][j];
566 std::cerr <<
"**WARNING** Could not recover fluctuations!\n";
572 for (
int i = 0; i < NN; ++i) {
573 m_wprim[i] = m_PrimCorrel[i][i];
574 if (m_densities[i] > 0.) m_wprim[i] *= m_Parameters.T / m_densities[i];
575 else m_wprim[i] = 1.;
589 m_FluctuationsCalculated =
true;
591 for (
size_t i = 0; i < m_wprim.size(); ++i) {
601 vector<double> ret(order + 1, 0.);
604 for (
size_t i = 0; i < m_densities.size(); ++i)
605 ret[0] += chgs[i] * m_densities[i];
609 if (order < 2)
return ret;
611 int NN = m_densities.size();
613 vector<double> MuStar(NN, 0.);
614 for (
int i = 0; i < NN; ++i) {
615 MuStar[i] = m_Chem[i] +
MuShift(i);
618 MatrixXd densMatrix(2 * NN, 2 * NN);
619 VectorXd solVector(2 * NN), xVector(2 * NN);
621 vector<double> DensitiesId(m_densities.size()), chi2id(m_densities.size());
622 for (
int i = 0; i < NN; ++i) {
624 chi2id[i] = m_TPS->Particles()[i].chi(2, m_Parameters, m_UseWidth, MuStar[i]);
627 for (
int i = 0; i < NN; ++i)
628 for (
int j = 0; j < NN; ++j) {
629 densMatrix(i, j) =
m_Virial[j][i] * DensitiesId[i];
630 if (i == j) densMatrix(i, j) += 1.;
633 for (
int i = 0; i < NN; ++i)
634 for (
int j = 0; j < NN; ++j)
635 densMatrix(i, NN + j) = 0.;
637 for (
int i = 0; i < NN; ++i) {
638 densMatrix(i, NN + i) = 0.;
639 for (
int k = 0; k < NN; ++k) {
640 densMatrix(i, NN + i) +=
m_Virial[k][i] * m_densities[k];
642 densMatrix(i, NN + i) = (densMatrix(i, NN + i) - 1.) * chi2id[i] * pow(
xMath::GeVtoifm(), 3) * m_Parameters.T * m_Parameters.T;
645 for (
int i = 0; i < NN; ++i)
646 for (
int j = 0; j < NN; ++j) {
647 densMatrix(NN + i, NN + j) =
m_Virial[i][j] * DensitiesId[j];
648 if (i == j) densMatrix(NN + i, NN + j) += 1.;
652 PartialPivLU<MatrixXd> decomp(densMatrix);
655 vector<double> dni(NN, 0.), dmus(NN, 0.);
657 for (
int i = 0; i < NN; ++i) {
659 xVector[NN + i] = chgs[i];
662 solVector = decomp.solve(xVector);
664 for (
int i = 0; i < NN; ++i) {
665 dni[i] = solVector[i];
666 dmus[i] = solVector[NN + i];
669 for (
int i = 0; i < NN; ++i)
670 ret[1] += chgs[i] * dni[i];
674 if (order < 3)
return ret;
676 vector<double> d2ni(NN, 0.), d2mus(NN, 0.);
678 vector<double> chi3id(m_densities.size());
679 for (
int i = 0; i < NN; ++i)
680 chi3id[i] = m_TPS->Particles()[i].chi(3, m_Parameters, m_UseWidth, MuStar[i]);
682 for (
int i = 0; i < NN; ++i) {
686 for (
int j = 0; j < NN; ++j) tmp +=
m_Virial[j][i] * dni[j];
687 tmp = -2. * tmp * chi2id[i] * pow(
xMath::GeVtoifm(), 3) * m_Parameters.T * m_Parameters.T * dmus[i];
691 for (
int j = 0; j < NN; ++j) tmp +=
m_Virial[j][i] * m_densities[j];
692 tmp = -(tmp - 1.) * chi3id[i] * pow(
xMath::GeVtoifm(), 3) * m_Parameters.T * dmus[i] * dmus[i];
695 for (
int i = 0; i < NN; ++i) {
696 xVector[NN + i] = 0.;
699 for (
int j = 0; j < NN; ++j) tmp += -
m_Virial[i][j] * dmus[j] * chi2id[j] * pow(
xMath::GeVtoifm(), 3) * m_Parameters.T * m_Parameters.T * dmus[j];
701 xVector[NN + i] = tmp;
704 solVector = decomp.solve(xVector);
706 for (
int i = 0; i < NN; ++i) {
707 d2ni[i] = solVector[i];
708 d2mus[i] = solVector[NN + i];
711 for (
int i = 0; i < NN; ++i)
712 ret[2] += chgs[i] * d2ni[i];
717 if (order < 4)
return ret;
720 vector<double> d3ni(NN, 0.), d3mus(NN, 0.);
722 vector<double> chi4id(m_densities.size());
723 for (
int i = 0; i < NN; ++i)
724 chi4id[i] = m_TPS->Particles()[i].chi(4, m_Parameters, m_UseWidth, MuStar[i]);
726 vector<double> dnis(NN, 0.);
727 for (
int i = 0; i < NN; ++i) {
728 dnis[i] = chi2id[i] * pow(
xMath::GeVtoifm(), 3) * m_Parameters.T * m_Parameters.T * dmus[i];
731 vector<double> d2nis(NN, 0.);
732 for (
int i = 0; i < NN; ++i) {
733 d2nis[i] = chi3id[i] * pow(
xMath::GeVtoifm(), 3) * m_Parameters.T * dmus[i] * dmus[i] +
734 chi2id[i] * pow(
xMath::GeVtoifm(), 3) * m_Parameters.T * m_Parameters.T * d2mus[i];
737 for (
int i = 0; i < NN; ++i) {
741 for (
int j = 0; j < NN; ++j) tmp +=
m_Virial[j][i] * dni[j];
742 tmp = -3. * tmp * d2nis[i];
746 for (
int j = 0; j < NN; ++j) tmp +=
m_Virial[j][i] * d2ni[j];
747 tmp = -3. * tmp * dnis[i];
751 for (
int j = 0; j < NN; ++j) tmps +=
m_Virial[j][i] * m_densities[j];
753 tmp = -(tmps - 1.) * chi3id[i] * pow(
xMath::GeVtoifm(), 3) * m_Parameters.T * d2mus[i] * 3. * dmus[i];
756 tmp = -(tmps - 1.) * chi4id[i] * pow(
xMath::GeVtoifm(), 3) * dmus[i] * dmus[i] * dmus[i];
759 for (
int i = 0; i < NN; ++i) {
760 xVector[NN + i] = 0.;
763 for (
int j = 0; j < NN; ++j) tmp += -2. *
m_Virial[i][j] * d2mus[j] * dnis[j];
764 xVector[NN + i] += tmp;
767 for (
int j = 0; j < NN; ++j) tmp += -
m_Virial[i][j] * dmus[j] * d2nis[j];
768 xVector[NN + i] += tmp;
771 solVector = decomp.solve(xVector);
773 for (
int i = 0; i < NN; ++i) {
774 d3ni[i] = solVector[i];
775 d3mus[i] = solVector[NN + i];
778 for (
int i = 0; i < NN; ++i)
779 ret[3] += chgs[i] * d3ni[i];
790 for (
int i = 0; i < m_TPS->ComponentsNumber(); ++i)
791 ret += m_Chem[i] * m_densities[i];
808 if (
id >= 0. &&
id <
static_cast<int>(
m_Virial.size())) {
810 for (
int j = 0; j < m_TPS->ComponentsNumber(); ++j)
818 std::vector<double> ThermalModelEVCrosstermsLegacy::BroydenEquationsCRS::Equations(
const std::vector<double>& x)
820 std::vector<double> ret(
m_N);
821 for (
size_t i = 0; i < x.size(); ++i)
822 ret[i] = x[i] - m_THM->
Pressure(i, x);
826 std::vector<double> ThermalModelEVCrosstermsLegacy::BroydenJacobianCRS::Jacobian(
const std::vector<double>& x)
830 vector<double> tN(N);
831 for (
int i = 0; i < N; ++i) {
832 tN[i] = m_THM->DensityId(i, x);
835 vector<double> ret(N*N, 0.);
836 for (
int i = 0; i < N; ++i) {
837 for (
int j = 0; j < N; ++j) {
840 ret[i*N + j] += m_THM->VirialCoefficient(i, j) * tN[i];
847 bool ThermalModelEVCrosstermsLegacy::BroydenSolutionCriteriumCRS::IsSolved(
const std::vector<double>& x,
const std::vector<double>& f,
const std::vector<double>& )
const
850 for (
size_t i = 0; i < x.size(); ++i) {
851 maxdiff = std::max(maxdiff, fabs(f[i]) / x[i]);
853 return (maxdiff < m_MaximumError);
856 std::vector<double> ThermalModelEVCrosstermsLegacy::BroydenEquationsCRSDEV::Equations(
const std::vector<double>& x)
858 std::vector<double> ret(1);
859 ret[0] = x[0] - m_THM->PressureDiagonalTotal(x[0]);
Contains some functions to deal with excluded volumes.
map< string, double > params
Sub-class where it is determined whether the required accuracy is achieved in the Broyden's method.
int m_N
The number of equations.
Class implementing the Broyden method to solve a system of non-linear equations.
double MaxDifference() const
virtual std::vector< double > Solve(const std::vector< double > &x0, BroydenSolutionCriterium *solcrit=NULL, int max_iterations=MAX_ITERS)
int MaxIterations() const
Class which implements calculation of the Jacobian needed for the Broyden's method.
void SetDx(double dx)
Set the finite variable difference value used for calculating the Jacobian numerically.
virtual void CalculateSusceptibilityMatrix()
Calculates the conserved charges susceptibility matrix.
virtual void ChangeTPS(ThermalParticleSystem *TPS)
Change the particle list.
virtual void CalculateParticleChargeCorrelationMatrix()
Calculates the matrix of correlators between primordial (and also final) particle numbers and conserv...
@ CrosstermsEV
Crossterms excluded volume model.
virtual void CalculateFeeddown()
Calculates the total densities which include feeddown contributions.
virtual void ValidateCalculation()
Checks whether issues have occured during the calculation of particle densities in the CalculateDensi...
virtual void CalculateProxySusceptibilityMatrix()
Calculates the susceptibility matrix of conserved charges proxies.
ThermalModelBase(ThermalParticleSystem *TPS, const ThermalModelParameters ¶ms=ThermalModelParameters())
Construct a new ThermalModelBase object.
virtual void CalculateDensities()
Calculates the primordial and total (after decays) densities of all species.
@ GCE
Grand canonical ensemble.
virtual void CalculateTwoParticleFluctuationsDecays()
Computes particle number correlations and fluctuations for all final-state particles which are marked...
std::vector< int > m_MapFromEVComponent
virtual double CalculateEntropyDensity()
virtual double Pressure(int i, const std::vector< double > &pstars=std::vector< double >())
Calculate the ideal gas pressure of particle species i for the given values of partial pressures.
virtual double CalculateEnergyDensity()
virtual double CalculatePressure()
std::vector< std::vector< double > > m_Virial
virtual void WriteInteractionParameters(const std::string &filename)
Write the QvdW interaction parameters to a file.
double VirialCoefficient(int i, int j) const
Excluded volume coefficient .
void SetVirial(int i, int j, double b)
Set the excluded volume coefficient .
void CalculateFluctuations()
Computes the fluctuation observables.
virtual void CalculatePrimordialDensitiesNoReset()
double PressureDiagonalTotal(double P)
The total pressure for the given input pressure in the diagonal model.
virtual double MuShift(int i) const
The shift in the chemical potential of particle species i due to the excluded volume interactions.
virtual ~ThermalModelEVCrosstermsLegacy(void)
Destroy the ThermalModelEVCrossterms object.
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.
virtual std::vector< double > CalculateChargeFluctuations(const std::vector< double > &chgs, int order=4)
Calculates fluctuations (diagonal susceptibilities) of an arbitrary "conserved" charge.
virtual double DensityId(int i, const std::vector< double > &pstars=std::vector< double >())
Calculate the ideal gas density of particle species i for the given values of partial pressures.
void CalculateTwoParticleCorrelations()
Computes the fluctuations and correlations of the primordial particle numbers.
double m_TotalEntropyDensity
virtual void SolvePressure(bool resetPartials=true)
Solves the system of transcdental equations for the pressure using the Broyden's method.
virtual void ReadInteractionParameters(const std::string &filename)
Reads the QvdW interaction parameters from a file.
std::vector< double > m_densitiesid
std::vector< int > m_MapToEVComponent
virtual void SolveDiagonal()
Solves the transcendental equation of the corresponding diagonal EV model.
void SetRadius(double rad)
Set the same excluded volume radius parameter for all species.
std::vector< std::vector< int > > m_EVComponentIndices
virtual void ChangeTPS(ThermalParticleSystem *TPS)
Change the particle list.
std::vector< double > m_Ps
ThermalModelEVCrosstermsLegacy(ThermalParticleSystem *TPS, const ThermalModelParameters ¶ms=ThermalModelParameters())
Construct a new ThermalModelEVCrossterms object.
double PartialPressureDiagonal(int i, double P)
The "partial pressure" of hadron species i for the given total pressure in the diagonal model.
virtual void CalculatePrimordialDensitiesIter()
virtual void CalculatePrimordialDensities()
Calculates the primordial densities of all species.
double ScaledVarianceId(int ind)
Calculate the ideal gas scaled variance of particle species i number fluctuations for the given value...
Class containing the particle list.
std::vector< std::string > split(const std::string &s, char delim)
double brr(double r1, double r2)
Computes the symmetric 2nd virial coefficient of the classical hard spheres equation of state from t...
constexpr double GeVtoifm()
A constant to transform GeV into fm .
constexpr double GeVtoifm3()
A constant to transform GeV into fm .
The main namespace where all classes and functions of the Thermal-FIST library reside.
Structure containing all thermal parameters of the model.
Contains some extra mathematical functions used in the code.