XGCa
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
radiation.hpp
Go to the documentation of this file.
1 #ifndef RADIATION_HPP
2 #define RADIATION_HPP
3 
4 #include "grid.hpp"
5 #include "magnetic_field.hpp"
7 #include "velocity_grid.hpp"
8 #include "plasma.hpp"
9 #include "vgrid_distribution.hpp"
10 #include "moments.hpp"
11 #include "source.hpp"
12 
13 class Radiation : public Source{
14 
15  double psi_min;
16  double psi_max;
17 
18  View<double*, CLayout, HostType> rad_Te_ev_h;
19  View<double*, CLayout, HostType> rad_n0_ne_h;
20  View<double**, CLayout, HostType> rad_Lz_h;
21  View<double**, CLayout, HostType> rad_avgZ_h;
22  View<double**, CLayout, HostType> rad_avgZ2_h;
23 
24  View<double*, CLayout, DeviceType> rad_Te_ev;
25  View<double*, CLayout, DeviceType> rad_n0_ne;
26  View<double**, CLayout, DeviceType> rad_Lz;
27  View<double**, CLayout, DeviceType> rad_avgZ;
28  View<double**, CLayout, DeviceType> rad_avgZ2;
29 
33  double fixedZ;
35 
37 
38  public:
39 
41 
43 
44  KOKKOS_INLINE_FUNCTION void Rad_Emissivity2(double tval_ev_in,double n0_ne_in, double& Lz,double& avgZ,double& avgZ2) const;
45 
46  KOKKOS_INLINE_FUNCTION double get_impurity_fraction(const MagneticField<DeviceType>& magnetic_field, const Grid<DeviceType>& grid, const Moments& moments, int inode, double avgZ, double avgZ2) const;
47 
48  KOKKOS_INLINE_FUNCTION double power_loss(double n, double imp_frac, double Lz, double dt) const;
49 
50  KOKKOS_INLINE_FUNCTION void f_shift_from_f_heat_torque(const VelocityGrid& vgrid, double alpha, const VGridDistribution<DeviceType>& f0_f, const VGridDistribution<DeviceType>& f0_df0g, int inode_local) const;
51 
52  KOKKOS_INLINE_FUNCTION bool out_of_bounds(const Grid<DeviceType>& grid, int inode) const;
53 
54  void apply(const Grid<DeviceType>& grid, const MagneticField<DeviceType>& magnetic_field, const DomainDecomposition<DeviceType>& pol_decomp, const VelocityGrid& vgrid, const Moments& moments, const View<double*, CLayout, HostType>& neu_node_dens, const VGridDistribution<HostType>& f0_f, const VGridDistribution<HostType>& f0_df0g, double dt);
55 };
56 
57 #endif
KOKKOS_INLINE_FUNCTION double get_impurity_fraction(const MagneticField< DeviceType > &magnetic_field, const Grid< DeviceType > &grid, const Moments &moments, int inode, double avgZ, double avgZ2) const
Definition: radiation.cpp:55
Eq::Profile< DeviceType > eq_zeff
Definition: radiation.hpp:36
Definition: velocity_grid.hpp:8
double impurity_fraction
Definition: radiation.hpp:30
double psi_min
Inner boundary for impurity radiation.
Definition: radiation.hpp:15
View< double *, CLayout, HostType > rad_Te_ev_h
Definition: radiation.hpp:18
Definition: NamelistReader.hpp:193
Definition: magnetic_field.hpp:12
Definition: moments.hpp:13
bool use_fix_charge
Definition: radiation.hpp:32
View< double **, CLayout, HostType > rad_avgZ_h
Definition: radiation.hpp:21
Definition: source.hpp:7
View< double **, CLayout, DeviceType > rad_Lz
Definition: radiation.hpp:26
Definition: vgrid_distribution.hpp:13
KOKKOS_INLINE_FUNCTION void Rad_Emissivity2(double tval_ev_in, double n0_ne_in, double &Lz, double &avgZ, double &avgZ2) const
Definition: radiation.cpp:17
Radiation()
Definition: radiation.hpp:40
View< double **, CLayout, DeviceType > rad_avgZ
Definition: radiation.hpp:27
Definition: magnetic_field.F90:1
void apply(const Grid< DeviceType > &grid, const MagneticField< DeviceType > &magnetic_field, const DomainDecomposition< DeviceType > &pol_decomp, const VelocityGrid &vgrid, const Moments &moments, const View< double *, CLayout, HostType > &neu_node_dens, const VGridDistribution< HostType > &f0_f, const VGridDistribution< HostType > &f0_df0g, double dt)
Definition: radiation.cpp:199
double fixedZ
Definition: radiation.hpp:33
View< double **, CLayout, HostType > rad_Lz_h
Definition: radiation.hpp:20
View< double *, CLayout, DeviceType > rad_Te_ev
Definition: radiation.hpp:24
View< double **, CLayout, DeviceType > rad_avgZ2
Definition: radiation.hpp:28
int rad_species
Definition: radiation.hpp:34
double psi_max
Outer boundary for impurity radiation.
Definition: radiation.hpp:16
bool use_zeff_profile
Definition: radiation.hpp:31
KOKKOS_INLINE_FUNCTION void f_shift_from_f_heat_torque(const VelocityGrid &vgrid, double alpha, const VGridDistribution< DeviceType > &f0_f, const VGridDistribution< DeviceType > &f0_df0g, int inode_local) const
Definition: radiation.cpp:78
View< double **, CLayout, HostType > rad_avgZ2_h
Definition: radiation.hpp:22
KOKKOS_INLINE_FUNCTION double power_loss(double n, double imp_frac, double Lz, double dt) const
Definition: radiation.cpp:73
View< double *, CLayout, DeviceType > rad_n0_ne
Definition: radiation.hpp:25
KOKKOS_INLINE_FUNCTION bool out_of_bounds(const Grid< DeviceType > &grid, int inode) const
Definition: radiation.cpp:122
Definition: radiation.hpp:13
View< double *, CLayout, HostType > rad_n0_ne_h
Definition: radiation.hpp:19