Structured Mesh Generation and Numerical Analysis of a Scroll Expander in an Open-Source Environment

: The spread of the organic rankine cycle applications has driven researchers and companies to focus on the improvement of their performance. In small to medium-sized plants, the expander is the component that has typically attracted the most attention. One of the most used types of machine in this scenario is the scroll. Among the other methods, numerical analyses have been increasingly exploited for the investigation of the machine’s behaviour. Nonetheless, there are major challenges for the successful application of computational ﬂuid dynamics (CFD) to scrolls. Speciﬁcally, the dynamic mesh treatment required to capture the movement of working chambers and the nature of the expanding ﬂuids require special care. In this work, a mesh generator for scroll machines is presented. Given few inputs, the software described provides the mesh and the nodal positions required for the evolution of the motion in a predeﬁned mesh motion approach. The mesh generator is developed ad hoc for the coupling with the open-source CFD suite OpenFOAM. A full analysis is then carried out on a reverse-engineered commercial machine, including the refrigerant properties calculations via CoolProp. It is demonstrated that the proposed methodology allows for a fast simulation and achieves a good agreement with respect to former


Introduction
Scroll compressors have been extensively employed in air conditioning and refrigeration since the 1980s.Their success is mostly related to a low level of noise and vibrations, together with a small number of moving parts and a compact design.In the last decade, scroll compressors and other positive displacement machines (PDMs, e.g., piston, screw, and vane machines) have been operated as expanders in Organic Rankine Cycles (ORCs) to generate power from waste heat and renewable energies [1].Compared to its alternatives, the scroll expander is generally characterized by higher pressure ratios and efficiency and by lower flow rates and rotational speeds [2].On the other hand, one of the major drawbacks of this technology is the maximum working temperature (maximum temperature of 250 • C reported by Seher et al. [3]): higher temperatures would increase excessively the thermal expansion of scroll spirals, leading to significant increments of internal leakages [4].
Scroll expanders are frequently adopted in micro-ORCs with power outputs up to 2 kW, as described in different literature works reporting experimental tests.Wang et al. [5] have tested a scroll expander with R134a over a wide range of rotational speeds, reaching a shaft work output close to 1 kW.Experimental characterizations of scroll expanders with R245fa are described in References [6,7], with maximum isoentropic efficiencies of 66.5% and 75.7%, respectively.Other tests using HCFC-123 and R134a as working fluids are analyzed in References [8,9].
The architecture of the scroll geometry is the cornerstone of the design and optimization of the whole machine.The inventor of this technology, Léon Creux, has introduced in 1905 a scroll profile based on the involute of a circle, which is still the most spread solution [10].However, various alternative profile shapes have been developed during the XX century [11][12][13].
The expander is designed with a fixed built-in volume ratio, which is the volume of the discharge chamber at the beginning of the discharge phase divided by the volume of the suction chamber at its maximum extension.The built-in volume ratio determines the theoretical pressure ratio of the fluid expansion.Nonetheless, leakage flows, off-design operating conditions, and wear could commonly force the expander to work in under-or over-expansion conditions.The expander works in conditions of under-expansion when the internal pressure ratio imposed by the chambers volumes variation is lower than the system pressure ratio.Consequently, the pressure in the working chamber at the end of the expansion is higher than the pressure in the discharge area.This phenomenon produces a significant flow rate peak at the expander output when the discharge phase occurs.On the contrary, over-expansion occurs when the internal pressure ratio of the expander is higher than the system pressure ratio.The fluid is then forced to flow back, leading to a recompression, which is particularly detrimental for the machine performance [8].
Currently, the most used methods for the design and the prediction of scroll expanders performance are based on theoretical modeling, thermodynamic analysis, and experimental studies.Shaffer et al. [14] have presented a control volume approach to model the geometry of a scroll machine.The analytical and thermodynamic modeling of scroll compressors is extensively treated in References [15][16][17][18][19], with and without experimental validation.For what concerns the scroll expander, Ma et al. [20] have presented a dynamic model with experimental validation, introducing an overall dynamic friction coefficient of the machine to enhance the model adaptability.Lately, Bell et al. and Ziviani et al. have presented [21] and demonstrated the capabilities [22] of an open-source general framework for the simulation of various positive displacement machines, including scrolls.When the geometry of the scroll expander is not exactly known, deterministic models similar to the ones reported above are not suitable options.Lemort et al. [8] have developed and validated a semi-empirical model that requires a limited number of parameters.Examples of similiar studies for scroll and other positive displacement expanders are reported in References [23][24][25][26][27].
Recently, industries and researches have began to include Computational Fluid Dynamics (CFD) analyses in scroll machine designs and optimizations [28][29][30][31][32][33].This tool allows to retrieve information about leakage flows nature, temperature distribution, and three-dimensional behavior of the flow inside the expander/compressor.Moreover, CFD could be employed to tune analytical and thermodynamic models as low-cost alternatives to experimental campaigns.One of the most challenging aspects of computational analyses of scroll machines (and positive displacement machines in general) is the grid generation process.
The nature of the problem imposes to adopt a dynamic mesh approach in order to correctly model the moving parts of the machines.Casari et al. [34] have reviewed different approaches for the dynamic mesh treatment in screw machines numerical analyses, including immersed boundary, adaptive remeshing, and key-frame remeshing.Most of the techniques presented in their work are suitable also for scroll expanders and compressors, but the most popular approach is certainly the custom predefined mesh generation [35].This technique consists in the realization of a user-defined number of grids per rotor pitch.Each grid represents a set of control points (coordinates) through which the mesh nodes has to pass during the simulation.Several examples of this approach can be found in the literature, including applications to screw machines [36][37][38][39], root machines [40,41], and scroll machines [28,31,42,43].
In this work, the authors present a C++ library for the generation of structured body-fitted meshes of scroll compressors and expanders.Starting from the scroll profiles and main dimensions, the meshes are generated by means of an elliptic grid generation algorithm.This library has been realized in accordance with the coding standards of the open-source CFD software OpenFOAM.Furthermore, the authors have performed a full three-dimensional CFD analysis of a scroll expander suitable for micro-ORC applications.The library developed can be a useful tool for the development of structured meshes of scroll machines.One of the possible outcomes of this work could be the realization of advanced numerical analysis of ORC systems, such as the Whole ORC Model (WOM) presented in Reference [44].

Materials and Methods
The authors have realized a C++ library according to the OpenFOAM coding standard in order to perform numerical simulations of scroll machines by means of the custom predefined mesh generation method.The first step in this method is the realization of a body-fitted structured grid starting from the scroll geometry.This kind of grid is characterized by elements of good quality and well-defined connectivity rules.When the path of the moving parts is known, a set of structured meshes can be generated in advance in order to describe chronologically sequential positions of the moving bodies.
In this case, an increment in time corresponds to an increment of the crank angle, so the user is able to define a number of angular positions of the mobile spiral that have to be meshed.When the actual simulation is executed, the nodes of these predefined meshes become control points for the grid nodes in order to maintain good element quality.The mesh nodes pass through the control points, but the connectivity of the mesh remains the same.In this way, both re-meshing and interpolations are avoided during the analysis.One of the advantages of this strategy is that it is respectful of the space conservation law.Moreover, mass and energy imbalances derived from interpolation procedures are not a concern in this case because no interpolation is performed.

Body-Fitted Structured Grid
The structured grid generation process of a scroll machine has been achieved as follows: STRUCTURED DOMAIN DEFINITION The generation of a structured mesh of all the scroll domains, including the ports region, is a very challenging task.It could be very difficult to model narrow gaps and complex features of the geometry.Consequently, it has been decided to isolate a portion of the machine that includes the mobile scroll, as represented in Figure 1.The two edges of the structured domain are imported as a list of points, representing the control points for two different spline curves.This region has been discretized by means of a structured strategy, while the other parts can be meshed with unstructured algorithms.Then, the connection between the two regions must be performed with one of the interface strategies implemented in OpenFOAM.

MOBILE SPIRAL DISCRETIZATION
The mesh boundary discretization starts from the mobile spiral edge, where the boundary points are defined according to criteria based on the variation of the slope of the straight line tangent to the spiral.The variation of the slope is maintained constant along the mobile spiral in order to have a finer discretization in the central region of the machine, where the high pressure port is placed.
The position of the points on the mobile edge remains the same during the whole meshing process.The points are translated with the spiral in order to represent different angular position, but their relative positions do not change.

FIXED SPIRAL AND CASING DISCRETIZATION
The other edge of the structured domain is represented by the fixed spiral merged with a portion of the casing profile.The points are collocated on the fixed edge in order to create lines as normal to the edges as possible.
In the central region of the machine, where it is not possible to create lines normal to both the edges, a special treatment is introduced: the points on the fixed edge follow a squared cosine distribution with variable parameters (related to phase and period) in function of the crank angle.The user has to find the best fitting parameters for few main angular positions of the mobile scroll, and then, the intermediate parameters are interpolated from the main ones.The first guess for the internal nodes is then provided by a transfinite interpolation.

ELLIPTIC INTERNAL MESH GENERATION
The second step is an elliptic mesh generator with a control map that imposes the orthogonality of the grid at the boundary.This method has been developed according to the work presented by Spekreijse [45].This meshing strategy is characterized by a transformation from a computational space (ξ,η) to the cartesian domain (x,y), passing through a parameter space (s,t), as represented in Figure 2.
The Picard iteration method with a finite difference discretization has been applied for the solution of a system of nonlinear elliptic equations, reported below: x k η = 0 where x represents the position vector and the subscripts ξ and η represent a derivative in function of the variables of the computational space.The apexes k and k-1 refer to the current and previous iteration of the Picard method, respectively.In this system of equations, the coefficients P, Q, and R can be calculated using the derivatives of the position vectors at the previous iteration in the function of the computational space variables.On the contrary, in order to evaluate S and T, the derivative of the position vectors relative to the parameter space variables are needed.The variables of the parameter space are calculated by means of the following Laplace equations: where s and t represent the unknowns of the systems while the orthogonality at the boundary is reached by imposing a Neumann boundary condition at the boundaries of interest.The Laplace equations have been discretized by means of the finite volume strategy, and the resulting systems have been solved using a BiConjugate Gradient Stabilized (BiCGSTAB) method.
The structured mesh is generated in two dimensions and then extruded in order to create a three-dimensional computational grid.

Moving the Mesh
The first structured mesh is generated for an initial position of the scroll machine.Later, the user has to define a number of grids per revolution that the software must generate and to write in files containing the list of control points for the mesh nodes.A dynamic motion solver, which has been added to the set available in OpenFOAM, updates the nodal positions for any user-defined time step, keeping the control points files as a reference.In order to evaluate the location of a mesh node for the ith time step, the following equation is solved: where the subscript AG represents the actual grid file and NG is the next grid file.AG and NG are the files including the nodal positions at the time steps we are interpolating among.
The library that has been developed in this work is therefore comprehensive of two steps: mesh generation (including the actual mesh and the nodal position for a user-defined number of angular steps) and the mesh motion part, that takes care of the evolution of the geometry as the operation of the machine proceeds.The sum of the two goes under the name of the ScrollFOAM library and is the only addition to be provided to OpenFOAM in order to simulate scroll machines (either in compression or expansion configuration) with the above-described approach.The library, as developed, can be fully integrated into OpenFOAM and can be empolyed with factory or user-defined libraries (e.g., for the CoolFOAM wrapper, as described below).

Scroll Geometry and Simulation Setup
At this stage, the mesh has been completed (both the starting position as well as the control points that drive the evolution), and therefore, the simulation can be set up.The procedure is shown on an expander that is set to operate in realistic conditions.The cycle taken as a reference is a µ-ORC installed at the University of Bologna and is described in Reference [46].The original cycle is composed of a brazed plate heat exchanger with 64 plates as evaporator, a brazed plate heat exchanger with 16 plates as a regenerator, a shell and tube heat exchanger as condenser, a volumetric three pistons radial engine used as expander, and a volumetric gear pump controlled by an inverter that supplies the organic fluid over the ORC system position under the liquid receiver (tank) realizing a column of water of about 1 m high.The ORC system operates with R134a as working fluid.This layout is considered as a reference and is exploited to feed the numerical model with actual operating conditions.
The scroll expander simulated in this work is thought to be a potential replacement for the piston engine.The design point for the expander has been chosen for the analysis, as it falls inside the operating range of the cycle.Specifically, the machine investigated is the commercial SANDEN TRSA09-3658 scroll compressor.The geometry of the model has been obtained by means of a reverse engineering procedure, as described in Reference [47].The acquired model is then slightly modified: the thickness of the spirals has been reduced of 1/7th with respect to the original work of Reference [47].This change has been introduced for the sake of computational speed: all the features of the scroll are retained, and the simulation is fully 3D.Also, the position of the discharge port is modified: the port has been redesinged to be axial as the inlet and to be located in proximity to the discharge.This expedient has been included in order to avoid the presence of a non-conformal interface to link the morphing chamber domain to the static part constituted by the casing.The non-conformal interface approach has been tested with unsatisfactory results: in that scenario, the interface would unavoidably deform in the normal-to-interface direction.This occurrence is not robustly handled by OpenFOAM, leading to stability problems.The turbulence model has found to be severely affected by this problem.The resulting fluid domain is reported in Figure 3.The built-in volume ratio of the machine is of 1.82, given by two spirals of 2 wraps each.A single working chamber per spiral moves the refrigerant from the high pressure port to the low one.The geometry tested does not present axial clearances.The flank gaps that characterize the operation of the machine are reported in Table 1.The size of the clearances is fully in line with common engineering practice.The boundary conditions that have been imposed at the inlet of the scroll are static temperature equal to 358 K, far field static pressure of 20 bar (wave transmissive), 1% of turbulent intensity, and a mixing length of 0.7 mm (the inlet channel diameter is equal to 12 mm).A static pressure of 11 bar fixes the counter pressure at which the machine operates.All the walls are considered adiabatic.The simulation runs fully turbulent with the k-ω SST model of Menter [48] with updated coefficients [49].
Concerning the thermophysical property calculations of the refrigerant during the operation of the expander, both the ideal gas model with constant properties and the full real gas calculation have been tested.The refrigerant operates in a region in which the deflection from the ideality is nonnegligible.For this reason, the equation of state proposed by Tillner-Roth et al. has been adopted [50].The modeling is carried out thanks to the CoolFOAM wrapper developed by the authors [51]: the CoolProp library [52] is exploited for retrieving the properties in the actual conditions.This choice has been characterized by an increase of 23% in the elapsed computational time of one revolution, if compared to the ideal gas approximation.

Mesh Results
The final result is a mesh with satisfying values of skewness, orthogonality, and aspect ratio.All these parameters, and many others, widely fit all the quality criteria set by the OpenFOAM standards.An example of structured mesh is presented in Figure 4, which represents the discretization of a SANDEN TRSA09-3658 scroll compressor.Table 2 contains some illustrative values of skewness, non-orthogonality, and aspect ratio for this grid.More details on this machine, which has been numerically analyzed in this work, are given in the next sections of this paper.

CFD Results
The pressure pattern as the operation of the scroll evolves with the conditions described in Section 2.3 is reported in Figure 5.The filling procedure of the high-pressure chamber can be noticed passing from Figure 5a-d.Further, the good operation in proximity of the design point is proven by the pressure of the chamber before the opening of the discharge port (Figure 5d shows the pressure distribution of a few degrees before the actual opening): the pressure in the chamber is slightly above the output value, and therefore, no under or overexpansion is recorded.The minimum pressure reached in the domain is slightly above 8 bar and reached downstream the working chamber sealing clearance.In such areas, the flow becomes chocked as reported in Reference [34].The simulation catches well such phenomena and proves to be robust and stable also in case of transonic problems.Another interesting result shows the deflection from the ideal behaviour of the refrigerant during the operation and is reported in Figure 6.The maximum deflection from 1 is found in the inlet chamber and is roughly 15%.As a general remark, the real gas effects lower (Z tends to 1) as the fluid goes through the gaps and increase in the bulk of the chambers.Regarding the performance of the scroll, Figure 7 reports the mass flow rate that is processed over an entire revolution of the machine.Under the conditions investigated, the machine processes 27.5 g/s.It should be kept in mind that only a portion of the entire thickness is included.The value obtained is in line with other investigation of the current machine [47].It is possible to estimate also the VFM (Volumetric Flow Matching Ratio), as the theoretical volume is isolated by the scroll over the CFD-calculated volume flow operated by the scroll.The resulting VFM is of 1.23.This value is perfectly in line with typical values of VFM, that ranges from 1.07 to 1.3 [53].The imbalance in the mass with the current setup is of the order of 0.1%, that is remarkably good considering the application and the presence of two ACMIs (Arbitrary Coupling Mesh Interfaces).The outflow shows high pulsations with respect to the inlet, and the amplitude of the oscillation is of roughly 80% of the average value.With regards to the output that can be extracted from the machine, as reported in Figure 8, the power varies over a period from less than 50 W to almost 250 W, with an average of 149.2 W. This value has been calculated as the product between the mechanical torque and the rotational speed (2000 rpm).This is perfectly in line with what has been found in the previous simulation and with the nameplate power of the machine (that is 1 kW, very close to 7 times the actual power).The average internal isentropic efficiency of the machine is therefore 41%, that is typical for this kind of applications [53].This value has been calculated as the ratio of the average power produced by the expander and the power that it would produce if the expansion of the fluid was isentropic.
A final remark regards the impact of the gaps in the volumetric efficiency.To help in visualizing the relative importance of the gaps, Figure 9 reports the flow field in a constant-span plane.It can be clearly seen how the velocity in clearances is remarkably high with respect to the bulk of the working chambers.An interesting remark regards the different speeds that are reached in the two gaps of each pocket: the higher Mach numbers are obtained in the second gap, closer to the outlet port.From Figure 9, it can also be seen that the high speed traces downstream the gaps are the ones in which the real gas effects are lower (as can be noticed by comparison with Figure 6).

Conclusions
In this work, a new meshing tool developed in C++ has been proposed.The capability of this tool to manage a fully 3D CFD simulation is proven by the analysis of a commercial scroll compressor in an open-source CFD environment, i.e., OpenFOAM.The results that are presented here are in line with what has been found in previous numerical investigations of the same scroll machine.Those calculations, on the other hand, have been performed with commercial software, and this work provides a tool for performing CFD analysis in a positive displacement machine with open-source software.Moreover, an imbalance in mass of the order of 0.1%, which represents a very good level of accuracy, has been reached.
The application of ScrollFOAM provides a unique tool for the numerical investigation of refrigerant behaviour in scroll machine with open-source tools.The procedure has been demonstrated for an expander.This tool can be used to foresee the off-design behaviour of the ORC cycle in terms of output power performance.Variations in the boundary conditions have been tested, and the solver proves to be robust and accurate in catching over-and under-expansions.The suitability of the entire infrastructure to the investigation of ORC cycles is enhanced by the coupling of the solver with CoolFOAM, the CoolProp wrapper for OpenFOAM.With such an expedient, the real gas modeling gains in accuracy as the Helmholtz equation of state can be used.The tool developed in this work is a fundamental step for achieving the WOM infrastructure, as the state-of-the-art in fast and robust simulation of positive displacement machines in OpenFOAM is limited to piston-type expanders.The extension of the modeling capabilities to other types of machines is needed for a more spread usability of CFD in ORC cycles.

Conflicts of Interest:
The authors declare no conflict of interest.

Figure 1 .
Figure 1.Structured domain of the scroll machine.

Figure 3 .
Figure 3. Fluid domain of the scroll expander comprehensive of the high pressure (central) and discharge ports.

Figure 6 .
Figure 6.Compressibility factor for R134a during the operation of the expander.

Figure 7 .
Figure 7. Flow rate variation over a revolution of the shaft.

Figure 8 .
Figure 8. Power variation over a revolution of the shaft.

Figure 9 .
Figure 9. Velocity distribution in the domain: The arrow size is scaled by the local velocity magnitude.

Author
Contributions: E.F. and N.C.methodology, conceptualization, and writing original draft; E.F. software and data curation; M.P. supervision and funding acquisition; A.S. writing-review and editing.All authors have read and agreed to the published version of the manuscript.Funding: The research was partially supported by the Italian Ministry of Economic Development within the framework of the Program Agreement MSE-CNR "Micro co/tri generazione di Bioenergia Efficiente e Stabile (Mi-Best)".

Table 1 .
Flank gap size evolution during the operation of the machine.

Table 2 .
Mesh quality parameters in function of the mobile scroll position.