Skip to main content
Piper Cherokee

Tutorial for CFD beginners or new-to-Luminary users walking through setting up an external aerodynamics simulation

Updated over a week ago

Reading Time: 20 min

Simulation Time: 90 s

Simulation Cost: 10

Target audience: new-to-Luminary

In this Tutorial

The Piper PA-28 Cherokee is a small single-propeller aircraft used for flight training and personal use. This tutorial will guide you through demonstrating and using Luminary Cloud's external aerodynamics solution. Follow the steps to upload a CAD file, generate a computational mesh, and analyze aerodynamic features.

Create a New Project

  1. Log into Luminary Cloud.

  2. On the Projects Summary Page, click New Project.

  3. From the Tutorials tab of the project template window, select Piper Cherokee.

  4. Click Create to create and open your new project.


Viewing Your Model

Following successful import, you'll see a round sphere in the 3D Viewer. This is the far field.

On the left, you'll see the geometry tree, which contains Tags, Surfaces, and Volumes. Under Surfaces, click the eye to the right of the Shell 1 surface group. This will turn off visibility for those surfaces. Click the F hotkey to Zoom to Fit and make the model easier to view.

A few other useful 3D Viewer controls to experiment with include:

  • Click and drag with your mouse. This will rotate the model.

  • Hold down the Control button and click and drag with your mouse. This will translate the model.

  • Scroll upwards and downwards with your mouse scroll button. This will zoom in and out.

Create Tags and Assign Surfaces

Next we will create tags and assign the surfaces to them.

  1. Under Tags, select all of the tags by clicking the top tag, holding Shift, and then clicking the bottom tag.

  2. Right click on one of the tags and select Delete to delete all of the imported tags.

  3. In the geometry tree under Surfaces, select the Shell 2 surface group.

    1. Right click and select Add to Tag > New Tag...

    2. Name the tag "Plane" and click Create.

    3. A new tag will be created containing all of the plane surfaces. This tag will be used later to assign meshing parameters and boundary conditions.

  4. In the geometry tree under Surfaces, select the Shell 1 surface group.

    1. Right click and select Create Tag.

    2. Name the tag "Far-field" and click Create.

    3. A new tag will be created containing the far-field surfaces.

  5. In the geometry tree under Volumes, select Volume 1.

    1. Right click and select Add to Tag > New Tag for Volume...

    2. Name the tag "Fluid Volume" and click Create.

    3. A new tag will be created containing the fluid volume.

Before moving on to model setup, we need to provide one more piece of information. On the right side of the screen, you'll see a box labeled Geometry Checklist. One of the items states "Is your CAD solid or fluid?". This is a reminder to ensure that you have a fluid volume in the model. In this case we imported a fluid volume encapsulated by a far-field - click on this item and select Fluid from the dropdown.

Finally, click Load to Setup at the top right of the screen to transition to the next stage of the workflow. The geometry will now be checked to ensure it is of sufficient quality; this could take a few minutes.

Set Up Physics

On the right side of the screen you'll see a box labeled Physics Checklist. From this tree you can create new physics models, apply boundary condition and solver initialization, and define frames & motion. You'll notice a red dot next to some items. This indicates that inputs are required before continuing to the next step in your workflow setup.

  1. Expand the Physics and Fluid Flow 1 items in the tree.

  2. Click the plus (+) sign next to Boundary Conditions. Select Wall.

  3. Keep the default No-Slip wall condition and associated settings. Click into the Surfaces box at the bottom of the panel. Expand the Geometry tree to reveal the Tags section (you may need to collapse the Geometry Health check box for better visibility). Select the Plane tag under Tags in the geometry tree on the left side of the screen. This will create a no-slip wall boundary condition on the plane surfaces.

  4. Click the plus (+) sign next to Boundary Conditions. Select Far-field.

  5. Input the below parameters:

    • Static Pressure: 70,100 Pa

    • Mach Number: 0.216

    • Temperature: 288.15 K

    • Select Flow Angles from the Flow Direction dropdown. Input an Angle of Attack of 2°

  6. Click into the Surfaces box at the bottom of the panel. Select the Far-field tag under Tags in the geometry tree on the left side of the screen. This will create a far-field boundary condition with the above parameters on the far-field surfaces.

  7. Finally, select Initialization from the Physics Checklist tree and set the Initialization parameter to Far-Field Values.

Define the Body Frame

Before moving on to the next stage of this project, define the Body Frame for this simulation. This information is required if you want to define flow conditions using angles of attack, as we did for the far-field above, or if you need to calculate output quantities such as lift or drag (i.e., for all of these you need to know which directions constitute forwards, upwards, etc.).

To define the Body Frame:

  1. Click on the Frames & Motion section header in the control panel.

  2. Click the + icon to the right.

  3. Select Body Frame.

  4. Ensure Origin is set to 0, 0, 0, pointing from the center of the airplane out through its starboard wing.)

  5. Ensure Orientation is set to 0, 180, 0, pointing from the center of the airplane out through its nose.

We can now select the purple Mesh button from the top right of the screen to move to the meshing stage of the workflow.

Generate Mesh

Before running a simulation, we'll need to generate a computational mesh based on the geometry in the project.

First we'll set up the parameters that are used to generate the mesh. Normally, you'll want to iterate this process, starting with a coarser mesh and refining it as needed.

We recommend starting coarser and refining because this will require fewer computational resources in total. In this tutorial, we'll go ahead and generate a fine mesh and use a Clip to analyze it.

Set Mesh Parameters

  1. From the Mesh Checklist box on the right side of the screen, select Mesh.

    • From the Sizing Strategy dropdown, select Target Count.

    • Enter 20 in the box (20 million CVs).

    • Scroll to the Optional section. Check the box to enable Auto Refinement.

  2. Select Mesh Size below Mesh in the control panel and set the parameters for the mesh within the volume:

    • Min Size: 0.005

    • Max Size: 50

    • Applies to: All Volumes

  3. Click on Model in the control panel to set the parameters for surface mesh on the airplane:

    • Curvature: 4°

    • Max Size: 0.05

    • Applies to: Selected Surfaces, then click inside the box and add the "Plane" tag from the geometry tree on the left side of the screen.

  4. Click on the Boundary Layer in the control panel to set the parameters for the boundary layer on the airplane:

    • Number of Layers: 20

    • Initial Size: 0.00001

    • Growth Rate: 1.2

    • Applies to: Selected Surfaces, then click inside the box and add the "Plane" from the geometry tree on the left side of the screen. You may need to clear the pre-populated surfaces before selecting the Plane tag.

  5. Select Mesh from the mesh checklist. Scroll to the bottom of the properties panel and click Generate Mesh.

When the mesh has been generated, in the properties panel, you should see that the mesh has around 19M control volumes.

At the top left of the 3D Viewer, the first dropdown menu allows you to toggle between viewing the Geometry and Mesh. The dropdown menu to the right allows you to select the appearance geometry or mesh entities. With Mesh selected and the Far Field surface hidden, choose Surface With Edges to view the surface mesh on the airplane.

Analyze the Mesh

Create clips through the volume to get a better view of the mesh. One of these will cut vertically through the centerline of the plane and the other vertically from wingtip to wingtip.

To create a clip through the centerline:

  1. Ensure the Far-field surfaces are hidden. To hide them, navigate to the Tags section of the geometry tree and click the eye icon to the right of the Far-field tag.

  2. On the left of the Visualization toolbar above the 3D Viewer, click the Add Clip.

  3. In the properties panel, set:

    1. Representation: Surface With Edges. This will make seeing the cells on the clips surface a little easier.

    2. Clip Type: Plane

    3. Origin: 0, 0, 0

    4. Normal: 0, 1, 0 (or click Y)

  4. Click the check button to create the clip.

Click the purple Outputs button from the top right of the screen to continue to the Outputs stage of the workflow.

Assigning Outputs

We output equation residuals and surface-integrated scalar outputs at every iteration, on all surfaces, volumes, monitor planes, and monitor points. This allows you to extract outputs after running a simulation without requiring you to re-run the simulation!

However, if you’d like to define a stopping condition based on an output, you need to define a specific output in this section. Otherwise, declaring outputs is optional during setup.

To define lift as an output variable:

  1. Click on + symbol next to the Outputs section in the control panel.

  2. Select Surface.

  3. Set Quantity to Lift (N).

  4. Set Reference Frame to Body Frame.

  5. Scroll to the bottom of the properties panel and click in the box to choose which surfaces to calculate lift over. Select the Plane tag from the geometry tree and then click outside the box to save.

To define drag as an output variable, follow the same process as above, but ensure that Quantity is set to Drag (N).

To save time, you can also right click on the Lift output that you created before, and select Copy. Right-click and select Rename to rename the copied output to Drag. Then change the Quantity field to Drag (N) in the output property panel.

Click the purple Solver button from the top right of the screen to continue to the solver stage of the workflow and set up stopping conditions.

Set Stopping Conditions

Stopping Conditions are used to determine when a simulation exits and saves results. In the case of the Piper Cherokee, use stopping conditions based on the number of iterations and one of our custom output quantities:

  1. Click on Stopping Conditions in the solver check list on the right side of the screen.

  2. Set Max Iterations to 2,000. This means that if the simulation hasn't met the other stopping conditions criteria by the time it has run 2,000 iterations, it will save and exit then.

  3. Next, under Conditions, set Stop If to ALL Conditions are met. This means all the following stopping conditions must be met for the solution to save and exit early.

  4. Click + Add Stopping Condition.

  5. Set Output Name in the new stopping condition to be Lift.

  6. Set the following:

    1. Tolerance: 0.01%

    2. Start at Iteration: 500

    3. Averaging Iterations: 10

    4. Iterations to Consider: 5.

This means that starting from the 500th iteration, the platform will calculate an average value of lift based on the last 10 iterations, inclusive. It will then compare the variation of this trailing average over the last five iterations, inclusive. If this varies by less that 0.01%, the stopping condition will have been met.

You should see that there are no red dots alongside any sections in the control panel (all required settings have been assigned), and the Run Simulation button at the top is active.

Run Simulation

If everything is set up correctly, the Run Simulation button at the top will become active.

Clicking this button will launch a new simulation and open a Simulation tab showing you the current status of the run. Once the simulation has finished, this new tab can also be used to analyze the results and create visualizations.

On the left of the 3D Viewer, you will see a collapsible Run Status summary. The Output monitors at the bottom will, once the simulation starts, show a graph of the residuals or other chosen output quantities. By watching these three components you can see the current status of the simulation and track its progress.

This sample project will run for 2,000 iterations. At this point it will stop, saving all of the data for the last iteration.

To run this simulation for additional iterations:

  1. Click on Post-processing at the top of the control panel.

  2. Select Setup Details.

  3. Click the Copy to Setup icon at the top of the control panel. This will copy all the settings used in this simulation to the Setup tab, and set the initial conditions for a new run to be the values from the final iteration of the previous run.

Visualize Flow Movement

In this section of the Piper Cherokee sample project we'll use different tools to visualize how the flow moves.

One of the powerful abilities of computational fluid dynamics is that it can allow us to visualize the usually invisible movement of a fluid past an object. This understanding can be critical in improving the designs of vehicles and aircraft.

Before continuing, first ensure the airplane is clearly visible in the 3D Viewer, and turn off and deselect any other existing visualizations.‍

We'll create two slices, one running vertically through the length of the Piper Cherokee and the other cutting vertically across the wingspan:

  1. Click the Slice icon in the Visualization toolbar.

  2. In the properties panel, set the Display options to:

    1. Color By: Velocity (m/s)

    2. Component: Magnitude

    3. Representation: Surface

  3. Then in the Visualization options set:

    1. Origin: 0, 0, 0

    2. Normal: 0, 1, 0

  4. Click the check button to create the first slice.

  5. Double click on the name of this slice in the Visualization section of the Control panel, and change it to "Vertical: Nose-Tail"

  6. Repeat this process for a second slice, changing:

    1. Origin: 2.5, 0, 0

    2. Normal: 1, 0, 0

    3. Name: "Vertical: Wingspan"

Did this answer your question?