-
Notifications
You must be signed in to change notification settings - Fork 18
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
Enable to initialize spatial/temporal/angular chirped laser + CI test with LASY #1196
base: development
Are you sure you want to change the base?
Conversation
Discussed offline: this PR should include CI using LASY for laser analysis before it can be merged. |
…huixingjian/SF_fix
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.
Thanks for this PR! See comments attached. I did not check the formulas, but considering the sensitive test, this should be good to go.
src/laser/Laser.cpp
Outdated
bool length_is_specified = queryWithParser(pp, "L0", m_L0); | ||
bool duration_is_specified = queryWithParser(pp, "tau", m_tau); | ||
AMREX_ALWAYS_ASSERT_WITH_MESSAGE( length_is_specified + duration_is_specified == 1, | ||
"Please specify exlusively either the pulse length L0 or the duration tau of gaussian lasers"); | ||
"Please specify exlusively either the pulse length L0 or the duration tau of the laser"); |
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 specify exlusively either the pulse length L0 or the duration tau of the laser"); | |
"Please specify exlusively either the pulse length L0 or the duration tau of the laser"); |
bool length_is_specified = queryWithParser(pp, "L0", m_L0); | ||
bool duration_is_specified = queryWithParser(pp, "tau", m_tau); | ||
AMREX_ALWAYS_ASSERT_WITH_MESSAGE( length_is_specified + duration_is_specified == 1, | ||
"Please specify exlusively either the pulse length L0 or the duration tau of gaussian lasers"); | ||
"Please specify exlusively either the pulse length L0 or the duration tau of the laser"); | ||
if (duration_is_specified) m_L0 = m_tau * get_phys_const().c; |
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 think this was duplicated by error.
if (duration_is_specified) m_L0 = m_tau * get_phys_const().c; |
Co-authored-by: Maxence Thévenet <maxence.thevenet@desy.de>
This PR adds three optional parameters: temporal chirp
<laser name>.phi2
, spatial chirp<laser name>.zeta
, angular chirp<laser name>.beta
, to initialise spatio-temporal coupling based on Gaussian lasers (see docstring in this PR). All of them are set to be conform to the definition in [Akturk, 2004].The parameters could be tested through the following formula, with the laser envelope expressed as$a=a_0e^{i\theta}$ :
$\Phi^{(2)} = \frac{4\phi^{(2)}}{4(\phi^{(2)})^2+\tau^4}$ $\tau$ is duration in s, and $\phi^{(2)} $ , and $\Phi^{(2)}$ can be calculated by $\frac{\partial^2 \theta }{\partial t ^2}$ .
Here
laser.phi2
refers to group-delay dispersionSimilarly, the spatial chirp is tested through:
$\nu = \frac{4\zeta c}{w_0^2L_0^2(1+4\zeta^2L_0^2)}$ $L_0$ and $w_0$ are the laser duration and laser waist respectively. $\zeta$ is $\nu = \frac{\partial^2 \theta }{\partial z \partial y} $
Here
laser.zeta
, andFinally, the angular chirp term is tested through:
Here$k_0$ is laser wavenumber and $p$ is the pulse front tilt.
This PR also added on one CI test to check the correctness of these initial parameters