Monkey Mechanics


Overview

Requirements:

Goal

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 Airfoil Generation

PARSEC Airfoil Definition

PARSEC is a method of defining an airfoil by its upper and lower curve using a polynomial that meets 11-12 geometric parameters.

PARSEC Airfoil Creation

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

Solving the System

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.

Polynomial Creation

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.

Clip & Fillet

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.

Point Distribution

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.

STAR CCM+ Macro Generation & Execution

Macro Template

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.

Execution

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.

Results

Final Workflow

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.