Version: SMASH-1.5
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 31 of file potentials.h.

Collaboration diagram for smash::Potentials:
[legend]

Public Member Functions

 Potentials (Configuration conf, const DensityParameters &parameters)
 Potentials constructor. More...
 
 ~Potentials ()
 Standard destructor. 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
 Evaluates symmetry potential given baryon isospin density. More...
 
double potential (const ThreeVector &r, const ParticleList &plist, const ParticleType &acts_on) const
 Evaluates potential at point r. More...
 
std::pair< double, int > force_scale (const ParticleType &data) const
 Evaluates the scaling factor of the forces acting on the particles. More...
 
std::pair< ThreeVector, ThreeVectorskyrme_force (const double density, const ThreeVector grad_rho, const ThreeVector dj_dt, const ThreeVector rot_j) const
 Evaluates the electrical and magnetic components of the skyrme force. More...
 
std::pair< ThreeVector, ThreeVectorsymmetry_force (const ThreeVector grad_rho, const ThreeVector dj_dt, const ThreeVector rot_j) const
 Evaluates the electrical and magnetic components of the symmetry force. More...
 
std::tuple< ThreeVector, ThreeVector, ThreeVector, ThreeVectorall_forces (const ThreeVector &r, const ParticleList &plist) const
 Evaluates the electrical and magnetic components of the forces at point r. More...
 
bool use_skyrme () const
 
bool use_symmetry () const
 

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...
 
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 symmetry_s_
 coefficent in front of the symmetry term. 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 coefficents 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.

◆ ~Potentials()

smash::Potentials::~Potentials ( )

Standard destructor.

Definition at line 94 of file potentials.cc.

94 {}

Member Function Documentation

◆ skyrme_pot()

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

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

96  {
97  const double tmp = baryon_density / nuclear_density;
98  /* U = U(|rho|) * sgn , because the sign of the potential changes
99  * under a charge reversal transformation. */
100  const int sgn = tmp > 0 ? 1 : -1;
101  // Return in GeV
102  return 1.0e-3 * sgn *
103  (skyrme_a_ * std::abs(tmp) +
104  skyrme_b_ * std::pow(std::abs(tmp), skyrme_tau_));
105 }
double skyrme_a_
Parameter of skyrme potentials: the coefficient in front of in GeV.
Definition: potentials.h:186
double skyrme_b_
Parameters of skyrme potentials: the coefficient in front of in GeV.
Definition: potentials.h:192
double skyrme_tau_
Parameters of skyrme potentials: the power index.
Definition: potentials.h:198
constexpr double nuclear_density
Ground state density of symmetric nuclear matter [fm^-3].
Definition: constants.h:42
int sgn(T val)
Signum function.
Definition: random.h:187
Here is the call graph for this function:

◆ symmetry_pot()

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

Evaluates symmetry potential given baryon isospin density.

Parameters
[in]baryon_isospin_densityThe difference between the proton and the neutron density in the local rest frame in fm \(^{-3}\).
Returns
Symmetry potential

\[U_I=2\times 10^{-3}S_{\rm sym} \frac{\rho_n-\rho_p}{\rho_0}\]

in GeV

Definition at line 107 of file potentials.cc.

107  {
108  return 1.0e-3 * 2. * symmetry_s_ * baryon_isospin_density / nuclear_density;
109 }
double symmetry_s_
coefficent in front of the symmetry term.
Definition: potentials.h:201
constexpr double nuclear_density
Ground state density of symmetric nuclear matter [fm^-3].
Definition: constants.h:42

◆ potential()

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

Evaluates potential at point r.

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:

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

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

112  {
113  double total_potential = 0.0;
114  const bool compute_gradient = false;
115  const auto scale = force_scale(acts_on);
116 
117  if (!acts_on.is_baryon()) {
118  return total_potential;
119  }
120 
121  if (use_skyrme_) {
122  const double rho_eck = std::get<0>(
123  rho_eckart(r, plist, param_, DensityType::Baryon, compute_gradient));
124  total_potential += scale.first * skyrme_pot(rho_eck);
125  }
126  if (use_symmetry_) {
127  const double rho_iso = std::get<0>(rho_eckart(
128  r, plist, param_, DensityType::BaryonicIsospin, compute_gradient));
129  const double sym_pot = symmetry_pot(rho_iso) * acts_on.isospin3_rel();
130  total_potential += scale.second * sym_pot;
131  }
132  return total_potential;
133 }
bool use_symmetry_
Symmetry potential on/off.
Definition: potentials.h:180
std::tuple< double, ThreeVector, ThreeVector, ThreeVector > rho_eckart(const ThreeVector &r, const ParticleList &plist, const DensityParameters &par, DensityType dens_type, bool compute_gradient)
Calculates Eckart rest frame density and optionally the gradient of the density in an arbitary frame...
Definition: density.cc:133
std::pair< double, int > force_scale(const ParticleType &data) const
Evaluates the scaling factor of the forces acting on the particles.
Definition: potentials.cc:135
double skyrme_pot(const double baryon_density) const
Evaluates skyrme potential given a baryon density.
Definition: potentials.cc:96
const DensityParameters param_
Struct that contains the gaussian smearing width , the distance cutoff and the testparticle number n...
Definition: potentials.h:174
bool use_skyrme_
Skyrme potential on/off.
Definition: potentials.h:177
double symmetry_pot(const double baryon_isospin_density) const
Evaluates symmetry potential given baryon isospin density.
Definition: potentials.cc:107
Here is the call graph for this function:

◆ force_scale()

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

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}), 2I_3\)) where \(Q_B\) is the baryon charge, \(Q_S\) is the strangeness, and \(I_3\) is the third component of the isospin.

Definition at line 135 of file potentials.cc.

135  {
136  double skyrme_scale = data.is_baryon() ? 1.0 : 0.0;
137  if (data.pdgcode().is_hyperon()) {
138  if (data.pdgcode().is_Xi()) {
139  skyrme_scale = 1. / 3.;
140  } else if (data.pdgcode().is_Omega()) {
141  skyrme_scale = 0.;
142  } else {
143  skyrme_scale = 2. / 3.;
144  }
145  }
146  skyrme_scale = skyrme_scale * data.pdgcode().baryon_number();
147  const int symmetry_scale = data.pdgcode().baryon_number();
148  return std::make_pair(skyrme_scale, symmetry_scale);
149 }
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  density,
const ThreeVector  grad_rho,
const ThreeVector  dj_dt,
const ThreeVector  rot_j 
) const

Evaluates the electrical and magnetic components of the skyrme force.

Parameters
[in]densityEckart density [fm \(^{-3}\)].
[in]grad_rhoGradient of density [fm \(^{-4}\)]. This density is evaluated in the computational frame.
[in]dj_dtTime derivative of the current density [fm \(^{-4}\)
[in]rot_jCurl of the current density [fm \(^{-4}\)
Returns
( \(E_B, B_B\)), where

\[E_B = -V_B^\prime(\rho^\ast)(\nabla\rho_B + \partial_t \vec j_B)\]

is the electro component of Skyrme force and

\[B_B = V_B^\prime(\rho^\ast) \nabla\times\vec j_B\]

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

Definition at line 151 of file potentials.cc.

153  {
154  const double MeV_to_GeV = 1.0e-3;
155  ThreeVector E_component(0.0, 0.0, 0.0), B_component(0.0, 0.0, 0.0);
156  if (use_skyrme_) {
157  const double dV_drho =
159  std::pow(density / nuclear_density, skyrme_tau_ - 1)) *
160  MeV_to_GeV / nuclear_density;
161  E_component -= dV_drho * (grad_rho + dj_dt);
162  B_component += dV_drho * rot_j;
163  }
164  return std::make_pair(E_component, B_component);
165 }
double skyrme_a_
Parameter of skyrme potentials: the coefficient in front of in GeV.
Definition: potentials.h:186
bool use_skyrme_
Skyrme potential on/off.
Definition: potentials.h:177
double skyrme_b_
Parameters of skyrme potentials: the coefficient in front of in GeV.
Definition: potentials.h:192
double skyrme_tau_
Parameters of skyrme potentials: the power index.
Definition: potentials.h:198
constexpr double nuclear_density
Ground state density of symmetric nuclear matter [fm^-3].
Definition: constants.h:42

◆ symmetry_force()

std::pair< ThreeVector, ThreeVector > smash::Potentials::symmetry_force ( const ThreeVector  grad_rho,
const ThreeVector  dj_dt,
const ThreeVector  rot_j 
) const

Evaluates the electrical and magnetic components of the symmetry force.

Parameters
[in]grad_rhoGradient of density [fm \(^{-4}\)]. This density is evaluated in the computational frame.
[in]dj_dtTime derivative of the current density [fm \(^{-4}\)
[in]rot_jCurl of the current density [fm \(^{-4}\)
Returns
( \(E_I3, B_I3\)) [GeV/fm], where

\[E_{I3} = -V_{I3}^\prime(\rho^\ast)(\nabla\rho_{I3} + \partial_t \vec j_{I3})\]

is the electrical component of symmetry force and

\[B_{I3} = V_I^\prime(\rho^\ast) \nabla\times\vec j_{I3}\]

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

Definition at line 167 of file potentials.cc.

169  {
170  const double MeV_to_GeV = 1.0e-3;
171  ThreeVector E_component(0.0, 0.0, 0.0), B_component(0.0, 0.0, 0.0);
172  if (use_symmetry_) {
173  const double dV_drho = MeV_to_GeV * 2. * symmetry_s_ / nuclear_density;
174  E_component -= dV_drho * (grad_rho + dj_dt);
175  B_component += dV_drho * rot_j;
176  }
177  return std::make_pair(E_component, B_component);
178 }
bool use_symmetry_
Symmetry potential on/off.
Definition: potentials.h:180
double symmetry_s_
coefficent in front of the symmetry term.
Definition: potentials.h:201
constexpr double nuclear_density
Ground state density of symmetric nuclear matter [fm^-3].
Definition: constants.h:42

◆ all_forces()

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

Evaluates the electrical 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_{I3}, B_{I3}\)) [GeV/fm], where \(E_B\): the electric component of the Skyrme force \(B_B\): the magnetic component of the Skyrme force \(E_{I3}\): the electric component of the symmetry force \(B_{I3}\): the magnetic component of the symmetry force

Definition at line 181 of file potentials.cc.

181  {
182  const bool compute_gradient = true;
183  auto F_skyrme =
184  std::make_pair(ThreeVector(0., 0., 0.), ThreeVector(0., 0., 0.));
185  auto F_symmetry =
186  std::make_pair(ThreeVector(0., 0., 0.), ThreeVector(0., 0., 0.));
187 
188  if (use_skyrme_) {
189  const auto density_and_gradient =
190  rho_eckart(r, plist, param_, DensityType::Baryon, compute_gradient);
191  const double rho = std::get<0>(density_and_gradient);
192  const ThreeVector grad_rho = std::get<1>(density_and_gradient);
193  const ThreeVector dj_dt = std::get<2>(density_and_gradient);
194  const ThreeVector rot_j = std::get<3>(density_and_gradient);
195  F_skyrme = skyrme_force(rho, grad_rho, dj_dt, rot_j);
196  }
197 
198  if (use_symmetry_) {
199  const auto density_and_gradient = rho_eckart(
200  r, plist, param_, DensityType::BaryonicIsospin, compute_gradient);
201  const ThreeVector grad_rho = std::get<1>(density_and_gradient);
202  const ThreeVector dj_dt = std::get<2>(density_and_gradient);
203  const ThreeVector rot_j = std::get<3>(density_and_gradient);
204  F_symmetry = symmetry_force(grad_rho, dj_dt, rot_j);
205  }
206 
207  return std::make_tuple(F_skyrme.first, F_skyrme.second, F_symmetry.first,
208  F_symmetry.second);
209 }
bool use_symmetry_
Symmetry potential on/off.
Definition: potentials.h:180
std::tuple< double, ThreeVector, ThreeVector, ThreeVector > rho_eckart(const ThreeVector &r, const ParticleList &plist, const DensityParameters &par, DensityType dens_type, bool compute_gradient)
Calculates Eckart rest frame density and optionally the gradient of the density in an arbitary frame...
Definition: density.cc:133
std::pair< ThreeVector, ThreeVector > symmetry_force(const ThreeVector grad_rho, const ThreeVector dj_dt, const ThreeVector rot_j) const
Evaluates the electrical and magnetic components of the symmetry force.
Definition: potentials.cc:167
const DensityParameters param_
Struct that contains the gaussian smearing width , the distance cutoff and the testparticle number n...
Definition: potentials.h:174
bool use_skyrme_
Skyrme potential on/off.
Definition: potentials.h:177
std::pair< ThreeVector, ThreeVector > skyrme_force(const double density, const ThreeVector grad_rho, const ThreeVector dj_dt, const ThreeVector rot_j) const
Evaluates the electrical and magnetic components of the skyrme force.
Definition: potentials.cc:151
Here is the call graph for this function:
Here is the caller graph for this function:

◆ use_skyrme()

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

Definition at line 164 of file potentials.h.

164 { return use_skyrme_; }
bool use_skyrme_
Skyrme potential on/off.
Definition: potentials.h:177
Here is the caller graph for this function:

◆ use_symmetry()

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

Definition at line 166 of file potentials.h.

166 { return use_symmetry_; }
bool use_symmetry_
Symmetry potential on/off.
Definition: potentials.h:180
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 174 of file potentials.h.

◆ use_skyrme_

bool smash::Potentials::use_skyrme_
private

Skyrme potential on/off.

Definition at line 177 of file potentials.h.

◆ use_symmetry_

bool smash::Potentials::use_symmetry_
private

Symmetry potential on/off.

Definition at line 180 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 186 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 192 of file potentials.h.

◆ skyrme_tau_

double smash::Potentials::skyrme_tau_
private

Parameters of skyrme potentials: the power index.

Definition at line 198 of file potentials.h.

◆ symmetry_s_

double smash::Potentials::symmetry_s_
private

coefficent in front of the symmetry term.

Definition at line 201 of file potentials.h.


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