INP-PM / FEDM

Finite Element Discharge Modelling code
https://inp-pm.github.io/FEDM/
GNU Lesser General Public License v3.0
10 stars 4 forks source link

Particles Class #13

Open RaphaelPile opened 1 year ago

RaphaelPile commented 1 year ago

Hello everyone,

I would like to discuss the interest of including a "Particle" class in the code architecture. There is already two different ways to input the particles properties (manually in tof example, or from files with the two others).

I propose to have a more generic structure which enable to get the mobility and diffusion coefficients as function of the electrical field through getters. Thus, every "Particle" object should have a "get_mobility_coeff", "get_diffusion_coeff", "get_source_term" etc... Depending on the type of the inherited class, these methods would either load a constant value, load data from file and interpolate etc...

Then the whole solving process could be to solve the convection system on a dict of "Particle" objects. The interest of the dict (instead of a list) would be to ease the coupling between different kind of particles (in particular between mean-energy and electrons).

What do you think of such architecture ?

Raphaël

AleksandarJ1984 commented 1 year ago

Hi Raphaël,

That seems like a good idea. I guess this would make the reimplementation of the equations when the whole model needs to be reset (for changing the mesh in case of remeshing, for example) easier. However, this part about coupling between different kinds of particles is not quite clear to me, so it would be good if you give an example of how this would work.

Note that the present version is made to be compatible with the existing input data, so we need to be careful not to break something.

Best regards, Aleksandar

markus-m-becker commented 1 year ago

Modularisation and generic structure is a good idea. It would be best to developed this in a separate branch, which can be merged as soon as it works (maybe with new input format).