When the relative velocity between a charged particle and the background
for Coulomb collisions (W in the code) was low, there was a
segmentation fault. This is fixed now as if the norm of the relative
velocity (normW) in the code is too low, no collision is applied.
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.
Due to a high convergence value (1.0e-2) in phy2logQuad (variable conv),
particles were being stuck in some elements, reaching a segmentation
fault. The new limit (1.0e-4) should avoid this.
After some testing and making things a bit better and more general, I am
quite happy with the implementation of vtu and it seems that it is
working (at least as good as Gmsh2).
There are some procedures that might be useful for other XML-like
formats that might be moved in the future to the common module (I am
thinking right now in the implementation of a general format like
XDMF3).
I have tested all geometries and cases and all seem to work perfectly
with .vtu meshes.
Input and output works great, starting from a previous case also works.
Everything I was able to test is okay.
Still, what I want to do is to change a few things in the output (e.g.,
change OUTPUT prefix to Step) and try to improve reading gmsh meshes
to make them more compact as vtu is now.
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.
First complete implementation of .vtu format.
Still a lot of things to improve but right now fpakc can read a vtu mesh
and write the output in vtu.
Still to test:
Multiple geometries.
Double mesh.
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...
The average of the species properties can be written now in .vtu format.
No .pvd file is provided as no time series is generated.
Still to do:
Read a .vtu mesh.
Improve gmsh format to use more common functions.
The collisions and EM field information is now available in .vtu files.
A collection file .pvd is provided per dataset for time-dependent
plotting.
Still to do:
Write average quantities in .vtu
Read mesh from .vtu
Testing new VTU format.
For now, species information is ALWAYS output in .vtu (to test, this will
be an independent format in the future).
A .pvd file is produced to do time-series.
Still to implement other outputs (electromagnetic, average,
collisions...)
Still to implement reading a mesh from .vtu file
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.
This assigns the correct random cell when a particle is created from the
ionization boundary.
Also, the number of possible ionizations is reduced by one if there is a
suscesful ionization. This has no impact on the results.
During the improve performant step, an error in the electrostatic
pushers was introduced, resulting in these using the minimum time step
and not the species time step when calculating the acceleration.
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.