*2.2. 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 *i*th time step, the following equation is solved:

$$\varkappa\_{i,final} = \kappa \ast \varkappa\_{i,AG} + (1 - \kappa) \ast \varkappa\_{i,NG}$$

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).

#### *2.3. 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.

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

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.


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

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.
