APP下载

BRIGHT:the three-dimensional X-ray crystal Bragg diffraction code

2019-04-01NanShunHuangKaiLiHaiXiaoDeng

Nuclear Science and Techniques 2019年3期

Nan-Shun Huang·Kai Li·Hai-Xiao Deng

Abstract In pursuit of a fully coherent X-ray free-electron laser(FEL),highly reflective Bragg crystals are used and will be used as a highly selective spectral filter in hard X-ray self-seeding FELs and X-ray FEL oscillators(XFELO),respectively.However,currently,when simulating self-seeding and XFELO,the three-dimensional effect of Bragg diffraction is not fully considered.In this paper,we derive a comprehensive solution for the response function of the crystal in Bragg diffraction.A three-dimensional X-ray crystal Bragg diffraction code,named BRIGHT,is introduced,which can be combined with other FEL-related codes,e.g.,GENESIS and OPC.Performance and feasibility are assessed using two numerical examples,namely a self-seeding experiment for the linac coherent light source and XFELO options for Shanghai high repetition rate XFEL.The results indicate that BRIGHT provides a new and useful tool for three-dimensional modeling of FEL.

Keywords X-ray·Bragg diffraction·Self-seeding·XFELO

1 Introduction

The discovery of X-rays in 1895 triggered a huge amount of innovative scientific inquiry.X-rays from a highly relativistic electron beam have emerged as a powerful light source for probing in biology,chemistry,and materials research[1].A free-electron laser(FEL)is the next-generation X-ray source,whose peak brightness is about ten orders of magnitude over those of traditional third-generation synchrotron light sources[2,3].Several X-ray FEL user facilities have been successfully operated in the past decade[4—8],while other X-ray FEL light sources are under construction around the world.Nevertheless,almost all hard X-ray FEL facilities were inevitably based on self-amplified spontaneous emission(SASE)[9],which is caused by the noise of the electron beam shot.SASE FEL typically has limited temporal coherence with a spiky spectrum.

Therefore,the temporal coherence of hard X-ray FEL has been a topic of great interest,and self-seeding has been theoretically proposed and experimentally demonstrated[10—12].The self-seeding scheme uses the first undulator section to generate moderate SASE radiation.Then,the delayed monochromatic seed can be provided via a crystal monochromator,which employs forward Bragg diffraction(FBD).Finally,this monochromatic seed is amplified in the second section of the undulator to produce fully coherent X-rays.

The X-ray FEL oscillator(XFELO)is an alternative scheme to generate stable,fully coherent radiation[13,14].The physics and technologies of the FEL oscillator were tested and proven decades ago for the long wavelengths,such as in the infrared and ultraviolet regions[15—17].However,XFELO can only use crystal mirrors that have high reflectivity due to Bragg diffraction(BD)at a narrow bandwidth in the X-ray region.Recently,with the development of the Bragg crystal[18,19],the XFELO scheme was reconsidered,and some practical technical problems were studied[20—24].

Because XFELO and the self-seeding FEL involve the interaction between X-rays and the crystal,an additional algorithm is needed for describing the Bragg diffraction.In previous studies,the algorithms for calculating Bragg diffraction were used in a one-dimensional manner[14,25,26],i.e.,the 3D radiation field is usually transformed into one dimension for crystal reflection and then artificially transformed back to 3D in the simulation.The one-dimensional method smears out the transverse phase information entirely and ignores some critical 3D effects,including the wave front,which are essential for transverse modes[25].This paper describes the theory and implementation of a three-dimensional(3D)Bragg diffraction code,named BRIGHT,which can be combined with GENESIS and OPC in 3D self-seeding FEL and XFELO simulations.For this purpose,we derive a comprehensive theoretical solution for the response function,including the 3D effect of excitation by a finite-length X-ray pulse.This response function is based on the previous research[27,28]of the spatiotemporal response function of crystal in Bragg diffraction.BRIGHT focuses on the interaction between X-rays and crystals in both reflection and transmission geometries to satisfy the requirements of the self-seeding FEL and the XFELO numerical simulation.

2 The theory of BRIGHT

To describe the X-ray crystal diffraction phenomenon more rigorously,dynamical theory,where multiple scattering is considered,has been introduced[29].In this section,the solutions of dynamical theory in the two-beam case are derived.Then,the 3D effects are considered.Finally,practical strategies are proposed to perform numerical simulation and to implement BRIGHT.

2.1 Two-dimensional Bragg diffraction

A plane monochromatic electromagnetic wave propagating in the vacuum can be written as

The wave frequency can be expressed as ω =E/¯h,where E is the photon energy.The magnitude of the wavevector in the vacuumis expressed by the wavelength λ and E as=K=2π/λ =E/hc.The incident wave propagates in the crystal and interacts with the electron density distributed around the atomic sites.These interactions could excite a wave inside the crystal with electric vectorThe spatial partcan be obtained via the wave equation.

Since a perfect crystal has a periodic array of atoms,the assumed solution of the wave equation is a Bloch wave which is composed of an in finite number of plane waves,

Fig.1(Color online)Schematic diagram of the two-dimensional X-ray Bragg diffraction in the reflection geometry.The wavevector of the incident and reflected waves is K0 and KH,respectively.Blue lines depict the reflecting atomic planes.H is the diffraction vector for the special atomic plane,and the unit vector z^ is inward normal to the crystal surface.η is the angle between the crystal surface and the atomic plane.γ=with γ=and γ=is the asymmetry0 H ratio for not highly asymmetric reflection.

For the perfect crystal,in general,there are only two reciprocal lattice points on the Ewald sphere,which contribute significantly to the solution of the fundamental equations[30].Because of this feature,we shall assume that the excitation condition is ful filled for the two particular waves with the two wavevectors denoted byand[28,30].According to Eq.(2),by correlating eigenvalues of the fundamental equation and the boundary conditions when the wave enters and leaves the crystal,the transmission and reflection amplitude measured at the rear and the front surfaces of the crystal are[28]:

where

The subscript ν indicates two possible solutions of Yν,where it is assumed that the root in Yνis positive and the index ν=1 corresponds to the ‘‘+''sign in Yν. χ,which characterizes the interaction between X-rays and matter can be written aswhereis the reciprocal lattice vector and the coefficients χHand χ0are the Fourier components of the susceptibility.α describes the deviation of the incident wave from the Bragg condition,which is proportional to the magnitude of the difference between the wavevector inside crystal and the vacuum wavevector.y is a reduced parameter called deviation parameter[30].P is the polarization factor,while P=1 for σ-polarization and P=cos2θBfor π-polarization.d is the thickness of the crystal,Rνis the ratio of DH(ν)and D0(ν),where DH(ν)is the reflected wave and D0(ν)is the transmitted wave[28].

ΛBis the extinction depth in the reflection geometry,and Λ0=2πΛBis defined as the Pendello¨sung distance in the transmission geometry.The full width at half maximum(FWHM)of the rocking curve in the transmission geometry and the width of the total reflection domain in the reflection geometry,called Darwin width,are 2Re(δ) with

2.2 Three-dimensional effect of Bragg diffraction

To simulate the interaction between X-rays and a crystal,an X-ray pulse is decomposed into monochromatic plane wave components using the Fourier transform(FT).For each monochromatic plane wave,it multiplies the relative diffraction amplitude R0Hto calculate Bragg diffraction or multiplies R00for calculating forward Bragg diffraction.Then,the inverse Fourier transform(IFT)is unitized to obtain the diffracted wave amplitude.

Following the previous discussion and the deduction in Ref.[31],we present the spatiotemporal response function of the Bragg diffraction for a finite-length X-ray pulse.The monochromatic Bragg diffraction field)and forward Bragg diffraction field)of the crystal,with initial field amplitudes εi,frequency ω0,and glancing anglerelative to the atomic plane around the central angle θ,are

where

As we mentioned in the previous subsection,the subscript H means reflected(diffracted)one and the subscript 0 means transmitted (forward diffracted) one. The wavevectorof the Bragg diffraction fielddetermined on the entrance surface in the case of Bragg geometry with an arbitrary glancing anglearound the angle θ is shown in Fig.2.Ω is the deviation from the Bragg's law.φ and ψ are presumed to be small for a typical low-divergence X-ray FEL,and we exclude all of their high-order terms.The wave number component inandis much less than along;their effect on the additional momentum transfer ΔHis negligible.Following the deduction in Ref.[23],the spatiotemporal radiation following Bragg diffraction can be rewritten as:

Fig.2(Color online)Schematic presentation of 3D X-ray Bragg diffraction in the reflection geometry.As defined in Ref.[31],,,are the coordinate axis directions for incident radiation,while,and=-are the coor-dinate axis directions for the diffracted radiation beam.(θ),assumed to propagate along the direction of the unit vector,is the central wavevector of the incident radiation pulse and has the reflected wavevector(θ).θ is the glancing angle of incidence,and is the reciprocal crystal lattice vector.For the frequency ω(θ),the Bragg's law reads as ω(θ)sin θ =Hc/2.The incident radiation component propagates along)with the glancing angle ofto the reflecting atomic planes,creating an angle of φ with the scattering plane.The angle between(θ)and),which is the projection ofonto the scattering plane,is ψ

The quantity D,the normalized angular dispersion rate,defined in Ref. [27], can be expressed as D=-(1+ γ)tanθ.It is a measure of the variation of the propagation direction of the diffracted wave.The spatiotemporal envelope function∏represents the transverse profile of the radiation beam.It can be written as the Fourier integral of the angular profile:

f(Ω,ψ,φ)is the 3D Fourier transform of the incident pulse.For 3D Bragg diffraction simulation,we must directly take the 3D Fourier transform.However,enormous resources have been spent on computing the Fourier transform in this way due to an odd number of grid points,which is incompatible with the fast Fourier transform(FFT)of the GENESIS output data.With reasonable approximations,we split the 3D radiation field along the longitudinal axis at the grid transverse coordinates at transverse coordinates v0and w0in Eq.(11)and take the Fourier transform of each longitudinal wavelet to get the function ∏(Ω,v0,w0)and avoid taking the 3D Fourier transform directly.

In practice,the steps to obtain the 3D radiation pulse after Bragg diffraction are:First,take the FFT of each longitudinal wavelet at a fixed transverse coordinate;then,multiply them by the corresponding monochromatic wave diffraction amplitude function R0Hor R00and obtain the radiation wavelet after Bragg diffraction by IFFT;and then recombine the 3D radiation at the previous transverse coordinate; finally,substitute the transverse variable vHwith vH- τHc cotθ or v0with v0- τ0c cotθ,which represents a spatial transverse shift due to Bragg diffraction of the crystal.The final step in this study is negligible for XFELO,since θ ≈ 0 causes cotθ ≈ 0.The following sections present how they address this step and contribute to achieving the goal of reliable FEL simulation.

3 The framework of BRIGHT

Fig.3 The framework of BRIGHT

Figure 3 presents the structure of the BRIGHT code.For greater convenience,several divisions of BRIGHT by functions have been envisaged.The crystal diffraction amplitudes can be calculated only once for all subsequent FEL simulations.For instance,the XFELO simulation contains hundreds of Bragg reflections of the same crystal,but the theoretical reflectivity of the crystal remains unchanged,and there is no need to calculate the diffraction amplitude for every round-trip.Therefore,the framework of BRIGHT is comprised of two main parts.First,the diffraction amplitude functions R0Hand R00are calculated using Eqs.(3)and(4)with the required crystal information.The second one controls the interaction of the crystal with radiation.The 3D radiation was split along the longitudinal axis with the transverse grid size ncar×ncar.The amplitude of the radiation along the longitudinal axis is then converted into a spectrum using FFT.To obtain the interaction between the crystal and the radiation,the spectral amplitudes are multiplied by R0Hor R00,which are defined in Eqs.(3)and(4),respectively.The final radiation amplitude can be obtained using IFFT.Finally,the resulting radiation is recombined into 3D radiation in the previous transverse coordinates.

BRIGHT implements multicore parallel computing with Python scientific library NumPy[32]and other IO interfaces.BRIGHT mainly assists GENESIS in 3D FEL simulations and provides a completely transparent programming interface and integration tools for communication with GENESIS.BRIGHT supports the GENESIS output format,which means that the parameters to control the output of BRIGHT are the same as in GENESIS.De finitions of these parameters,i.e.,ncar and nslices,can be found in the manual of GENESIS.Note that many of these parameters require a good understanding of their effects on the output radiation while changing them.

4 Example of XFELO simulation

The first hard X-ray FEL user facility in China called SHINE is under design[31,33—37].Table 1 lists the parameters of a sample XFELO system for SHINE.With the help of a photocathode electron gun and a superconducting linac,SHINE can produce relativistic electron beams with the energy of 8 GeV and 1 MHz repetitionfrequency.In addition,the undulator lines that can cover the photon energy of 0.4—25 keV hold a high potential for XFELO operation.Figure 4 presents a schematic layout of the optical cavity of XFELO.Two Be parabolic compound refractive lenses(CRLs)with a focal length of f=57.7 m are used for X-ray focusing[24].Two bending magnets(B1,B2)are used to change the direction of the electron beam.Three undulator cells are employed,and the cavity length would be approximately 150 m to match the high repetition frequency of the electron beams[31].

Table 1 Main parameters of the SHINE

The first two columns in Fig.5 show the theoretical Bragg reflectivity(red line)with the related phase(blue line)calculated by BRIGHT.The peak reflectivity of the upstream mirror has reached 95%,while the peak reflectivity of the downstream mirror is 80%.Note that in order to guarantee enough power in the optical cavity and to ensure sufficient output,the downstream mirror has a lower reflectivity.The Darwin width predicted by BRIGHT is approximately 10 meV with a photon energy of 14.3 keV,which is primarily due to a full coherence.

Another significant improvement is that the simulation results by BRIGHT preserve the entire transverse phase distribution,which is bene ficial for constructing eigenmodes.The distant evolution of the transverse intensity of the radiation pulse is shown in Fig.6.The fact that a stable output(after approximately 90 rounds),shown in the third column of Fig.6,is completely dominated by one near-Gaussian transverse mode means that it is transversely coherent(diffraction limited).Meanwhile,the transverse phase is nearly the same for points in the central area shown in Fig.7(third column).In addition,3D simulation gives a smaller transverse radiation size and a higher gain in a single pass,which can generate higher radiation power,as shown in[31].The third column in Fig.5 illustrates the evolution of RMS radiation size at the undulator exit in 3D simulation(red)and 1D simulation(blue).It takes more round-trips for generating a stable transverse mode for XFELO in 3D simulation than in 1D simulation.In the XFELO operation,a longer undulator will be implemented,the drift space will be suppressed,and the optical cavity will be more sensitive than in a conventional FEL oscillator.Thus,3D effects are essential for XFELO simulation.The one-dimensional method can undermine stable conditions,destroy the transverse information and decrease the power of the X-ray pulse in the XFELO simulation.

Fig.4(Color online)Schematic view of the XFELO system of SHINE

Fig.5(Color online)The reflectivity of a sapphire(0 0 0 30)mirror calculated by BRIGHT.The reflectivity of the upstream mirror has reached 95%,while the reflectivity of the downstream mirror is 80%to match the stable conditions of the optical cavity.The third column shows the evolution of the transverse RMS radiation size on undulator exit of the 3D XFELO simulation using BRIGHT(red)and the 1D method(blue)

Fig.6(Color online)The transverse intensity of a single pulse at the round-trip numbers 10,30,and the final stable output

Fig.7(Color online)The transverse phase of a single pulse at the round-trip numbers 10,30,and the final stable output

5 Example of self-seeding FEL simulation

For the first time,linac coherent light source(LCLS),the first X-ray free-electron laser,experimentally demonstrated hard X-ray self-seeding technique in 2012.The relevant parameters of the self-seeding FEL system of LCLS are listed in Table 2.The normal operation of LCLS has 150—250 pC of charge in single bunch.However,the facility can operate in the low-charge mode(bunch charge of 40 pC)with a corresponding bunch length of approximately 10 fs for the self-seeding operation[11].A Gaussian profile electron beam with a FWHM beam length of 10 fs and without taking into account wake field effects in undulators was used in this simulation.A simulation of another ultrashort electron beam(bunch charge of 20 pC)can be found in Ref.[10].

The undulator layout used in this study is illustrated in Fig.8.The undulator is divided into two sections.The SASE radiation generated in the first section passes through a diamond crystal to narrow its bandwidth.Meanwhile,arelatively compact chicane is used to delay the electron beam and wash out the SASE microbunching.In the second part of the undulator,the filtered radiation is amplified by a delayed electron beam to achieve power saturation,and decrease the intensity of fluctuations.

Table 2 Main parameters of the LCLS self-seeding simulation

Fig.8(Color online)Undulator layout of the self-seeding system of LCLS

For the case of 40 pC,the average energy of the SASE radiation pulse generated by the first part of the undulators is~ 30 μJ in the GENESIS simulation and is greater than the 20 μJ measured in the experiment.The first column in Fig.9 indicates the spectral transmissivity intensity of diamond with the atomic plane(004)and a glancing angle of 56.53°.A radiation pulse passes through a diamond crystal and is filtered in a narrow bandwidth.Then,the time profile of the transmitted radiation pulse shows a long monochromatic wake.These effects are best seen in the second and third columns of Fig.9,where we show the spectrum and power profile after the filter.In addition to filtering,the crystal can produce an additional time delay of the monochromatic wake and a slight transverse spatial shift of the transmitted radiation pulse,as shown in Fig.10.The wake can be as small as a few tenths of μm due to the extremely short time of radiation pulse.

The seeded power profiles and spectra at the exit of the second undulator section,including the contribution of SASE in the first undulator section,are shown in Fig.11.The results indicate that the mean seeded signal is~113 μJ(an average over 35 shots),while the experimental resultis ~ 53 μJ.A larger pulse energy is produced by an ideal electron beam without the effects of the wake field of undulators.The noisy power distribution in Fig.11(left)is caused by the following reason.The seed power is generated by a random SASE process,and the seed power, filtered by the crystal Bragg diffraction bandwidth, fluctuates close to 100%.The average dip in the power distribution at the center of the self-seeded pulse is caused by a decrease in the energy spread of the electron beam in the first section of the undulator.A 1D simulation will produce a higher pulse energy(~ 127 μJ)in the second section of the undulator,while using the same seed that is generated in the first undulator section,which will lead to optimistic results for high-power FEL studies.This is because 1D simulation ignores the whole transverse phase information,and GENESIS treats transverse mode as a Gaussian mode.The FWHM bandwidth of the average seeded spectrum is approximately 0.47 eV,which is less than the experimental results(1 eV)of LCLS.The FWHM bandwidth of a singleshot spectrum is approximately 0.42 eV.There are other small spectral spikes,which originate from the amplification of shot noise and the SASE background.

Fig.9(Color online)The spectral dependence of the transmission( first column),the spectrum after the diamond crystal(second column),and the power profile after the diamond crystal(third column).The filter effect,the monochromatic following wave,is visible in the third column.The light red line refers to a single shot;the dark red line indicates the average over 35 shots

Fig.10(Color online)Longitudinal profile before the crystal and after the crystal with a glancing angle of 56.53°.As the center(red line)of the radiation shifted from 0 in the second column,a slight transverse spatial shift after the diamond crystal is shown

Fig.11(Color online)Output power profile and the spectra of selfseeding with LCLS parameters.The light red line indicates a single shot;the dark red line indicates an average over 35 shots.The third column shows the averaged X-ray spectra in 3D simulation(red)and 1D simulation(blue).Peak spectral intensity in 1D simulation is higher than in 3D simulation

6 Conclusion

This paper presents a 3D Bragg diffraction code,named BRIGHT,for XFELO and self-seeding FEL simulations.To describe the principle of BRIGHT,we brie fly derive the solution of the dynamic theory,on which BRIGHT is mainly based,in the two-beam case.Then,we introduce the 3D effect into the response function of crystal in both the reflection and transmission geometries.Meanwhile,we reasonably simplify the 3D response function to reduce the time consumption of BRIGHT.

An example of XFELO simulation based on the parameters of SHINE is studied by taking advantage of the combination of GENESIS,OPC,and BRIGHT.The results indicate that 3D simulation gives a smaller radiation size and a more Gaussian-like transverse mode,while there is good agreement between the classical method calculated in Ref.[31]and BRIGHT.We also simulate the self-seeding FEL based on the experimental parameters of LCLS.The simulation results illustrate that the bandwidth of a selfseeded X-ray pulse is approximately 0.47 eV,and the average seeded X-ray pulse energy is ~ 113 μJ.The results are rather reasonable,and there is a general agreement with experimental data.These results confirmed the feasibility and effectiveness of BRIGHT,which would make a great contribution to current and future studies of FEL.