Version: SMASH-3.4
smash::Potentials Class Reference

#include <potentials.h>

A class that stores parameters of potentials, calculates potentials and their gradients.

Potentials are responsible for long-range interactions and stand in the left part of Boltzmann equation. Short-range interactions are taken into account in the right part of it - in the collision term.

Definition at line 36 of file potentials.h.

Collaboration diagram for smash::Potentials:
[legend]

Public Member Functions

 Potentials (Configuration conf, const DensityParameters &parameters)
 Potentials constructor. More...
 
virtual ~Potentials ()
 Standard destructor. More...
 
ThreeVector single_particle_energy_gradient (DensityLattice *jB_lattice, const ThreeVector &position, const ThreeVector &momentum, double mass, ParticleList &plist) const
 Calculates the gradient of the single-particle energy (including potentials) in the calculation frame in MeV/fm. More...
 
double calculation_frame_energy (const ThreeVector &momentum, const FourVector &jmu_B, double mass) const
 Evaluates the single-particle energy (including the potential) of a particle at a given position and momentum in the calculation frame. More...
 
double skyrme_pot (const double baryon_density) const
 Evaluates Skyrme potential given a baryon density. More...
 
double symmetry_pot (const double baryon_isospin_density, const double baryon_density) const
 Evaluates symmetry potential given baryon isospin density. More...
 
double symmetry_S (const double baryon_density) const
 Calculate the factor \(S(\rho)\) in the symmetry potential. More...
 
FourVector vdf_pot (double rhoB, const FourVector jmuB_net) const
 Evaluates the FourVector potential in the VDF model given the rest frame density and the computational frame baryon current. More...
 
double potential (const ThreeVector &r, const ParticleList &plist, const ParticleType &acts_on) const
 Evaluates potential (Skyrme with optional Symmetry or VDF) at point r. More...
 
std::pair< ThreeVector, ThreeVectorskyrme_force (const double rhoB, const ThreeVector grad_j0B, const ThreeVector dvecjB_dt, const ThreeVector curl_vecjB) const
 Evaluates the electric and magnetic components of the skyrme force. More...
 
std::pair< ThreeVector, ThreeVectorsymmetry_force (const double rhoI3, const ThreeVector grad_j0I3, const ThreeVector dvecjI3_dt, const ThreeVector curl_vecjI3, const double rhoB, const ThreeVector grad_j0B, const ThreeVector dvecjB_dt, const ThreeVector curl_vecjB) const
 Evaluates the electric and magnetic components of the symmetry force. More...
 
std::pair< ThreeVector, ThreeVectorvdf_force (double rhoB, const double drhoB_dt, const ThreeVector grad_rhoB, const ThreeVector gradrhoB_cross_vecjB, const double j0B, const ThreeVector grad_j0B, const ThreeVector vecjB, const ThreeVector dvecjB_dt, const ThreeVector curl_vecjB) const
 Evaluates the electric and magnetic components of force in the VDF model given the derivatives of the baryon current \(j^{\mu}\). More...
 
std::pair< ThreeVector, ThreeVectorvdf_force (const ThreeVector grad_A_0, const ThreeVector dA_dt, const ThreeVector curl_vecA) const
 Evaluates the electric and magnetic components of force in the VDF force given the derivatives of the VDF mean-field \(A^\mu\). More...
 
virtual std::tuple< ThreeVector, ThreeVector, ThreeVector, ThreeVectorall_forces (const ThreeVector &r, const ParticleList &plist) const
 Evaluates the electric and magnetic components of the forces at point r. More...
 
virtual bool use_skyrme () const
 
virtual bool use_symmetry () const
 
virtual bool use_coulomb () const
 
virtual bool use_momentum_dependence () const
 
double skyrme_a () const
 
double skyrme_b () const
 
double skyrme_tau () const
 
double symmetry_S_pot () const
 
virtual bool use_vdf () const
 
double saturation_density () const
 
const std::vector< double > & coeffs () const
 
const std::vector< double > & powers () const
 
int number_of_terms () const
 
double coulomb_r_cut () const
 
bool use_potentials_outside_lattice () const
 

Static Public Member Functions

static std::pair< double, int > force_scale (const ParticleType &data)
 Evaluates the scaling factor of the forces acting on the particles. More...
 
static ThreeVector E_field_integrand (ThreeVector pos, DensityOnLattice &charge_density, ThreeVector point)
 Integrand for calculating the electric field. More...
 
static ThreeVector B_field_integrand (ThreeVector pos, DensityOnLattice &charge_density, ThreeVector point)
 Integrand for calculating the magnetic field using the Biot-Savart formula. More...
 

Private Member Functions

double dVsym_drhoI3 (const double rhoB, const double rhoI3) const
 Calculate the derivative of the symmetry potential with respect to the isospin density in GeV * fm^3. More...
 
double dVsym_drhoB (const double rhoB, const double rhoI3) const
 Calculate the derivative of the symmetry potential with respect to the net baryon density in GeV * fm^3. More...
 

Static Private Member Functions

static double skyrme_pot (const double baryon_density, const double A, const double B, const double tau)
 Single particle Skyrme potential in MeV. More...
 
static double root_eq_potentials (double energy_calc, const ThreeVector &momentum_calc, const FourVector &jmu, double m, double A, double B, double tau, double C, double Lambda)
 Root equation used to determine the energy in the calculation frame. More...
 
static double momentum_dependent_part (double momentum, double rho, double C, double Lambda)
 Momentum dependent term of the potential. More...
 

Private Attributes

const DensityParameters param_
 Struct that contains the gaussian smearing width \(\sigma\), the distance cutoff \(r_{\rm cut}\) and the testparticle number needed for the density calculation. More...
 
bool use_skyrme_
 Skyrme potential on/off. More...
 
bool use_symmetry_
 Symmetry potential on/off. More...
 
bool use_coulomb_
 Coulomb potential on/Off. More...
 
bool use_vdf_
 VDF potential on/off. More...
 
bool use_momentum_dependence_
 Momentum-dependent part on/off. More...
 
double skyrme_a_
 Parameter of skyrme potentials: the coefficient in front of \(\frac{\rho}{\rho_0}\) in GeV. More...
 
double skyrme_b_
 Parameters of skyrme potentials: the coefficient in front of \((\frac{\rho}{\rho_0})^\tau\) in GeV. More...
 
double skyrme_tau_
 Parameters of skyrme potentials: the power index. More...
 
double mom_dependence_Lambda_
 Parameter Lambda of the momentum-dependent part of the potentials given in 1/fm. More...
 
double mom_dependence_C_
 Parameter C of the momentum-dependent part of the potentials given in MeV. More...
 
double symmetry_S_Pot_
 Parameter S_Pot in the symmetry potential in MeV. More...
 
bool symmetry_is_rhoB_dependent_ = false
 Whether the baryon density dependence of the symmetry potential is included. More...
 
double symmetry_gamma_
 Power \( \gamma \) in formula for \( S(\rho) \): More...
 
double coulomb_r_cut_
 Cutoff in integration for coulomb potential. More...
 
bool use_potentials_outside_lattice_
 Wether potentials should be included outside of the lattice. More...
 
double saturation_density_
 Saturation density of nuclear matter used in the VDF potential; it may vary between different parameterizations. More...
 
std::vector< double > coeffs_
 Parameters of the VDF potential: coefficients \(C_i\), in GeV. More...
 
std::vector< double > powers_
 Parameters of the VDF potential: exponents \(b_i\). More...
 

Constructor & Destructor Documentation

◆ Potentials()

smash::Potentials::Potentials ( Configuration  conf,
const DensityParameters parameters 
)

Potentials constructor.

Parameters
[in]confConfiguration which contains the switches determining whether to turn on the Skyrme or the symmetry potentials, and the coefficients controlling how strong the potentials are.
[in]parametersStruct that contains the gaussian smearing factor \(\sigma\), the distance cutoff \(r_{\rm cut}\) and the testparticle number needed for the density calculation.

Definition at line 20 of file potentials.cc.

21  : param_(param),
22  use_skyrme_(conf.has_section(InputSections::p_skyrme)),
23  use_symmetry_(conf.has_section(InputSections::p_symmetry)),
24  use_coulomb_(conf.has_section(InputSections::p_coulomb)),
25  use_vdf_(conf.has_section(InputSections::p_vdf)),
27  conf.has_section(InputSections::p_momentumDependence)),
30  if (use_skyrme_) {
34  }
39  }
40 
41  if (use_symmetry_) {
43  if (conf.has_value(InputKeys::potentials_symmetry_gamma)) {
46  }
47  }
48  if (use_coulomb_) {
50  }
51  if (use_vdf_) {
55  if (coeffs_.size() != powers_.size()) {
56  throw std::invalid_argument(
57  "The number of coefficients should equal the number of powers.");
58  }
59  // coefficients are provided in MeV, but the code uses GeV
60  std::transform(coeffs_.cbegin(), coeffs_.cend(), coeffs_.begin(),
61  [](double c) { return c * mev_to_gev; });
62  }
63 }
bool use_skyrme_
Skyrme potential on/off.
Definition: potentials.h:528
bool use_symmetry_
Symmetry potential on/off.
Definition: potentials.h:531
double mom_dependence_C_
Parameter C of the momentum-dependent part of the potentials given in MeV.
Definition: potentials.h:570
std::vector< double > powers_
Parameters of the VDF potential: exponents .
Definition: potentials.h:602
bool use_potentials_outside_lattice_
Wether potentials should be included outside of the lattice.
Definition: potentials.h:592
double symmetry_S_Pot_
Parameter S_Pot in the symmetry potential in MeV.
Definition: potentials.h:573
double skyrme_a_
Parameter of skyrme potentials: the coefficient in front of in GeV.
Definition: potentials.h:546
std::vector< double > coeffs_
Parameters of the VDF potential: coefficients , in GeV.
Definition: potentials.h:600
double mom_dependence_Lambda_
Parameter Lambda of the momentum-dependent part of the potentials given in 1/fm.
Definition: potentials.h:564
bool use_momentum_dependence_
Momentum-dependent part on/off.
Definition: potentials.h:540
double skyrme_tau_
Parameters of skyrme potentials: the power index.
Definition: potentials.h:558
bool use_coulomb_
Coulomb potential on/Off.
Definition: potentials.h:534
double symmetry_gamma_
Power in formula for :
Definition: potentials.h:586
bool symmetry_is_rhoB_dependent_
Whether the baryon density dependence of the symmetry potential is included.
Definition: potentials.h:579
double coulomb_r_cut_
Cutoff in integration for coulomb potential.
Definition: potentials.h:589
const DensityParameters param_
Struct that contains the gaussian smearing width , the distance cutoff and the testparticle number n...
Definition: potentials.h:525
bool use_vdf_
VDF potential on/off.
Definition: potentials.h:537
double saturation_density_
Saturation density of nuclear matter used in the VDF potential; it may vary between different paramet...
Definition: potentials.h:598
double skyrme_b_
Parameters of skyrme potentials: the coefficient in front of in GeV.
Definition: potentials.h:552
constexpr Section p_skyrme
Subsection for the Skyrme potentials information.
Definition: input_keys.h:235
constexpr Section p_vdf
Subsection for the VDF potentials information.
Definition: input_keys.h:239
constexpr Section p_coulomb
Subsection for the Coulomb potentials information.
Definition: input_keys.h:230
constexpr Section p_symmetry
Subsection for the symmetry potentials information.
Definition: input_keys.h:237
constexpr Section p_momentumDependence
Subsection for the momentum-dependent potentials information.
Definition: input_keys.h:232
static const Key< bool > potentials_use_potentials_outside_lattice
See user guide description for more information.
Definition: input_keys.h:7360
static const Key< double > potentials_momentum_dependence_C
See user guide description for more information.
Definition: input_keys.h:7520
static const Key< std::vector< double > > potentials_vdf_powers
See user guide description for more information.
Definition: input_keys.h:7471
static const Key< double > potentials_coulomb_rCut
See user guide description for more information.
Definition: input_keys.h:7505
static const Key< double > potentials_skyrme_skyrmeB
See user guide description for more information.
Definition: input_keys.h:7389
static const Key< double > potentials_momentum_dependence_Lambda
See user guide description for more information.
Definition: input_keys.h:7536
static const Key< double > potentials_skyrme_skyrmeA
See user guide description for more information.
Definition: input_keys.h:7375
static const Key< double > potentials_symmetry_gamma
See user guide description for more information.
Definition: input_keys.h:7422
static const Key< double > potentials_skyrme_skyrmeTau
See user guide description for more information.
Definition: input_keys.h:7404
static const Key< double > potentials_symmetry_sPot
See user guide description for more information.
Definition: input_keys.h:7438
static const Key< double > potentials_vdf_satRhoB
See user guide description for more information.
Definition: input_keys.h:7489
static const Key< std::vector< double > > potentials_vdf_coeffs
See user guide description for more information.
Definition: input_keys.h:7452
Here is the call graph for this function:

◆ ~Potentials()

smash::Potentials::~Potentials ( )
virtual

Standard destructor.

Definition at line 65 of file potentials.cc.

65 {}

Member Function Documentation

◆ single_particle_energy_gradient()

ThreeVector smash::Potentials::single_particle_energy_gradient ( DensityLattice jB_lattice,
const ThreeVector position,
const ThreeVector momentum,
double  mass,
ParticleList &  plist 
) const
inline

Calculates the gradient of the single-particle energy (including potentials) in the calculation frame in MeV/fm.

Parameters
jB_latticePointer to the baryon density lattice
positionPosition of the particle of interest in fm
momentumMomentum of the particle of interest in GeV
massMass of the particle of interest in GeV
plistList of all particles
Returns
ThreeVector gradient of the single particle energy in the calculation frame in MeV/fm

Definition at line 65 of file potentials.h.

69  {
70  const std::array<double, 3> dr = (jB_lattice)
71  ? jB_lattice->cell_sizes()
72  : std::array<double, 3>{0.1, 0.1, 0.1};
73  ThreeVector result, position_left, position_right;
74  DensityOnLattice jmu_left, jmu_right;
75  FourVector net_4current_left, net_4current_right;
76  for (int i = 0; i < 3; i++) {
77  position_left = position;
78  position_left[i] -= dr[i];
79  position_right = position;
80  position_right[i] += dr[i];
81 
82  if (jB_lattice && jB_lattice->value_at(position_left, jmu_left)) {
83  net_4current_left = jmu_left.jmu_net();
85  auto current = current_eckart(position_left, plist, param_,
86  DensityType::Baryon, false, true);
87  net_4current_left = std::get<1>(current);
88  } else {
89  return {0., 0., 0.};
90  }
91 
92  if (jB_lattice && jB_lattice->value_at(position_right, jmu_right)) {
93  net_4current_right = jmu_right.jmu_net();
95  auto current = current_eckart(position_right, plist, param_,
96  DensityType::Baryon, false, true);
97  net_4current_right = std::get<1>(current);
98  } else {
99  return {0., 0., 0.};
100  }
101  result[i] =
102  (calculation_frame_energy(momentum, net_4current_right, mass) -
103  calculation_frame_energy(momentum, net_4current_left, mass)) /
104  (2 * dr[i]);
105  }
106  return result;
107  }
double calculation_frame_energy(const ThreeVector &momentum, const FourVector &jmu_B, double mass) const
Evaluates the single-particle energy (including the potential) of a particle at a given position and ...
Definition: potentials.h:118
std::tuple< double, FourVector, ThreeVector, ThreeVector, FourVector, FourVector, FourVector, FourVector > current_eckart(const ThreeVector &r, const ParticleList &plist, const DensityParameters &par, DensityType dens_type, bool compute_gradient, bool smearing)
Calculates Eckart rest frame density and 4-current of a given density type and optionally the gradien...
Definition: density.cc:176
Here is the call graph for this function:

◆ calculation_frame_energy()

double smash::Potentials::calculation_frame_energy ( const ThreeVector momentum,
const FourVector jmu_B,
double  mass 
) const
inline

Evaluates the single-particle energy (including the potential) of a particle at a given position and momentum in the calculation frame.

Parameters
[in]momentumMomentum of interest in GeV
[in]jmu_BBaryon current density at pos
[in]massmass of the particle of interest
Returns
the energy of a particle in the calculation frame

Definition at line 118 of file potentials.h.

119  {
120  std::function<double(double)> root_equation = [momentum, jmu_B, mass,
121  this](double energy) {
122  return root_eq_potentials(energy, momentum, jmu_B, mass, skyrme_a_,
125  };
126  RootSolver1D root_solver{root_equation};
127  constexpr std::size_t max_number_root_solver_iterations = 100000;
128  const double initial_guess = std::sqrt(mass * mass + momentum * momentum);
129  const std::array<double, 4> interval_half_widths = {0.05, 0.5, 5.0, 50.0};
130  for (const double half_width : interval_half_widths) {
131  const std::pair<double, double> x_range = {initial_guess - half_width,
132  initial_guess + half_width};
133  const auto calc_frame_energy = root_solver.try_find_root(
134  x_range.first, x_range.second, max_number_root_solver_iterations);
135  if (calc_frame_energy) {
136  return *calc_frame_energy;
137  } else {
138  logg[LPotentials].debug()
139  << "Did not find a root for potentials in the interval ["
140  << x_range.first << " GeV ," << x_range.second << " GeV].";
141  }
142  }
143  /* If the above attempts failed, try a scan in a larger interval with a fine
144  * resolution. This is a compromise between trying to be sure to find a root
145  * and not introduce a too large overhead. As plan B it should be fine. */
146  constexpr double half_interval_width = 100; // GeV
147  constexpr double scanning_resolution = 0.1; // GeV
148  const double upper_bound = initial_guess + half_interval_width;
149  const double lower_bound = initial_guess - half_interval_width;
150  std::pair<double, double> x_range = {initial_guess - scanning_resolution,
151  initial_guess + scanning_resolution};
152  logg[LPotentials].debug()
153  << "Trying to find a root for potentials around " << initial_guess
154  << " GeV in the range [" << lower_bound << ", " << upper_bound
155  << "] GeV\nExploring interval with a resolution of "
156  << scanning_resolution << " GeV, starting with x_range: ["
157  << x_range.first << ", " << x_range.second << "] GeV";
158  while (true) {
159  const auto calc_frame_energy = root_solver.try_find_root(
160  x_range.first, x_range.second, max_number_root_solver_iterations);
161  if (calc_frame_energy) {
162  return *calc_frame_energy;
163  } else {
164  const bool is_possible_to_go_right = (x_range.second < upper_bound);
165  const bool is_possible_to_go_left = (x_range.first > lower_bound);
166  // The following logic might be compacted, but it would be much harder
167  // to read and follow, hence accept here a trivial duplication of code
168  if (!is_possible_to_go_left && !is_possible_to_go_right) {
169  break;
170  } else if (!is_possible_to_go_left) {
171  x_range.second += scanning_resolution;
172  } else if (!is_possible_to_go_right) {
173  x_range.first -= scanning_resolution;
174  } else {
175  const bool go_right = random::uniform_int(0, 1);
176  if (go_right) {
177  x_range.second += scanning_resolution;
178  } else {
179  x_range.first -= scanning_resolution;
180  }
181  }
182  logg[LPotentials].trace() << "x_range: [" << x_range.first << ", "
183  << x_range.second << "] GeV";
184  }
185  }
186  logg[LPotentials].debug()
187  << "Did not find any sub-range with a root scanning the interval ["
188  << x_range.first << ", " << x_range.second << "] GeV";
189  logg[LPotentials].error(
190  "Failed to find root for momentum-dependent potentials.");
191  throw std::runtime_error("Unable to continue simulation.");
192  }
static double root_eq_potentials(double energy_calc, const ThreeVector &momentum_calc, const FourVector &jmu, double m, double A, double B, double tau, double C, double Lambda)
Root equation used to determine the energy in the calculation frame.
Definition: potentials.h:679
std::array< einhard::Logger<>, std::tuple_size< LogArea::AreaTuple >::value > & logg
An array that stores all pre-configured Logger objects.
Definition: logging.h:245
T uniform_int(T min, T max)
Definition: random.h:106
static constexpr int LPotentials
Definition: potentials.h:28
Here is the call graph for this function:
Here is the caller graph for this function:

◆ skyrme_pot() [1/2]

double smash::Potentials::skyrme_pot ( const double  baryon_density) const
inline

Evaluates Skyrme potential given a baryon density.

Parameters
[in]baryon_densityBaryon density \(\rho\) evaluated in the local rest frame in fm \(^{-3}\).
Returns
Skyrme potential

\[U_B=10^{-3}\times\frac{\rho}{|\rho|} (A\frac{\rho}{\rho_0}+B(\frac{\rho}{\rho_0})^\tau)\]

in GeV

Definition at line 202 of file potentials.h.

202  {
203  return skyrme_pot(baryon_density, skyrme_a_, skyrme_b_, skyrme_tau_);
204  }
double skyrme_pot(const double baryon_density) const
Evaluates Skyrme potential given a baryon density.
Definition: potentials.h:202
Here is the caller graph for this function:

◆ symmetry_pot()

double smash::Potentials::symmetry_pot ( const double  baryon_isospin_density,
const double  baryon_density 
) const

Evaluates symmetry potential given baryon isospin density.

Note
The second term is neglected if \(\gamma\) is not specified in the config.
Parameters
[in]baryon_isospin_densityThe difference between the proton and the neutron density in the local rest frame in fm \(^{-3}\).
[in]baryon_density
Returns
Symmetry potential

\[U_I=2\times 10^{-3}S_{\rm sym} \frac{\rho_{I_3}}{\rho_0} + \left[12.3\left(\frac{\rho_B}{\rho_0}\right)^{2/3} + 20\left(\frac{\rho_B}{\rho_0}\right)^\gamma\right] \left(\frac{\rho_{I_3}}{\rho_B}\right)^2\]

in GeV

Definition at line 86 of file potentials.cc.

87  {
88  double pot = mev_to_gev * 2. * symmetry_S_Pot_ * baryon_isospin_density /
91  pot += mev_to_gev * symmetry_S(baryon_density) * baryon_isospin_density *
92  baryon_isospin_density / (baryon_density * baryon_density);
93  }
94  return pot;
95 }
double symmetry_S(const double baryon_density) const
Calculate the factor in the symmetry potential.
Definition: potentials.cc:78
constexpr double mev_to_gev
MeV to GeV conversion factor.
Definition: constants.h:38
constexpr double nuclear_density
Ground state density of symmetric nuclear matter [fm^-3].
Definition: constants.h:52
Here is the call graph for this function:
Here is the caller graph for this function:

◆ symmetry_S()

double smash::Potentials::symmetry_S ( const double  baryon_density) const

Calculate the factor \(S(\rho)\) in the symmetry potential.

Parameters
[in]baryon_densitybaryon density
Returns
factor S in symmetry potenial

Definition at line 78 of file potentials.cc.

78  {
80  return 12.3 * std::pow(baryon_density / nuclear_density, 2. / 3.) +
81  20.0 * std::pow(baryon_density / nuclear_density, symmetry_gamma_);
82  } else {
83  return 0.;
84  }
85 }
Here is the caller graph for this function:

◆ vdf_pot()

FourVector smash::Potentials::vdf_pot ( double  rhoB,
const FourVector  jmuB_net 
) const

Evaluates the FourVector potential in the VDF model given the rest frame density and the computational frame baryon current.

Parameters
[in]rhoBrest frame baryon density, in fm \(^{-3}\)
[in]jmuB_netnet baryon current in the computational frame, in fm \(^{-3}\)
Returns
VDF potential

\[A^{\mu} = 10^{-3}\times \sum_i C_i \left(\frac{\rho}{\rho_0}\right)^{b_i - 2} \frac{j^{\mu}}{\rho_0}\]

in GeV

Definition at line 97 of file potentials.cc.

97  {
98  // this needs to be used in order to prevent trying to calculate something
99  // like
100  // (-rho_B)^{3.4}
101  const int sgn = rhoB > 0 ? 1 : -1;
102  double abs_rhoB = std::abs(rhoB);
103  // to prevent NAN expressions
104  if (abs_rhoB < very_small_double) {
105  abs_rhoB = very_small_double;
106  }
107  // F_2 is a multiplicative factor in front of the baryon current
108  // in the VDF potential
109  double F_2 = 0.0;
110  for (int i = 0; i < number_of_terms(); i++) {
111  F_2 += coeffs_[i] * std::pow(abs_rhoB, powers_[i] - 2.0) /
112  std::pow(saturation_density_, powers_[i] - 1.0);
113  }
114  F_2 = F_2 * sgn;
115  // Return in GeV
116  return F_2 * jmuB_net;
117 }
int number_of_terms() const
Definition: potentials.h:506
int sgn(T val)
Signum function.
Definition: random.h:207
constexpr double very_small_double
A very small double, used to avoid division by zero.
Definition: constants.h:44
Here is the call graph for this function:
Here is the caller graph for this function:

◆ potential()

double smash::Potentials::potential ( const ThreeVector r,
const ParticleList &  plist,
const ParticleType acts_on 
) const

Evaluates potential (Skyrme with optional Symmetry or VDF) at point r.

For Skyrme and Symmetry options, potential is always taken in the local Eckart rest frame, but point r is in the computational frame.

Parameters
[in]rArbitrary space point where potential is calculated
[in]plistList of all particles to be used in \(j^{\mu}\) calculation. If the distance between particle and calculation point r, \( |r-r_i| > r_{cut} \) then particle input to density will be ignored.
[in]acts_onType of particle on which potential is going to act. It gives the charges (or more precisely, the scaling factors) of the particle moving in the potential field.
Returns
Total potential energy acting on the particle: for Skyrme and Symmetry potentials,

\[U_{\rm tot} =Q_BU_B+2I_3U_I\]

in GeV, while for the VDF potential

\[U_{\rm tot} =Q_B A^0\]

in GeV, where \(Q_B\) is the baryon charge scaled by the ratio of the light (u, d) quark to the total quark number and \(I_3\) is the third compnent of the isospin.

Definition at line 119 of file potentials.cc.

120  {
121  double total_potential = 0.0;
122  const bool compute_gradient = false;
123  const bool smearing = true;
124  const auto scale = force_scale(acts_on);
125 
126  if (!(acts_on.is_baryon() || acts_on.is_nucleus())) {
127  return total_potential;
128  }
129  const auto baryon_density_and_gradient = current_eckart(
130  r, plist, param_, DensityType::Baryon, compute_gradient, smearing);
131  const double rhoB = std::get<0>(baryon_density_and_gradient);
132  if (use_skyrme_) {
133  total_potential += scale.first * skyrme_pot(rhoB);
134  }
135  if (use_symmetry_) {
136  const double rho_iso = std::get<0>(
138  compute_gradient, smearing));
139  const double sym_pot = symmetry_pot(rho_iso, rhoB) * acts_on.isospin3_rel();
140  total_potential += scale.second * sym_pot;
141  }
142 
143  if (use_vdf_) {
144  const FourVector jmuB = std::get<1>(baryon_density_and_gradient);
145  const FourVector VDF_potential = vdf_pot(rhoB, jmuB);
146  total_potential += scale.first * VDF_potential.x0();
147  }
148 
149  return total_potential;
150 }
double symmetry_pot(const double baryon_isospin_density, const double baryon_density) const
Evaluates symmetry potential given baryon isospin density.
Definition: potentials.cc:86
FourVector vdf_pot(double rhoB, const FourVector jmuB_net) const
Evaluates the FourVector potential in the VDF model given the rest frame density and the computationa...
Definition: potentials.cc:97
static std::pair< double, int > force_scale(const ParticleType &data)
Evaluates the scaling factor of the forces acting on the particles.
Definition: potentials.cc:152
Here is the call graph for this function:

◆ force_scale()

std::pair< double, int > smash::Potentials::force_scale ( const ParticleType data)
static

Evaluates the scaling factor of the forces acting on the particles.

The forces are equal to the product of the scaling factor and the gradient of the potential. We need these scaling factors to describe the motions of the hyperons as well as the anti-particles in the potentials. For Lambda and Sigma, since they carry 2 light (u or d) quarks, they are affected by 2/3 of the Skyrme force. Xi carries 1 light quark, it is affected by 1/3 of the Skyrme force. Omega carries no light quark, so it's not affected by the Skyrme force. Anti-baryons are affected by the force as large as the force acting on baryons but with an opposite direction.

Parameters
[in]dataType of particle on which potential is going to act.
Returns
( \(Q_B(1-\frac{|Q_S|}{3}), Q_B\)) where \(Q_B\) is the baryon charge and \(Q_S\) is the strangeness.

Definition at line 152 of file potentials.cc.

152  {
153  const auto &pdg = data.pdgcode();
154  const double skyrme_or_VDF_scale =
155  (3 - std::abs(pdg.strangeness())) / 3. * pdg.baryon_number();
156  const int symmetry_scale = pdg.baryon_number();
157  return std::make_pair(skyrme_or_VDF_scale, symmetry_scale);
158 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ skyrme_force()

std::pair< ThreeVector, ThreeVector > smash::Potentials::skyrme_force ( const double  rhoB,
const ThreeVector  grad_j0B,
const ThreeVector  dvecjB_dt,
const ThreeVector  curl_vecjB 
) const

Evaluates the electric and magnetic components of the skyrme force.

Parameters
[in]rhoBEckart baryon density [fm \(^{-3}\)].
[in]grad_j0BGradient of baryon density [fm \(^{-4}\)]. This density is evaluated in the computational frame.
[in]dvecjB_dtTime derivative of the vector baryon current density [fm \(^{-4}\)
[in]curl_vecjBCurl of the baryon vector current density [fm \(^{-4}\)
Returns
( \(E_B, B_B\)), where

\[ E_B = - V_B^\prime(\rho^\ast)(\boldsymbol{\nabla}\rho_B + \partial_t\,\mathbf{j}_B) \]

is the electro component of Skyrme force and

\[ B_B = V_B^\prime(\rho^\ast) \boldsymbol{\nabla}\times\mathbf{j}_B \]

is the magnetic component of the Skyrme force with \(\rho^\ast\) being the Eckart baryon density.

Definition at line 160 of file potentials.cc.

162  {
163  ThreeVector E_component(0.0, 0.0, 0.0), B_component(0.0, 0.0, 0.0);
164  if (use_skyrme_) {
165  const int sgn = rhoB > 0 ? 1 : -1;
166  const double abs_rhoB = std::abs(rhoB);
167  const double dV_drho = sgn *
169  std::pow(abs_rhoB / nuclear_density,
170  skyrme_tau_ - 1)) *
172  E_component -= dV_drho * (grad_j0B + dvecjB_dt);
173  B_component += dV_drho * curl_vecjB;
174  }
175  return std::make_pair(E_component, B_component);
176 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ symmetry_force()

std::pair< ThreeVector, ThreeVector > smash::Potentials::symmetry_force ( const double  rhoI3,
const ThreeVector  grad_j0I3,
const ThreeVector  dvecjI3_dt,
const ThreeVector  curl_vecjI3,
const double  rhoB,
const ThreeVector  grad_j0B,
const ThreeVector  dvecjB_dt,
const ThreeVector  curl_vecjB 
) const

Evaluates the electric and magnetic components of the symmetry force.

Parameters
[in]rhoI3Relative isospin 3 density.
[in]grad_j0I3Gradient of I3/I density [fm \(^{-4}\)]. This density is evaluated in the computational frame.
[in]dvecjI3_dtTime derivative of the I3/I vector current density [fm \(^{-4}\)]
[in]curl_vecjI3Curl of the I3/I vector current density [fm \(^{-4}\)]
[in]rhoBNet-baryon density in the rest frame
[in]grad_j0BGradient of the net-baryon density in the computational frame
[in]dvecjB_dtTime derivative of the net-baryon vector current density
[in]curl_vecjBCurl of the net-baryon vector current density
Returns
( \(E_{I_3}, B_{I_3}\)) [GeV/fm], where

\[ \mathbf{E} = - \frac{\partial V^\ast}{\partial\rho_{I_3}^\ast} (\boldsymbol{\nabla}\rho_{I_3} + \partial_t \mathbf{j}_{I_3}) - \frac{\partial V^\ast}{\partial\rho_B^\ast} (\boldsymbol{\nabla}\rho_B + \partial_t\,\mathbf{j}_B) \]

is the electrical component of symmetry force and

\[ \mathbf{B} = \frac{\partial V^\ast}{\rho_{I_3}^\ast} \boldsymbol{\nabla}\times\mathbf{j}_{I_3} + \frac{\partial V^\ast}{\rho_B^\ast} \boldsymbol{\nabla}\times\mathbf{j}_B \]

is the magnetic component of the symmetry force with \(\rho^\ast\) being the respective Eckart density.

Definition at line 178 of file potentials.cc.

182  {
183  ThreeVector E_component(0.0, 0.0, 0.0), B_component(0.0, 0.0, 0.0);
184  if (use_symmetry_) {
185  E_component -= dVsym_drhoI3(rhoB, rhoI3) * (grad_j0I3 + dvecjI3_dt) +
186  dVsym_drhoB(rhoB, rhoI3) * (grad_j0B + dvecjB_dt);
187  B_component += dVsym_drhoI3(rhoB, rhoI3) * curl_vecjI3 +
188  dVsym_drhoB(rhoB, rhoI3) * curl_vecjB;
189  }
190  return std::make_pair(E_component, B_component);
191 }
double dVsym_drhoB(const double rhoB, const double rhoI3) const
Calculate the derivative of the symmetry potential with respect to the net baryon density in GeV * fm...
Definition: potentials.cc:254
double dVsym_drhoI3(const double rhoB, const double rhoI3) const
Calculate the derivative of the symmetry potential with respect to the isospin density in GeV * fm^3.
Definition: potentials.cc:244
Here is the call graph for this function:
Here is the caller graph for this function:

◆ E_field_integrand()

static ThreeVector smash::Potentials::E_field_integrand ( ThreeVector  pos,
DensityOnLattice charge_density,
ThreeVector  point 
)
inlinestatic

Integrand for calculating the electric field.

The field is calculated via

\[ \mathbf{E}(\mathbf{r}) = \int\frac{(\mathbf{r}-\mathbf{r}^\prime)\rho(\mathbf{r}^\prime)} {|\mathbf{r}-\mathbf{r}^\prime|^3}d^3r^\prime \]

Parameters
[in]posposition vector to be integrated over
[in]charge_densityelectric charge density at position pos
[in]pointposition where to calculate the field

Definition at line 365 of file potentials.h.

367  {
368  ThreeVector dr = point - pos;
369  if (dr.abs() < really_small) {
370  return {0., 0., 0.};
371  }
372  return elementary_charge * charge_density.rho() * dr /
373  std::pow(dr.abs(), 3);
374  }
constexpr double really_small
Numerical error tolerance.
Definition: constants.h:41
const double elementary_charge
Elementary electric charge in natural units, approximately 0.3.
Definition: constants.h:109
Here is the call graph for this function:

◆ B_field_integrand()

static ThreeVector smash::Potentials::B_field_integrand ( ThreeVector  pos,
DensityOnLattice charge_density,
ThreeVector  point 
)
inlinestatic

Integrand for calculating the magnetic field using the Biot-Savart formula.

Parameters
[in]posposition vector to be integrated over
[in]charge_densityelectric charge density and current
[in]pointposition where the magnetic field will be calculated

Definition at line 383 of file potentials.h.

385  {
386  ThreeVector dr = point - pos;
387  if (dr.abs() < really_small) {
388  return {0., 0., 0.};
389  }
390  return elementary_charge *
391  charge_density.jmu_net().threevec().cross_product(dr) /
392  std::pow(dr.abs(), 3);
393  }
Here is the call graph for this function:

◆ vdf_force() [1/2]

std::pair< ThreeVector, ThreeVector > smash::Potentials::vdf_force ( double  rhoB,
const double  drhoB_dt,
const ThreeVector  grad_rhoB,
const ThreeVector  gradrhoB_cross_vecjB,
const double  j0B,
const ThreeVector  grad_j0B,
const ThreeVector  vecjB,
const ThreeVector  dvecjB_dt,
const ThreeVector  curl_vecjB 
) const

Evaluates the electric and magnetic components of force in the VDF model given the derivatives of the baryon current \(j^{\mu}\).

Parameters
[in]rhoBrest frame baryon density in fm \(^{-3}\)
[in]drhoB_dttime derivative of the rest frame density
[in]grad_rhoBgradient of the rest frame density
[in]gradrhoB_cross_vecjBcross product of the gradient of the rest frame density and the 3-vector baryon current density
[in]j0Bcomputational frame baryon density in fm \(^{-3}\)
[in]grad_j0Bgradient of the computational frame baryon density
[in]vecjB3-vector baryon current
[in]dvecjB_dttime derivative of the computational frame 3-vector baryon current
[in]curl_vecjBcurl of the 3-vector baryon current
Returns
( \(E_{VDF}, B_{VDF}\)) [GeV/fm], where

\[ \mathbf{E}_{VDF} = - F_1 \big[(\boldsymbol{\nabla} \rho)\,j^0 + (\partial_t \rho)\,\mathbf{j}\big] - F_2 (\boldsymbol{\nabla} j^0 + \partial_t\,\mathbf{j}) \]

is the electrical component of VDF force and

\[ \mathbf{B}_{VDF} = F_1 (\boldsymbol{\nabla} \rho) \times \mathbf{j} + F_2 \boldsymbol{\nabla} \times \mathbf{j} \]

is the magnetic component of the VDF force, with

\begin{aligned} F_1 &= \sum_i C_i (b_i - 2) \frac{\rho^{b_i - 3}}{\rho_0^{b_i - 1}}\\ F_2 &= \sum_i C_i \frac{\rho^{b_i - 2}}{\rho_0^{b_i - 1}} \;, \end{aligned}

where \(\rho_0\) is the saturation density.

Definition at line 193 of file potentials.cc.

197  {
198  // this needs to be used to prevent trying to calculate something like
199  // (-rhoB)^{3.4}
200  const int sgn = rhoB > 0 ? 1 : -1;
201  ThreeVector E_component(0.0, 0.0, 0.0), B_component(0.0, 0.0, 0.0);
202  // to prevent NAN expressions
203  double abs_rhoB = std::abs(rhoB);
204  if (abs_rhoB < very_small_double) {
205  abs_rhoB = very_small_double;
206  }
207  if (use_vdf_) {
208  // F_1 and F_2 are multiplicative factors in front of the baryon current
209  // in the VDF potential
210  double F_1 = 0.0;
211  for (int i = 0; i < number_of_terms(); i++) {
212  F_1 += coeffs_[i] * (powers_[i] - 2.0) *
213  std::pow(abs_rhoB, powers_[i] - 3.0) /
214  std::pow(saturation_density_, powers_[i] - 1.0);
215  }
216  F_1 = F_1 * sgn;
217 
218  double F_2 = 0.0;
219  for (int i = 0; i < number_of_terms(); i++) {
220  F_2 += coeffs_[i] * std::pow(abs_rhoB, powers_[i] - 2.0) /
221  std::pow(saturation_density_, powers_[i] - 1.0);
222  }
223  F_2 = F_2 * sgn;
224 
225  E_component -= (F_1 * (grad_rhoB * j0B + drhoB_dt * vecjB) +
226  F_2 * (grad_j0B + dvecjB_dt));
227  B_component += F_1 * gradrhoB_cross_vecjB + F_2 * curl_vecjB;
228  }
229  return std::make_pair(E_component, B_component);
230 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ vdf_force() [2/2]

std::pair< ThreeVector, ThreeVector > smash::Potentials::vdf_force ( const ThreeVector  grad_A_0,
const ThreeVector  dA_dt,
const ThreeVector  curl_vecA 
) const

Evaluates the electric and magnetic components of force in the VDF force given the derivatives of the VDF mean-field \(A^\mu\).

Parameters
[in]grad_A_0gradient of the zeroth component of the field A^mu
[in]dA_dttime derivative of the field A^mu
[in]curl_vecAcurl of the vector component of the field A^mu
Returns
( \(E_{VDF}, B_{VDF}\)) [GeV/fm], where

\[ \mathbf{E}_{VDF} = - \boldsymbol{\nabla} A^0 - \partial_t\mathbf{A} \]

is the electrical component of VDF force and

\[ \mathbf{B}_{VDF} = \boldsymbol{\nabla} \times \mathbf{A} \]

is the magnetic component of the VDF force.

Definition at line 233 of file potentials.cc.

235  {
236  ThreeVector E_component(0.0, 0.0, 0.0), B_component(0.0, 0.0, 0.0);
237  if (use_vdf_) {
238  E_component -= (grad_A_0 + dA_dt);
239  B_component += curl_A;
240  }
241  return std::make_pair(E_component, B_component);
242 }

◆ all_forces()

std::tuple< ThreeVector, ThreeVector, ThreeVector, ThreeVector > smash::Potentials::all_forces ( const ThreeVector r,
const ParticleList &  plist 
) const
virtual

Evaluates the electric and magnetic components of the forces at point r.

Point r is in the computational frame.

Parameters
[in]rArbitrary space point where potential gradient is calculated
[in]plistList of all particles to be used in \(j^{\mu}\) calculation. If the distance between particle and calculation point r, \( |r-r_i| > r_{cut} \) then particle input to density will be ignored.
Returns
( \(E_B, B_B, E_{I_3}, B_{I_3}\)) [GeV/fm], where \(E_B\): the electric component of the Skyrme or VDF force, \(B_B\): the magnetic component of the Skyrme or VDF force, \(E_{I_3}\): the electric component of the symmetry force, \(B_{I_3}\): the magnetic component of the symmetry force

Definition at line 268 of file potentials.cc.

268  {
269  const bool compute_gradient = true;
270  const bool smearing = true;
271  auto F_skyrme_or_VDF =
272  std::make_pair(ThreeVector(0., 0., 0.), ThreeVector(0., 0., 0.));
273  auto F_symmetry =
274  std::make_pair(ThreeVector(0., 0., 0.), ThreeVector(0., 0., 0.));
275 
276  const auto baryon_density_and_gradient = current_eckart(
277  r, plist, param_, DensityType::Baryon, compute_gradient, smearing);
278  double rhoB = std::get<0>(baryon_density_and_gradient);
279  const ThreeVector grad_j0B = std::get<2>(baryon_density_and_gradient);
280  const ThreeVector curl_vecjB = std::get<3>(baryon_density_and_gradient);
281  const FourVector djmuB_dt = std::get<4>(baryon_density_and_gradient);
282  if (use_skyrme_) {
283  F_skyrme_or_VDF =
284  skyrme_force(rhoB, grad_j0B, djmuB_dt.threevec(), curl_vecjB);
285  }
286 
287  if (use_symmetry_) {
288  const auto density_and_gradient =
290  compute_gradient, smearing);
291  const double rhoI3 = std::get<0>(density_and_gradient);
292  const ThreeVector grad_j0I3 = std::get<2>(density_and_gradient);
293  const ThreeVector curl_vecjI3 = std::get<3>(density_and_gradient);
294  const FourVector dvecjI3_dt = std::get<4>(density_and_gradient);
295  F_symmetry =
296  symmetry_force(rhoI3, grad_j0I3, dvecjI3_dt.threevec(), curl_vecjI3,
297  rhoB, grad_j0B, djmuB_dt.threevec(), curl_vecjB);
298  }
299 
300  if (use_vdf_) {
301  const FourVector jmuB = std::get<1>(baryon_density_and_gradient);
302  const FourVector djmuB_dx = std::get<5>(baryon_density_and_gradient);
303  const FourVector djmuB_dy = std::get<6>(baryon_density_and_gradient);
304  const FourVector djmuB_dz = std::get<7>(baryon_density_and_gradient);
305 
306  // safety check to not divide by zero
307  const int sgn = rhoB > 0 ? 1 : -1;
308  if (std::abs(rhoB) < very_small_double) {
309  rhoB = sgn * very_small_double;
310  }
311 
312  const double drhoB_dt =
313  (1 / rhoB) * (jmuB.x0() * djmuB_dt.x0() - jmuB.x1() * djmuB_dt.x1() -
314  jmuB.x2() * djmuB_dt.x2() - jmuB.x3() * djmuB_dt.x3());
315 
316  const double drhoB_dx =
317  (1 / rhoB) * (jmuB.x0() * djmuB_dx.x0() - jmuB.x1() * djmuB_dx.x1() -
318  jmuB.x2() * djmuB_dx.x2() - jmuB.x3() * djmuB_dx.x3());
319 
320  const double drhoB_dy =
321  (1 / rhoB) * (jmuB.x0() * djmuB_dy.x0() - jmuB.x1() * djmuB_dy.x1() -
322  jmuB.x2() * djmuB_dy.x2() - jmuB.x3() * djmuB_dy.x3());
323 
324  const double drhoB_dz =
325  (1 / rhoB) * (jmuB.x0() * djmuB_dz.x0() - jmuB.x1() * djmuB_dz.x1() -
326  jmuB.x2() * djmuB_dz.x2() - jmuB.x3() * djmuB_dz.x3());
327 
328  const FourVector drhoB_dxnu = {drhoB_dt, drhoB_dx, drhoB_dy, drhoB_dz};
329 
330  const ThreeVector grad_rhoB = drhoB_dxnu.threevec();
331  const ThreeVector vecjB = jmuB.threevec();
332  const ThreeVector Drho_cross_vecj = grad_rhoB.cross_product(vecjB);
333 
334  F_skyrme_or_VDF = vdf_force(
335  rhoB, drhoB_dt, drhoB_dxnu.threevec(), Drho_cross_vecj, jmuB.x0(),
336  grad_j0B, jmuB.threevec(), djmuB_dt.threevec(), curl_vecjB);
337  }
338 
339  return std::make_tuple(F_skyrme_or_VDF.first, F_skyrme_or_VDF.second,
340  F_symmetry.first, F_symmetry.second);
341 }
std::pair< ThreeVector, ThreeVector > symmetry_force(const double rhoI3, const ThreeVector grad_j0I3, const ThreeVector dvecjI3_dt, const ThreeVector curl_vecjI3, const double rhoB, const ThreeVector grad_j0B, const ThreeVector dvecjB_dt, const ThreeVector curl_vecjB) const
Evaluates the electric and magnetic components of the symmetry force.
Definition: potentials.cc:178
std::pair< ThreeVector, ThreeVector > vdf_force(double rhoB, const double drhoB_dt, const ThreeVector grad_rhoB, const ThreeVector gradrhoB_cross_vecjB, const double j0B, const ThreeVector grad_j0B, const ThreeVector vecjB, const ThreeVector dvecjB_dt, const ThreeVector curl_vecjB) const
Evaluates the electric and magnetic components of force in the VDF model given the derivatives of the...
Definition: potentials.cc:193
std::pair< ThreeVector, ThreeVector > skyrme_force(const double rhoB, const ThreeVector grad_j0B, const ThreeVector dvecjB_dt, const ThreeVector curl_vecjB) const
Evaluates the electric and magnetic components of the skyrme force.
Definition: potentials.cc:160
Here is the call graph for this function:
Here is the caller graph for this function:

◆ use_skyrme()

virtual bool smash::Potentials::use_skyrme ( ) const
inlinevirtual
Returns
Is Skyrme potential on?

Definition at line 478 of file potentials.h.

478 { return use_skyrme_; }
Here is the caller graph for this function:

◆ use_symmetry()

virtual bool smash::Potentials::use_symmetry ( ) const
inlinevirtual
Returns
Is symmetry potential on?

Definition at line 480 of file potentials.h.

480 { return use_symmetry_; }
Here is the caller graph for this function:

◆ use_coulomb()

virtual bool smash::Potentials::use_coulomb ( ) const
inlinevirtual
Returns
Is Coulomb potential on?

Definition at line 482 of file potentials.h.

482 { return use_coulomb_; }
Here is the caller graph for this function:

◆ use_momentum_dependence()

virtual bool smash::Potentials::use_momentum_dependence ( ) const
inlinevirtual
Returns
Use momentum-dependent part of the potential?

Definition at line 484 of file potentials.h.

484  {
486  }
Here is the caller graph for this function:

◆ skyrme_a()

double smash::Potentials::skyrme_a ( ) const
inline
Returns
Skyrme parameter skyrme_a, in MeV

Definition at line 489 of file potentials.h.

489 { return skyrme_a_; }

◆ skyrme_b()

double smash::Potentials::skyrme_b ( ) const
inline
Returns
Skyrme parameter skyrme_b, in MeV

Definition at line 491 of file potentials.h.

491 { return skyrme_b_; }

◆ skyrme_tau()

double smash::Potentials::skyrme_tau ( ) const
inline
Returns
Skyrme parameter skyrme_tau

Definition at line 493 of file potentials.h.

493 { return skyrme_tau_; }

◆ symmetry_S_pot()

double smash::Potentials::symmetry_S_pot ( ) const
inline
Returns
Skyrme parameter S_pot, in MeV

Definition at line 495 of file potentials.h.

495 { return symmetry_S_Pot_; }

◆ use_vdf()

virtual bool smash::Potentials::use_vdf ( ) const
inlinevirtual
Returns
Is VDF potential on?

Definition at line 498 of file potentials.h.

498 { return use_vdf_; }
Here is the caller graph for this function:

◆ saturation_density()

double smash::Potentials::saturation_density ( ) const
inline
Returns
Value of the saturation density used in the VDF potential

Definition at line 500 of file potentials.h.

500 { return saturation_density_; }

◆ coeffs()

const std::vector<double>& smash::Potentials::coeffs ( ) const
inline
Returns
Vector of the VDF coefficients \(C_i\), coefficients_

Definition at line 502 of file potentials.h.

502 { return coeffs_; }

◆ powers()

const std::vector<double>& smash::Potentials::powers ( ) const
inline
Returns
Vector of the VDF exponents \(b_i\), powers_

Definition at line 504 of file potentials.h.

504 { return powers_; }

◆ number_of_terms()

int smash::Potentials::number_of_terms ( ) const
inline
Returns
Number of terms in the VDF potential

Definition at line 506 of file potentials.h.

506 { return powers_.size(); }
Here is the caller graph for this function:

◆ coulomb_r_cut()

double smash::Potentials::coulomb_r_cut ( ) const
inline
Returns
cutoff radius in ntegration for coulomb potential in fm

Definition at line 509 of file potentials.h.

509 { return coulomb_r_cut_; }

◆ use_potentials_outside_lattice()

bool smash::Potentials::use_potentials_outside_lattice ( ) const
inline
Returns
Wether to take potentials into account for particles outside of the lattice

Definition at line 515 of file potentials.h.

515  {
517  }
Here is the caller graph for this function:

◆ dVsym_drhoI3()

double smash::Potentials::dVsym_drhoI3 ( const double  rhoB,
const double  rhoI3 
) const
private

Calculate the derivative of the symmetry potential with respect to the isospin density in GeV * fm^3.

\[ \frac{\partial V_\mathrm{sym}}{\partial \rho_{I_3}} = 2\frac{S_\mathrm{Pot}}{\rho_0} + \frac{2\rho_{I_3}\left[12.3\left(\frac{\rho_B}{\rho_0}\right)^{2/3} + 20 \left(\frac{\rho_B}{\rho_0}\right)^\gamma\right]}{\rho_B^2} \]

Note
The isospin 3 density here is actually the density of I3 / I.
Parameters
[in]rhoBnet baryon density
[in]rhoI3isospin density
Returns
partial derivative of the symmetry potenital with respect to the isospin density.

Definition at line 244 of file potentials.cc.

244  {
245  double term1 = 2. * symmetry_S_Pot_ / nuclear_density;
247  double term2 = 2. * rhoI3 * symmetry_S(rhoB) / (rhoB * rhoB);
248  return mev_to_gev * (term1 + term2);
249  } else {
250  return mev_to_gev * term1;
251  }
252 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ dVsym_drhoB()

double smash::Potentials::dVsym_drhoB ( const double  rhoB,
const double  rhoI3 
) const
private

Calculate the derivative of the symmetry potential with respect to the net baryon density in GeV * fm^3.

\[ \frac{\partial V_\mathrm{sym}}{\partial \rho_B} = \left(\frac{\rho_{I_3}}{\rho_B}\right)^2 \left[\frac{8.2}{\rho_0}\left(\frac{\rho_B}{\rho_0}\right)^{-1/3} + \frac{20\gamma}{\rho_B}\left(\frac{\rho_B}{\rho_0}\right)^\gamma\right] -2\frac{\rho_{I_3}^2}{\rho_B^3} \left[12.3\left(\frac{\rho_B}{\rho_0}\right)^{2/3} + 20\left(\frac{\rho_B}{\rho_0}\right)^\gamma\right]\]

Note
The isospin 3 density here is actually the density of I3 / I
Parameters
[in]rhoBnet baryon density
[in]rhoI3isospin density
Returns
partial derivative of the symmetry potenital with respect to the net baryon density.

Definition at line 254 of file potentials.cc.

254  {
256  double rhoB_over_rho0 = rhoB / nuclear_density;
257  double term1 = 8.2 * std::pow(rhoB_over_rho0, -1. / 3.) / nuclear_density +
258  20. * symmetry_gamma_ *
259  std::pow(rhoB_over_rho0, symmetry_gamma_) / rhoB;
260  double term2 = -2. * symmetry_S(rhoB) / rhoB;
261  return mev_to_gev * (term1 + term2) * rhoI3 * rhoI3 / (rhoB * rhoB);
262  } else {
263  return 0.;
264  }
265 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ skyrme_pot() [2/2]

double smash::Potentials::skyrme_pot ( const double  baryon_density,
const double  A,
const double  B,
const double  tau 
)
staticprivate

Single particle Skyrme potential in MeV.

Parameters
baryon_densitynet baryon density in the local rest-frame in 1/fm^3
ASkyrme parameter A in MeV
BSkyrme parameter B in MeV
tauSkyrme parameter tau
Returns
Single particle Skyrme potential in MeV

Definition at line 67 of file potentials.cc.

68  {
69  const double tmp = baryon_density / nuclear_density;
70  /* U = U(|rho|) * sgn , because the sign of the potential changes
71  * under a charge reversal transformation. */
72  const int sgn = tmp > 0 ? 1 : -1;
73  // Return in GeV
74  return mev_to_gev * sgn *
75  (A * std::abs(tmp) + B * std::pow(std::abs(tmp), tau));
76 }
Here is the call graph for this function:

◆ root_eq_potentials()

static double smash::Potentials::root_eq_potentials ( double  energy_calc,
const ThreeVector momentum_calc,
const FourVector jmu,
double  m,
double  A,
double  B,
double  tau,
double  C,
double  Lambda 
)
inlinestaticprivate

Root equation used to determine the energy in the calculation frame.

It is the difference between energy (including potential) squared minus momentum squared in the calculation frame and in the local rest-frame. The equation should be zero due to Lorentz invariance but a root finder is required to determine the calculation frame energy such that this is indeed the case.

Parameters
[in]energy_calcEnergy in the calculation frame at which the equation should be evaluated in GeV
[in]momentum_calcMomentum of the particle in calculation frame of interest in GeV
[in]jmuBaryon current fourvector at the position of the particle
[in]mMass of the particle of interest in GeV
[in]ASkyrme parameter A in MeV
[in]BSkyrme parameter B in MeV
[in]tauSkyrme parameter tau
[in]CParameter C of the momentum dependent part of the potential in MeV
[in]LambdaParameter Lambda of the momentum-dependent term of the potential in 1/fm
Returns
effective mass squared in calculation frame minus effective mass in rest_frame in GeV^2

Definition at line 679 of file potentials.h.

683  {
684  // get velocity for boost to the local rest frame
685  double rho_LRF = jmu.abs();
686  ThreeVector beta_LRF = jmu.x0() > really_small ? jmu.threevec() / jmu.x0()
687  : ThreeVector(0, 0, 0);
688  // get momentum in the local rest frame
689  FourVector pmu_calc = FourVector(energy_calc, momentum_calc);
690  FourVector pmu_LRF = beta_LRF.abs() > really_small
691  ? pmu_calc.lorentz_boost(beta_LRF)
692  : pmu_calc;
693  double p_LRF = pmu_LRF.threevec().abs();
694  double energy_LRF = std::sqrt(m * m + p_LRF * p_LRF) +
695  skyrme_pot(rho_LRF, A, B, tau) +
696  momentum_dependent_part(p_LRF, rho_LRF, C, Lambda);
697  const double result = energy_calc * energy_calc - momentum_calc.sqr() -
698  (energy_LRF * energy_LRF - p_LRF * p_LRF);
699  logg[LPotentials].debug()
700  << "root equation for potentials called with E_calc=" << energy_calc
701  << " p_calc=" << momentum_calc << " jmu=" << jmu << " m=" << m
702  << " tau=" << tau << " A=" << A << " B=" << B << " C=" << C
703  << " Lambda=" << Lambda << " and the root equation is " << result;
704  return result;
705  }
static double momentum_dependent_part(double momentum, double rho, double C, double Lambda)
Momentum dependent term of the potential.
Definition: potentials.h:721
constexpr int Lambda
Λ.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ momentum_dependent_part()

static double smash::Potentials::momentum_dependent_part ( double  momentum,
double  rho,
double  C,
double  Lambda 
)
inlinestaticprivate

Momentum dependent term of the potential.

To be added to the momentum independent part.

Parameters
[in]momentumAbsolute momentum of the particle of interest in the local rest-frame in GeV
[in]rhoBaryon density in the Eckart frame in 1/fm^3
[in]CParameter C of the momentum dependent part of the potential in MeV
[in]LambdaParameter Lambda of the momentum-dependent part of the potential in 1/fm
Returns
momentum dependent part of the potential in GeV

Definition at line 721 of file potentials.h.

722  {
723  /* We assume here that the distribution function is the one of cold
724  * nuclear matter, which consists only of protons and neutrons.
725  * That is, the degeneracy factor simply equals nucleon spin degeneracy
726  * times nucleon isospin degeneracy, even though all baryons contribute
727  * to the density and the potential is applied to all baryons. */
728  int g = 4;
729  const double fermi_momentum =
730  std::cbrt(6. * M_PI * M_PI * rho / g); // in 1/fm
731  momentum = momentum / hbarc; // convert to 1/fm
732  if (unlikely(momentum < really_small)) {
733  return mev_to_gev * g * C / (M_PI * M_PI * nuclear_density) *
734  (Lambda * Lambda * fermi_momentum -
735  std::pow(Lambda, 3) * std::atan(fermi_momentum / Lambda));
736  }
737  const std::array<double, 7> temp = {
738  2 * g * C * M_PI * std::pow(Lambda, 3) /
739  (std::pow(2 * M_PI, 3) * nuclear_density),
740  (fermi_momentum * fermi_momentum + Lambda * Lambda -
741  momentum * momentum) /
742  (2 * momentum * Lambda),
743  std::pow(momentum + fermi_momentum, 2) + Lambda * Lambda,
744  std::pow(momentum - fermi_momentum, 2) + Lambda * Lambda,
745  2 * fermi_momentum / Lambda,
746  (momentum + fermi_momentum) / Lambda,
747  (momentum - fermi_momentum) / Lambda};
748  const double result =
749  temp[0] * (temp[1] * std::log(temp[2] / temp[3]) + temp[4] -
750  2 * (std::atan(temp[5]) - std::atan(temp[6])));
751  return mev_to_gev * result;
752  }
#define unlikely(x)
Tell the branch predictor that this expression is likely false.
Definition: macros.h:16
constexpr double hbarc
GeV <-> fm conversion factor.
Definition: constants.h:29
Here is the caller graph for this function:

Member Data Documentation

◆ param_

const DensityParameters smash::Potentials::param_
private

Struct that contains the gaussian smearing width \(\sigma\), the distance cutoff \(r_{\rm cut}\) and the testparticle number needed for the density calculation.

Definition at line 525 of file potentials.h.

◆ use_skyrme_

bool smash::Potentials::use_skyrme_
private

Skyrme potential on/off.

Definition at line 528 of file potentials.h.

◆ use_symmetry_

bool smash::Potentials::use_symmetry_
private

Symmetry potential on/off.

Definition at line 531 of file potentials.h.

◆ use_coulomb_

bool smash::Potentials::use_coulomb_
private

Coulomb potential on/Off.

Definition at line 534 of file potentials.h.

◆ use_vdf_

bool smash::Potentials::use_vdf_
private

VDF potential on/off.

Definition at line 537 of file potentials.h.

◆ use_momentum_dependence_

bool smash::Potentials::use_momentum_dependence_
private

Momentum-dependent part on/off.

Definition at line 540 of file potentials.h.

◆ skyrme_a_

double smash::Potentials::skyrme_a_
private

Parameter of skyrme potentials: the coefficient in front of \(\frac{\rho}{\rho_0}\) in GeV.

Definition at line 546 of file potentials.h.

◆ skyrme_b_

double smash::Potentials::skyrme_b_
private

Parameters of skyrme potentials: the coefficient in front of \((\frac{\rho}{\rho_0})^\tau\) in GeV.

Definition at line 552 of file potentials.h.

◆ skyrme_tau_

double smash::Potentials::skyrme_tau_
private

Parameters of skyrme potentials: the power index.

Definition at line 558 of file potentials.h.

◆ mom_dependence_Lambda_

double smash::Potentials::mom_dependence_Lambda_
private

Parameter Lambda of the momentum-dependent part of the potentials given in 1/fm.

Definition at line 564 of file potentials.h.

◆ mom_dependence_C_

double smash::Potentials::mom_dependence_C_
private

Parameter C of the momentum-dependent part of the potentials given in MeV.

Definition at line 570 of file potentials.h.

◆ symmetry_S_Pot_

double smash::Potentials::symmetry_S_Pot_
private

Parameter S_Pot in the symmetry potential in MeV.

Definition at line 573 of file potentials.h.

◆ symmetry_is_rhoB_dependent_

bool smash::Potentials::symmetry_is_rhoB_dependent_ = false
private

Whether the baryon density dependence of the symmetry potential is included.

Definition at line 579 of file potentials.h.

◆ symmetry_gamma_

double smash::Potentials::symmetry_gamma_
private

Power \( \gamma \) in formula for \( S(\rho) \):

\[ S(\rho)=12.3\,\mathrm{MeV}\times \left(\frac{\rho}{\rho_0}\right)^{2/3}+20\,\mathrm{MeV}\times \left(\frac{\rho}{\rho_0}\right)^\gamma \]

Definition at line 586 of file potentials.h.

◆ coulomb_r_cut_

double smash::Potentials::coulomb_r_cut_
private

Cutoff in integration for coulomb potential.

Definition at line 589 of file potentials.h.

◆ use_potentials_outside_lattice_

bool smash::Potentials::use_potentials_outside_lattice_
private

Wether potentials should be included outside of the lattice.

Definition at line 592 of file potentials.h.

◆ saturation_density_

double smash::Potentials::saturation_density_
private

Saturation density of nuclear matter used in the VDF potential; it may vary between different parameterizations.

Definition at line 598 of file potentials.h.

◆ coeffs_

std::vector<double> smash::Potentials::coeffs_
private

Parameters of the VDF potential: coefficients \(C_i\), in GeV.

Definition at line 600 of file potentials.h.

◆ powers_

std::vector<double> smash::Potentials::powers_
private

Parameters of the VDF potential: exponents \(b_i\).

Definition at line 602 of file potentials.h.


The documentation for this class was generated from the following files: