**1. Introduction**

Many new applications have arisen as a result of recent advances in 3D printing techniques. For example, printed parts are used for manufacturing space instrumentation, for both prototypes and flying parts [1], for manufacturing cost-effective parts in the sports industry or for developing new

protective structures for vehicles in the automotive industry [2]. 3D printing has many different medical applications, such as bioprinting tissues and organs, building vascularized organs, the manufacture of customized implants, prostheses and models for surgical preparation, among others [3]. Thus, 3D printed scaffolds can be employed as templates for initial cell attachment and tissue formation, for example in bone tissue engineering [4]. They can also be used for fixing prostheses by means of osseointegration. Scaffolds could be printed in different materials such as titanium, degradable polymers and degradable ceramics [5,6]. Specifically, in FDM or fused deposition modelling technique a material is melted through an extrusion head and deposited layer by layer [7]. Main advantages of FDM technology are its easiness of use and the fact that it allows printing a wide range of materials, as long as they can be extruded, for example plastic materials such as acrylonitrile butadiene styrene (ABS) or polylactic acid (PLA). It is also more cost-effective than other additive manufacturing techniques, and its lead times are short. However, it also has disadvantages. It does not provide high dimensional precision, layer steps are usually observed on the part's surface, causing the surfaces not to be smooth. Besides, the use of and the use of scaffolds with biocompatible materials is difficult, because the technology is limited to materials whose viscosity is sufficiently low that they can be extruded, but high enough so that their shape is maintained after extrusion [8–10].

Regarding the design of 3D printed porous scaffolds that simulate tissues, some properties to keep in mind are: surface area and interconnectivity, which are related to cell growth; permeability, which governs nutrient transport; and mechanical strength, which assures support and protection, among other properties.

One possibility to achieve required porosity is to use hierarchical scaffold design, creating libraries of unit cells that can be joined to obtain scaffold structures. Hollister observed that increasing the material volume of a certain structure increased elastic modulus and decreased permeability [11]. In the same line, Egan et al. defined four different types of scaffold structures, taking into account either beam-based unit cells or truss-based unit cells. In addition, each structure could be created by means of either continuous or hierarchical patterning. They found that, given a certain porosity value, truss-based scaffolds have higher surface areas and lower elastic moduli than beam-based ones [12]. On the other hand, Arabnejad et al. presented a visualization method that allows understanding the relationship among cell topology, pore size and porosity in stretch-dominated structures, such as tetrahedron and octet trusses [13].

Another possibility to create structures with required porosity is use of topology optimization, which consists of distributing material in regions having low and high material density respectively. This is achieved by periodically repeating a unit cell, which is composed of areas with and without material [14,15]. When applying topological optimization methods, several authors have carried out multiobjective optimization of different properties in scaffolds. Lin et al. used an objective function that assigned different weights to the two responses considered: porosity and stiffness. The function was then maximized or minimized by numerical methods [16]. In a similar way, Guest and Prévost [17], as well as Hollister and Lin [18] used topology optimization to maximize stiffness and fluid permeability. Kang et al. used a homogenization-based topology optimization method to achieve the required bulk modulus and isotropic diffusivity for a certain porosity value [19]. Other properties of the structures, such as thermal conductivity [20], have been addressed. On the other hand, although the increase in surface area of pores helps tissue growth, this growth is facilitated if concave surfaces are used. In this direction, Egan et al. modelled scaffolds with curvature. They first fixed required porosity to assure a certain permeability value, which is desirable for nutrient transport, and then addressed the problem of mechanical strength of structures [21].

Different authors have tested the properties of FDM printed porous scaffolds. Regarding mechanical properties, Habib et al. used finite element analysis and compressive strength tests [22]. Wang et al. printed scaffolds for vascularized bone tissues in different materials, in order to test both their biomimetics and their strength [23]. Aw et al. tested the effect of printing parameters on tensile strength of conductive acrylonitrile butadiene styrene/zinc oxide (CABS/ZnO) composites [24]. Helguero et al. modelled artificial bones and printed them in acrylonitrile butadiene styrene (ABS). They tested both anisotropy and compressive strength of the scaffolds [25]. As for porosity, Gregor et al. printed PLA scaffolds and measured their porosity by means of X-ray microtomography [26]. Regarding surface finish, Townsend et al. listed most usual methods for measuring roughness profiles (contact stylus), and surface topography (confocal microscopy, focus variation microscopy, coherence scanning interferometry, chromatic confocal microscopy, conoscopic holography, atomic force microscopy (AFM), and elastomeric sensors [27]). Krolczyk et al. compared the roughness obtained in turning processes with that obtained in FDM processes [28]. They observed that the machined surface had an anisotropic and periodic structure, while the printed surface had an undirected structure. With the manufacturing conditions employed, the FDM process showed higher roughness values than the turning process.

In the present paper, a model was developed to define the pore size and the porosity of porous structures. Unlike other methods that are based on truss structures, the present model allows obtaining irregular porous structures from random location of columns in the space, which leave voids among them. Specifically, the structure was modelled with parallel planes joined by columns, with a certain number of columns on each plane. The model was applied to a disk shape. Three variables were defined: the distance between parallel planes, the number of base points for columns on each plane, and the radius of each column. Next, dimensional analysis was used to reduce the number of process variables to 2. Then, the requirements were defined for a specific application case: the use of a porous structure in external layers of hemispherical hip prostheses. Subsequently, the design of experiments, with three-level factorial analysis, was used to obtain mathematical models for porosity, mean of pore size and variance of pore size as a function of dimensionless variables. They allowed multiobjective optimization in order to determine the optimal values for the process parameters.

In order to compare experimental results to computationally calculated ones, samples were printed with FDM technology, and total porosity, as well as pore size, was measured. X-ray tomography was used to determine the total porosity of the printed structures by means of computation of plastic volume and comparison with total volume of the printed shape.

The present study will help designing and manufacturing porous structures with specific requirements regarding the porosity and pore size that favour osseointegration. The same methodology can be used, however, to achieve other requirements of porous structures, such as mechanical strength and/or nutrient transport.
