Version: SMASH-1.6
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...
 
virtual 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...
 
virtual bool use_skyrme () const
 
virtual 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

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.
smash::Potentials::~Potentials ( )

Standard destructor.

Definition at line 94 of file potentials.cc.

94 {}

Member Function Documentation

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

Here is the call graph for this function:

Here is the caller graph for this function:

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

Here is the caller graph for this function:

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 bool smearing = true;
116  const auto scale = force_scale(acts_on);
117 
118  if (!acts_on.is_baryon()) {
119  return total_potential;
120  }
121 
122  if (use_skyrme_) {
123  const double rho_eck = std::get<0>(current_eckart(
124  r, plist, param_, DensityType::Baryon, compute_gradient, smearing));
125  total_potential += scale.first * skyrme_pot(rho_eck);
126  }
127  if (use_symmetry_) {
128  const double rho_iso = std::get<0>(
130  compute_gradient, smearing));
131  const double sym_pot = symmetry_pot(rho_iso) * acts_on.isospin3_rel();
132  total_potential += scale.second * sym_pot;
133  }
134  return total_potential;
135 }
double skyrme_pot(const double baryon_density) const
Evaluates skyrme potential given a baryon density.
Definition: potentials.cc:96
bool use_symmetry_
Symmetry potential on/off.
Definition: potentials.h:180
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::tuple< double, FourVector, ThreeVector, ThreeVector, ThreeVector > 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:149
std::pair< double, int > force_scale(const ParticleType &data) const
Evaluates the scaling factor of the forces acting on the particles.
Definition: potentials.cc:137
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:

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

137  {
138  double skyrme_scale = data.is_baryon() ? 1.0 : 0.0;
139  if (data.pdgcode().is_hyperon()) {
140  if (data.pdgcode().is_Xi()) {
141  skyrme_scale = 1. / 3.;
142  } else if (data.pdgcode().is_Omega()) {
143  skyrme_scale = 0.;
144  } else {
145  skyrme_scale = 2. / 3.;
146  }
147  }
148  skyrme_scale = skyrme_scale * data.pdgcode().baryon_number();
149  const int symmetry_scale = data.pdgcode().baryon_number();
150  return std::make_pair(skyrme_scale, symmetry_scale);
151 }

Here is the call graph for this function:

Here is the caller graph for this function:

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

155  {
156  const double MeV_to_GeV = 1.0e-3;
157  ThreeVector E_component(0.0, 0.0, 0.0), B_component(0.0, 0.0, 0.0);
158  if (use_skyrme_) {
159  const double dV_drho =
161  std::pow(density / nuclear_density, skyrme_tau_ - 1)) *
162  MeV_to_GeV / nuclear_density;
163  E_component -= dV_drho * (grad_rho + dj_dt);
164  B_component += dV_drho * rot_j;
165  }
166  return std::make_pair(E_component, B_component);
167 }
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

Here is the caller graph for this function:

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

171  {
172  const double MeV_to_GeV = 1.0e-3;
173  ThreeVector E_component(0.0, 0.0, 0.0), B_component(0.0, 0.0, 0.0);
174  if (use_symmetry_) {
175  const double dV_drho = MeV_to_GeV * 2. * symmetry_s_ / nuclear_density;
176  E_component -= dV_drho * (grad_rho + dj_dt);
177  B_component += dV_drho * rot_j;
178  }
179  return std::make_pair(E_component, B_component);
180 }
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

Here is the caller graph for this function:

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

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

183  {
184  const bool compute_gradient = true;
185  const bool smearing = true;
186  auto F_skyrme =
187  std::make_pair(ThreeVector(0., 0., 0.), ThreeVector(0., 0., 0.));
188  auto F_symmetry =
189  std::make_pair(ThreeVector(0., 0., 0.), ThreeVector(0., 0., 0.));
190 
191  if (use_skyrme_) {
192  const auto density_and_gradient = current_eckart(
193  r, plist, param_, DensityType::Baryon, compute_gradient, smearing);
194  const double rho = std::get<0>(density_and_gradient);
195  const ThreeVector grad_rho = std::get<2>(density_and_gradient);
196  const ThreeVector dj_dt = std::get<3>(density_and_gradient);
197  const ThreeVector rot_j = std::get<4>(density_and_gradient);
198  F_skyrme = skyrme_force(rho, grad_rho, dj_dt, rot_j);
199  }
200 
201  if (use_symmetry_) {
202  const auto density_and_gradient =
204  compute_gradient, smearing);
205  const ThreeVector grad_rho = std::get<2>(density_and_gradient);
206  const ThreeVector dj_dt = std::get<3>(density_and_gradient);
207  const ThreeVector rot_j = std::get<4>(density_and_gradient);
208  F_symmetry = symmetry_force(grad_rho, dj_dt, rot_j);
209  }
210 
211  return std::make_tuple(F_skyrme.first, F_skyrme.second, F_symmetry.first,
212  F_symmetry.second);
213 }
bool use_symmetry_
Symmetry potential on/off.
Definition: potentials.h:180
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 > 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:169
std::tuple< double, FourVector, ThreeVector, ThreeVector, ThreeVector > 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:149
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:153

Here is the call graph for this function:

Here is the caller graph for this function:

virtual bool smash::Potentials::use_skyrme ( ) const
inlinevirtual
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:

virtual bool smash::Potentials::use_symmetry ( ) const
inlinevirtual
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

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.

bool smash::Potentials::use_skyrme_
private

Skyrme potential on/off.

Definition at line 177 of file potentials.h.

bool smash::Potentials::use_symmetry_
private

Symmetry potential on/off.

Definition at line 180 of file potentials.h.

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.

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.

double smash::Potentials::skyrme_tau_
private

Parameters of skyrme potentials: the power index.

Definition at line 198 of file potentials.h.

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: