Version: SMASH-3.1
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.

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 18 of file potentials.cc.

19  : param_(param),
20  use_skyrme_(conf.has_value({"Skyrme"})),
21  use_symmetry_(conf.has_value({"Symmetry"})),
22  use_coulomb_(conf.has_value({"Coulomb"})),
23  use_vdf_(conf.has_value({"VDF"})),
24  use_momentum_dependence_(conf.has_value({"Momentum_Dependence"})),
26  conf.take({"Use_Potentials_Outside_Lattice"},
28  .default_value())) {
29  if (use_skyrme_) {
30  skyrme_a_ = conf.take({"Skyrme", "Skyrme_A"});
31  skyrme_b_ = conf.take({"Skyrme", "Skyrme_B"});
32  skyrme_tau_ = conf.take({"Skyrme", "Skyrme_Tau"});
33  }
35  mom_dependence_Lambda_ = conf.take({"Momentum_Dependence", "Lambda"});
36  mom_dependence_C_ = conf.take({"Momentum_Dependence", "C"});
37  }
38 
39  if (use_symmetry_) {
40  symmetry_S_Pot_ = conf.take({"Symmetry", "S_Pot"});
41  if (conf.has_value({"Symmetry", "gamma"})) {
42  symmetry_gamma_ = conf.take({"Symmetry", "gamma"});
44  }
45  }
46  if (use_coulomb_) {
47  coulomb_r_cut_ = conf.take({"Coulomb", "R_Cut"});
48  }
49  if (use_vdf_) {
50  saturation_density_ = conf.take({"VDF", "Sat_rhoB"});
51  std::vector<double> aux_coeffs = conf.take({"VDF", "Coeffs"});
52  std::vector<double> aux_powers = conf.take({"VDF", "Powers"});
53  if (aux_coeffs.size() != aux_powers.size()) {
54  throw std::invalid_argument(
55  "The number of coefficients should equal the number of powers.");
56  }
57  const int n_terms = aux_powers.size();
58  for (int i = 0; i < n_terms; i++) {
59  if (aux_powers[i] < 0.0) {
60  throw std::invalid_argument("Powers need to be positive real numbers.");
61  }
62  // coefficients are provided in MeV, but the code uses GeV
63  coeffs_.push_back(aux_coeffs[i] * mev_to_gev);
64  powers_.push_back(aux_powers[i]);
65  }
66  }
67 }
default_type default_value() const
Get the default value of the key.
Definition: input_keys.h:132
bool use_skyrme_
Skyrme potential on/off.
Definition: potentials.h:483
bool use_symmetry_
Symmetry potential on/off.
Definition: potentials.h:486
double mom_dependence_C_
Parameter C of the momentum-dependent part of the potentials given in MeV.
Definition: potentials.h:525
std::vector< double > powers_
Parameters of the VDF potential: exponents .
Definition: potentials.h:557
bool use_potentials_outside_lattice_
Wether potentials should be included outside of the lattice.
Definition: potentials.h:547
double symmetry_S_Pot_
Parameter S_Pot in the symmetry potential in MeV.
Definition: potentials.h:528
double skyrme_a_
Parameter of skyrme potentials: the coefficient in front of in GeV.
Definition: potentials.h:501
std::vector< double > coeffs_
Parameters of the VDF potential: coefficients , in GeV.
Definition: potentials.h:555
double mom_dependence_Lambda_
Parameter Lambda of the momentum-dependent part of the potentials given in 1/fm.
Definition: potentials.h:519
bool use_momentum_dependence_
Momentum-dependent part on/off.
Definition: potentials.h:495
double skyrme_tau_
Parameters of skyrme potentials: the power index.
Definition: potentials.h:513
bool use_coulomb_
Coulomb potential on/Off.
Definition: potentials.h:489
double symmetry_gamma_
Power in formula for :
Definition: potentials.h:541
bool symmetry_is_rhoB_dependent_
Whether the baryon density dependence of the symmetry potential is included.
Definition: potentials.h:534
double coulomb_r_cut_
Cutoff in integration for coulomb potential.
Definition: potentials.h:544
const DensityParameters param_
Struct that contains the gaussian smearing width , the distance cutoff and the testparticle number n...
Definition: potentials.h:480
bool use_vdf_
VDF potential on/off.
Definition: potentials.h:492
double saturation_density_
Saturation density of nuclear matter used in the VDF potential; it may vary between different paramet...
Definition: potentials.h:553
double skyrme_b_
Parameters of skyrme potentials: the coefficient in front of in GeV.
Definition: potentials.h:507
constexpr double mev_to_gev
MeV to GeV conversion factor.
Definition: constants.h:34
static const Key< bool > potentials_use_potentials_outside_lattice
See user guide description for more information.
Definition: input_keys.h:4936

◆ ~Potentials()

smash::Potentials::~Potentials ( )
virtual

Standard destructor.

Definition at line 69 of file potentials.cc.

69 {}

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:171

◆ 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  const std::array<double, 4> starting_interval_width = {0.1, 1.0, 10.0,
128  100.0};
129  for (double width : starting_interval_width) {
130  const double initial_guess = std::sqrt(mass * mass + momentum * momentum);
131  auto calc_frame_energy = root_solver.try_find_root(
132  initial_guess - width / 2, initial_guess + width / 2, 100000);
133  if (calc_frame_energy) {
134  return *calc_frame_energy;
135  } else {
136  logg[LPotentials].debug()
137  << "Did not find a root for potentials in the interval ["
138  << initial_guess - width / 2 << " GeV ,"
139  << initial_guess + width / 2 << " GeV]. Trying a wider interval";
140  }
141  }
142  logg[LPotentials].debug(
143  "Root for potentials was not found in any of the intervals "
144  "tried.");
145  throw std::runtime_error(
146  "Failed to find root for momentum-dependent potentials");
147  }
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:634
std::array< einhard::Logger<>, std::tuple_size< LogArea::AreaTuple >::value > logg
An array that stores all pre-configured Logger objects.
Definition: logging.cc:39
static constexpr int LPotentials
Definition: potentials.h:28

◆ 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 157 of file potentials.h.

157  {
158  return skyrme_pot(baryon_density, skyrme_a_, skyrme_b_, skyrme_tau_);
159  }
double skyrme_pot(const double baryon_density) const
Evaluates Skyrme potential given a baryon density.
Definition: potentials.h:157

◆ 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 90 of file potentials.cc.

91  {
92  double pot = mev_to_gev * 2. * symmetry_S_Pot_ * baryon_isospin_density /
95  pot += mev_to_gev * symmetry_S(baryon_density) * baryon_isospin_density *
96  baryon_isospin_density / (baryon_density * baryon_density);
97  }
98  return pot;
99 }
double symmetry_S(const double baryon_density) const
Calculate the factor in the symmetry potential.
Definition: potentials.cc:82
constexpr double nuclear_density
Ground state density of symmetric nuclear matter [fm^-3].
Definition: constants.h:48

◆ 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 82 of file potentials.cc.

82  {
84  return 12.3 * std::pow(baryon_density / nuclear_density, 2. / 3.) +
85  20.0 * std::pow(baryon_density / nuclear_density, symmetry_gamma_);
86  } else {
87  return 0.;
88  }
89 }

◆ 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 101 of file potentials.cc.

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

◆ 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 123 of file potentials.cc.

124  {
125  double total_potential = 0.0;
126  const bool compute_gradient = false;
127  const bool smearing = true;
128  const auto scale = force_scale(acts_on);
129 
130  if (!(acts_on.is_baryon() || acts_on.is_nucleus())) {
131  return total_potential;
132  }
133  const auto baryon_density_and_gradient = current_eckart(
134  r, plist, param_, DensityType::Baryon, compute_gradient, smearing);
135  const double rhoB = std::get<0>(baryon_density_and_gradient);
136  if (use_skyrme_) {
137  total_potential += scale.first * skyrme_pot(rhoB);
138  }
139  if (use_symmetry_) {
140  const double rho_iso = std::get<0>(
142  compute_gradient, smearing));
143  const double sym_pot = symmetry_pot(rho_iso, rhoB) * acts_on.isospin3_rel();
144  total_potential += scale.second * sym_pot;
145  }
146 
147  if (use_vdf_) {
148  const FourVector jmuB = std::get<1>(baryon_density_and_gradient);
149  const FourVector VDF_potential = vdf_pot(rhoB, jmuB);
150  total_potential += scale.first * VDF_potential.x0();
151  }
152 
153  return total_potential;
154 }
double symmetry_pot(const double baryon_isospin_density, const double baryon_density) const
Evaluates symmetry potential given baryon isospin density.
Definition: potentials.cc:90
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:101
static std::pair< double, int > force_scale(const ParticleType &data)
Evaluates the scaling factor of the forces acting on the particles.
Definition: potentials.cc:156

◆ 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 156 of file potentials.cc.

156  {
157  const auto &pdg = data.pdgcode();
158  const double skyrme_or_VDF_scale =
159  (3 - std::abs(pdg.strangeness())) / 3. * pdg.baryon_number();
160  const int symmetry_scale = pdg.baryon_number();
161  return std::make_pair(skyrme_or_VDF_scale, symmetry_scale);
162 }

◆ 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 164 of file potentials.cc.

166  {
167  ThreeVector E_component(0.0, 0.0, 0.0), B_component(0.0, 0.0, 0.0);
168  if (use_skyrme_) {
169  const int sgn = rhoB > 0 ? 1 : -1;
170  const double abs_rhoB = std::abs(rhoB);
171  const double dV_drho = sgn *
173  std::pow(abs_rhoB / nuclear_density,
174  skyrme_tau_ - 1)) *
176  E_component -= dV_drho * (grad_j0B + dvecjB_dt);
177  B_component += dV_drho * curl_vecjB;
178  }
179  return std::make_pair(E_component, B_component);
180 }

◆ 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 182 of file potentials.cc.

186  {
187  ThreeVector E_component(0.0, 0.0, 0.0), B_component(0.0, 0.0, 0.0);
188  if (use_symmetry_) {
189  E_component -= dVsym_drhoI3(rhoB, rhoI3) * (grad_j0I3 + dvecjI3_dt) +
190  dVsym_drhoB(rhoB, rhoI3) * (grad_j0B + dvecjB_dt);
191  B_component += dVsym_drhoI3(rhoB, rhoI3) * curl_vecjI3 +
192  dVsym_drhoB(rhoB, rhoI3) * curl_vecjB;
193  }
194  return std::make_pair(E_component, B_component);
195 }
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:258
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:248

◆ 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 320 of file potentials.h.

322  {
323  ThreeVector dr = point - pos;
324  if (dr.abs() < really_small) {
325  return {0., 0., 0.};
326  }
327  return elementary_charge * charge_density.rho() * dr /
328  std::pow(dr.abs(), 3);
329  }
constexpr double really_small
Numerical error tolerance.
Definition: constants.h:37
const double elementary_charge
Elementary electric charge in natural units, approximately 0.3.
Definition: constants.h:98

◆ 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 338 of file potentials.h.

340  {
341  ThreeVector dr = point - pos;
342  if (dr.abs() < really_small) {
343  return {0., 0., 0.};
344  }
345  return elementary_charge *
346  charge_density.jmu_net().threevec().cross_product(dr) /
347  std::pow(dr.abs(), 3);
348  }

◆ 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 197 of file potentials.cc.

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

◆ 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 237 of file potentials.cc.

239  {
240  ThreeVector E_component(0.0, 0.0, 0.0), B_component(0.0, 0.0, 0.0);
241  if (use_vdf_) {
242  E_component -= (grad_A_0 + dA_dt);
243  B_component += curl_A;
244  }
245  return std::make_pair(E_component, B_component);
246 }

◆ 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 272 of file potentials.cc.

272  {
273  const bool compute_gradient = true;
274  const bool smearing = true;
275  auto F_skyrme_or_VDF =
276  std::make_pair(ThreeVector(0., 0., 0.), ThreeVector(0., 0., 0.));
277  auto F_symmetry =
278  std::make_pair(ThreeVector(0., 0., 0.), ThreeVector(0., 0., 0.));
279 
280  const auto baryon_density_and_gradient = current_eckart(
281  r, plist, param_, DensityType::Baryon, compute_gradient, smearing);
282  double rhoB = std::get<0>(baryon_density_and_gradient);
283  const ThreeVector grad_j0B = std::get<2>(baryon_density_and_gradient);
284  const ThreeVector curl_vecjB = std::get<3>(baryon_density_and_gradient);
285  const FourVector djmuB_dt = std::get<4>(baryon_density_and_gradient);
286  if (use_skyrme_) {
287  F_skyrme_or_VDF =
288  skyrme_force(rhoB, grad_j0B, djmuB_dt.threevec(), curl_vecjB);
289  }
290 
291  if (use_symmetry_) {
292  const auto density_and_gradient =
294  compute_gradient, smearing);
295  const double rhoI3 = std::get<0>(density_and_gradient);
296  const ThreeVector grad_j0I3 = std::get<2>(density_and_gradient);
297  const ThreeVector curl_vecjI3 = std::get<3>(density_and_gradient);
298  const FourVector dvecjI3_dt = std::get<4>(density_and_gradient);
299  F_symmetry =
300  symmetry_force(rhoI3, grad_j0I3, dvecjI3_dt.threevec(), curl_vecjI3,
301  rhoB, grad_j0B, djmuB_dt.threevec(), curl_vecjB);
302  }
303 
304  if (use_vdf_) {
305  const FourVector jmuB = std::get<1>(baryon_density_and_gradient);
306  const FourVector djmuB_dx = std::get<5>(baryon_density_and_gradient);
307  const FourVector djmuB_dy = std::get<6>(baryon_density_and_gradient);
308  const FourVector djmuB_dz = std::get<7>(baryon_density_and_gradient);
309 
310  // safety check to not divide by zero
311  const int sgn = rhoB > 0 ? 1 : -1;
312  if (std::abs(rhoB) < very_small_double) {
313  rhoB = sgn * very_small_double;
314  }
315 
316  const double drhoB_dt =
317  (1 / rhoB) * (jmuB.x0() * djmuB_dt.x0() - jmuB.x1() * djmuB_dt.x1() -
318  jmuB.x2() * djmuB_dt.x2() - jmuB.x3() * djmuB_dt.x3());
319 
320  const double drhoB_dx =
321  (1 / rhoB) * (jmuB.x0() * djmuB_dx.x0() - jmuB.x1() * djmuB_dx.x1() -
322  jmuB.x2() * djmuB_dx.x2() - jmuB.x3() * djmuB_dx.x3());
323 
324  const double drhoB_dy =
325  (1 / rhoB) * (jmuB.x0() * djmuB_dy.x0() - jmuB.x1() * djmuB_dy.x1() -
326  jmuB.x2() * djmuB_dy.x2() - jmuB.x3() * djmuB_dy.x3());
327 
328  const double drhoB_dz =
329  (1 / rhoB) * (jmuB.x0() * djmuB_dz.x0() - jmuB.x1() * djmuB_dz.x1() -
330  jmuB.x2() * djmuB_dz.x2() - jmuB.x3() * djmuB_dz.x3());
331 
332  const FourVector drhoB_dxnu = {drhoB_dt, drhoB_dx, drhoB_dy, drhoB_dz};
333 
334  const ThreeVector grad_rhoB = drhoB_dxnu.threevec();
335  const ThreeVector vecjB = jmuB.threevec();
336  const ThreeVector Drho_cross_vecj = grad_rhoB.cross_product(vecjB);
337 
338  F_skyrme_or_VDF = vdf_force(
339  rhoB, drhoB_dt, drhoB_dxnu.threevec(), Drho_cross_vecj, jmuB.x0(),
340  grad_j0B, jmuB.threevec(), djmuB_dt.threevec(), curl_vecjB);
341  }
342 
343  return std::make_tuple(F_skyrme_or_VDF.first, F_skyrme_or_VDF.second,
344  F_symmetry.first, F_symmetry.second);
345 }
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:182
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:197
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:164

◆ use_skyrme()

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

Definition at line 433 of file potentials.h.

433 { return use_skyrme_; }

◆ use_symmetry()

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

Definition at line 435 of file potentials.h.

435 { return use_symmetry_; }

◆ use_coulomb()

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

Definition at line 437 of file potentials.h.

437 { return use_coulomb_; }

◆ use_momentum_dependence()

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

Definition at line 439 of file potentials.h.

439  {
441  }

◆ skyrme_a()

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

Definition at line 444 of file potentials.h.

444 { return skyrme_a_; }

◆ skyrme_b()

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

Definition at line 446 of file potentials.h.

446 { return skyrme_b_; }

◆ skyrme_tau()

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

Definition at line 448 of file potentials.h.

448 { return skyrme_tau_; }

◆ symmetry_S_pot()

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

Definition at line 450 of file potentials.h.

450 { return symmetry_S_Pot_; }

◆ use_vdf()

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

Definition at line 453 of file potentials.h.

453 { return use_vdf_; }

◆ saturation_density()

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

Definition at line 455 of file potentials.h.

455 { 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 457 of file potentials.h.

457 { return coeffs_; }

◆ powers()

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

Definition at line 459 of file potentials.h.

459 { return powers_; }

◆ number_of_terms()

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

Definition at line 461 of file potentials.h.

461 { return powers_.size(); }

◆ coulomb_r_cut()

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

Definition at line 464 of file potentials.h.

464 { 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 470 of file potentials.h.

470  {
472  }

◆ 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 248 of file potentials.cc.

248  {
249  double term1 = 2. * symmetry_S_Pot_ / nuclear_density;
251  double term2 = 2. * rhoI3 * symmetry_S(rhoB) / (rhoB * rhoB);
252  return mev_to_gev * (term1 + term2);
253  } else {
254  return mev_to_gev * term1;
255  }
256 }

◆ 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 258 of file potentials.cc.

258  {
260  double rhoB_over_rho0 = rhoB / nuclear_density;
261  double term1 = 8.2 * std::pow(rhoB_over_rho0, -1. / 3.) / nuclear_density +
262  20. * symmetry_gamma_ *
263  std::pow(rhoB_over_rho0, symmetry_gamma_) / rhoB;
264  double term2 = -2. * symmetry_S(rhoB) / rhoB;
265  return mev_to_gev * (term1 + term2) * rhoI3 * rhoI3 / (rhoB * rhoB);
266  } else {
267  return 0.;
268  }
269 }

◆ 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 71 of file potentials.cc.

72  {
73  const double tmp = baryon_density / nuclear_density;
74  /* U = U(|rho|) * sgn , because the sign of the potential changes
75  * under a charge reversal transformation. */
76  const int sgn = tmp > 0 ? 1 : -1;
77  // Return in GeV
78  return mev_to_gev * sgn *
79  (A * std::abs(tmp) + B * std::pow(std::abs(tmp), tau));
80 }

◆ 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 634 of file potentials.h.

638  {
639  // get velocity for boost to the local rest frame
640  double rho_LRF = jmu.abs();
641  ThreeVector beta_LRF = jmu.x0() > really_small ? jmu.threevec() / jmu.x0()
642  : ThreeVector(0, 0, 0);
643  // get momentum in the local rest frame
644  FourVector pmu_calc = FourVector(energy_calc, momentum_calc);
645  FourVector pmu_LRF = beta_LRF.abs() > really_small
646  ? pmu_calc.lorentz_boost(beta_LRF)
647  : pmu_calc;
648  double p_LRF = pmu_LRF.threevec().abs();
649  double energy_LRF = std::sqrt(m * m + p_LRF * p_LRF) +
650  skyrme_pot(rho_LRF, A, B, tau) +
651  momentum_dependent_part(p_LRF, rho_LRF, C, Lambda);
652  const double result = energy_calc * energy_calc - momentum_calc.sqr() -
653  (energy_LRF * energy_LRF - p_LRF * p_LRF);
654  logg[LPotentials].debug()
655  << "root equation for potentials called with E_calc=" << energy_calc
656  << " p_calc=" << momentum_calc << " jmu=" << jmu << " m=" << m
657  << " tau=" << tau << " A=" << A << " B=" << B << " C=" << C
658  << " Lambda=" << Lambda << " and the root equation is " << result;
659  return result;
660  }
static double momentum_dependent_part(double momentum, double rho, double C, double Lambda)
Momentum dependent term of the potential.
Definition: potentials.h:676
constexpr int Lambda
Λ.

◆ 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 676 of file potentials.h.

677  {
678  /* We assume here that the distribution function is the one of cold
679  * nuclear matter, which consists only of protons and neutrons.
680  * That is, the degeneracy factor simply equals nucleon spin degeneracy
681  * times nucleon isospin degeneracy, even though all baryons contribute
682  * to the density and the potential is applied to all baryons. */
683  int g = 4;
684  const double fermi_momentum =
685  std::cbrt(6. * M_PI * M_PI * rho / g); // in 1/fm
686  momentum = momentum / hbarc; // convert to 1/fm
687  if (unlikely(momentum < really_small)) {
688  return mev_to_gev * g * C / (M_PI * M_PI * nuclear_density) *
689  (Lambda * Lambda * fermi_momentum -
690  std::pow(Lambda, 3) * std::atan(fermi_momentum / Lambda));
691  }
692  const std::array<double, 7> temp = {
693  2 * g * C * M_PI * std::pow(Lambda, 3) /
694  (std::pow(2 * M_PI, 3) * nuclear_density),
695  (fermi_momentum * fermi_momentum + Lambda * Lambda -
696  momentum * momentum) /
697  (2 * momentum * Lambda),
698  std::pow(momentum + fermi_momentum, 2) + Lambda * Lambda,
699  std::pow(momentum - fermi_momentum, 2) + Lambda * Lambda,
700  2 * fermi_momentum / Lambda,
701  (momentum + fermi_momentum) / Lambda,
702  (momentum - fermi_momentum) / Lambda};
703  const double result =
704  temp[0] * (temp[1] * std::log(temp[2] / temp[3]) + temp[4] -
705  2 * (std::atan(temp[5]) - std::atan(temp[6])));
706  return mev_to_gev * result;
707  }
#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:25

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 480 of file potentials.h.

◆ use_skyrme_

bool smash::Potentials::use_skyrme_
private

Skyrme potential on/off.

Definition at line 483 of file potentials.h.

◆ use_symmetry_

bool smash::Potentials::use_symmetry_
private

Symmetry potential on/off.

Definition at line 486 of file potentials.h.

◆ use_coulomb_

bool smash::Potentials::use_coulomb_
private

Coulomb potential on/Off.

Definition at line 489 of file potentials.h.

◆ use_vdf_

bool smash::Potentials::use_vdf_
private

VDF potential on/off.

Definition at line 492 of file potentials.h.

◆ use_momentum_dependence_

bool smash::Potentials::use_momentum_dependence_
private

Momentum-dependent part on/off.

Definition at line 495 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 501 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 507 of file potentials.h.

◆ skyrme_tau_

double smash::Potentials::skyrme_tau_
private

Parameters of skyrme potentials: the power index.

Definition at line 513 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 519 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 525 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 528 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 534 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 541 of file potentials.h.

◆ coulomb_r_cut_

double smash::Potentials::coulomb_r_cut_
private

Cutoff in integration for coulomb potential.

Definition at line 544 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 547 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 553 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 555 of file potentials.h.

◆ powers_

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

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

Definition at line 557 of file potentials.h.


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