Commit graph

435 commits

Author SHA1 Message Date
4cadfe5367 Seems are a bit better
There is still less density in the axis. I don't find a reason why.
There must be a modification to the weight...
2024-06-29 22:22:10 +02:00
5386114d15 Cylindrical injection working better
Seems things are a bit better. Still, more cases are needed and still
not perfectly uniform...
2024-06-29 14:58:48 +02:00
6389c8ba2d Quick because food
Cartesian fixed now
2024-06-27 12:08:08 +02:00
0ce921a48c Merge branch 'issue/quadLocation' into 'development'
Issue with calculating coordinates in quads

See merge request JorgeGonz/fpakc!49
2024-06-26 13:14:22 +00:00
c6470819e8 Issue with calculating coordinates in quads
The third coordinate (unused) was causing some errors when it was
becomming too large.
2024-06-26 15:11:01 +02:00
e4f7987f90 Trying to solve
Still I don't understand this basic thing...
2024-05-19 16:45:03 +02:00
a3bdf8230a Implementation of Boltzmann electrons
Still not working, just saving code.
2024-05-19 10:55:20 +02:00
62b8873786 Merge branch 'feature/Amps_per_m2' into 'development'
Implementing injection with current density

See merge request JorgeGonz/fpakc!48
2024-03-29 12:09:30 +00:00
d86b3a3417 Implementing injection with current density
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.
2024-03-28 09:45:46 +01:00
a3d7b38e3b Merge branch 'improve/secondaryElectronIonization' into 'development'
Improve ionization

See merge request JorgeGonz/fpakc!47
2023-11-24 09:34:30 +00:00
e41b448ef8 Different species for secondary electrons
The option to have a different species than the impacting electron for
secondary electrons from ionization is introduced.
2023-11-24 10:30:50 +01:00
4585390b50 Fixing issue
Fixing an issue with reading tables led me to other issues with
collisions that I think are fixed right now. I am testing with the 1D
ionization model for ALPHIE and things seems to be working properly.
2023-11-21 09:53:36 +01:00
5df81a79e4 Merge branch 'feature/CoulombLinear' into 'development'
First attempt at Coulomb collisions

See merge request JorgeGonz/fpakc!46
2023-07-16 12:47:58 +00:00
2e4b3c3d20 Update of user-manual
The user manual has been updated with a simple explanation on how to use
Coulomb Scattering.
2023-07-16 14:44:38 +02:00
e05c0d4635 Coulomb Scattering fully conservative
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.
2023-07-16 14:30:49 +02:00
c3a6f77ffc Combining ij - ji collisions
In an attempt to make the operator fully conservarive I have combined ij
and ji collisions (when i/=j).

Now the matter is to find a way that makes this conserve momentum and
energy for intraspecies.
2023-07-12 15:17:26 +02:00
28b2bf206a Added the possibility to have sub-steps
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.
2023-07-12 14:21:29 +02:00
a891360b7a Still unsure, but things fixed
There was an issue with the calculation of theta and phi for the
rotation from W to C. This was causing some velocities not being
correct.

Now the angles are properly computed. Still unsure about the e-i
collisions as they seem to be quite small. Probably a numerical issue
with the mass ratios still exists.
2023-07-12 11:38:12 +02:00
f63e34e266 Not fully conservative but works
The code is still not fully conservative in intra-species collisions
(small error) but at least now is working.

I have to test species with different weight.

I have to implement a fully conservation for intra-species.
2023-07-11 18:55:20 +02:00
63fc2842be Small changes
Just some small changes to the code to improve its quality.

Nothing regarding conservation was done yet.
2023-07-11 11:22:19 +02:00
c45ffa5380 Dear various gods, finally...
I had to go back to sherlock2008montecarlo to properly understand the
change in frame of reference and how to translate that into the code.
The language there is clear and understandable for a dumb person like
me.

Now I have a Coulomb linear operator that at least works.

However, still not fully 100% conservative, need to fix this with a
correction for intra-species collisions.

I skip gym today because I was unable to focus on other things than
this.
2023-07-11 09:58:50 +02:00
d75af4bda7 Trying to implement Lemos Coulomb Scatering
I was having tones of issues with the previous implementation. I think
the problem was the velocity vector and how it was returning to the
normal reference frame.

I hope this new implementation works better.
2023-07-11 07:51:49 +02:00
a26dc04051 I hate Coulomb and his Scattering
I found no way to ensure conservation in the linear Coulomb operator.
Thus, now two collisions have to be declared if sp_i /= sp_j: collision
ij and collision ji.

This does not conserve energy so please use under your own risk, like
everything else.

Still, I think something is wrong with this implementation and I'm
really tired.
2023-07-07 16:36:31 +02:00
8d35123508 First Coulomb implementation that works
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.
2023-07-04 17:01:02 +02:00
0bd90d02f9 Merge branch 'issue/injection' into 'feature/CoulombLinear'
Issue with injection of particles

See merge request JorgeGonz/fpakc!45
2023-05-22 15:51:28 +00:00
2505cbecf2 Half-Maxwellian distribution added to the user manual
The option to have half-Maxwellian distributions in the injection of
particles has been added to the user manual.
2023-05-22 15:20:11 +02:00
94a4864e6a Issue with injection of particles
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)
2023-05-22 15:14:33 +02:00
ed6c2c46e4 I'm a fucking idiot
The limit I set to avoid divisions by zero was wront and collisions were
being skipped. It is corrected now.
2023-03-29 10:08:11 +02:00
f4448d9e7a Fixed segmentation fault in Coulomb collisions
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.
2023-03-12 17:02:12 +01:00
a70788b95d Fix an issue with compilation
Copy paste error. Now the code compiles.
2023-03-08 19:42:15 +01:00
fe94615a27 First conservative implementation of Coulomb
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.
2023-03-08 16:37:45 +01:00
f8af7a8dae No progress in fixing Coulomb collisions with mass ratio
I am starting to think that the only fix is to reduce the time step, but
that is too harsh.
2023-03-07 10:10:54 +01:00
6113ac3305 Correction with conservation
Now the method is much better in conserving total energy.
However, still there is an issue with collisions between species of
dispaprate mass.
2023-03-06 16:16:17 +01:00
601103105f First attempt at Coulomb collisions
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.
2023-02-24 21:46:01 +01:00
7579d165ad Merge branch 'improve/probes' into 'development'
Probes were not working properly

See merge request JorgeGonz/fpakc!44
2023-02-23 12:45:38 +00:00
386ddd82dd Probes in 0 iteration
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.
2023-02-23 13:36:31 +01:00
2ee6c1764e Probes were not working properly
Issue in the output of probes and in the detection of particles inside
the velocity grid.
2023-02-23 08:18:46 +01:00
e7ae4e13ff Merge branch 'issue/lapack' into 'development'
Issue with -llapack option

See merge request JorgeGonz/fpakc!43
2023-02-17 12:05:39 +00:00
acc8505485 Issue with -llapack option
Some versions of gfortran (in the foss framework) were having issues
with the -llpack flag, so it is disables as OpenBLAS takes the work.
2023-02-17 13:03:22 +01:00
ee16de3f86 Merge branch 'issue/gmsh2FileName' into 'development'
Incorrect file name in Gmsh2 output

See merge request JorgeGonz/fpakc!42
2023-02-17 11:54:13 +00:00
8237aa90e9 Incorrect file name in Gmsh2 output
The file with the EMField was being writteng with the wrong name.
Quantities inside were correct.
2023-02-17 12:48:23 +01:00
e51348ae41 Merge branch 'issue/findCell' into 'development'
Returning to previous version of moduleMesh.f90

See merge request JorgeGonz/fpakc!41
2023-02-10 17:54:49 +00:00
4e9a592982 Returning to previous version of moduleMesh.f90
Having initialization in some variables was causing issues in 1D
geometry, so I reverted the file to one working.
2023-02-10 18:53:19 +01:00
167e25e276 Merge branch 'feature/writeGitCommit' into 'development'
Adds the commit to the output folder

See merge request JorgeGonz/fpakc!40
2023-02-09 15:50:36 +00:00
60477481dd Adds the commit to the output folder
I thought it will be a good idea to write the commit into the output
folder to better track the code version responsible for the results.
2023-02-09 16:48:49 +01:00
f815c8f192 Merge branch 'issue/particlesStuck' into 'development'
Issue in connectivity between Quad elements

See merge request JorgeGonz/fpakc!39
2023-02-09 15:29:34 +00:00
de1d4567f3 Issue for particles in quad cell
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.
2023-02-09 15:32:04 +01:00
f86641110c Issue in connectivity between Quad elements
For unstructured meshes, the quad elements where not being propertly
connected as not all possibilities were tested. This should be fixed
now.
2023-02-09 12:15:18 +01:00
de2aad02d1 Merge branch 'feature/vtk' into 'development'
Implementation of vtu file format for mesh reading and output

See merge request JorgeGonz/fpakc!38
2023-02-07 15:11:16 +00:00
2c55913501 First version of vtu file format
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).
2023-02-07 16:02:36 +01:00