XGCa
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
bias_potential.hpp
Go to the documentation of this file.
1 #ifndef BIAS_POTENTIAL_HPP
2 #define BIAS_POTENTIAL_HPP
3 
4 #include "grid.hpp"
5 
6 // bias potential for artificial GAM drive
8  public:
9  bool kick;
10  double tanh_amp;
11  double linear_amp;
12  double psic;
13  double inv_psiw;
14  int freq;
15  int start;
16  double time0;
17  double inv_psi_norm;
18 
19  BiasPotential(NLReader::NamelistReader& nlr, double dt, double psi_norm);
20 
21  KOKKOS_INLINE_FUNCTION double tanh_bias(double psi) const{
22  return 0.5*tanh_amp*(tanh( 2.0*(psi - psic)*inv_psiw)-1.0);
23  }
24 
25  KOKKOS_INLINE_FUNCTION double linear_bias(double psi) const{
26  return linear_amp*(1.0-psi*inv_psi_norm);
27  }
28 
29  void add_potential(const Grid<DeviceType>& grid, double time, const View<double*, CLayout, DeviceType>& pot) const;
30 };
31 
32 #endif
bool kick
If true, a periodic kick drive instead of a continuous sinusoidal drive is used.
Definition: bias_potential.hpp:9
Definition: bias_potential.hpp:7
KOKKOS_INLINE_FUNCTION double tanh_bias(double psi) const
Definition: bias_potential.hpp:21
double inv_psiw
Decay length of the radial envelope of the bias potential.
Definition: bias_potential.hpp:13
Definition: NamelistReader.hpp:193
double linear_amp
Additional Ampltude of the bias potential in Volt for the kick drive.
Definition: bias_potential.hpp:11
BiasPotential(NLReader::NamelistReader &nlr, double dt, double psi_norm)
Definition: bias_potential.cpp:5
int start
Definition: bias_potential.hpp:15
double inv_psi_norm
Definition: bias_potential.hpp:17
void add_potential(const Grid< DeviceType > &grid, double time, const View< double *, CLayout, DeviceType > &pot) const
Definition: bias_potential.cpp:58
int freq
Frequency in Hz of the bias potential.
Definition: bias_potential.hpp:14
KOKKOS_INLINE_FUNCTION double linear_bias(double psi) const
Definition: bias_potential.hpp:25
double tanh_amp
Ampltude of the bias potential in Volt.
Definition: bias_potential.hpp:10
double time0
Definition: bias_potential.hpp:16
double psic
Center position of bias potential phi_bia ~ exp(-(psi-psi0)^2), psi_normalized.
Definition: bias_potential.hpp:12