Create a workflow to generate 3D CAD models in STAR CCM+ from PARSEC coefficients. In its final state, single element airfoils are automatically generated and tested inside of STAR CCM+ after a Latin hypercube sampling (LHS) of the design space.
PARSEC is a method of defining an airfoil by its upper and lower curve using a polynomial that meets 11-12 geometric parameters.

Solving the A x X = B system of equations for the X matrix gives the polynomial coefficients for each curve.

I use MATLAB to solve these equations as it is designed for these problems. I build the A and B matrix and ask MATLAB to solve for the X matrix.

I use symbolic functions in MATLAB to create the polynomials from the coefficients. Using symbolic equations allows me to easily update the polynomial and solve for specific points or derivatives.

Using my symbolic equations, I clip the end of the airfoil if needed, close the trailing edge, and symbolically solve for derivatives to apply a fillet. I combine this into 2 piecewise functions for the upper and lower curves.

When creating a CSV of the airfoil to import into STAR I have to generate points along the surfaces. The distribution of these points is important as it will affect meshing and simulation. Points are distributed evenly along each curve.
Build a simulation in STAR CCM+ and record a sample macro that runs a whole simulation. Adjust the sample macro into a template to prepare for further adjustments, setting the parameters (AoA e.g.) into an unknown to prepare for data input.
Use MATLAB to input the parameters needed into the macro, then use a cmd command to start the macro. Output the result CSV and wait for further integration and analysis.
Built a functional STAR-CCM+ Java macro to automatically import airfoil CSVs, generate geometry, and run simulations. Established MATLAB → STAR automation via system command call and verified the full execution pipeline.
