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)
Just some comments on how I am going to make the desired changes (have a
Dirichlet boundary condition for the electric potential that changes
with time). This might be a good opportunity to rework the boundary
conditions in the electrostatic field and include other things like a
Newmann boundary condition. We will see.
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
The number of particles per cell can be defined when giving an initial
distribution fora species. If not, the typical method of using the
species weight is used. This is particularly useful for cylindrical
coordinates in which very little particles might end up in the axis if a
constant weight is used.
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.
Coulomb scattering is now fully conservative thanks to the method in
lemos2009small.
The trick was to conserve the momentum and energy of ALL particles
involved in the scattering in each cell.
The substeps in Coulomb collisions have been removed as they are no
longer necessary.
Still some issues with e-i, but I don't know right now.
Now per each Coulomb collision process there is the possibility to do
sub-steps. This helps in improving accuracy without reducing the time
step of the problem.
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)
I am doing a trick in which I ensure that energy is conserved for
Coulomb collisions. This was not happening and what an issue for
different mass ratios. Still, this can cause an issue on getting the
right relaxation rates, still necessary to check it.
First attemp for Coulomb collisions based on the moments distribtuions.
Still the method is not done and far from being complete but input
options and basic math are implemented.
Probes are now written at the 0 iteration.
Additionally, and this shouldn't be done, some small changes to the quad
elements. This should be done in a separate commit, but I'm lazy.
For some reason the connectivity for collision meshes was not being
properly assigned.
Also, the first subroutine to read information from .vtu files as
initial states has been added.
It is currently giving wrong results.
Moving forward making vtu an independent format.
Now fpakc can generate nodes and edges from vtu input.
Next step is cells.
Some minor corrections in gmsh2 format to unify statements.
The reading of meshes needs a good overhaul.
Testing all geometries with vtu is gonna be fun...
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.
While testing the examples distributed with the code, a few errors were
found and fixed, mostly related with the K matrix in 1D geometry and
reading values from initial conditions for species.
Finalysing first step of performance improvement focusing on reducing
iteration CPU time by improving calculation of basic element functions,
which took a lot of the CPU time