diff options
author | 2021-05-05 20:26:48 +0200 | |
---|---|---|
committer | 2021-05-05 11:26:48 -0700 | |
commit | 57a2ac2e49bc0e4fb5591bee5a1d6728e19b51ff (patch) | |
tree | 99bb17d3d1efc4bd48086cf9e8dce51916129a95 /Source | |
parent | 2386df26322435c6b25b49ebbdf9c4af730195fb (diff) | |
download | WarpX-57a2ac2e49bc0e4fb5591bee5a1d6728e19b51ff.tar.gz WarpX-57a2ac2e49bc0e4fb5591bee5a1d6728e19b51ff.tar.zst WarpX-57a2ac2e49bc0e4fb5591bee5a1d6728e19b51ff.zip |
QED module: use PICSAR function to calculate gamma for photons (#1928)
Diffstat (limited to 'Source')
-rw-r--r-- | Source/Particles/ElementaryProcess/QEDInternals/BreitWheelerEngineWrapper.H | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/Source/Particles/ElementaryProcess/QEDInternals/BreitWheelerEngineWrapper.H b/Source/Particles/ElementaryProcess/QEDInternals/BreitWheelerEngineWrapper.H index 0101a32dd..0a38e37f0 100644 --- a/Source/Particles/ElementaryProcess/QEDInternals/BreitWheelerEngineWrapper.H +++ b/Source/Particles/ElementaryProcess/QEDInternals/BreitWheelerEngineWrapper.H @@ -15,6 +15,7 @@ #include <AMReX_Vector.H> #include <AMReX_Gpu.H> +#include <picsar_qed/physics/gamma_functions.hpp> #include <picsar_qed/physics/breit_wheeler/breit_wheeler_engine_tables.hpp> #include <picsar_qed/physics/breit_wheeler/breit_wheeler_engine_core.hpp> @@ -145,13 +146,19 @@ public: const auto u_norm = std::sqrt(ux*ux + uy*uy + uz*uz); const auto energy = u_norm*m_e*PhysConst::c; + const auto px = m_e*ux; + const auto py = m_e*uy; + const auto pz = m_e*uz; + const auto chi_phot = QedUtils::chi_photon( - m_e*ux, m_e*uy, m_e*uz, ex, ey, ez, bx, by, bz); + px, py, pz, ex, ey, ez, bx, by, bz); //Optical depth is not evolved for photons having less energy than what is //required to generate a pair or a quantum parameter smaller than //m_bw_minimum_chi_phot - const auto gamma_photon = u_norm/PhysConst::c; + const auto gamma_photon = pxr_p::compute_gamma_photon< + amrex::ParticleReal, pxr_p::unit_system::SI>( + px, py, pz); if (gamma_photon < pxr_m::two<amrex::Real> || chi_phot < m_bw_minimum_chi_phot) return 0; |