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

Pulsed plane-wave fields #14

Merged
merged 22 commits into from
Jan 11, 2024

Conversation

szabo137
Copy link
Member

@szabo137 szabo137 commented Oct 6, 2023

This PR adds an abstract interface for dealing with pulsed plane-wave fields in the context of pulsed-perturbative QED. As the root type of all background fields, to be used in the strong field part of QED.jl, we introduce the abstract base type AbstractBackgroundField. However, the interface is currently defined for pulsed plane-wave fields (see below).

Definition of the interface

The base type of the interface is AbstractPulsedPlaneWaveFields, where the following interface functions are mandatory

reference_momentum(::AbstractPulsedPlaneWaveFields) # return the reference momentum of the field
domain(::AbstractPulsedPlaneWaveFields) # return the interval, on which the BG field is non-zero
phase_duration(::AbstractPulsedPlaneWaveFields) # return the extent of the BG field in the phase variable phi
_pulse_envelope(::AbstractPulsedPlaneWaveFields, phi::Real) # return the value of the envelope function of the BG field in the phase variable phi, i.e. the phase profile 

The first three functions are just accessor functions for static properties of the background field. The last function _pulse_envelope defines the shape of the pulse, and it only needs to be implemented on one single value of $\phi$. With that, the following functions were implemented as well

pulse_envelope(::AbstractPulsedPlaneWaveFields,phi::Real) # return the value of the envelope function at phi if phi is in the domain, and zero otherwise
_amplitude(::AbstractPulsedPlaneWaveFields, pol::AbstactDefinitePolarization,phi::Real) # return envelope times oscillator for given polarisation direction
amplitude(::AbstractPulsedPlaneWaveFields, pol::AbstactDefinitePolarization,phi::Real) # same as _amplitude, but return zero if phi is not in the domain
generic_spectrum(::AbstractPulsedPlaneWaveFields,pnum::Real) # return the Fourier transform of the amplitude at a given pnum

For each function, which is defined for phi::Real or pnum::Real, the respective version for multiple values, i.e. phi::AbstractVector{<:Real} and pnum::AbstractVector{<:Real} is also implemented.

For the generic spectrum, the implementation is simply based on QuadGK and therefore worthy of improvement.

Todos

  • remove temporary file src/QEDbase_polarisation_mock.jl before merging this. This needs Move particle definitions from QEDprocesses.jl to QEDbase.jl QEDbase.jl#25 to be merged in QEDbase.jl and the respective release.
  • add integration tests for polarisation types from QEDbase
  • write docstrings for the exported functions
  • open issue on the enhancement of the default implementation of generic_spectrum.

@szabo137
Copy link
Member Author

szabo137 commented Oct 9, 2023

Currently in draft status, because it depends on QEDjl-project/QEDbase.jl#25

@szabo137 szabo137 marked this pull request as ready for review November 7, 2023 13:02
@szabo137
Copy link
Member Author

szabo137 commented Nov 7, 2023

@steindev This should be ready for final review now. I do not include elliptic polarization in this PR, because it is already fairly extensive. However, I opened #21 to include this in another PR.

Copy link
Member

@steindev steindev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review interfaces. Rest is missing. But you do things at the moment.

src/interfaces/background_field_interface.jl Outdated Show resolved Hide resolved
src/interfaces/background_field_interface.jl Outdated Show resolved Hide resolved
src/interfaces/background_field_interface.jl Show resolved Hide resolved
src/interfaces/background_field_interface.jl Outdated Show resolved Hide resolved
src/interfaces/background_field_interface.jl Show resolved Hide resolved
src/interfaces/background_field_interface.jl Outdated Show resolved Hide resolved
src/interfaces/background_field_interface.jl Show resolved Hide resolved
src/interfaces/background_field_interface.jl Show resolved Hide resolved
Copy link
Member

@steindev steindev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed all files now. Overall very good. Minor questions and comments.

src/interfaces/background_field_interface.jl Show resolved Hide resolved
src/interfaces/background_field_interface.jl Show resolved Hide resolved
src/polarization.jl Show resolved Hide resolved
test/interfaces/background_field_interface.jl Show resolved Hide resolved
src/polarization.jl Outdated Show resolved Hide resolved
test/interfaces/background_field_interface.jl Outdated Show resolved Hide resolved
test/interfaces/background_field_interface.jl Outdated Show resolved Hide resolved
test/polarization.jl Show resolved Hide resolved
src/polarization.jl Show resolved Hide resolved
src/polarization.jl Outdated Show resolved Hide resolved
src/QEDfields.jl Outdated Show resolved Hide resolved
@steindev
Copy link
Member

@szabo137 It seems you forgot a few comments. Apart from that, I am mostly fine with your revision.

Copy link
Member Author

@szabo137 szabo137 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I addressed all open comments. Hopefully this time, no comment is hiding from me 😅

test/interfaces/background_field_interface.jl Outdated Show resolved Hide resolved
test/interfaces/background_field_interface.jl Outdated Show resolved Hide resolved
test/interfaces/background_field_interface.jl Show resolved Hide resolved
src/interfaces/background_field_interface.jl Outdated Show resolved Hide resolved
src/interfaces/background_field_interface.jl Show resolved Hide resolved
@steindev steindev merged commit 0a73189 into QEDjl-project:dev Jan 11, 2024
4 checks passed
@AntonReinhard AntonReinhard added this to the Release-0.1.0 milestone Aug 6, 2024
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