Skip to content
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

Reorganising of Mironov's for merge pull request into templates #741

Draft
wants to merge 13 commits into
base: develop
Choose a base branch
from

Conversation

GianlucaOberreit
Copy link

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 where Model=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 is template <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. The RateId template parameter is needed to tell the monteCarloRoutine 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 the i < 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.

ArsenyMironov and others added 6 commits August 27, 2024 15:17
Define a new common monteCarloRoutine method in the Ionization class
that is called by the () operators of all Ionization children. Also move
the common parts of the initialisation of the children to the Ionization
class.
Rewrite IonizationTunnel and the new models introduced by Mironov to be
more compact and use templates.
@beck-llr
Copy link
Contributor

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).

@beck-llr
Copy link
Contributor

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.

@beck-llr
Copy link
Contributor

With the latest fix, all ionization tests of the CI passed.

@beck-llr
Copy link
Contributor

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.

@beck-llr
Copy link
Contributor

beck-llr commented Sep 4, 2024

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.

@beck-llr
Copy link
Contributor

beck-llr commented Sep 4, 2024

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.

@beck-llr
Copy link
Contributor

beck-llr commented Oct 3, 2024

With these correction some electrons are ionized as expected. Differences are observed with the previous implementation though. This still needs to be clarified.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants