Skip to content

Commit

Permalink
Update PlasmaParticleContainer.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
EyaDammak authored Feb 5, 2025
1 parent e910943 commit 0f0faba
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/particles/plasma/PlasmaParticleContainer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -672,16 +672,17 @@ LaserIonization (const int islice,
if (linear_polarization) {
amrex::Real width_p;
amrex::Real p_pol;
width_p = std::sqrt(laser_dp_prefactor[ion_lev_loc-1] * Ep) * std::sqrt(amrex::abs(A*A)); // equation (4) art. Massimo
width_p = std::sqrt(laser_dp_prefactor[ion_lev_loc-1] * Ep) * std::sqrt(amrex::abs(A*A)); // equation (4) art. Massimo (2020)
p_pol = amrex::RandomNormal(0.0, width_p, engine);
ux = p_pol;
uy = 0._rt;
uz = (amrex::abs(A * A) / 4. + p_pol * p_pol / 2.);
} else {
amrex::Real angle;
angle = amrex::Random(engine) * 2 * MathConst::pi;
ux = std::sqrt(amrex::abs(A*A)) / std::sqrt(2) * std::cos(angle);
uy = std::sqrt(amrex::abs(A*A)) / std::sqrt(2) * std::sin(angle);
// A_t = A (e_x +/- i e_y) in hipace in circular polarization
ux = std::sqrt(amrex::abs(A*A)) * std::cos(angle);
uy = std::sqrt(amrex::abs(A*A)) * std::sin(angle);
uz = amrex::abs(A*A) / 2.;
}

Expand Down

0 comments on commit 0f0faba

Please sign in to comment.