## 3 MATLAB Turbine Design System
The fluid properties are assessed via the isentropic relationships at each station point, which are used to establish the passage areas throughout the stage. Like the earlier estimation made for total to static efficiency, this procedure requires an initial estimate for the stator enthalpy loss coefficient, \(\xi_{stator}\). Again, this assumption is proven to not impact the final results. An estimate of \(\xi_{stator}=0.06\) was chosen, based on examples from [PERSON] and [PERSON] et al. [15; 17]. The meanline thermodynamic losses are then calculated using Equations (A28) to (A32) and are to be compared with the Ainley-Mathieson predictions once a design has been selected. The rotor enthalpy losses are directly evaluated from the difference between stator enthalpy loss estimate and the predicted stage enthalpy loss from the total to static efficiency for the current iteration. The stator meanline loss component is recalculated by considering the pressure loss over the stator and converting it to an enthalpy loss via the isentropic Mach number relationship in Equation (A30). Free vortex equations (Equations (A33) to (A39)) are applied to calculate the variation in fluid velocity angles at hub (0% span) and tip (100% span), along with the tangential blade speed at each span for the leading and trailing edge. Due to the flow velocities the fluid must be considered as compressible, so the passage area is expanding through the stage, leading to a variation in linear velocity between the leading and trailing edge of the rotor blade. Consequently, velocity triangles for rotor inlet and exit cannot be plotted with a shared \(U\) vector at the hub and tip. At this point additional design parameters are required to generate the three-dimensional blade geometry. These parameters are described in Table 2. While it is possible to combine each of these parameters as a generic value for both the stator and rotor, it was decided to introduce additional design flexibility and broaden the design space by separating them. The Zweifel coefficient describes the tangential aerodynamic force generated by the blade as a function of blade surface area and can be used to estimate an optimal value of the axial solidity, \(\sigma\) \begin{table}
\begin{tabular}{c c} \hline \hline
**Boundary Conditions** & **Design Parameters** \\ \hline \(T_{11}\), \(P_{11}\), \(P_{3}\), \(N\), \(\ m\), \(\gamma\), \(C_{p}\) & \(D_{max}\), \(\phi\), \(\alpha_{3}\), \(HTR\) \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Boundary conditions and design parameters required for meanline analysis. The axial solidity relates the size of the blade with the spacing between blades such as to minimise unnecessary frictional losses from a large chord length while managing the additional flow separation losses incurred from a shorter, more strongly curved blade [16]. Using the previously determined turbine information and these design parameters the blade geometry is generated meridionally and in the aerofoil profile plane from Equations (A40) to (A55). To reduce the rotor vibrational response and ensure the blade rows are balanced to avoid natural frequencies best practice is to use an odd number of rotor blades and an even number of stator blades [15; 16]. To enforce this, the values of \(Z_{rotor}\) and \(Z_{stator}\) are rounded to the nearest odd and even integer respectively. The pitch is then recalculated exactly, by rearranging the blade number calculations for pitch and using the new integer blade count. With the blade geometry fully modelled, the final stage of the iteration loop is to evaluate the turbine stage performance according to the Ainley-Mathieson estimation with a modification for the Secondary loss components and correlation for rotor tip clearance from Dunham & Came. The calculation of profile losses is subject to a correction factor based on the maximum thickness/chord ratio of the aerofoil profile at mid span, however this value is not obtainable at this point within MATLAB. The correction factor is 1 at a maximum thickness/chord of 0.2.