Commit graph

449 commits

Author SHA1 Message Date
3083e20ff7 Subroutine for reading mesh
It is now complete and working. I also added some minor improvements to moduleMesh.f90 using 'associate' to practice.

I noticed there are a lot of things (allocating K, for example) that are common for all meshes and should be moved to a general module.
2026-01-22 14:06:20 +01:00
7d4f4b98c3 Implementing input subroutines 2026-01-19 15:37:31 +01:00
9f9bacca7c Skeleton implementation of text mesh for simple 1D cases. 2026-01-19 14:48:06 +01:00
d5bcf8ce50 Merge branch 'issue/triangles' into 'development'
Fixed issue with volume in triangles

See merge request JorgeGonz/fpakc!56
2025-10-11 12:01:28 +00: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
c9b551458d Merge branch 'citationFile' into 'development'
Add citation file

See merge request JorgeGonz/fpakc!55
2025-09-24 17:34:24 +00:00
9d789ef7a6 Add citation file
I think it follows the standard.
2025-09-24 19:33:25 +02:00
b1f21a2c02 Merge branch 'IEPC2025' into 'development'
Merge IEPC2025

See merge request JorgeGonz/fpakc!54
2025-09-23 16:42:04 +00:00
dff9a87f0d Implemenint injecting particles without direction
I was almost sure this was implemented in the past, but it was not working.

Now, if n = 0 or if n is not provided, particles are injected with the normal to the surface.
2025-08-08 19:27:27 +02:00
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