After reading some works and reviewing what I had, I've done some
corrections to how the randomb velicities in Maxwellian distributions
are calculated. These should be correct now.
I should've commited before, but I wanted to make things compile.
The big change is that I've added a global time step so the parameter
does not need to be passed in each function. This is useful as we are
moving towards using time profiles for boundary conditions and injection
of particles (not in this branch, but in the future and the procedure
will be quite similar)
I rewrote how particles are injected. Now the particles per edge and its
weight are calculated in the initialization. There is the possibility
for the user to select the particles per edge.
TODO: Write documentation for new feature.
TODO: Test in 2DCyl
So now each edge has the same number of particles and the weight of each
particle is calculated based on the surface of each edge compared to the
total one.
Only in 2DCyl, still to extend to other geometries.
Not perfect constant density, but the issue might be the node volume.
Fixed an issue with random integer numbers.
Cylindrical coordinates are not perfect yet:
- Box (cylinder) with initial constant density loses particles at r =
0
- Injection density still low in r = 0
I have to change the injection of particles. Each edge will receive a
similar number of particles and their weight will change to have a
constant density based on the geometry.
Still testing.
WARNING: This current denstiy will be multiplied by the reference
length, no the surface area that is being used for injection!
New units in the injection of particles 'Am2' to inject a density
current. Manual has been modified accordingly.
Reference parameters are now also printed in the case folder.
After fixing all possible divisions by zero I was able to find in the
Coulomb collision I think that this is a first working implementation of
a Coulomb operator based on moments.
Still to test a few things, modify the manual but I would say that I'm
satisfiyed right now. This operator won't be used that often but maybe
improving efficiency is still needed.
In the future a binary operator is required to be able to study cases
out of Maxwellian equilibrium.
I was having a lot of issues trying to get quasi-neutrality with the
injection of electrons and ions. Main issue was a definition of the
direction of injection. This should be fixed now (tested in 1D).
Added a definition for Half-Maxwellian velocity distribution.
WARNING: I'm still not happy at all about the definition of the
direction of injection and the velocity definition to be in that
direction so I might change it at some point (for example take into
account the sign of each direction in the thermal part of the velocity)
Now, if no normal is provided to an injection in the input file, the
velocity direction of the particles is chosen to be the surface normal.
This allows to inject particles from curves, corners... without having
to provide a direction or declaring multiple injections.
Output for the example ALPHIE_Grid.
Found an issue when multiple injections were used with species with
different time steps.
Modification to the way to compute the ionization boundary:
The maximum number of ionizations is computed by eRel/eThreshold
(relative energy / threshold of ionization)
For each possible ionization, the probability of ionization is
computed based on the density of neutrals, cross section and effective
time divided by the number of maximum ionizations.
If an ionization takes place, the ionization energy is substracted
from the relative energy.
Documentation updated properly.
3D Cartesian geometry also tested.
Documentation updated properly.
Added weighting probability in the injection of particles.
Possibility to input initial species distributions (density, velocity
and temperature) via an input file for each species.
New moduleRandom includes function to generate random numbers in
different ways (still uses) the implicit RANDOM_NUMBER().
Now collisions can have a different time step.
Added species name to output names as it was starting to get confusing
in Gmsh for multiple species.
Output filenames adapted to match any number of iterations.
Maxwellian and Diract Delta distributions have been implemented.
The input for injection of particles should be rewritten to allow more
clear input file.