OPTIMIZATION OF 3D-PRINTER ENCLOSURE ENVIRONMENT

Additive manufacturing has become a widely utilized process in industrial, academic, and household applications. Previous studies have demonstrated that non-optimum humidity conditions can adversely impact the print quality of parts printed from plastic filaments by changing their mechanical properties, such as elastic modulus and ultimate strength. This study utilized a computational fluid dynamics (CFD) approach and experimental testing to design a system that yields a more uniform humidity distribution in a 3-dimensional (3D) printer printing region. The study resulted in an optimized enclosure with significantly higher relative humidity (RH) uniformity in the print volume. The simulations predicted that the optimized enclosure would improve the uniformity by about 65%, while experimental testing pointed to even more significant improvement at about 75%. As a case study, tensile testing of 3D printed specimens made from NinjaFlex© filamenets under the optimum environmental conditions showed 11% higher ultimate strength and more elastic behavior than specimens printed using the baseline model.


INTRODUCTION
Additive manufacturing, commonly known as 3D printing, is a technology for creating a 3-dimensional object through the process of adding successive layers of material. 3D printing provides a time-efficient and cost-effective alternative to classical machining, such as milling or turning in the manufacturing process [1]. 3D printing offers promising capabilities to fabricate custom-designed parts for complex applications, where parts can be modified according to each application. There are many different techniques for 3D printing, such as Stereolithography (SLA), Electron Beam Melting (EBM), Selective Laser Sintering (SLS), and Fused Deposition Modeling (FDM) [2]. FDM is one of the most commonly used printing techniques for creating prototype parts. It utilizes a spool of plastic filament that is then melted and extruded through a heated nozzle and placed layer by layer on a platform. This technique is relatively inexpensive, easy to use, and can reduce manufacturing time by up to 85%. [3] The advantages offered by FDM have made this technique widely popular for use in industrial, academic, and household applications [4].
A variety of polymers can be melted and used in an FDM process. Although the melting point of each of the polymers is known, the environmental condition needed to cool down with the proper rate of cooling to solidify the final 3D printed parts are not known or self-evident. A significant issue with FDM is the variation in print qualities depending on environmental factors such as dust particles contamination, humidity, temperature, and airflow. Warping, poor layer connection, and part non-uniformity are among a few examples of printing issues arising due to suboptimal environmental conditions. Other failures may include stringy prints, parts with bubbly or uneven surface textures, and soft or brittle parts. Other issues, such as jammed filament in the printer, can result in printer damage and added maintenance.
There has been some research to determine the effects of humidity on various filaments used for 3D printing [5][6][7][8][9][10]. These studies have focused on mechanical properties such as elastic modulus, ultimate strength, and fracture toughness. Livolsi et al. [5] investigated the effect of humidity conditions during the printing process on the properties of NinjaFlex©, a thermoplastic polyurethane-based filament both at micro-scale and macro-scale. They concluded that the ultimate strength and tangent modulus of the 3D printed specimens decreased when printed in a humid environment. Kariz et al. [6] found humidity had a similar effect with wood-PLA filaments.
Rossi et al. [7] explored the sensitivity of 3D-printed nano-ceramics to crack propagation under different humidity conditions. Additionally, the mechanical tests conducted by Zaldivar et al. [8] data indicated a significant decrease in tensile strength and failure strain in the 3D printed parts due to moisture absorption of ULTEM® 9085 filament.
Studies have also used CFD to enhance the additive manufacturing process [11][12][13][14][15][16][17]. For example, Butt et al. [11], Phan et al. [12], and Han et al. [13] used CFD to analyze the velocity, pressure, and temperature fields of melted filament or paint through a nozzle. Additionally, a study performed by Annet [14] investigated the airflow around the heat sink of the hot end using CFD analysis.

Objective and Motivation
The study by Livolsi et al. pointed to the significance of controlling the environmental conditions to produce the desired strength for shape memory polymers [5]. Additionally, they found that optimal environmental conditions can result in lower risks of nozzle jams and quality degradations. The 3D printers are often operated within enclosures for controlling the environmental conditions for a more optimum printing process. This study presents a CFD-based approach for design and optimization of an enclosure, validated with experimental testing, for creating a more optimum 3D printing environment. More specifically, the optimized enclosure system is to provide a more uniform RH field within the print volume of the printer. While this study focuses on the Prusa i3 MK3S printer model, the present approach is sufficiently generalized for creating an optimized enclosure for any 3D printer model and enclosure The enclosures can range from a simplistic box to more sophisticated designs with intake or exhaust fans and sensors for controlling airflow and temperature. However, a more optimum design requires an understanding of the environmental conditions inside the chamber, and numerical simulation and modeling can provide detailed information on these conditions to assist with the design of these enclosures. Although there is a significant amount of work that has used CFD to improve the 3D printing process, the present work is one of the limited few that showcases an accurate CFD model for simulating the environmental patterns and regulating the humidity fields inside an enclosure housing a 3D printer.

Fluent Setup
The finite volume ANSYS Fluent software has been employed in this study to solve the multispecies, unsteady, incompressible continuity, momentum, and energy governing equations, which are presented below, respectively [18] where V is the velocity vector, is the stress tensor, E is total energy, is the mass flux. Also, P is pressure, and is density, g is the gravity vector, T is temperature, h is the convective heat transfer coefficient, and is the effective thermal conductivity.
The solutions were obtained using the "coupled" pressure-based scheme with the pressurevelocity coupling. A second-order upwind scheme was selected for the momentum and energy equations with the second-order spatial discretization for pressure. The effects of turbulence were considered by employing a standard turbulence model, and the regions close to the solid surfaces aretreated using the standard wall functions.
The present study involved modeling humidity, meaning the fluid used in the simulations was a mixture of dry air and water vapor. Although we did not find any research that focused on humidity distribution modeling inside a 3D printer enclosure, there were other studies focusing on enclosed volumes of air in other applications that were helpful to the present study. For example, Kim et al. [19] and Wang et al. [20] used three-dimensional CFD analysis to simulate the relative humidity distribution within a greenhouse. Fauchouz et al. [21] used CFD simulations to evaluate the effectiveness of a ceiling panel design that uses airflow to regulate comfortable humidity conditions. Additionally, Guo et al. [22] explored the uniformity of the relative humidity distribution of containers to keep agricultural products fresh. . In the present study, the humidity modeling was achieved through the multispecies model in the ANSYS Fluid. The local mass fraction for each species, i, is predicted by applying a convection-diffusion equation. Fluent software uses Fick's law to model mass diffusion, J, in conservation form, as presented in Eq. 4.
where is time, is density, is the velocity vector, is the local mass fraction, is the mass flux, and is the rate of creation by addition from the dispersed phase, plus any user-defined sources. In this model, the mixture density and specific heat properties are set as volume-weighted mixing law and mixing law, respectively. The thermal conductivity, viscosity, and mass diffusivity are set as constant values.
The nozzle and bed of the 3D printer, seen in Fig for temperature and water vapor mass fraction. The temperature and mass fraction values were set to obtain the desired relative humidity value. All outlets were set as pressure outlets and were set to ambient temperature, pressure, and mass fraction of water vapor.   Nu # of Elements (10 3 )

Optimization Effort
The present study aimed to develop an optimized enclosure system to provide a more uniform relative humidity (RH) field within the print volume of the printer. The optimized system would employ external fan(s) to infuse outside air into the enclosure for a more uniform temperature and humidity distribution in the print volume. Therefore, several geometrical and flow parameters were selected as design variables. Additionally, a uniformity metric was defined to serve as the objective function for performance comparison of various configurations.

Uniformity Metric
A primary objective of the present study was to design an enclosure that will control the airflow within the enclosure to obtain a constant RH surrounding the extruder assembly. Therefore, we defined a new uniformity metric, the relative humidity variance metric (RHV), to assess the extent of the uniformity of the RH in the print volume of each of the configurations. The RHV metric is determined by splitting the print volume into a number of sub-volumes. Each sub-volume is a spherical region of air defined in the CFD post-processing software of ANSYS. Each of the sub-volumes consists of several mesh cells, which each have a respective RH value. The volumeweighted average RH value for each sub-volume was used in the following equations to determine the uniformity of the print volume.
where RH is the volume-weighted average relative humidity, is the identifier for each subvolume, is the total number of sub-volumes, ̅̅̅̅ is the average RH for the print volume, and RHV is the relative humidity variance.
The RHV provides a value that indicates the extent of varaition between the sub-volumes and print volume. A high RHV value suggests that the RH varies significantly within the print volume. Alternatively, a low RHV value means that the RH values of the sub-volumes are similar, and therefore the print volume has a more uniform distribution. Therefore, the objective function of the simulation is set to minimize the RHV. To help prove the validity of the RHV as a metric, simulations were run using varying numbers of sub-volumes. Figure 5 shows the sub-volume number and positions for each of the tests that were performed. Each sub-volume is shown as a grey sphere.  center. Each variable was tested at four to five values, while the other two parameters were kept constant. Also, each of these variables was tested for the three configurations that performed best based on the simulations discussed in the previous section. The organization of these tests can be seen in Table 1. Each cell within the "Magnitudes" section of the where NRHV represents the normalized relative humidity variance, the represents the value for a specific case, and value represents the RHV value for the baseline model.

EXPERIMENTAL SETUP
The printer used in the present effort was the Prusa i3 MK3S. Furthermore, a modified version of an enclosure design provided in the Prusa website was employed in this study. The printer/enclosure system is presented in Fig. 7. Sensiron EK4 environmental measurement kits which include SHT7x digital sensors were used to record all temperature and humidity values.  Three other temperature field experiments were performed by recording the temperature of a number of points along a specific line. These lines were selected in the X-, Y-, and Z-directions based on the PRUSA printer setup, seen in Fig. 9. The X-direction is set based on the direction that the extruder assembly moving back and forth. The Y-direction is based on the direction that the heated bed moves. Finally, the Z-direction is based on the assembly that moves up and down above the heated bed. For the X and Y-direction tests, temperature measurements were taken every 2 cm along the back and left side of the heated bed, respectively. For the Z-direction test, measurements were taken at heights of 0.5, 1, 2, and 4 at the front and back of the heated bed.
These steady-state temperature values were recorded using an environmental sensor. In addition to the temperature tests, an experiment was devised to help validate the prediction of air moisture diffusion and distribution within the chamber. The humidity measurement in this experiment was initiated with the internal environment set at a relative humidity value greater than the ambient condition. The internal RH value was recorded with a sensor placed above the axial fan, and the ambient condition sensor was attached to the top, front of the enclosure. The interior humidity level was then allowed to vary by allowing the air to mix with ambient air as the access door was opened. The humidity level was recorded throughout this process until the conditions steadily matched the ambient conditions.

Exterior Fan Experimental Setup
The optimization effort detailed in Section 2.3 yielded an enclosure configuration with print volume uniformity which improved compared to the basline model by 65%, based on the RHV value. Experimental tests were then conducted to validate the simulation results and verify the efficacy of this optimized enclosure. The optimized enclosure system was designed to provide inlet flow that resembled the boundary conditions set for the simulations (Fig. 10). This system works by redirecting low humidity air from a compressed air source into a humidity system. The humidity system splits the compressed airflow into two separate flows. One runs through a valve and directly into a centralized container. The other runs through a valve and a bubble humidifier to increase the RH of the air. The two airflows combine and mix in a centralized container, and the valves can be adjusted to set the desired RH value. The air is then drawn through a flexible duct by an electric fan. An airflow delivery system was designed to mount the fan and to ensure the air flows is normal to the side of the enclosure. An adjustable voltage power supply was used for the fan to set the desired airflow velocity at the inlet of the enclosure. A hole was put in the backside of the enclosure to create the pressure outlet. Multiple tests were run to determine the RH uniformity for different enclosure design cases. Sixty-four RH measurements were taken, equally spaced throughout the print volume, using the environmental sensors. More specifically, 16 measurements, using a 4 x 4 pattern, were taken on four planes that ran along the Y-direction of the enclosure, as presented in Fig. 11 below. Each marker shown in Fig. 11 represents a sensor position, and each colored rectangle represents a crosssectional plane of each measurement set. The RH value was recorded for each of these measurements after the value had reached a steady state.

Baseline Model Validation
The accuracy of the simulation model to predict the temperature and humidity field inside the enclosure is essential before the simulation is used to optimize those conditions. This section presents the validation of simulation results for the baseline model. The comparison between the measured and predicted values for each of the four quadrants is shown in Fig. 12. Furthermore, the comparison of the measured and simulation temperature values for the X-, Y-, and Z-direction tests is presented in Fig. 13

Sensitivity Study Results
The efficacy of the uniformity metric for determining the best setup to create a more uniform print volume is evident in the three graphs presented in Fig. 16. Each of the graphs consists of one of the three test parameters as the independent variable with Fig. 16 (a) uniformity. It is shown that for all three configurations, the NRHV value increases as the inlet height increases. The height increase, from 10 to 25 , resulted in more than doubling the NRHV values. As a result, the 10 height was selected for further optimizing the uniformity as it provided the most uniform print conditions. It should be noted that airflow for cases with heights less 10 are directed below the bed and do not improve uniformity. Figure 16

Optimized Enclosure Configuration
An optimum enclosure design was selected based on the results of the sensitivity study.
This optimized enclosure setup includes a 9.2 diameter fan, set at a velocity of 12 / , and at a height of 10 . Based on the previous section's findings, the fan options were narrowed to the 9.2 cm diameter fan.
A comparison between the humidity fields of the baseline model and the optimized enclosure design is presented in Fig. 17. The simulation of the baseline model points to pockets of high and low humidity at different areas of the print volume ( Fig. 17 (a)). Alternatively, the optimized enclosure design simulation shows a print volume with significantly more uniform relative humidity distribution.  Additionally, the RH measurements, presented in Fig. 18, were used to determine experimental RHV values using Eqs. 6 and 7. However, each sensor's measurement in the physical testing represents a single value rather than a volume average RH value for each sub-volume. A comparison of the experimental and simulated RHV results is presented in (b) (a) Further experimental tests were performed to show that the simulations can accurately predict how well the optimized enclosure will perform compared to other potential enclosure designs. Two additional enclosure setups were tested and compared to the optimal conditions results. The first alternate case was an enclosure with a higher inlet height of 25 and a velocity of 12 / , and the second case used a height of 10 and a lower velocity of 1.5 / . These cases were chosen because the results from Fig. 16 indicate that they should result in a significantly higher NRHV value when compared to the optimal case. The results of the sub-optimum comparison tests can be seen in Table 3

Tensile Testing Results
Tensile testing of 3D printed specimens was used to show that the optimized humidity conditions in the enclosure translate into higher quality printed parts. Three specimens were printed using the optimum conditions enclosure and compared against three specimens from the baseline model enclosure. The specimens were printed using the profile for ASTM standard D638 type IV dogbones seen in Fig. 19 (a). All specimens were printed using Ninjaflex ® filament and identical infill percentage and print patterns. The parts were then tested using an Instron® hydraulic fatigue testing system seen in Fig. 19 (b). Through these tests, the stress and strain values were recorded and plotted. A representative for the baseline and optimum condition plots can be seen in Fig. 19 (c). It is observed through the stress-strain plot that the baseline sample has multiple dashpots that are causing stress-relaxations during tensile testing. These dashpots are less prone to the tension in the specimen printed in optimum conditions, indicating that those samples become more elastic and less viscoelastic. Finally, the elastic modulus and ultimate strength were also recorded for each test and averaged for each test condition seen in Fig 19 (d). The tangent modulus was not significantly affected by the printing conditions, but the specimen printed in the optimized enclosure resulted in an ultimate strength that is approximately 11% higher than the baseline model. These results show that the print quality of the parts was improved when using the optimum conditions.

CONCLUSIONS
The present study used a combination of CFD simulation and experimental testing to illustrate how airflow modifications within the 3D-printer enclosure can be used to obtain a more uniform RH distribution within the print volume. In this study, CFD simulations using ANSYS Fluent were primarily utilized in the enclosure design process. However, experimental tests using baseline and modified models were conducted to determine the simulation setup conditions and validate the simulation results.
The optimization phase of this study was focused on optimizing the humidity field's uniformity in the print volume using a fan-humidity system. A uniformity metric, RHV, was developed to assess the RH uniformity within the print volume to evaluate gains through this optimization effort. Results from both simulation and testing conducted to assess the optimum design effectiveness pointed to significant improvement in humidity uniformity by the optimum design. It was predicted that the optimum fan-humidity-enclosure design could improve the uniformity of the RH values within the print volume by approximately 65%, compared to the baseline model. In comparison, experimental testing pointed to even more significant improvement at about 75%. Furthermore, it was shown that printed part quality improved when printed under the optimum conditions. The ultimate strength of specimen printed under the optimum conditions had a 11% higher ultimate strength on average. Furthermore, these specimens showed more elastic behavior than the more viscoelastic behavior of the specimen printed using the baseline model.