Commit graph

290 commits

Author SHA1 Message Date
5166a650d2 Data for Kr, just to test 2025-08-06 10:59:03 +02:00
3d7b1ce476 Fixed!
So it seems that rectangles and triangles are now working properly.

I have also checked the phy2log routine, now it seems a bit more complicated, but it is much clearer.
Maybe in the future is worth rethinking to improve speed (specially for quad elements)
2025-08-03 22:14:19 +02:00
102fd013f3 Issue with triangles fixed
Now they give the right electric field.

I have to change 2DCyl.

However, there was some insonsistency between the change of coordinates in phy2log and the Jacobian for the K matrix. I fixed it putting a transpose() in phy2log, but I don't like that solution.

I need to review the basic procedure of phy2log.
2025-08-03 20:46:12 +02:00
7e193b9fa8 Minor changes, no improvement made yet 2025-08-03 15:32:55 +02:00
d86c8480f3 Fixed issue with some velocities. Still, at some point I need to rething all the injection thing. 2025-08-02 16:51:00 +02:00
4b040c35c3 Fixes to random variables
After reading some works and reviewing what I had, I've done some
corrections to how the randomb velicities in Maxwellian distributions
are calculated. These should be correct now.
2025-08-02 13:25:48 +02:00
78cb9a2453 No reflection of particles at injection, that should be a boundary condition 2025-08-02 10:31:06 +02:00
d1e73297eb Adjust flux when no particlesPerEdge is used
This does not affects the cases of the IEPC, but I am also doing other
stuff.
2025-07-27 18:17:01 +02:00
8e531ede08 Vol_ref was the right answer 2025-07-27 17:16:57 +02:00
76c5af89b2 Merge branch 'IEPC2025' of gitlab.com:JorgeGonz/fpakc into IEPC2025 2025-07-27 17:15:36 +02:00
7f73b69dc2 Fix injection
Half-Maxwellian distribution should inject particles correctly
2025-07-27 17:14:38 +02:00
69215ef66d Change in calculating ionization
I don't know why I normalizing density n_0 by Vol_ref and not n_ref
2025-07-22 19:52:39 +02:00
a2f9957f32 I am dumb
The Poisson equation was not working because I didn't finish
implementing the new type of BCs. Dirichlet is probably untested. I
should stop doing shitty developments and no testing.
2025-07-18 16:31:52 +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
2268a97e23 Merge branch 'mergeDevleopment' into 'development'
Issue with injecting current

See merge request JorgeGonz/fpakc!53
2024-10-13 12:41:03 +00:00
3d8d912722 Merge branch 'development' of gitlab.com:JorgeGonz/fpakc into development 2024-10-13 13:35:34 +02:00
2af10acd70 Issue with injecting current
Values were not right in 1D geometry. Fixed.
2024-10-13 13:32:57 +02:00
98ee3e9c9c Still not working, but will be fixed
I have the solution in the plasma expansion code, but I need to do other
stuff.
2024-09-30 17:06:25 +02:00
0679fa58bc Merge branch 'feature/temporalDirichlet' into 'development'
Time variable Dirichlet condition

See merge request JorgeGonz/fpakc!52
2024-07-13 11:01:10 +00:00
6f185c4188 Organizing things
Move the array of pointers to the nodes to moduleMesh.
2024-07-13 12:35:42 +02:00
e4dfba45f8 Manual updated
New dirichletTime condition is documented.
2024-07-13 12:13:39 +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
49025a6965 Starting changes
Planning the new way to do BC in the EM field solver.
Probably I have to change how things are read, but I don't think this is
going to affect the input file.
2024-07-12 19:21:00 +02:00
f0a27c0529 More comments
So if the source vector is being updated every time step, it might be
"easy" to implement these things.
2024-07-12 13:17:02 +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
065bb1d13e Merge branch 'issue/injection2DCyl' into 'development'
Rework of injection of particles with a special focus in 2DCyl to ensure an homogeneous distribution.

See merge request JorgeGonz/fpakc!51
2024-07-11 16:51:42 +00:00
fb9d1ad837 Update moduleMesh2DCyl.f90
This is not needed.
2024-07-11 16:44:29 +00:00
152ae6b097 No longer needed
The correction in the node volume is no longer needed as now things are
being calculated right with the last change.

Still, at some point I should review the calculation of the node volume
in 2DCyl.
2024-07-11 18:19:26 +02:00
72dd3c9073 I think I have it
So the radius for the volume integral in the nodes has to be set with a
1/4 3/4 ratio to match the change in volume as the radius changes along
the volume.

This has a bigger impact close to the edge.

Still unsure if this is the "right" thing to do, but at least it works
okay (it seems).
2024-07-11 17:40:57 +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
d710cc5e66 Probes fixed!
This should've been commited in another branch, but I am taking
advantage of this to clean up the code a bit.
2024-07-11 15:52:13 +02:00
03f3b81811 Manual updated
The manual has been modified to account for the new particlePerEdge
option and to indicate that now when the flux is giving by a flux like
in the Am2 units, the real surface of the inject is used to scale it.
2024-07-11 15:31:01 +02:00
6d62807fb4 Remove testing 'print' statements
2DCyl still seems to have some problems but waiting for simulation.
2024-07-11 14:50:14 +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
e23fc2fc2c Small progress
I made some small changes to how things are calculated.

I have also discovered that the issue with different density when
changing injection is not related with the node volume but with the way
injection is carried out. When loading particles from a file, all
provide the same density regardless the cell (node) volume.

I am doing testing in 2DCart as it is easier to set up.
2024-07-11 11:21:38 +02:00
9d961bb85f Removing weight from edges
This parameter is no longer needed.

Also removing the cumulative sum of weights from the injection.
2024-07-10 21:57:22 +02:00
cb92462f36 New injection based on surface to all geometries.
WARNING: 3DCart still not working (too tired to calculate things and I'm
    not ussing it...)
2024-07-10 21:55:45 +02:00
d608639e77 Forgot to save
Sorry.
2024-07-09 22:05:16 +02:00
667a2ecd93 So, no idea...
Basically things do not work. I've added a correction to the node volume
in the axis which gives okays results but still this is not perfect. I
need to find a better way to do things.

Also, I've noticed that the density changes with the size of the cells,
which should not happen! I'vw to check this issue.
2024-07-09 21:57:32 +02:00
11831a973d Still not working
Trying to have a very simple volume per node assuming a rectangle and
the density at the axis it higher than it should (kinda like when using
the more accurate volume calculation).

This is still weird. I also suspect that the size of the first cell in
the axis will also affect this...
2024-07-09 21:25:30 +02:00
b36f9c2615 Shifting towards constant number of particles per edge
So now each edge has the same number of particles and the weight of each
particle is calculated based on the surface of each edge compared to the
total one.

Only in 2DCyl, still to extend to other geometries.

Not perfect constant density, but the issue might be the node volume.
2024-07-09 17:49:42 +02:00
fa23f9481a Issue with bibliography
Backup files are properly ignored now.
2024-07-07 14:40:26 +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
5bc064d018 Some parallel issues
Forgot to check Gmsh2 format with new changes.

Cartesian coordinates were not calculating things properly.
2024-07-07 11:53:56 +02:00
626e970d82 Some progress
Fixed an issue with random integer numbers.
Cylindrical coordinates are not perfect yet:
  - Box (cylinder) with initial constant density loses particles at r =
    0
  - Injection density still low in r = 0
2024-07-06 19:14:44 +02:00
6b5ac16e4b Still working on it
No uniform density yet...
2024-07-06 10:12:03 +02:00
b972120ed5 Switching to variable particle weight
I have to change the injection of particles. Each edge will receive a
similar number of particles and their weight will change to have a
constant density based on the geometry.

Still testing.
2024-07-04 10:56:13 +02:00