Commit graph

135 commits

Author SHA1 Message Date
4e9514876e Number of collisions per collision pair
Now the number of collisions is calculated per species pair. This allows
that the randomly particles selected for collisions do not have
collisions assigned.
2022-04-23 19:00:33 +02:00
78a97ed7a0 Improve to collisions
Improvement into the collision model to better compute number of
particles collisions.
2022-04-23 18:57:27 +02:00
97718209cc Setting pushers as PURE
Pushers were not set to PURE after testing.
2022-04-09 09:00:40 +02:00
8006f9d768 First EM pusher
First implementation of Electromagnetic pusher.

Some testing is still required.

Documentation needs to be upgraded to match the changes in this branch.
2022-04-09 08:57:06 +02:00
771e336f87 Cart pusher combined
Now, all Cart pushers push particles in 3D, regardless the geometry.
2022-04-08 19:16:41 +02:00
5b5dadce39 Restructuring the geometry and pushers
The geometry and push structure has been reworked to allow eassy adding
new pushers.

Documentation not updated yet.

Baseline for merging Cartesian pushers into one.
2022-04-08 19:06:12 +02:00
90e667f0a5 Fixing issue with makefile
The dependencies of the modules have been streamlined.
2021-10-18 16:36:19 +02:00
e683c66ff8 Modification to Probes to use all particles
Now, probes check all particles in the domain.
This is done only when probes are outputed to save CPU time.
However, still some issues and distribution functions are not properly
being calculated.
2021-10-18 16:00:28 +02:00
f9dcd181c8 Issue reading EM field
Fixed an issue reading the EM field from input file.
2021-10-18 10:29:45 +02:00
aa9dda76ca Small improvement.
Small change to probing system.
2021-08-26 11:21:08 +02:00
56967dd6c7 First implementation of probing method
The code nows offer the possibility to obtain the distribution function
for a specific species in a 3D velocity grid at a determined position.

This is a simple method that just scatter the particles in one cell into
the velocity grid.
2021-06-29 10:37:39 +02:00
b6a7eb9ced Adding a time step for collisions
A new option has been added in which MCC are computed with its own time
step.

If no time is provided, then the minimum time step of the simulation is
employed.
2021-06-15 10:40:13 +02:00
9af3429395 Issue with random position in volumes
Fixed an issue in which  the position in triangular an thetrahedron
elements were not correctly being computed.

Other minor issues fixed:
  - Units in input file now do not use '/'.
  - Collisions accuratly conserve momentum.
  - Minor improvements in mass calculation in collisions.
2021-05-24 12:37:16 +02:00
35bd61fda9 Common scatter subroutine
All subroutines of scattering particle properties to the nodes of a
volume have been converged into one in moduleMesh.
2021-04-21 23:40:58 +02:00
027b346a84 Copy input files to output folder
After reading the input, the code copies the JSON input file but the
mesh(es) to the output directory.
2021-04-21 16:01:01 +02:00
dee860e37b Implementation of initial iteration.
An initial simulation time can be provided in the input file. This is
useful when restarting a simulation from a previous file. If no
initial time is provided, the value 0 is used.
2021-04-17 10:45:52 +02:00
f20cb35fc5 Small modification in input for initial case.
Names have been simplified. User manual updated accordingly.
2021-04-15 09:47:19 +02:00
7dccba5906 The normal vector in an injection is now normalized to 1 and it is no
longer responsability of the user to ensure that the norm is 1.

This is a very simple fix and I do not why I did not implemented early.
2021-04-14 20:56:53 +02:00
a681b9f533 0D Grid geometry
Implementation of the 0D grid to test collisional processes.

An OMP_LOCK was added to the nodes to properly write perform the
scattering (it is weird that multiple threads work in the same node at
the same time, but in 0D happens everytime).

Added a new case to test the 0D geometry.

User Manual updated with the new options.
2021-04-13 21:48:44 +02:00
0ffdb8578a Merge branch 'development' into feature/0DGrid
Conflicts:
	src/modules/mesh/moduleMesh.f90
2021-04-13 17:46:20 +02:00
f1d74d954c Implementation of 0D dummy pusher and modifications to input parameters
to allow 0D runs.
2021-04-13 17:40:33 +02:00
e25b567d36 Now the initial state has the same format as the mesh file, i.e., is
easy to use a file from a previous run without processing it into a
plain text file.

Although the previous method presented some updates for 1D small cases,
this is quite easy to do with any type of simulations and, in the
future, with different mesh formats.
2021-04-13 16:55:50 +02:00
d2b36632c9 Implementation of 0D grid for analysis of collisional operators.
Still need to add a 0D pusher and the corresponding input configuration
and documentation.
2021-04-12 18:54:33 +02:00
cbcefb06c8 Final implementation of a specific mesh for MCC, added a case for
cylFlow that used two meshes and the User Manual has been updated.
2021-04-05 09:45:57 +02:00
a2631f6b78 Impliementation of a collision mesh which is independent for the mesh
used to scatter particles and compute the EM field.
2021-04-03 09:20:46 +02:00
3f91d9e1ed Reading of mesh files has been made independent from geometry and
prepared to accept different formats.
2021-03-29 09:45:51 +02:00
46348c86ee Improved some general things using pointers. 2021-03-28 16:52:01 +02:00
ec128902ad The integer part%sp that referenced the species index has been
substituted for a pointer to the species.
2021-03-28 15:55:26 +02:00
bf4b8b41d3 Fixed an issue in the compilation caused by not included the
moduleRefCase when using m_ref in moduleInput.
2021-03-28 15:20:27 +02:00
2a843547b8 Ionization boundary condition fully tested.
Documentation updated properly.

3D Cartesian geometry also tested.
Documentation updated properly.

Added weighting probability in the injection of particles.
2021-03-27 11:38:18 +01:00
12e61731df Ionization boundary ready to testing.
Fixed an issue in which some particles in the corner were interacting
with the axis boundary. Now the axis acts as a reflective boundary in
case a particle is wrongly assigned to it.
2021-03-23 16:43:11 +01:00
db6b0a2c03 Fixed an issue with reflection of particles in all geometries and also
assigning the normal vector in 2D and 3D.

3D Cartesian geometry is working properly, although it needs testing.

Still issue with ionization boundary.
2021-03-22 12:39:34 +01:00
3b01099aba Merge branch 'development' into feature/3DCart 2021-03-20 13:08:55 +01:00
8cf50cda68 First implementation of ionization boundary. Still some work to do. 2021-03-20 13:08:01 +01:00
c236c5e0e2 Fixing some issues in 3D Cartesian coordinates. Included 3D pusher.
Still there are issues linking a volume to an edge.
2021-03-15 10:00:34 +01:00
1e66110014 Merge branch 'development' into feature/3DCart 2021-03-11 18:43:44 +01:00
7e5b78f72f Implementation of 3D cartesian coordinates completed. Last commit before
testing.
2021-03-11 16:25:30 +01:00
ff0c09242d Fixed an issue with normal vector not being norm unit, which was causing
reflected particle velocities to increase.
2021-03-11 12:56:15 +01:00
ac2965621a Structure for 3D Cartesian Grid created.
Unification of boundary conditions into one file.

Some changes to input file for reference cases. This should have been
done in another branch but I wanto to commit to save progress and I
don't want to deal with tswitching branches right now, I'm very busy
watching Futurama.
2021-02-27 16:24:44 +01:00
20bc1abc29 Fixed an issue in which the logical coordinates of the particle (xi)
were not being initialized and was causing particles to get stuck in
  the iteration loop.
2021-01-27 09:59:37 +01:00
2eae95002d Small modifications to 1D input files to make them start from a small
x/r position to avoid huge fields in Radial case when r -> 0 due to
charge accumulation.

Added a Gnuplot script to plot both potential profiles extracted from
Gmsh.
2021-01-23 10:58:39 +01:00
2ae4a6c785 First implementation of 2D Cartesian space.
Files and types with 'Cyl' have been changed to '2DCyl' to better
differentiate between the two types of 2D geometry.

Solvers for charged and neutral particles in 2D Cartesian space.

Added solveds for 1D neutral particles (this branch is not the place to
    do it, but it was a minor change).

User Manual updated with the new accepted options.
2021-01-21 12:03:10 +01:00
c378f8c3a2 Merge branch 'feature/output' into 'development'
Folder name

See merge request JorgeGonz/fpakc!4
2021-01-20 15:38:10 +00:00
2a6628d529 Added and option to include an output folder name. The date and time of
creation is still appended to the folder name provided.
2021-01-20 16:36:01 +01:00
978eb99f02 New way to deal with electric field in triangles. Some improvements but
rectangles are still recommended for regular grids.
2021-01-20 16:08:01 +01:00
5516e46ec3 Particles are injected in each iteration and pushed with tauMin when
injected. Then, particles are pushed as normal in their own time step.
2021-01-02 16:31:31 +01:00
874d573e89 New and improved method to calculate collisions per iteration:
In each iteration, number of collisions are calculate as a REAL variable
(collFrac) and stored in each cell. The number of collisions is
calculated as FLOOR(collFrac) and, if it is >1 collisions are computed
as usual. Per each collision calculated, 1.0 is removed from collFrac
2021-01-02 14:09:27 +01:00
4ba08e74af Method to divide collisions from a collisional iteration into multiple
pushing iterations.
2021-01-02 12:50:22 +01:00
a45df9de22 Recombination process introduced. No photon creation yet. 2020-12-27 13:15:36 +01:00
9e0d1a7cc7 Final implementation of ionization process by electron impact.
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().
2020-12-26 22:45:55 +01:00