## 2 Materials and Methods
### Computational Insole Design  
Insole modeling begins with a foot scan with a Sense(r) 3D scanner (3D Systems, Rock Hill, SC, USA). In the software Sense(r) V2.0, the initial repair of the model was carried out, eliminating the surfaces on the periphery of the model inherent to the scanning process; later, the model was refined in Meshmixer(r) (V3.5.474, Autodesk, Mill Valley, CA, USA) to generate a smooth surface. The digital model (STL file) is exported to the software Gensole(r) (Beta, Gyrobot, UK), where an insole is built according to the mesh-modifying parameters, e.g., length, significant and minor thickness. Finally, the STL file of the insole is exported to Solidworks(r) (v2020, Dassault Systemes, Waltham, MA, USA), to incorporate the cellular structures with a periodic distribution in the internal part of the insole, as shown in Figure 2.  
Computational Design of Unit Cells and Characterization under Compressive Loading via Simulations of Cellular Structures  
Depending on their deformation mechanism, cellular structures can be classified as stretch-dominated and bending-dominated. According to the Maxwell criterion [3], BCC is bending-dominated, and this structure is often used in energy absorption applications [24]. In contrast, some TPMS respond primarily by shortening or stretching of their constituent elements. This results in higher stiffness and strength when the TPMS structure is compared  
Figure 1: Study methodology: insole modeling, unit cells, cellular structure modeling, cellular structure integration, numerical simulation, and additive manufacturing.  
with bending-dominated topologies [25]. The nature of the deformation mechanisms of these two topologies brings an interesting comparison when these are employed in insoles.  
To characterize the porosity-property relationship, three unit cells with different relative densities were proposed for each topology. In the BCC unit cell, the relative density was modified with the variation in the strut diameter, and in the TPMS, it was achieved with the change in the thickness of the walls. Figure 3 shows the dimensions for both topologies and the different relative densities. The cellular structures were built in Solidworks(r), and were composed of a cuboid of 5 unit cells in the \(X\)- and \(Y\)-axes and 10 unit cells in the \(Z\)-axis (see Figure 3). The unit-cell size was defined by two features. First, its size considers the space allowed in the insole limited by medial midfoot and medial forefoot. Second, the resolution of the 3D printer machine, which was between 0.2 and 0.4 mm.  
All the models were subjected to compressive loading. Their relative density was calculated as the volume fraction \(\overline{\rho}=V_{s}/V_{e}\), where \(V_{s}\) is the overall volume of the cellular structure and \(V_{e}\) is the volume of the actual space occupied by the cellular structure. The apparent elastic modulus was calculated by \(\overline{E}=FL/\overline{A}\Delta_{L}\), where \(F\) is the force applied to the structure, \(L\) is the original length of the cell structure along the loading direction, \(\overline{A}\) is the apparent area (considering it as continuous and homogeneous, including voids) where the force is applied, and \(\Delta_{L}\) is the displacement of the cell structure due to the applied load.  
The boundary conditions used to characterize the cellular structures via simulation are shown in Figure 4. All the models were meshed with quadratic tetrahedrons. To determine the element size used in the simulation, the solution time and precision of results of meshes  
Figure 2: Hollow insole and insole with cellular structure implemented.  
with element sizes of 0.5, 1, and 1.5 mm were evaluated. According to the results, 1 mm elements were selected.