diff options
author | 2019-08-04 15:47:12 -0700 | |
---|---|---|
committer | 2019-08-04 15:47:12 -0700 | |
commit | a0f579f27969c3f86e54874b5a3c6a732dff9f53 (patch) | |
tree | 91c59f3d44645d7db38ba522c96f16bffd63e234 /Source/Particles/PhysicalParticleContainer.cpp | |
parent | 43c06604530ac2c532d1c731fd60bbb5570446e1 (diff) | |
download | WarpX-a0f579f27969c3f86e54874b5a3c6a732dff9f53.tar.gz WarpX-a0f579f27969c3f86e54874b5a3c6a732dff9f53.tar.zst WarpX-a0f579f27969c3f86e54874b5a3c6a732dff9f53.zip |
add target species handling
Diffstat (limited to 'Source/Particles/PhysicalParticleContainer.cpp')
-rw-r--r-- | Source/Particles/PhysicalParticleContainer.cpp | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/Source/Particles/PhysicalParticleContainer.cpp b/Source/Particles/PhysicalParticleContainer.cpp index 0183a44b9..8232b621f 100644 --- a/Source/Particles/PhysicalParticleContainer.cpp +++ b/Source/Particles/PhysicalParticleContainer.cpp @@ -215,7 +215,7 @@ PhysicalParticleContainer::CheckAndAddParticle(Real x, Real y, Real z, auto& particle_tile = DefineAndReturnParticleTile(0, 0, 0); if (WarpX::do_boosted_frame_diagnostic && do_boosted_frame_diags) { - particle_tile.push_back_real(particle_comps["xold"], x); + particle_tile.push_back_real(particle_comps["xold"], x); particle_tile.push_back_real(particle_comps["yold"], y); particle_tile.push_back_real(particle_comps["zold"], z); @@ -591,7 +591,7 @@ PhysicalParticleContainer::AddPlasma (int lev, RealBox part_realbox) } if (do_field_ionization) { - pi[ip] = 2.; // species_ionization_level; + pi[ip] = species_ionization_level; } u.x *= PhysConst::c; @@ -2105,4 +2105,21 @@ void PhysicalParticleContainer::InitIonizationModule() adk_power.resize(ion_atomic_number); adk_prefactor.resize(ion_atomic_number); adk_exp_prefactor.resize(ion_atomic_number); + for (int i=0; i<ion_atomic_number; ++i){ + Real n_eff = (i+1) * std::sqrt(UH/ionization_energies[i]); + Real C2 = std::pow(2,2*n_eff)/(n_eff*tgamma(n_eff+l_eff+1)*tgamma(n_eff-l_eff)); + adk_power[i] = -(2*n_eff - 1); + Real dt = 1.; + Real Uion = ionization_energies[i]; + adk_prefactor[i] = dt * wa * C2 * ( Uion/(2*UH) ) + * std::pow(std::pow(2*(Uion/UH),3./2)*Ea,2*n_eff - 1); + adk_exp_prefactor[i] = -2./3 * std::pow( Uion/UH,3./2) * Ea; + } +} + +int +PhysicalParticleContainer::doFieldIonization(const int lev) +{ + Print()<<"in PhysicalParticleContainer::doFieldIonization\n"; + return 0; } |