Commit graph

183 commits

Author SHA1 Message Date
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
a22099ee87 Improvement to vtu read subroutine
Some improvements to reduce code repetition when reading vtu mesh.
2023-02-06 19:18:04 +01:00
402dac9068 Update to the manual for .vtu
Manual has been updated to account for new vtu option in the mesh
format.
2023-02-05 21:44:09 +01:00
e3eeb97f48 First working version!
First complete implementation of .vtu format.
Still a lot of things to improve but right now fpakc can read a vtu mesh
and write the output in vtu.

Still to test:
  Multiple geometries.
  Double mesh.
2023-02-05 21:33:03 +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
7b470b7f58 Subroutines to read .vtu information
All subroutines to read .vtu information is ready.

Now it is time to create the input and generate a mesh for fpakc.
2023-02-05 18:32:38 +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
f5be04587a First step towards reading .vtu mesh
Just setting up the required functions.
2023-02-04 15:41:13 +01:00
6706c5dd1c Average is written in .vtu
The average of the species properties can be written now in .vtu format.
No .pvd file is provided as no time series is generated.

Still to do:
  Read a .vtu mesh.
  Improve gmsh format to use more common functions.
2023-02-04 15:20:36 +01:00
f1c0c5755f Collisions and EM field in .vtu
The collisions and EM field information is now available in .vtu files.
A collection file .pvd is provided per dataset for time-dependent
plotting.

Still to do:
  Write average quantities in .vtu
  Read mesh from .vtu
2023-02-04 12:31:33 +01:00
ceab516a5b Correction on collection file
The extension of the collection file has to be .pvd so that ParaView
properly reads it.
2023-02-04 08:54:36 +01:00
aca84d6312 First output in VTU format
Testing new VTU format.

For now, species information is ALWAYS output in .vtu (to test, this will
    be an independent format in the future).
A .pvd file is produced to do time-series.

Still to implement other outputs (electromagnetic, average,
    collisions...)

Still to implement reading a mesh from .vtu file
2023-02-03 20:14:53 +01:00
318f686051 Merge branch 'issue/forgotPrint' into 'development'
Forgot to remove some print statements

See merge request JorgeGonz/fpakc!37
2023-02-03 14:12:30 +00:00
6c34dd8a05 Forgot to remove some print statements
It is okay now. Sorry.
2023-02-03 15:11:36 +01:00
e3e87eeb9f Merge branch 'feature/injectionNormal' into 'development'
Injection of particles from surfaces direction

See merge request JorgeGonz/fpakc!36
2023-02-03 14:07:32 +00: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
3646474d3d Merge branch 'issue/ionizationBoundaryCell' into 'development'
Fix an issue in assigning cells in ionization Boundary

See merge request JorgeGonz/fpakc!35
2023-02-03 09:54:58 +00:00
a0dfc55a69 Fix an issue in assigning cells in ionization Boundary
This assigns the correct random cell when a particle is created from the
ionization boundary.

Also, the number of possible ionizations is reduced by one if there is a
suscesful ionization. This has no impact on the results.
2023-02-03 10:52:49 +01:00
d36b2db342 Merge branch 'issue/electricFieldGather' into 'development'
Incorrect tau in electrostatic pushers

See merge request JorgeGonz/fpakc!34
2023-01-13 14:38:09 +00:00
cca57d5ab0 Incorrect tau in electrostatic pushers
During the improve performant step, an error in the electrostatic
pushers was introduced, resulting in these using the minimum time step
and not the species time step when calculating the acceleration.
2023-01-13 15:32:25 +01:00
d8eb2c2c58 Merge branch 'improvement/performance' into 'development'
Performance improvement.

See merge request JorgeGonz/fpakc!33
2023-01-07 17:47:29 +00: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
22dff9ed69 Small style correction 2023-01-06 22:36:55 +01:00
600480f5d5 Reduce overhead of probes
I noticed that doProbes was causing some overhead even if no probes were
being used. Now it should be fixed.
2023-01-06 21:37:26 +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
7b7a5c45ca Small improvement
Very small improvement in performance.

Still, partialDer takes too long to compute.
Trying to find ways to improve it.
2023-01-06 15:18:04 +01:00
ba272de4e3 DOES NOT COMPILE: Break
Small break of changing functions.
Still some geometries to change.
2023-01-06 12:16: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
6f24b5f1f6 Small changes before trying something big
I think that creating arrays with self%nNodes takes a lot of time.
I'm trying now to pass the number of nodes as argument.
2023-01-05 20:32:45 +01:00
26bd73597d Small improvement for 2DCyl
Nothing important, but overhead in dPsi has been reduced.
2023-01-05 18:47:33 +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
0db76083ec fPsi no longer allocates memory
I noticed that phy2logquad had a lot of overhead. Trying to reducing it
by simplifying calls to fPsi, dPsi and such.

The function for fPsi has been made so no memory is allocated and works
under the assumption that the input array has the right size (1:numNodes)
2023-01-01 12:12:06 +01:00
c82cd50cf9 Merge branch 'issue/collisionWeight' into 'development'
Adjusting weights for collisions

See merge request JorgeGonz/fpakc!32
2022-12-31 10:25:33 +00:00
8199a228c8 Locks for particle lists are now inside the type.
The lock of a particle list is no longer an external variable, it is now
part of the type.

New procedures have been added to set and unset the lock.
2022-12-31 11:22:02 +01:00
0677684f85 Adjusting weights for collisions
Ionization and recombination collisions have been modified to have the
right products accounting for the possibility that primary electron and
target particle have different weight.
2022-12-31 10:46:25 +01:00
061dcafafe Merge branch 'feature/weighting' into 'development'
Trying to fix weighting scheme

See merge request JorgeGonz/fpakc!31
2022-12-29 18:35:02 +00:00
905d3f94a5 Trying to fix weighting scheme
Now particles can be split to increase statistics when they enter a
smaller cell. However, this only has an effect for collisions.

Still, I have to rethink a lot about this feature.
2022-12-29 19:32:38 +01:00
7c2c4ae884 Merge branch 'issue/organizeSolvers' into 'development'
Reorganization of modules

See merge request JorgeGonz/fpakc!30
2022-12-24 12:27:47 +00:00
9484502d0b Most of modules organized
Most of the modules are organized in subfolders.

Maybe some big re-organization is needed in the future, but for now I am
happy.
2022-12-24 13:26:10 +01:00
d9a1869564 Reorganization of solver
I started grouping similar modules in subfolders to ease the expansion
process.
2022-12-24 12:59:23 +01:00
37dccb2d11 Merge branch 'feature/average' into 'development'
Average scheme

See merge request JorgeGonz/fpakc!29
2022-12-24 10:42:34 +00:00
a8bea6102f Final commit for volume nodes
1D Rad is fixed.

Still there might be an issue with the triangles in 2D Cyl.
2022-12-24 11:41:12 +01:00
78763bbd84 Merge branch 'issue/volumeNode' into 'feature/average'
Fix for node volume

See merge request JorgeGonz/fpakc!28
2022-12-24 10:32:08 +00:00
e9c86b4678 Modification of Weighting scheme
The weighting scheme has been modified so that particles are splitted
without modifying the weight.

I have to look a bit more into this.
2022-12-24 11:30:20 +01:00
dd1fca3fee Fix for node volume
An issue in the node volume calculation in cylindrical coordinates was
found. This was causing wrong conservation of current. Still to test
with ALPHIE_Grid case.

Still to check triangular element.
Still to theck 1D radial geometry
2022-12-20 15:51:43 +01:00
cab07447b5 Averge scheme documented
Documentation of the average scheme for species properties.
2022-12-16 19:27:10 +01:00
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
38d28887ff Implementation of average scheme and testing
New input variables to activate the average scheme.
Still only computing the mean, no the standard deviation.

Output checked  with ALPHIE Grid example. Looks good.

No impact on CPU time, although testing is still required.
2022-12-15 08:35:00 +01:00