Skip to content

Commit

Permalink
for use injection, use GJ factor
Browse files Browse the repository at this point in the history
  • Loading branch information
RevathiJambunathan committed Oct 26, 2023
1 parent c74bc3c commit b03ffa1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Source/Particles/PulsarParameters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2413,12 +2413,12 @@ Pulsar::FlagCellsForInjectionWithPcounts ()
ConvertCartesianToSphericalCoord(x, y, z, xc,
r, theta, phi);
amrex::Real q = 1.609e-19;
amrex::Real rho_GJ = rho_GJ_fac * (1. - 3. * std::cos(theta) * std::cos(theta) );
amrex::Real n_GJ = amrex::Math::abs(rho_GJ)/q;
//amrex::Real num_part_real = 0.;
amrex::Real shifted_theta = theta - chi;
amrex::Real GJ_factor = amrex::Math::abs( 1. - 3. * std::cos(shifted_theta)*std::cos(shifted_theta));
if (GJ_factor < GJdensitythreshold) GJ_factor = GJdensitythreshold;
amrex::Real rho_GJ = rho_GJ_fac * GJ_factor;
amrex::Real n_GJ = amrex::Math::abs(rho_GJ)/q;
amrex::Real sigma_factor = sigma_inj_ring(i,j,k)/sum_magnetization;
amrex::Real num_part_cell = (num_GJParticles * GJ_factor) + (PairPlasmaParticles * sigma_factor);
//amrex::Real num_part_cell = num_ppc_modified_real * factor;
Expand Down

0 comments on commit b03ffa1

Please sign in to comment.