-
Notifications
You must be signed in to change notification settings - Fork 225
Specialize ADK for linear or circular laser polarization #1541
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -43,12 +43,15 @@ namespace particles | |
| namespace ionization | ||
| { | ||
|
|
||
| /** \struct AlgorithmADK | ||
| /** Calculation for the Ammosov-Delone-Krainov tunneling model | ||
| * | ||
| * \brief calculation for the Ammosov-Delone-Krainov tunneling model */ | ||
| * for either linear or circular laser polarization | ||
| * | ||
| * \tparam T_linPol boolean value that is true for lin. pol. and false for circ. pol. | ||
| */ | ||
| template<bool T_linPol> | ||
| struct AlgorithmADK | ||
| { | ||
|
|
||
| /** Functor implementation | ||
| * \tparam EType type of electric field | ||
| * \tparam BType type of magnetic field | ||
|
|
@@ -82,11 +85,19 @@ namespace ionization | |
| float_X dBase = float_X(4.0) * util::cube(protonNumber) / (eInAU * util::quad(nEff)) ; | ||
| float_X dFromADK = math::pow(dBase,nEff); | ||
|
|
||
| /* ionization rate */ | ||
| float_X rateADK = math::sqrt(float_X(3.0) * util::cube(nEff) * eInAU / (pi * util::cube(protonNumber))) \ | ||
| * eInAU * util::square(dFromADK) / (float_X(8.0) * pi * protonNumber) \ | ||
| /* ionization rate (for CIRCULAR polarization)*/ | ||
| float_X rateADK = eInAU * util::square(dFromADK) / (float_X(8.0) * pi * protonNumber) \ | ||
| * math::exp(float_X(-2.0) * util::cube(protonNumber) / (float_X(3.0) * util::cube(nEff) * eInAU)); | ||
|
|
||
| /* in case of linear polarization the rate is modified by an additional factor */ | ||
| if(T_linPol) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is still a run-time decision thus is not as efficient as possible. float_X polarizationFactor = TEMPLATE_PARAM::polarizationFactor;with a struct containing the value not just a bool.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The value is not
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @psychocoderHPC
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @PrometheusPi Your suggestion is not possible because like @n01r said the factor is only known at runtime. A possible solution would be to add a functor for the factor calculation but it is a little bit complicated because of the needed input values. My suggestion: (small design change) /* ionization rate */
float_X rateADK = polarizationFactor \
* eInAU * util::square(dFromADK) / (float_X(8.0) * pi * protonNumber) \
* math::exp(float_X(-2.0) * util::cube(protonNumber) / (float_X(3.0) * util::cube(nEff) * eInAU));
if(T_linPol)
{
/* factor from averaging over one laser cycle with LINEAR polarization */
const float_X polarizationFactor = math::sqrt(float_X(3.0) * util::cube(nEff) * eInAU / (pi * util::cube(protonNumber)));
rateADK *= polarizationFactor;
}Then the code is better readable.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 Yep, looks good to me. I think it's okay to stay away from overcomplicating things and not introduce a new functor for this. |
||
| { | ||
| /* factor from averaging over one laser cycle with LINEAR polarization */ | ||
| const float_X polarizationFactor = math::sqrt(float_X(3.0) * util::cube(nEff) * eInAU / (pi * util::cube(protonNumber))); | ||
|
|
||
| rateADK *= polarizationFactor; | ||
| } | ||
|
|
||
| /* simulation time step in atomic units */ | ||
| const float_X timeStepAU = float_X(DELTA_T / ATOMIC_UNIT_TIME); | ||
| /* ionization probability | ||
|
|
||
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.
Please give a struct with the float value of the polarization factor instead of a
bool.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.
the value has to be calculated during runtime -- see above
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.
OK, thanks for clarifying. 👍