Skip to content

Configure ionization in an example

Marco Garten edited this page Dec 8, 2016 · 3 revisions

You are here: Home > Developer Documentation > Ionization in PIConGPU > Configure ionization in an example


HowTo: Set up a parameter set with activated ionization

(See Configure an example for basic steps on setting up your simulation scenario)

1. Go to speciesDefinition.param and define the kinds of atomics species for your simulation
struct Nitrogen
{
    static constexpr float_X numberOfProtons  = 7.0;
    static constexpr float_X numberOfNeutrons = 7.0;
};

/* mass and charge ratios with respect to electrons */
value_identifier(float_X, MassRatioNitrogen, 25514.325);
value_identifier(float_X, ChargeRatioNitrogen, -7.0);
2. Assemble the physics aspects of your species

e.g. for your nitrogen atoms

typedef bmpl::vector<
    particlePusher<UsedParticlePusher>,
    shape<UsedParticleShape>,
    interpolation<UsedField2Particle>,
    current<UsedParticleCurrentSolver>,
    massRatio<MassRatioNitrogen>,                           /* <-- from step 1 */
    chargeRatio<ChargeRatioNitrogen>,                       /* <-- from step 1 */
    #if(PARAM_IONIZATION == 1)                              
    ionizer<particles::ionization::ADK<N_Electrons> >,      /* <-- choose ionization model and electron species */
    ionizationEnergies<AU::IONIZATION_ENERGY_NITROGEN_t>,   /* <-- we'll cover that in step 3 */
    #endif
    atomicNumbers<Nitrogen>                                 /* <-- from step 1 */
> ParticleFlagsNitrogen;

/* define PIC species: nitrogen */
typedef Particles<
    ParticleDescription<
        bmpl::string<'n'>,
        SuperCellSize,
        AttributeSeqIons,
        ParticleFlagsNitrogen
    >
> N_Ions;

Remember that you can define multiple electron species and associate them with your different ion species to track the ionisation processes separately!

3. Go to species.param and activate ionization as well as electrons and ions
/*enable (1) or disable (0) electrons*/
#define ENABLE_ELECTRONS 1                 /* Here,... */
/*enable (1) or disable (0) ions*/
#ifndef PARAM_IONS
#define PARAM_IONS 1                       /* ... here,... */
#endif

#define ENABLE_IONS PARAM_IONS

/*enable (1) or disable (0) ionization*/
#ifndef PARAM_IONIZATION
#define PARAM_IONIZATION 1                 /* ... and here! */
#endif
4. Go to ionizationEnergies.param and define all the necessary ionization potentials
/* ionization energy for nitrogen atomic units */
    PMACC_CONST_VECTOR(float_X,7,IONIZATION_ENERGY_NITROGEN, /* data type, atomic number, name of the vector */
        14.53413 * UNITCONV_eV_to_AU,   
        29.60125 * UNITCONV_eV_to_AU,
        47.4453 * UNITCONV_eV_to_AU,
        77.4735 * UNITCONV_eV_to_AU,
        97.89013 * UNITCONV_eV_to_AU,
        552.06731 * UNITCONV_eV_to_AU,
        667.04609 * UNITCONV_eV_to_AU   /* don't forget to convert each entry to atomic units */
    );

You can refer to http://physics.nist.gov/PhysRefData/ASD/ionEnergy.html for the energy values.

5. Make sure all your species are in the initialization pipeline!
typedef mpl::vector<
    CreateGas<gasProfiles::Gaussian, startPosition::Random, N_Ions>,  /* create atom distribution */
    Manipulate<manipulators::SetBoundElectrons, N_Ions>               /* make your atoms initially neutral */
> InitPipeline;

You're good to go!