Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Improvements of the laser envelope extension #281

Merged
merged 11 commits into from
Aug 17, 2023

Conversation

MaxThevenet
Copy link
Member

@MaxThevenet MaxThevenet commented Aug 3, 2023

This PR proposes the following improvements to the EXT_LaserEnvelope extension:

  • isLaserEnvelope is a required attribute, rather than optional.
  • The standard supports both z and t representations for the longitudinal axis. Attributes isSpatial contains this info.
  • The standard supports both electric field (V/m) and vector potential a0. Attributes isNormalized contains this info.

While the first point is minor and the second point has been discussed in the context of LASY, the last point is relatively new. Supporting the normalized vector potential (or at least the SI vector potential) can be important as this is what appears in the ponderomotive force, and what is implemented in envelope solvers. As the conversion from field to vector potential can be non-trivial in a simulation code (it required the knowledge of the local frequency, which comes from a derivative of the phase, and can be cumbersome to implement in a robust way), I believe it is useful for the standard to accept both. An alternative approach would be to add, as an attribute, another array containing the local frequency, so the reconstruction in simulation codes is made easier.

@ax3l ax3l requested review from ax3l and RemiLehe August 7, 2023 16:10
@ax3l ax3l added the EXT: LaserEnvelope Description of laser pulses. label Aug 7, 2023
@ax3l
Copy link
Member

ax3l commented Aug 7, 2023

This sounds great. My only thought is, do we want to have a non-binary option instead of isNormalized? I think that normalizing by:

  • peak V/m
  • peak a0
  • total energy
  • V/m @fwhm
  • a0 @ FWHM
  • ...

are other options often used in experimental measurements. We could stay extensible if we only standardize a few strings for now: normalization=

  • "peak_a0"
  • "peak_Vm"
  • "energy_J"
  • "fwhm_a0"
  • "fwhm_Vm"
  • ...

@RemiLehe
Copy link
Member

RemiLehe commented Aug 9, 2023

Hm, I think that the name isNormalized might be confusing: it maybe suggests that this just changes the field by a normalizing constant, whereas that is not the case.
The fields that are stored with isNormalized = false and isNormalized = true are not simply proportional to each other - since in one case the field is the electric field and in the other case it is the vector potential.

Maybe we could have something more explicit like, envelopeField = 'electric_field' or envelopeField = 'normalized_vector_potential'. (Btw, having this single metadata could replace both isEnvelope and isNormalized.)

@MaxThevenet
Copy link
Member Author

MaxThevenet commented Aug 10, 2023

@ax3l Thanks, I think that, as Remi pointed out, the name isNormalized was confusing: vector potential and electric field are two different things, as seen on the figure below (from a realistic FBPIC simulation, these are temporal profiles, sorry there's no axes). I think we can start with just the 2 options, and maybe add some others later, but maybe it's good to be quite restrictive here, to make the standard lightweight?
Screenshot 2023-08-10 at 09 09 02

@RemiLehe Thanks, this is better indeed. So to check if an openPMD file complies with the EXT_LaserEnvelope, one would check if envelopeField is present, and which of the 2 possible values it has? I'll make the change, and we can have another round before merging.

@MaxThevenet
Copy link
Member Author

I made the changes :)

Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
@ax3l ax3l merged commit 66fae92 into openPMD:upcoming-2.0.0 Aug 17, 2023
@ax3l
Copy link
Member

ax3l commented Aug 17, 2023

This is great, thank you! :)

@MaxThevenet MaxThevenet deleted the laser_envelope branch August 17, 2023 15:53
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
EXT: LaserEnvelope Description of laser pulses.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants