Thermal-FIST 1.5
Package for hadron resonance gas model applications
Loading...
Searching...
No Matches
ExcludedVolumeHelper.cpp
Go to the documentation of this file.
1/*
2 * Thermal-FIST package
3 *
4 * Copyright (c) 2016-2018 Volodymyr Vovchenko
5 *
6 * GNU General Public License (GPLv3 or later)
7 */
9
10
11double thermalfist::CuteHRGHelper::btilrr(double r1, double r2)
12{
13 double bij = brr(r1, r2);
14 if (bij == 0.0) return 0.;
15 double bii = brr(r1, r1);
16 if (bii == 0.0) return 0.;
17 double bjj = brr(r2, r2);
18 return 2. * bij * bii / (bii + bjj);
19}
20
21std::vector< std::vector<double> > thermalfist::CuteHRGHelper::bijMatrix(const ThermalModelBase * model)
22{
23 std::vector< std::vector<double> > ret(model->ComponentsNumber());
24 for (int i = 0; i < model->ComponentsNumber(); ++i) {
25 ret[i].resize(model->ComponentsNumber());
26 for (int j = 0; j < model->ComponentsNumber(); ++j) {
27 ret[i][j] = model->RepulsionCoefficient(i, j);
28 }
29 }
30 return ret;
31}
32
33std::vector< std::vector<double> > thermalfist::CuteHRGHelper::aijMatrix(const ThermalModelBase * model)
34{
35 std::vector< std::vector<double> > ret(model->ComponentsNumber());
36 for (int i = 0; i < model->ComponentsNumber(); ++i) {
37 ret[i].resize(model->ComponentsNumber());
38 for (int j = 0; j < model->ComponentsNumber(); ++j) {
39 ret[i][j] = model->AttractionCoefficient(i, j);
40 }
41 }
42 return ret;
43}
44
45std::vector<std::vector<double>> thermalfist::GetBaryonBaryonInteractionMatrix(const ThermalParticleSystem *TPS, double param) {
46 std::vector<std::vector<double>> ret(TPS->Particles().size(), std::vector<double>(TPS->Particles().size(), 0.));
47 for (int i1 = 0; i1 < TPS->Particles().size(); ++i1) {
48 for (int i2 = 0; i2 < TPS->Particles().size(); ++i2) {
49 // Baryon charge of first species
50 int B1 = TPS->Particles()[i1].BaryonCharge();
51 // Baryon charge of second species
52 int B2 = TPS->Particles()[i2].BaryonCharge();
53 if ((B1 > 0 && B2 > 0) || (B1 < 0 && B2 < 0)) {
54 ret[i1][i2] = param;
55 } else {
56 ret[i1][i2] = 0.;
57 }
58 }
59 }
60 return ret;
61}
Contains some functions to deal with excluded volumes.
Abstract base class for an HRG model implementation.
double RepulsionCoefficient(int i, int j) const
virtual double AttractionCoefficient(int, int) const
QvdW mean field attraction coefficient .
int ComponentsNumber() const
Number of different particle species in the list.
Class containing the particle list.
const std::vector< ThermalParticle > & Particles() const
Returns the vector of all particle species.
std::vector< std::vector< double > > bijMatrix(const ThermalModelBase *model)
Returns the matrix of excluded volume coefficients of an HRG model.
double btilrr(double r1, double r2)
Computes the asymmetric 2nd virial coefficient of the classical hard spheres equation of state from ...
std::vector< std::vector< double > > aijMatrix(const ThermalModelBase *model)
Returns the matrix of van der Waals attraction coefficients of an HRG model.
double brr(double r1, double r2)
Computes the symmetric 2nd virial coefficient of the classical hard spheres equation of state from t...
std::vector< std::vector< double > > GetBaryonBaryonInteractionMatrix(const ThermalParticleSystem *TPS, double param)
Returns the matrix of attraction and repulsion parameters for baryon-baryon and antibaryon-antibaryon...