# Impact of Mesh Resolution and Temperature Effects in Jet Ejector CFD Calculations
## 2 Materials and Methods
### Meslt
Insufficient mesh refinement can also produce artificial shock waves or \"numerical artifacts\" that do not physically exist, thereby distorting the shock wave structure and interactions. In this type of jet ejector, the primary flow reaches supersonic conditions, producing a discharge jet with a set of oblique shock waves and expansion waves. The defined mesh must be sufficiently dense to allow the correct representation of these shock waves and to accurately locate them in the ejector. As mentioned earlier, the literature commonly employs meshes with lower resolutions, typically containing 20,000 to 300,000 cells [24; 29]. To evaluate the impact of mesh refinement on the accuracy of the simulations, we compared the highly refined mesh with a coarser one that aligns with conventional approaches. This comparison aimed to assess precision differences and justify the high cell count used in case no. 8 (Table 3). For this comparative analysis, an additional mesh case was selected to represent lower-resolution meshes. Specifically, case no. 3 from Table 3 was chosen, as it was the first to show a significant reduction in the \(y\)+ number, an entrainment ratio close to the final achieved value, and a moderate cell count within the same order of magnitude as those reported in the literature. This mesh is a generic, structured grid applied to the entire ejector geometry, generated using a polygonal mesh combined with a prism layer meshing. The mesh is a high-quality, two-dimensional structure confined to the xy-plane, with spatial dimensions of 0.34551 m in the x-direction and 0.01500 m in the y-direction. It consists of over 100,000 cells and maintains a mesh quality of 0.05, with a base size of 0.001 m. The mesh includes eight prism layers with a stretch factor of 1.1, where the minimum thickness is set at 10% of the base size, and the total prism layer thickness is also 10%. This coarser mesh version used for result comparison is referred to as _coarser_ in the analysis. The same generic mesh has been used as a base for the _refined_ case. Whereas some parts of the ejector where the flow is in subsonic conditions will not have shock waves and will not need denser meshing (subsonic flow will take place at the entrance of the primary  
Figure 4: Dependency of entrainment ratio on number of cells. and secondary flows and at the end of the diffuser), in the divergent part of the nozzle of the primary flow and in the mixing zone of the two flows, the flow will be in supersonic conditions and will require a more refined meshing [15]. To improve accuracy in areas where the flow is supersonic, two zones were defined where more precision was needed with the calculations. Figure 5 shows these two zones designated with the names _Block I_ and _Block II_. These rectangular zones with custom control differ by the base cell size and prism layer thickness. Additionally, to ensure the accurate resolution of shock waves and steep pressure gradients, a dynamic refinement strategy was implemented using a field function-based refinement approach. The refinement was governed by the magnitude of the pressure gradient, defined as mag(\(\
abla\)P), through the conditional expression, shown in Equation (3), where each set of cases has been studied to define the ranges of pressure gradients appearing and the refinement function was updated. \[\text{Refinement Size}= \begin{cases}1\times 10^{-7}&\text{ifmag}(\
abla P)>5\times 1 0^{10},\\ 1\times 10^{-6}&\text{ifmag}(\
abla P)>5\times 10^{9},\\ 1\times 10^{-5}&\text{ifmag}(\
abla P)>5\times 10^{8},\\ 1.2\cdot\text{Volume}^{1/3}&\text{otherwise}.\end{cases}  \tag{3}\]  
As Equation (3) shows, if the pressure gradient, mag(\(\
abla\)P), exceeds \(5\times 10^{10}\), the refinement base cell size (rbcs) is set to \(~{}1\times 10^{-7}\), providing the highest level of refinement. For regions with a gradient greater than \(~{}5\times 10^{9}\), an rbcs of \(1\times 10^{-6}~{}\) is applied, while for gradients exceeding \(5\times 10^{8}\), the rbcs is \(1\times 10^{-5}\).