Closed n01r closed 9 years ago
yes, atoms/neutrals should also be a separate species (besides "ions"/partly ionized atoms and electrons) since one can use easier pushers and neglect the expensive current deposition for them.
for that, re-sorting (party) ionized atoms in one (or more) ion species is necessary.
Yep, I thought of that, too ... My thinking was: Initialize atoms, ionize them with background field or pre-pulse and then change their species type to ions. But I got scared by the hacking that would be necessary and thus classified this as not-so-immediate-future.
what I mentioned is a specific optimization. what we should start with is:
generate all ion species and clone electrons out of them (during init time and/or during ionization). that also allows to start quasi-charge-neutral, even for compound materials such as frozen methane (CH_4). for the meantime, we can simply push/"deposit" neutral atoms as we push ions. that does not harm the physics as long as we put in q=0.
(I am sorry that was not yet documented in an issue - that's the plan I told @psychocoderHPC before as he implemented multiple species. nevertheless, most of the examples still do it the other way around - but that is only due to historic reasons and can be rewritten easily. the reason the lwfa example does it that way is: one can simply deactivate/remove the ions in a lwfa PIC sim to assume an immobile ion background.)
Done!
Instead of initializing electrons and ions separately the simulation could start with neutral atoms which get then ionized by a pre-pulse or background field.
Right now it is not possible to initialize only atoms because they get cloned out of the electrons.
Also it is not possible, yet, to set up more than two species because there are no rules how to instantiate them. It would be possible with #640, though but also there is no plugin support for this, yet.