Rheological characterization of complex fluids through a table-top 3D printer

3D printing is changing the way we conceive, design, and build 3D objects in mechanical, biomedical, aerospace, construction, automotive and maritime industries. In the current work, the nonlinear rheological behaviour of polymer melts is measured through a table-top 3D printer (3D RheoPrinter) that, smartly modified, allows inline investigation of viscosity, extrudate swell and melt fracture. By using a piezoresistive mini-transducer, the innovative system is designed to be applicable to all Fused Deposition Modelling (FDM) 3D printers by a simple and cost-effective modification of a state-of-art nozzle. The measurements of the nonlinear rheological behaviour are compared with traditional, rotational rheology. Two biodegradable polymers, i.e. polylactic acid and polycaprolactone, are investigated as model systems to test the 3D RheoPrinter. The results of the shear viscosity and the first normal stress difference coefficient, as function of shear rate, show a good agreement between the 3D RheoPrinter and rotational rheometer with an error of about 6% for a confidence interval of 96%. Moreover, the 3D RheoPrinter can still be used as 3D printer. In the last part of this work, it is presented a printing test for building 3D structures in which the results show controllable resolution by means of the measured rheological information such as the extrudate swell. The vision of this work is that an inline rheological characterization, possible with the developed 3D RheoPrinter, can enable automatic process optimization and quality assurance to the 3D printing community. The social and scientific impacts of this work are maximized by the cost-efficiency and simplicity of the design that makes it within reach of the general public. The 3D RheoPrinter opens for a rheological experimentation to a broad audience and it offers important insights to bring FDM to the next level of resolution.


Introduction
3D printing or additive manufacturing is revolutionizing the way to transform materials into functional 3D objects by virtue of (a) a high sustainability because of the waste minimization, (b) an incredible freedom of design comparing to traditional techniques and (c) a possibility of mass customization because, for small number of items, it is less expensive than traditional techniques (Wong and Hernandez 2012;Tammaro et al. 2021c). The number of applications is quickly rising in all industries, from automotive for bumpers and maquette (Leal et al. 2017) to biomedical for medical implants and scaffolds (Velu et al. 2020).
The Fused Deposition Modelling (FDM) is one of the most used 3D printing techniques because of the high flexibility, simple scalability, and cost-efficiency (Chacón et al. 2017). Currently, FDM printers are the most sold 3D printers with about half millions of table-top printers sold per year, a price ranging from 100 to 1000 Euro, and an incredibly high growth rate (Bourell 2016). In FDM a thin filament of thermoplastic polymer feeds a machine where a print head melts and extrudes it in a thickness typically of 200-600 microns. The precise movement of the nozzle on three axis is controlled by three or more stepper motors, and it allows the construction of 3D objects. The main advantages of FDM are as follows: no chemical post-processing required, fully recyclable parts, cost-effective material and process. The disadvantage is that the resolution on the z axis (i.e. the axis 1 3 that defines the vertical height of the object) is low compared to other additive manufacturing process, so, if a smooth surface is needed, a finishing post-process is required. The resolution depends strongly on the control of the shape and amount of deposited material during fast pushing and retracting movement of the polymer melt in the small nozzle. The flow of polymer through the 3D printer nozzle is not yet fully understood, as it involves many complex phenomena, such as phase transition, shear rate and temperature dependent viscosity, as well as viscoelastic effects (Serdeczny et al. 2020;Comminal et al. 2018). To tackle these challenges, 3D printing companies experimentally optimize the print conditions for the materials by applying empirical programs. Therefore, process optimization or calibration is required for each printed object and polymer blend. Recently, many researchers have tried to introduce additional sensors to ameliorate the control of the printing process (Di Caprio et al. 2017). As an instance, Greeff et al. introduced a USB microscope video camera to track the motor slippage and control the flow rate (Greeff and Schilling 2017). Andreregg et al. have investigated the polymer flow inside the nozzle to improve the control of 3D printing processes by introducing a pressure measurement and an additional thermocouple (Anderegg et al. 2019). Coogan et al. have introduced a system to monitor the shear viscosity of polymers during FDM printing, with the goal to facilitate the 3D printing of new materials (Coogan and Kazmer 2019). The incorporation of the sensors requires a complex load transfer system and expensive modifications that are not accessible to all. Together with the viscosity calculation, one of the current challenges in FDM processes is the design of the deposition strategy taking under consideration the polymer extrudate swell and melt fracture.
The swelling phenomenon appears in all FDM processes, when the melted polymer is pushed through the small nozzle there is a swell of the diameter of the extrudate (D e ) compared to the nozzle diameter (D) (Mezi et al. 2019;Robertson et al. 2017;. If the swell is not considered, the quality of the 3D printed objects is poor. In a Newtonian fluid, the extrudate swell is explained by the rearrangement of the velocity profile (i.e. D e ∕D ∼ 1-2) and, in viscoelastic fluids, the extrudate swell is mainly attributed to the elastic recovery (i.e. D e ∕D ∼ 2-4) (Lombardi and Tammaro 2021;Polychronopoulos and Papathanasiou 2015;Tammaro et al. 2021e). The extrudate swell has been rarely investigated in 3D printers, and, currently, the design of the deposition strategy relies only on empirical methods, and the effect of processing conditions (e.g. shear rates and temperature) is neglected. In addition to extrudate swell, high shear stresses in the nozzle can cause melt fracture (Hatzikiriakos et al. 1997;Tammaro et al. 2021a). Melt fracture affects the surface finish of the extrudate, and, so, the resolution of the printed objects (Othman et al. 2012). Moreover, it can generate cracks into printed strands inducing a substantial decrease of the final mechanical properties (Wickramasinghe et al. 2020). In literature, a better printing resolution was demonstrated by empirically adjusting the processing conditions to avoid melt fracture (Liu and Wu 2018;Liu et al. 2019) and reduce extrudate swell (Wickramasinghe et al. 2020;Delvaux and Crochet 1990;Sharma et al. 2021). However, determining by trial and error the optimal processing parameters for each polymer is challenging due to the large number of variables interacting each other. Furthermore, each parameter must be optimized for every new material because there is a strong material dependence on the extrudate swell and melt fracture (Tammaro et al. 2022a). Currently, these adjustments are time and cost consuming for the FDM community and they are limiting the 3D printing potential applications in more pretending fields (Persembe et al. 2021;Gudapati et al. 2020;Tammaro et al. 2021b).
Rheology has everything that is needed to bring FDM printers to the next level of resolution. A more thorough understanding of the rheology properties of the printed materials will improve the resolution and reduce the time for printing optimization.
In the current work, a cost-effective and simple modified 3D printer (i.e. 3D RheoPrinter) is designed, manufactured and tested to measure inline viscosity, extrudate swell and melt fracture of bio-based and biodegradable polymers (i.e. polylactic acid and polycaprolactone). A capillary rheometer approach is used to measure the inline viscosity: the deformation is imposed through the extrusion speed and the pressure is measured by means of a piezoresistive mini-transducer. The innovative system is designed to be applicable to all FDM by a simple modification of the current state-of-art nozzle. In particular, the geometry of the modified nozzle could be considered, with some approximations, a down sized version of a capillary rheometer. The data analysis is explained step by step from the pressure measurements to the viscosity calculation and the measurements of the nonlinear rheological behaviour is compared with traditional, rotational rheology. Moreover, the 3D RheoPrinter is tested for printing 3D structures to show that the modified device can still be used as a 3D printer, with the plus of an inline characterization of the processed polymers. For the first time, the values of extrudate swell and the stress threshold for melt fracture are used in the printing settings aiming at high resolution printing.

Design considerations on 3D RheoPrinter
The 3D RheoPrinter has been designed to reach the following specific objectives: (i) to measure inline rheological behaviour of complex fluids; (ii) to be able to print accurately 3D objects; (iii) to be user-friendly and cost-effective.
A Prusa I3 Mk3s 3D printer was bought from Prusa Research (Germany), as entry level prototype to be modified into the 3D RheoPrinter. The printer controls the flow rate by adjusting the rotation speed of metal gears through a precise stepper motor (Iverntech NEMA 17 Stepper Motor with Integrated 100mm T8 Lead Screw). For accurately measuring the flow rate, it is needed to monitor the stepper motor pulses as well as the motor current to account for filament slippage and skipped motor steps. The temperature sensor is a NTC 3950 100K ohm thermistor with 21cm cable. The brass nozzle is equipped with a ruby tip radius, R, of 200 microns that can withstand abrasive filament. The nozzle was made of brass because it has a higher thermal conductivity than stainless steel. The nozzle has a converging channel from, D r , 2 mm to, D, 400 microns at 60 degrees and the land length, L, of the capillary is 6 mm, hence, a L/R equal to 30 (Fig. 1e). A high temperature piezoelectric sensor (Type 4260A), with a diameter of 5 mm and a total length of 15 mm, was bought from Kistler, Switzerland. An NI 9219 Universal Analog Input data acquisition system was implemented to record signals from the sensors. Additionally, a PSS-10 Barrier Strip Style Power Supply 10V external power supply was used to provide the necessary excitation voltage for the pressure transducer. The error tolerance of the thermocouples is 0.5 ∘ C, and the error tolerance of the pressure transducer is 5 kPa.
The heating block was re-designed to accommodate the pressure transducer and the thermocouple as shown in Fig. 1. The new block is depicted in isometric view (Fig. 1a), from top ( Fig. 1c) and lateral (Fig. 1b) view. Moreover, the technical drawings and the complete 3D render are supplied in the supplementary information for allowing the manufacturing. The new design has three important features: (a) it has a port for inserting the pressure transducer, (b) it has a channel (1 mm) much smaller than the filament diameter (1.75 mm) to accelerate the melting (Fig. 1d), (c) it has a total height of 25 mm, bigger than the standard heating block, to increase the residence time and obtain a homogenized melt temperature. The block was manufactured by ADM srl Startup Innovativa, Salerno, Italy. The block was machined from an aluminum block ( Fig. 1f) and its assembly is shown in Fig. 1f. Aluminum was chosen to minimize the weight and maximize the conductivity. The weight of the entire block, including the pressure sensor, is 5g (about 15% of the initial weight of the printer head), which does not affect the capability of the stepper motors assigned to the movements. A re-calibration of the distance between the printer head and the deposition plate is all that is needed for upgrading a standard 3D printing to a 3D RheoPrinter. The re-calibration is needed because the modified hot-end is longer than a standard hotend. It is worth of noting that the material cost for the modification (i.e. pressure sensor and manufacturing of aluminum block) is about half of the Prusa MKS 3D printer.
Finally, a videocamera (DMX TIS 1/1,8" CMOS 3072x2048 Monocro from DB Electronics, Italy) equipped with an optical lens (2,0X, 2/3" SilverTL Telecentric Lens from Edmund, UK) is aligned at the nozzle exit to record the fluid flow. The use of the 2.0x optical lens allows a resolution of 0.3microns for the measurement of the extrudate swell and melt fracture. The background is illuminated by a diffused light. A custom-made Matlab code was developed to record the flow rate, temperature and pressure in parallel.
Before jumping into the results, few considerations on the dimensionless numbers in a 3D printing process are helpful to make the viscosity calculation straightforward. The typical 3D printing processing conditions have a characteristic printing velocity, V, equal to 10 − 2 m/s and a nozzle diameter, D, equal to 10 − 4 m (Lade et al. 2017). The polymer melts, used in a 3D printer, have typical physical properties such as: viscosity, η, equal to 10 3 Pa s, surface tension, σ, equal to 10 − 2 N/m, density, ρ, equal to 10 3 kg/m3, thermal conductivity, k, equal to 10 − 2 W/mK) (Lade et al. 2017;Tammaro et al. 2021d). Considering these physical properties: 1. Reynolds number, Re = VD ≪ 1 , tells us that the inertial effects are negligible, that implies small nozzle diameters to reduce the characteristic transient time, i = D 2 ≈ 10 − 8s . This allows to optimize the experimental procedure, and through the application of a stepwise pressure ramp it is possible to span a wide range of shear rates with the same polymer and to measure the corresponding steady-state viscosities. 2. The Galileo number, Ga = V D ≪ 1 (Uhlmann and Doychev 2014), and Capillary number, Ca = V ≫ 1 , underline that capillary and gravitational forces are negligible with respect to viscous forces. As a consequence, the total pressure drop, ΔP, along the capillary can be written as: ΔP = P v + P + P g ∼ P v ; where P v , P σ , P g are the contributions of viscous, capillary, and gravity forces, respectively. 3. The Nahme number, Na = V 2 k < 1 where β is the temperature sensitivity of viscosity ( Fig. 3c), varies from 0.04 to 0.9 for our reference polymer, that allow to neglect the dissipative heating effect (Costa and Macedonio 2005).
The software fixes the wall temperature of the brass nozzle in the 3D printer, which affects the melting kinetics of the filament and, hence, the instant at which the polymer is completely melted. The last design consideration is on the pressure effect. It is known that the pressure causes a reduction in the free volume of the melt, causing an exponential increase in viscosity at elevated pressures. The viscosity pressure dependency can be accounted by applying a pressure shift factor, using the Barus equation (Sorrentino and Pantani 2009). The typical value of the pressure coefficient in polymer melts, e.g. polystyrene, is smaller than 0.03MPa − 1 , and the pressures in a 3D printing process are smaller than 10MPa − 1 ; hence, the effect of the pressure on the viscosity is always smaller than 10% (Park et al. 2006). In this work, the pressure effect on the viscosity is neglected, and it will be further investigated in a future work.

Machine limitations
The accessible ranges of the operating conditions of the 3D RheoPrinter are reported in Table 1. The nozzle temperature can be changed arbitrarily through the 3D printer software. Conceptually, the maximum temperature of the 3D Rheo-Printer is 350 ∘ C that is the temperature limit of the piezoelectric pressure transducer; and the minimum temperature is room temperature because no chillers are installed. Also, the printing speed can be changed at will by the 3D printer software (up to 1000 mm/min), which sets the polymer flow rate through the nozzle. The largest speed is limited by slip at gears, around 100 mm/min for the current setup configuration (Colón Quintana et al. 2021). The operating range of shear rates is linked to the range of filament speed and the geometry of the nozzle. In particular, the pressure drop, in turn, is measured according to the imposed flow rate. The pressure range of the piezoelectric transducer is 0-350bar that also represents the pressure operating range of the current 3D RheoPrinter.
Practically, the process limits are affected by the materials to be characterized. As an instance, the temperature lower limit is given by the melting temperature of the polymer (i.e. about 170 ∘ C for PLA and 60 ∘ C for PCL) and the upper limit is the temperature at which the polymer starts to degrade (about 300 ∘ C); thus, a temperature operating range in between these two limits is considered in the following discussion.

Materials
Polylactic acid (PLA), grade 710M (batch number KH1g1030-2) from BewiSynbra, was used in this study and its physical properties are resumed in Table 2. PLA pellets were dried overnight at 60 ∘ C in oven under vacuum conditions before any manipulation. A PLA filament with diameter of 1.75 mm was produced using a Composer350 compounder (from 3DEVO company, The Netherlands), whose process parameters are given in Table 3.
Polycaprolactone, PCL, Capa 6800 with a melt flow index of 3.02 g/10min at a temperature of 35 ∘ C and weight load of 2.16 kg, weight average molecular weight of 120 kDa, and number average molecular weight of 69 kDa has been supplied by Perstrop Holding, Sweden. PCL pellets were dried overnight at 40 ∘ C in oven under vacuum conditions before any manipulation. A PCL filament with diameter of 1.75 mm was produced using a Composer350 compounder (from 3DEVO company, The Netherlands), whose process parameters are given in Table 3.
The viscosity of PLA was measured also with a Physica MCR 301 rheometer from Anton Paar. The measurements were performed under an air atmosphere and at different temperatures, using a disposable plate-plate system with a radius of 12.5 mm (PP25); the gap between the plates is set to 1 mm. The sample was changed for each measurement and at each temperature, and the shear viscosity has been determined through a flow test and the shear rate varied from 0.1 to 100 s − 1 .

Inline viscosity
Using the design considerations, the experimental procedure to measure the viscosity is straightforward: (i) the filament of PLA is inserted in the printer extruder (controlled by the stepper motor); (ii) the nozzle is heated up to the desired temperature; (iii) after an equilibration of the temperature (i.e. about 10 min), the extruder is activated, and the pressure measured; (iv) the tuning of extruder speed allows to explore different shear rates. For instance, Fig. 2 shows the pressure inside the nozzle, P, recorded at three different extruder speeds (1, 5 and 10 mm/min) for five melt temperatures (170,180,190,200,210 ∘ C).
The measured values of pressure and filament speed were averaged on a minimum time step of 5 seconds for each set of filament speed. The volumetric flow rate, Q, is calculated based on the stepper motor pulses (unless there was an abrupt change in the motor current, indicating skipped steps or filament slip). The change of flow rate requires 2-3 seconds, and, in few minutes, in combination with Re ≪ 1, it allows a flow rates sweep (or shear rates sweep) with the same polymer to measure the corresponding steady-state viscosity. The validation of the inline viscosity was performed by printing in air, in particular, the nozzle was not moving and raised about 10 cm above the printing plate in order to avoid any exit pressure that could build up between the nozzle and the platform.
In the 3D RheoPrinter the entrance and exit loss should be considered for an accurate calculation of viscosity from  the measured flow rates and pressures. An experimental procedure for the correction was proposed by Bagley (Mitsoulis and Hatzikiriakos 2003). Even if it is a simple procedure, it requires material for numerous tests at different capillary land lengths, which is in contrast with the objective of measuring inline rheological properties with a simple procedure. It is also well known that the end loss becomes negligible for capillaries with large land length (Macosko CW 1994). In order to reduce the amount of material and measurement time, a sufficiently large land length can be designed so that the end pressure can be considered negligible. In the case of viscoelastic fluids, the entrance and exit loss can be seen as composed of viscous and elastic components. Metzner and White (1965) concluded that the elastic effects due to profile development are a small part of the elastic component of the pressure drop and hence can be taken as negligible (Metzner and White 1965). In our custom-made nozzle with L/R = 30 is sufficiently high to consider the entrance and end effect negligible and reduce the efforts to measure the true shear stresses.
The shear stress at the capillary wall is calculated as where P is the pressure measured in Fig. 2 and the other terms, R,L, are geometrical parameters typical of the system (i.e. radius and length of the nozzle, described in the "Design considerations on 3D RheoPrinter" section). The apparent shear rate or Newtoninan shear rate at the wall is calculated as ̇a = 4Q R 3 where the Q is the volume flow rate calculated as Q = v in R 2 filament considering v in that is the speed of the filament imposed by the printing software and R filament that is the filament radius, i.e. 0.875mm. Hence, the two previous equations allow to calculate the shear stress and shear rate in the same point (i.e. at the wall), and these quantities are enough for calculating the viscosity of a Newtonian fluid, or apparent viscosity, as a = ẇ a having simply imposed Q and measured P. For non-Newtonian fluids, the viscosity can depend strongly on the shear rate and an additional correction is required to calculate the real viscosity, η, because the capillary flow is an inhomogenous flow with a shear rate changing over the capillary cross section (Mishra et al. 2021 The resulting true viscosity is plotted in Fig. 3. It is worth of noting that each flow rate sweep was repeated ten times and 95% of the pressure measurements were repeatable within 5% of error. The expected shear thinning behaviour is confirmed. In the high shear rate region (i.e. from 20 to 200 s − 1 ) the experimental viscosity is well fitted by a power law equation (i.e. = K̇n −1 ), where K is the consistency and n is the flow behaviour index), with a coefficient of determination adjusted equal to 0.98, and the fit returns n = 0.4 and K = 83kPas n .
In Fig. 3a, the results for PLA at 180 ∘ C are compared with viscosity obtained in a conventional rotational rheometer (see "Materials" section for details). Good agreement between the two measurements is observed with an error of about 6% for a confidence interval of 96%. Our findings Fig. 2 Pressure measured at five temperatures (170,180,190,200 and 210 ∘ C) for a flow rate sweep that has three steps (1, 5 and 10 mm/min) confirm that the 3D RheoPrinter is an appropriate tool for measuring shear viscosity on a wide range of shear rates.
In Fig. 3b, the nonlinear rheological behaviour of PLA at five temperatures has been measured by means of the new 3D RheoPrinter. It is worth noting that the each set of viscosity data could be measured during the printing process. The calculation of the viscosity is directly linked to the measured flow rate and pressure without additional measurements needed. The values of viscosity in the Newtonian plateau, at low shear rate (0.4 s − 1 ), are plotted in Fig. 3c as function of the temperature. The data are well fitted by an Arrhenius law (coefficient of determination adjusted equal to 0.99) with an activation energy of 95.4kJ/mol that is in good agreement with the literature value (Kaseem and Ko 2017).
The results of the nonlinear rheological characterization by the new 3D RheoPrinter for PCL at 70 ∘ C and 90 ∘ C are shown in Fig. 3d with blue circles and squares respectively. The viscosity is compared with the complex viscosity found in literature (Tammaro et al. 2022b) for the same material and same temperatures. Here, again, good agreement between the two measurements is observed with an error of about 10% for a confidence interval of 96%. Interestingly, the shear viscosity calculated by the 3D RheoPrinter is always lower than the complex viscosity (similarly to the previous measurements with PLA, as shown in Fig. 3a). In particular, the error is 7% at 70 ∘ C and 12% at 90 ∘ C. This will be discussed in greater detail in the next subsection on possible artifacts.

Possible artifacts
In the current work, it has been used a capillary rheometer approach to calculate the viscosity that is based on these hypotheses: (a) fully developed and incompressible flow, (b) no viscous heating, (c) no pressure dependence of the viscosity, (d) no melt fracture (Macosko CW 1994). Considering the dimensionless numbers described in the "Design considerations on 3D RheoPrinter" section, in this study, the development of the flow in the capillary is guarantee by Re << 1 (Ray et al. 2012;Durst et al. 2005), the viscous heating shear viscosity at 0.4s − 1 versus melt temperature for PLA; (d) comparison between rotational rheometer and 3D RheoPrinter at 180 ∘ C for PCL is negligible because Na < 1 and the pressure range (i.e. 1-80 bar) is small enough to avoid pressure dependence of viscosity. Finally, the use of a camera at the nozzle exit helps to estimate the onset of melt instability, called melt fracture, above which the viscosity calculation is not possible anymore. The absence of melt fracture is also confirmed by the pressure measurements that have no oscillations (Macosko CW 1994).
The polymers used in this study, PLA and PCL, can be affected by hydrolytic degradation. At high temperature, a decrease of molecular weight can occur fast (i.e. few hours) (Elsawy MA et al. 2017;Lu et al. 2018). In the 3D Rheo-Printer, as it is built, the polymer filament passes through a hot orifice to be melted that communicates with the environment. Few solutions are proposed in literature to avoid degradation of the printed strands or structures with the aim to improve the mechanical properties of the printed parts. As an instance, Lederle et al. (2016) have placed a 3D printer in a glove box that allowed to have a strict exclusion of oxygen and to prevent degradation of the printed strands. They focused on the degradation of the polymer occurring after the printing and considered negligible the degradation that may occur in the printer nozzle (Colón Quintana et al. 2021). The current setup was conceived to mimic a standard 3D printer and, for that reason, the filament is treated exactly as in a FDM process, hence, without any exclusion of oxygen and/or water from environment. This could be the reason why the viscosity measured with the 3D RheoPrinter is lower than the one measured with rotational rheometer. In the case of PCL, higher is the melt temperature and higher is the mismatch between the two measurements (the error is 7% at 70 ∘ C and 12% at 90 ∘ C).
During FDM of thermoplastic filaments there could be a strong temperature inhomogeneity in polymer melt, depending on the printing speed, due to the fact that the heating occurs by conduction with the metal wall (Colón Quintana et al. 2021). Graetz number, which is defined as the ratio between the characteristic heat diffusion time, τ diff , and the characteristic residence time inside the nozzle, τ res , helps in predicting temperature inhomogeneity in FDM (Phan et al. 2018). The first characteristic time, τ diff , can be calculated, assuming perfect contact with the metal wall of the printer heater, as: diff = r 2 heater where r heater is the radius of the filament, and = K C p , where K and C p are the thermal conductivity and the specific heat of the polymer. The second characteristic time, τ res , can be calculated, assuming a plug flow, as: τ res = l heater /v in , where l heater is the heater length and v in the printing speed. In the current experimental setup and model system of PLA and PCL, τ diff ≈ 3-4s and τ res is always above 10s for all the speed investigated. Hence, a temperature homogeneity is expected because τ res >> τ diff . Needless to say, when the printing speed is increased much more than the maximum speed explored in this study, it is expected that τ res < τ diff , hence, the melt temperature will be inhomogeneous and possible artifacts may raise.

Extrudate swell
Information on the extrudate swell can be investigated by using a camera that is placed at the nozzle exit. In particular, the background is illuminated by a diffused light to clearly see the extruded strand profile (as shown in the inset of Fig. 4). It should be remarked that, due to the micrometric dimension of the strand, gravitational effects are negligible (as described in the design considerations). For the above reasons the extrudate swell can be calculated as B = D e /D, where D e is the diameter of the extrudate. The extrudate swell can be directly calculated from the images taken by the camera, since the D is a geometrical design parameter and D e is the diameter of the extrudate as shown by the blue lines in the inset of Fig. 4. At least 10 measurements were performed on each captured image at the nozzle exit to calculate the average value of B that is plotted as squares in Fig. 4. The swell measurements can be considered independent of the geometry because the 3D RheoPrinter design is characterized by D r /D < 10 and L/D r > 10, where D r is the diameter of the reservoir (see Fig. 1e).
The extrudate swell can be related to the first normal stress difference, N 1 , and it is often used as a normal stress i n d e x .
T a n n e r p r o p o s e d a r e l a t i o n , N 2 1 = 8 2 w ((B − 0.13) 6 − 1) , between B and N 1 i s Fig. 4 (a) First normal stress difference coefficient, ψ 1 (black circles), as function of shear rate for PLA at 180 ∘ C calculated from the extrudate swell, B (blue squares). First normal stress difference coefficient (grey triangles) as function of shear rate for PLA at 180 ∘ C calculated using dynamic data. The inset on top of the plot shows the real extrudate swell of the PLA printed strand at three shear rates: 10, 50 and 100 s − 1 model-dependent, on the basis of not rigorous assumptions, however, it is one of the few empirical relation that has been used successfully in literature (Tanner 2005;Sun et al. 1996). For that reason, it was tested in this work as well. In particular, by estimating N 1 with the Tanner's empirical relationship, the first normal stress coefficient, 1 = N 1 2 , is obtained and reported in Fig. 4 for the PLA at 180 ∘ C. As expected, ψ 1 approaches a constant value at low shear rates and decreases dramatically with increasing shear rate. For comparison, we also report ψ 1 evaluated from rotational rheometer by using Laun's rule (Padmanabhan and Bhattacharya 1994). Interestingly, a good agreement is observed between the two sets of measurements.

Melt fracture
The 3D RheoPrinter can also be used to investigate melt fracture and, so, the maximum throughput of the process. The onset of melt instabilities was observed with PLA melts only at 170 ∘ C over the range of shear rates investigated. There is no definitive theory describing the melt fracture phenomenon, and, also the corresponding transition from regular to irregular patterns on the extrudate surface is not fully understood. Usually, this transition is attributed to the attaining of a critical limiting shear stress at the wall, above which the polymer starts to stick and slip. Using the 3D RheoPrinter, it was possible to investigate the onset of melt fracture and, by microscopy, observe the patterns produced on the strand surface. The printed strands are frozen in short time (the characteristic heat diffusion time for the 70 μm strand is d = R 2 a ∼ 1s , where a is the thermal diffusivity of the fluid) and it helps to preserve the patterns for post-mortem analysis. In particular, the right picture of Fig. 5 shows the Scanning Electron Microscopy (Hitachi TM 3000, Japan), SEM, of a printed strand at high flow rates. The shear stresses dependence on the shear rates for PLA is shown in Fig. 5 (left), and the horizontal line points out the onset stress for the melt fracture (σ c ). The onset was estimated where the slope of the curve shear stresses versus shear rates started to increase. σ c was measured equal to about 1.2 * 10 2 k Pa for the PLA at 170 ∘ C. Such a value is in line with the expected value for PLA extruded through metal orifices.

Printing test and future development
The use of recycled materials in FDM is still challenging because the material has usually unknown properties (e.g. viscosity). The properties of the recycled polymer used for 3D printing can be established by dedicated laboratory analysis. However, these analyses are expensive and time-consuming. The possibility to print and measure inline the rheological properties opens to a wide scenario of applications in plastics recycling. It was shown that the 3D RheoPrinter is able to perform rheological characterization, the motivation of this part is to show that the modified device can still be used as a 3D printer, with the plus of an inline characterization of the processed polymers. The printing capabilities of the 3D RheoPrinter were tested by printing a parallelepiped 50x20x5 mm (Fig. 6a). The processing parameters were set considering the calculated extrudate swell at the printing temperature (180 ∘ C) and the resulting adhesion among the filament was investigated by SEM. Figure 6b shows the middle cross section of the printed structure and Fig. 6c focuses on the contact line between two strands. The control of the movements was not affected by the modification, and the strands are perfectly glued together. Indeed, the resolution Fig. 5 Left, measurement of melt instability onset, σ c ; right, SEM microscopy of the printed strands that shows the shark skin on the z axis is improved and the strands are deposited at the right distance layer-by-layer. Moreover, the surface of the strand is perfectly smooth because the extrusions were designed to have shear stresses in the nozzle smaller than the σ c measured. In the next work, 3D RheoPrinter will be used also to investigate the welding problem among the printed strand by means of the prediction of die swell and melt fracture that can increase the contact surfaces.

Conclusion
In the current work, a small, cost-effective and simple modification of a commercial printer was designed, manufactured and tested to measure inline viscosity, extrudate swell and melt fracture (3D RheoPrinter) of a bio-based and biodegradable polylactic acid and polycaprolactone. The modification of a standard nozzle was described in detail with technical drawings. Using a capillary rheometer approach, the measured pressure and the imposed volume flow rate were used to calculate the shear viscosity through the correction of Weissenberg-Rabinowitsch equation. Moreover, a camera placed at nozzle exit allowed the measurement of extrudate swell and melt fracture that are important for achieving a good resolution in additive manufacturing. The results of the nonlinear rheological characterization by the new 3D RheoPrinter for PLA at 180 ∘ C and PCL at 70 ∘ C and 90 ∘ C are compared with data collected by a standard rotational rheometer.
A good agreement between the viscosity measured with 3DRheoPrinter and rotational rheometer is found within an error of about 10% for a confidence interval of 96%. The mismatch between the two measurements could be due to a different degradation of the sample in the two rheometers. Currently, the biggest challenge, in using recycled polymers for FDM, is that the properties of the recycled plastic materials are not known. The use of an inline rheological characterization, as in 3D RheoPrinter, has all that is needed to enable the use of recycled materials in FDM. For this reason, the 3D RheoPrinter has been tested for printing 3D structures obtaining a good resolution.
Acknowledgements I thank my colleague Claudio Walker for insightful discussions and the data collected from the rotational rheometer.
Funding Open access funding provided by Università degli Studi di Napoli Federico II within the CRUI-CARE Agreement.

Data availability
The dataset generated during and/or analysed during the current study are available from the corresponding author on reasonable request.

Code availability
The Matlab code generated during and/or analysed during the current study is available from the corresponding author on reasonable request.
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http:// creat iveco mmons. org/ licen ses/ by/4. 0/.