WarpX
Toggle main menu visibility
Loading...
Searching...
No Matches
Source
Particles
Collision
BinaryCollision
LinearBreitWheeler
LinearBreitWheelerCrossSection.H
Go to the documentation of this file.
1
/* Copyright 2023 Arianna Formenti
2
*
3
* This file is part of WarpX.
4
*
5
* License: BSD-3-Clause-LBNL
6
*/
7
8
#ifndef LINEAR_BREIT_WHEELER_CROSS_SECTION_H
9
#define LINEAR_BREIT_WHEELER_CROSS_SECTION_H
10
11
#include "
Utils/WarpXConst.H
"
12
13
#include <
AMReX_REAL.H
>
14
15
#include <cmath>
16
28
AMREX_GPU_HOST_DEVICE
AMREX_INLINE
29
amrex::ParticleReal
LinearBreitWheelerCrossSection
(
const
amrex::ParticleReal
& E_star)
30
{
31
using namespace
amrex::literals
;
32
33
constexpr
auto
c2 =
PhysConst::c2_v<amrex::ParticleReal>
;
34
constexpr
amrex::ParticleReal
me =
PhysConst::m_e
;
35
36
if
(E_star < me*c2) {
return
0._prt;}
37
38
constexpr
auto
one_half_pr =
amrex::ParticleReal
(1./2.);
39
constexpr
amrex::ParticleReal
pi =
MathConst::pi
;
40
constexpr
amrex::ParticleReal
re2 =
PhysConst::r_e
*
PhysConst::r_e
;
41
auto
constexpr
pow2 = [](
auto
const
x) {
return
x*x; };
42
auto
constexpr
pow4 = [](
auto
const
x) {
return
x*x*x*x; };
43
44
const
amrex::ParticleReal
s = pow2(E_star/(me * c2));
45
const
amrex::ParticleReal
beta = std::sqrt(1._prt-1._prt/s);
46
47
const
amrex::ParticleReal
term1 = (3._prt-pow4(beta))*std::log((1._prt+beta)/(1._prt-beta));
48
const
amrex::ParticleReal
term2 = 2._prt*beta*(pow2(beta)-2._prt);
49
const
amrex::ParticleReal
cross_section = one_half_pr*pi*re2*(1._prt-pow2(beta))*(term1+term2);
50
51
return
cross_section;
52
}
53
54
#endif
// LINEAR_BREIT_WHEELER_CROSS_SECTION_H
AMREX_INLINE
#define AMREX_INLINE
AMREX_GPU_HOST_DEVICE
#define AMREX_GPU_HOST_DEVICE
AMReX_REAL.H
LinearBreitWheelerCrossSection
AMREX_GPU_HOST_DEVICE AMREX_INLINE amrex::ParticleReal LinearBreitWheelerCrossSection(const amrex::ParticleReal &E_star)
Computes the linear Breit-Wheeler cross section (refer to, for example, [Gould and Schreder Phys....
Definition
LinearBreitWheelerCrossSection.H:29
WarpXConst.H
amrex::ParticleReal
amrex_particle_real ParticleReal
ablastr::constant::SI::r_e
constexpr auto r_e
classical electron radius = 1./(4*pi*epsilon_0) * q_e*q_e/(m_e*c*c) [m]
Definition
constant.H:187
ablastr::constant::SI::m_e
constexpr auto m_e
electron mass [kg]
Definition
constant.H:172
ablastr::constant::SI::c2_v
constexpr auto c2_v
square of the vacuum speed of light [m^2/s^2] (variable template)
Definition
constant.H:145
ablastr::constant::math::pi
constexpr auto pi
ratio of a circle's circumference to its diameter
Definition
constant.H:29
amrex::literals
Generated by
1.17.0