-
Notifications
You must be signed in to change notification settings - Fork 217
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Start simulation with neutral atoms #768
Start simulation with neutral atoms #768
Conversation
If ionization is chosen to be enabled by the parameter set then no electrons will be initialized but only ions. Immediately after initializing them their attribute `boundElectrons_` will be set to the number of protons chosen for the respective ion species.
The ionization energies and the necessary ionization field strengths are now stored in `PMACC_CONST_VECTOR()` arrays and can be accessed by the ionization algorithm according to the current charge state. Also with recent changes to the paramSets by @psychocoderHPC the cmake flag for the gas shape has been removed.
great job 👍 |
Like it! |
well done @n01r, let's review the changes! :) |
@@ -41,7 +41,7 @@ flags[8]="-DCUDA_ARCH=sm_20 -DPARAM_OVERWRITES:LIST=-DPARAM_DIMENSION=DIM2" | |||
flags[9]="-DCUDA_ARCH=sm_20 -DPARAM_OVERWRITES:LIST=-DPARAM_CURRENTSOLVER=Esirkepov;-DPARAM_PARTICLESHAPE=CIC;-DPARAM_DIMENSION=DIM2" | |||
flags[10]="-DCUDA_ARCH=sm_20 -DPARAM_OVERWRITES:LIST=-DPARAM_PRECISION=precision64Bit;-DPARAM_DIMENSION=DIM2" | |||
flags[11]="-DCUDA_ARCH=sm_35 -DPARAM_OVERWRITES:LIST=-DENABLE_CURRENT=0;-DPARAM_DIMENSION=DIM2" | |||
flags[12]="-DCUDA_ARCH=sm_35 -DPARAM_OVERWRITES:LIST=-DPARAM_GASPROFILE=gasSphereFlanks;-DPARAM_IONS=1;-DPARAM_IONIZATION=1" | |||
flags[12]="-DCUDA_ARCH=sm_35 -DPARAM_OVERWRITES:LIST=-DPARAM_IONS=1;-DPARAM_IONIZATION=1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hm, why did you change that? do you mind reverting that change (or moving gasSphereFlanks up to DIM2
would also be ok).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed it because @psychocoderHPC 's big pull request #730 removed all of the gas configuration via cmake flags. Test case 12 was originally introduced by me anyway. I plan to make gas droplet studies later but for now this -DPARAM_GASPROFILE=gasSphereFlanks
was totally without effect for all of the structure was changed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah true, thanks!
looks great to me! ✨ just some inline questions left. |
Start simulation with neutral atoms
great work, well done! 👍 |
Yay that was fast ⏩ |
It will be possible from now on to start the simulation neutrally with un-ionized atoms.
Therefore the number of electrons bound to the core is set to the number of protons of the ion species via the
manipulator
concept during initialization.Furthermore ionization energies and the fields necessary to overcome them are now stored in
PMACC_CONST_VECTOR()
arrays and can be accessed by the ionization algorithm according to the current charge state.This allows now for any chemical element to be implemented. With it also comes for free that the effective charge of the initialized atoms is equal to zero because it is calculated from the
numberOfProtons
and the number ofboundElectrons
.If you happen to implement different elements as species, remember to change the weight of the atom / ion accordingly. A more generic approach should follow in due time.
In the picture above a simulation result of Hydrogen atoms being ionized can be seen (electron density is depicted). I guess that these funny "filament-structures" are being caused by the step-like nature of the BSI algorithm.