Dynamical diffraction in a deformed (often bent) crystal is described by the Takagi equations
1 which, in general, have to be solved numerically on a regular 2-D grid of points representing a planar cross section of the crystal in which the diffraction of an incident X-ray wavefront occurs . Presently, the majority of numerical approaches are based on a finite difference solving scheme
2-4 which can be easily implemented on a regular Cartesian grid but is not suitable for deformed meshes. In this case, the inner deformed crystal structure can be taken into account, but not the shape of the crystal surface if this differs substantially from a planar profile
5,6.
Conversely, a finite element method (FEM) can be easily applied to a deformed mesh and serves very well to the purpose of modelling any incident wave on an arbitrarily shaped entrance surface
7 e.g. that of a bent crystal or a crystal submitted to a strong heat load
8-10. For instance, the cylindrical shape of the surface of a strongly bent crystal plate can easily be taken into account in a FEM calculation. Bent crystals are often used as focusing optical elements in Xray beamlines
11-13.
In the following, we show the implementation of a general numerical framework for describing the propagation of X-rays inside a crystal based on the solution of the Takagi equations via the COMSOL Multiphysics FEM software package (www.comsol.com). A cylindrically bent crystal will be taken as an example to illustrate the capabilities of the new approach.