
This archive contains the complete computational framework used to design and evaluate a reactive eleven-layer MoO2/Mo/Cr/Ni-Cr functionally graded material (FGM) interlayer for the joining of c-plane sapphire to Inconel 718 by laser powder bed fusion (LPBF), as described in the accompanying manuscript. The framework implements: a biaxial mismatch stress model across all twelve interfaces; a modulus-compensated gradient optimisation algorithm (delta-alpha_i proportional to 1/E_biaxial,i) that equalises the interface-step stress across the alloying zone, reducing the peak LPBF interface-step stress from 2.93 GPa for direct bonding to 0.63 GPa; a multi-objective Pareto analysis that decouples mechanical design from deposition time; an Arrhenius diffusion model for the Cr barrier; a Stoney substrate-bow calculation; and a one-dimensional no-loss energy balance for the LPBF bonding pass that defines a fuse-and-protect process window (approximately 12.7 to 15.4 J/cm2 absorbed) within which the melt front fuses the Ni-Cr seed while stopping above the Cr diffusion barrier. A companion script provides plane-strain finite-element validation (the free CalculiX solver) of the through-stack membrane stress, which agrees with an independent laminate force-balance to within 6%. The analytical engine is pure Python (NumPy, Matplotlib); no commercial finite-element or thermodynamic software is required. Running fgm_model.py regenerates Figures 1 to 8 and Figure 10 of the main text, together with Supplementary Figures S2 and S3, in under a minute on a standard laptop. fea_validation.py regenerates Figure 9 (membrane-stress relocation) and Supplementary Figure S4 (thickness sweeps) using CalculiX. si_figures.py regenerates Supplementary Figure S1 (melt-front depth versus absorbed fluence) and the supplementary layer thermal-data table.
