Skip to content

Equations ​

The model TraTT solves, written out from the solver (src/tratt/core.py, src/tratt/drive.py). The assumptions behind it and the analytic limits the tests assert are in DESIGN.md; this page is the same model in one place, with the equations typeset.

Variables ​

Everything is dimensionless.

symbolmeaningin the code
ζ=z/L∈[0,1]depth in units of the crystal thickness Lzeta
t~=t/ttr, ttr=L/vstime in units of the acoustic transit timet
α=L/ΛPthickness in Pendellösung lengthsalpha
ηdeviation parameter (wavevector mismatch from the Bragg condition) multiplied by Leta
S=h⋅u0acoustic modulation strengthDrive.S
αac=L/Λacthickness in acoustic wavelengthsDrive.alpha_ac
q=w=2παacacoustic phase across the slab, and per transitDrive.q, Drive.w

The README's R=Λac/ΛP is α/αac.

The forward susceptibility χ0 does not appear in the equations below. In Laue geometry it enters both beams with the same coefficient and is removed by a common phase substitution. In Bragg geometry it enters the two beams with opposite signs, so no common phase removes it: its real part is absorbed into η and its imaginary part is the absorption κ (below). In both, η=0 is the refraction-corrected Bragg angle.

Laue geometry ​

Both beams travel into the crystal. With D0(0)=1 and Dh(0)=0 at the entrance face, the two-beam Takagi–Taupin equations are integrated to the exit face by fixed-step RK4:

dD0dζ=iπαe+iφ(ζ;t~)Dh,dDhdζ=iπαe−iφ(ζ;t~)D0+iηDh.

The diffracted intensity is I=|Dh(1)|2 (rocking(..., geometry="laue")). A complex α adds the anomalous (Borrmann) part of absorption.

Bragg geometry ​

The diffracted beam travels back to the entrance face, so the boundary conditions sit on opposite faces (D0(0)=1, Dh(1)=0). The solver integrates the ratio R=Dh/D0 backward from R(1)=0, which turns the two-point problem into an initial-value problem:

dRdζ=−iπαe−iφ−iηR−iπαe+iφR2.

The reflectivity is I=|R(0)|2 (rocking(..., geometry="bragg")). Normal absorption, which does not gauge out in this geometry, enters as η→η+iκ (solve_bragg(..., kappa=)).

The acoustic drive ​

The sound wave enters at the surface at t~=0. The lattice is frozen at each time (the X-rays cross the crystal much faster than one acoustic period), and the phase it imposes is

φ(ζ;t~)=SA(t~−ζ)sin⁡(qζ−wt~).

A is a causal envelope of the retarded time s=t~−ζ: a step (A=0 for s<0, 1 after) or, with Drive(rise=r), the smoothstep 3x2−2x3 with x=min(max(s/r,0),1). A(s<0)=0 is the wavefront: at time t~ only the depth ζ<t~ is vibrating. For a non-dispersive wave Ω=Kvs, so w=q, and the phase is a function of the retarded time alone, φ=−SA(s)sin⁡(qs).

Satellite channels ​

The channel positions and weights come from the kinematic limit (weak diffraction, α≪1), where the Laue amplitude is a single integral over depth,

Dh(1)=iπα∫01e−iφ(ζ)eiη(1−ζ)dζ.

Where the crystal is filled (A=1; with the step envelope, everywhere once t~≥1), the phase factor expands in Bessel functions,

e−iφ=∑n(−1)nJn(S)ein(qζ−qt~),

and term n of the integral peaks at ηn=nq (Drive.eta_channel(n)): satellite n has amplitude (−1)nJn(S) and intensity proportional to Jn(S)2. The positions are analytic; nothing is fitted. For integer αac the response of one channel vanishes at the centres of the others. Outside the kinematic limit the intensity ratios no longer follow Jn(S)2; the full equations above give them.

Limits the tests assert ​

  • Laue, real α, no sound, η=0: |Dh(1)|2=sin2⁡(πα).
  • Laue, real α and η, with or without sound: |D0|2+|Dh|2=1 at the exit face.
  • Bragg, real α, with sound: |R|2≤1.
  • Bragg, no sound, α=4: |R|2>0.99 for |η|≤0.6⋅2πα and |R|2<0.5 for |η|≥1.6⋅2πα, the total-reflection plateau of a thick crystal, whose edge at |η|=2πα is soft at this thickness.
  • Step envelope, t~≥1: φ has its final form, so I(η,t~) is periodic in t~ with period 2π/w.

What the model leaves out ​

Two beams only, symmetric geometry, a plane monochromatic X-ray wave, a fixed polarization factor, and a sound wave that acts only as a displacement of the lattice (no change of χh, no vibrational Debye–Waller factor). Absorption is off unless α is made complex (Laue) or κ>0 (Bragg). The full list, with what each assumption discards, is in DESIGN.md.

Each project section is built from that project’s docs/ directory.