## 2 Design Approach
### Design of Porous Stem  
The mechanical properties of cubic structures (Figure 1) were used to design twelve different functionally graded stems, as shown in Table 1 and Figure 3. The layer cross sectional areas are 15.9 mm\({}^{2}\), 17.3 mm\({}^{2}\), and 23.6 mm\({}^{2}\) for the core, layer 1, and layer 2, respectively. The average porosities of the designed stems in the radial direction were calculated based on Equation (2). They were grouped into three different sets, each set having the same overall average volumetric porosity throughout the stem's layers in the radial direction. Three more designs, namely, design D5, D10, and D15, were considered to represent the homogeneous volumetric porosities of 30%, 50%, and 70%, respectively. A total of 15 designs were modeled, as shown in Figure 3. All designs were initially integrated into 3D finite element models, as shown in Figure 4, to study the stiffness performance of the designed stems concerning the intact femur bone. The setup shown in Figure 4 is per the ISO standard (ISO 7206-4). \[\overline{P}=\left(V_{P}\right)_{h}+\frac{\left(\overline{AV}_{p}\right)_{fg}- \left(\overline{AV}_{p}\right)_{h}}{\left(\overline{AV}_{p}\right)_{h}} \tag{2}\]  
where \(A\) = the stem's radial layer cross-sectional area, \(V_{p}\) = the stem's radial layer volumetric porosity, \(\overline{\left(AV_{p}\right)_{fg}}\) = average functionally graded porosity, along with the stem's layers, \(\overline{\left(AV_{p}\right)_{h}}\) = average homogeneous porosity along with the stem's layers, and \(\left(V_{p}\right)_{h}\) = stem homogenous porosity. The stem distal end was fixed in epoxy (3.7 GPa), with specific orientations identified in ISO 7206-4, as shown in Figure 4. Then, the stem was tied together with the epoxy, while the epoxy was constrained to move or revolve in any direction. Fine meshes and tetrahedral elements were employed and a 2250 N force [32] was applied on the head of the stem using a 0.1 increment size in 10 increments. The material properties of the bulk Ti and designed porous structures (Table 1) were assigned to the stems based on the simplified FE model to reduce design time and computation [24]. The proximal part of the stem was assigned with bulk Ti material properties. To study the effect of the designed porous stems on stress reduction and micromotion, it is vital to use a finite element model that incorporates the stem and femur bone along with proper physiological loads. This finite element model has been adopted in previous studies conducted by the authors [5; 6; 7; 8; 9]. Three-dimensional models of homogeneous and functionally graded stems (D1-D15) were assembled with femurs using surface-to-surface  
Figure 2: Sensitivity study to indicate the mesh size to which the modulus of elasticity converges using a solid cube. contact with a coefficient of friction 0.4, and the assembly was inserted into a cylindrical shape epoxy. The bone was tied with the epoxy and restricted to move or rotate in any direction [33; 34; 35]. The 3D model of the femur was constructed using computed tomography (CT) scanned images of a patient femur, as explained in previous studies [5; 36]. Cortical and trabecular bone were considered homogeneous and linear elastic isotropic material, respectively, with material properties as listed in Table 2[25; 36; 37]. The bone was subjected to three physiological loads, namely, P\({}_{0}\), P\({}_{1}\), and P\({}_{2}\), where P\({}_{0}\) is the hip contact force and P\({}_{1}\) and P\({}_{2}\) are muscular forces attached to the femur. These forces were calculated based on the loading of our conditions which are unique and have not been used before [38], as shown in Figure 5a. Table 3 displays these forces in their components (Fx, Fy, Fz). The direction cosines for these component forces were obtained from previous studies [32; 38]. The simulation was carried out for three different walking speeds, 1 km/h, 3 km/h, and 5 km/h.