Commit graph

53 commits

Author SHA1 Message Date
5d82ea2ddc Code cleanup 2026-03-06 09:30:33 +01:00
600f7305bd Added center point procedure to edge and eps in inside to avoid some rounding errors 2026-03-04 10:41:55 +01:00
a89853135c Small correction to input. Adjustment of ALPHIE_Grid case 2026-03-03 14:50:09 +01:00
352a5578cc Wrong subroutine name in error 2026-03-01 09:57:40 +01:00
aad8675214 Small changes while testing 0D case 2026-02-27 22:21:37 +01:00
31f0b510bc The program reads the case but stops while doind the simulation 2026-02-26 14:25:47 +01:00
135f1f464c Files compile but there is no linking in mesh module 2026-02-24 20:03:36 +01:00
5dfc8d4ce9 Inject fixed. Now getting close to input 2026-02-20 11:24:58 +01:00
70f6db0883 Add new elements to point containers is now more general 2026-02-20 11:03:11 +01:00
a0d45503f7 Working on init for new physical surfaces 2026-02-19 20:42:28 +01:00
1b32dfdfd6 Rewriting surfaces and boundaries 2026-02-19 20:23:13 +01:00
d211ed9a71 Almost done with EM, not to modify the EM module itself 2026-02-18 15:14:59 +01:00
4c72e68246 Boundaries for EM almost done 2026-02-18 13:31:38 +01:00
6f8656bc21 Init for boundaries particles 2026-02-16 20:05:23 +01:00
defcf02466 Preparing to change the input 2026-02-10 18:46:37 +01:00
0ccf455986 Boundaries done. Now to change the input and edges 2026-02-09 18:43:59 +01:00
c78d92fa7d Changing now boundaries 2026-02-09 15:22:41 +01:00
58e2fa7566 Working towards compilation with submodules 2026-02-09 13:52:52 +01:00
e7e6e1bece New BC for quasi-neutrality
Still, the adjustment it is not iterative.
I need to build new subroutines to gather values of edges.
2026-02-05 11:01:15 +01:00
9f9bacca7c Skeleton implementation of text mesh for simple 1D cases. 2026-01-19 14:48:06 +01:00
55e062a9ef Fixed issue with volume in triangles
The right value in 2D Cartesian is used for calculating the volume.
2025-10-11 14:00:16 +02:00
d28dd16c2e Average fix and data for Xe 2025-07-17 18:34:11 +02:00
221de46734 Merge branch 'development' into feature/BoltzmannElectrons 2024-10-13 14:54:34 +02:00
2d4b405fb1 Functionality added
Now we have a new boundary condition that can change the value of the
potential in a surface based on a file.
2024-07-13 12:06:41 +02:00
10dee05922 NOT WORKING: Compilation okay, but not Dirichlet BC
The code compiles but the right BC is not being applied to the vectorF.

I'll check this tomorrow.
2024-07-12 23:30:35 +02:00
ac27725940 Big one...
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)
2024-07-12 23:08:19 +02:00
abedb79b16 Some comments
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.
2024-07-12 11:02:26 +02:00
bc8f205287 Clean-up!
Trying to reduce warnings and unused variables in the code. This should
not be in this branch.
2024-07-11 15:55:02 +02:00
96c563c146 Finally, some progress
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
2024-07-11 14:39:56 +02:00
1f2ec8d82f New option for initial distribution of species
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.
2024-07-07 14:37:34 +02:00
a3bdf8230a Implementation of Boltzmann electrons
Still not working, just saving code.
2024-05-19 10:55:20 +02: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
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
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
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
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
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
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
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
515e5c7744 Fix an issue and starting to read information from .vtu initial files
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.
2023-02-06 19:54:54 +01:00
43a7421795 Creating of nodes and edges in .vtu format
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...
2023-02-05 19:35:49 +01:00
63fd8fdb91 New functions to read VTU
Added a few functions to read .vtu meshes.

Output in .vtu changed to output data in 6 columns (seems to be the
    standard.)
2023-02-05 16:23:37 +01:00
bc2c29092a Injection of particles from surfaces direction
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.
2023-02-03 14:03:22 +01:00
7ce1b7a4dd Reducing overhead when no collisions are present
Particles are added to lists only if there are MCC collisions. Hopefully
this will reduce overhead when OpenMP is used and no collisions are
active.
2023-01-07 12:12:37 +01:00
1c5b887a6d Small bugfix when testing examples
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.
2023-01-07 10:47:18 +01:00
746c5bea09 First step of performance improvement
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
2023-01-06 21:02:54 +01:00
7f6afd6a87 Mark_1
First thing that I am kinda happy with.

Still some things to improve but at least push is good.
2023-01-05 22:43:51 +01:00
15d64f3e68 Passing nNodes as argument
It seems that this improves results as passing the size of the arrays as
an argument is better than getting it from self.
2023-01-05 21:22:13 +01:00
2486ef6316 Reduction in pushing
Reduction in 10-20% of time spend in pushing in 2DCyl thanks to
rewriting fPsi and dPsi.
2023-01-05 16:47:13 +01:00