Commit graph

51 commits

Author SHA1 Message Date
5509332980 Output of standard deviation
The output for the standard deviation (still Gmsh2 only) was added.

Change in the output routines to reduce code repetition.
2022-12-15 11:40:24 +01:00
c5c4cbefbf Output ready
Output for Gmsh2 ready.

Unfortunatly, code repetition was required.
2022-12-14 18:30:14 +01:00
2ee58b6b77 Small change to ionization boundary
Very small change in formats to better account the ionization processes.
Minimum impact in results.
2022-12-12 17:36:10 +01:00
924ba4e20e Alphie grid case and issues
Output for the example ALPHIE_Grid.

Found an issue when multiple injections were used with species with
different time steps.

Modification to the way to compute the ionization boundary:
  The maximum number of ionizations is computed by eRel/eThreshold
  (relative energy / threshold of ionization)
  For each possible ionization, the probability of ionization is
  computed based on the density of neutrals, cross section and effective
  time divided by the number of maximum ionizations.
  If an ionization takes place, the ionization energy is substracted
  from the relative energy.
2022-12-11 22:39:28 +01:00
ae8aa9075e Change in calculation of reduced mass and relative energy
Now reduced mass and relative energy are calculated on the fly per
collision.
2022-12-09 09:54:44 +01:00
23e2fe9bae I'm dying with hay fever but I have to commit
I'm feeling awful but I have work in my desktop that I need to commit so
I can work with my laptop while I'm at the IEPC 2022 in Boston.
2022-06-10 16:07:14 +02:00
cbb5fe0bf2 Merge branch 'feature/collisionPairs' into feature/electromagnetic
Merging branches and fixing a number of important issues:

- Initial particles were not being assigned to the list of particles.

- List of particles was being erased every iteration, even if species
  was not pushed.

These caused issues with the calculation of collisions when a species
was frozen.

Now, things should work properly. All particles are properly added to
the volume list and the list is erased ONLY if the species has been
updated.

I hope that collisions are now properly accounted for per species pair.
2022-04-23 20:48:34 +02:00
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
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
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
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
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
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
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
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
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
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
e50cc3325b Implementation of ionization process.
Now collisions can have a different time step.

Added species name to output names as it was starting to get confusing
in Gmsh for multiple species.

Output filenames adapted to match any number of iterations.
2020-12-25 23:08:59 +01:00
35936ea918 Implementation of charge exchange and structure for ionization
processes.
2020-12-22 10:41:30 +01:00
baf25c1157 New boundary condition 'wallTemperature' that simulates a reflecting
wall with constant temperature and specific heat.
2020-12-19 16:20:28 +01:00
9e3a1a771b Modification in boundary conditions:
- Now absorption scatte the particle  properties into the edge nodes.
  - New boundary condition 'transparent' subsitute old absorption.
2020-12-17 21:16:35 +01:00
2c3e25b40e Added the possibility to have different boundary conditions per species.
A boundary condition for each species must be indicated in the case
file.
This opens the door to use boundary conditions with different parameters
(for example, a wall temperature, coefficients for reflection or
 absorption...)

The examples included with the code have been updated accordently.
2020-12-17 18:21:27 +01:00
d3d070a367 First implementation of 1D radial case. Only charged particles taked
into account (as in 1D Cartesian case).

The 1D Cathode example case has been modified, having now 2 input files:
  - inputCart.json: Used for Cartesian coordinates
  - inputRad.json:  Used for Radial coordinates

Pusher is a Boris pusher but without z direction.
2020-12-13 22:14:37 +01:00
37b0139b1f Implementation of different distribution functions for velocities.
Maxwellian and Diract Delta distributions have been implemented.

The input for injection of particles should be rewritten to allow more
clear input file.
2020-12-13 13:56:48 +01:00
af74205932 Files renamed and makefile make compatible with ifort. 2020-12-10 19:25:17 +01:00