Open GianlucaOberreit opened 2 months ago
A .tex file and a .pdf files have been added to the repo in this branch. I think an important work is to rewrite the information contained in this document into the standard SMilei manual (in the understand section as well as in the namelist section).
The case tstAM_14_envelope_ionization_linear_polarization.py
fails on error
[ERROR](0) src/Ionization/IonizationFactory.h:34 (create) The ionization model for species interacting with envelope is tunnel_envelope_averaged
There seems to be a problem with the handling of ionization in the presence of a laser envelope.
With the latest fix, all ionization tests of the CI passed.
All 1D and 2D standard CI tests passed as well. I will run some final performance tests and I think it is going to be ok for me.
I have tried a case where nitrogen 5+ is ionized. It has a laser intensity a0 = 3. WhenI switch from tunnel
to tunnel_BSI
there are no electrons created at all. This is extremely suspicious and needs to be investigated.
This test case is available in /sps3/beck/smilei/benchmark_ionization
.
I confirmed with an old executable that, even with tunnel_BSI
there should be some electrons created by ionization. Therefore there is a problem with this templated version.
With these correction some electrons are ionized as expected. Differences are observed with the previous implementation though. This still needs to be clarified.
This pull request combines the ionization models proposed in the for merge pull request by Arseny Mironov into a single template. This branch is a work in progress that needs to be tested and polished.
The template is give by
template <int Model> class IonizationTunnel
whereModel=0
gives the original Smilei behaviour,Model=1
gives the new IonizationTunnelFullPPT model and so forth.The main changes are that the monte carlo routine in the
()
operator overload method is pulled out into its own template method which is common to all the ionization models. This istemplate <int RateId> monteCarloRoutine
. in this method, the class'Model
template parameter is used to determine what ionization rate will be used, the ionization rate being the only difference within the routine between all the models. TheRateId
template parameter is needed to tell themonteCarloRoutine
what rate to use in the case of the BSI model, which uses different rates depending on some values.It is important to note that in the original implementation of the BSI model in the for merge branch in the src/Ionization/IonizationTunnelBSI.cpp file, at lines 146 (bsi-linear) and 235 (bsi-quadratic), there is
i <= k_times+1
as opposed to thei < k_times+1
found in all the other ionization rates (including the tunnel in the same file, line 325). This change is not currently implemented, although it should be trivial. Neither Mironov nor I know why this is the case.