Questions? Feedback? powered by Olark live chat software
Resources Home

Aerodynamics

This tutorial will introduce you to Rescale’s platform using a basic airfoil DoE in OpenFOAM.

Please contact us if you're having trouble.

The analysis here calculates the best lift to drag ratio for an airfoil across a range of airspeeds and angles of attack. In the process, this tutorial will demonstrate some of the post-processing capabilities of Rescale, and show you how to run a parallel process.

Air Foil

Post processing visualization of result (using ParaView)

Required files

Import Job Setup

Get Job Results

Description of the Simulation

Duration: Approximately 20 minutes for the tutorial and less than 30 minutes for computation. Alternatively, you can also click the Get Job Results link above, and review the full setup and results for the DoE analysis with OpenFOAM instantly.

The Problem: Calculate lift to drag ratios for a range of angles of attack (AoA) and airspeeds for the NACA 2412 airfoil (NACA convention)

  • The independent variables are cross products of x_velocity and y_velocity
  • x_velocity: 20 to 30 meters per second with an increment of 1
  • y_velocity: 3 to 10 meters per second with an increment of 0.5
  • The output is the lift to drag ratio, which is equal to the lift coefficient over the drag coefficient

The Workflow: This tutorial will use a two variable parameter sweep (DoE) and evaluate it over 44 runs. Before running this tutorial, a Matlab script was used to generate the model, which is contained in an .stl file, of a NACA 2412 airfoil with a specific angle of attack. The workflow for this tutorial consists of two parts:

  • Rescale uses a customized template to vary the environmental setting of the wind.
  • OpenFoam's SimpleFoam generates the steady state solution. This process uses the data of air speed and mesh to calculate the drag and lift coefficients, which the analysis code uses to evaluate the merit function.

Simulation software: OpenFOAM

Starting up Rescale

  • To start using Rescale, go to platform.rescale.com and log in using your account information. Using Rescale requires no download or implementation of additional software. Rescale is browser-based, which allows you to securely access your analyses from your work station or from your home computer.
  • From the main screen of the platform, click on the +New Job button at the top left corner of your screen. This will take you to a Setup page.
  • The first step is to use the Job Type drop-down menu to select DOE.
  • There are now seven Setup stages to complete.

Setup: Input File(s)

First, you need to give the job a name. Since Rescale saves all your jobs, we recommend you to choose a unique name that will help you to identify it later. (For example, Tutorial 1: OpenFoam DoE). To change the name of your project, click on the pencil next to the current job name in the top left corner of the window.

Next upload the zip file airfoil2D.zip by clicking on the Choose File button.

On completion of this step, the Input Files setup page should look like that shown below.

Input Files

Setup: Parallel Settings

To implement your parallel process, click on the Parallel Settings button to add a parallel process to your analysis. Here, you have two options to set the parameters for your analysis. You can either upload a CSV file with all of the information (Use a run definition file), or you can add the variables manually into Rescale using the Specify your variables here option. For this tutorial, select the Specify your variables here option.

Next, make sure the Cross Product radio button is selected, and then add two variables.

The first variable should be x_velocity, with a min value of 20, a max value of 30, and an increment of 1.

The second variable should be y_velocity, with a min value of 3, a max value of 6, and an increment of 1.

When finished, your Parallel Settings screen should look like this:

Parallel Settings

Setup: Templates

Move on to the Templates setup stage by clicking on the Templates icon.

In the Specify Templates section, you can upload any files that you will need for running this analysis.

Templates are input files that change with each run. These templates will use the variables you have already assigned, x and y velocities, to evaluate the lift to drag ratio. For our analysis, you will be uploading a template for this job. To do this, click on the Choose File button and upload the following template:

U.inp_template

Set the Processed Filename to:

airFoil2D/0/U

Your Templates setup stage should look like this:

Templates

Setup: Software Settings

Click Next to move on to the Software Settings section of the analysis. Now, you need to select the software module you want to use for your analysis. You can scroll down or use the search bar to search for a sofware. For this demo, scroll down and click on OpenFoam.

Next, the Analysis Options must be set.

  • The drop-down selector allows users to choose their preferred version of OpenFoam.
  • The input files used in this tutorial were tested with OpenFOAM version 2.3.0, so select that option.

Next, you need to add the analysis execution command for your project. This is a command specific for each software package and each input file being used. For this input file and OpenFoam, the execution command is shown below:

./airFoil2D/Allrun

This should be the same command as what you would otherwise use on the local terminal.

On completion, the Software Settings page should look like that below:

Software Settings

Setup: Hardware Settings

Now that you have chosen the analysis code you want to use, the next step is to select the desired computing hardware for the job. Click on the Hardware Settings icon.

  • On this page, you must select your desired Core Type and how many cores you want to use for this job. A "core" is a virtualized computing unit, with each core representing a single core from a physical computer. For this demo, select Nickel.
  • The Number of Cores / Slot should be set to 1, since we want to execute each child run of this DOE job on a single core.
  • The Number of Task Slots represents how many parallel executions of the DOE tasks will take place. In this case, select Number of Task Slots to be 1.

Your Hardware Setting screen should look like this:

Hardware Settings

Setup: Post Processing

Move on to the Post Processing screen by clicking the Post Processing icon. For this demo, we will add some post-processing to visualize the analysis. Click on the Choose File button and upload the file extract.py file that you downloaded earlier.

You also need to enter the command required to run the post-processing script. For this analysis, add the following command:

python extract.py airFoil2D/log.simpleFoam Cd Cl

This post-processing script is executed at the end of every run and extracts the lift and drag coefficients from the OpenFOAM output files. Further information for working with post-processing scripts is available here

Your completed Post Processing screen should look like this:

Post Processing

Setup: Review

Finally, move to the Review stage of Setup and check that the setup is correct by reviewing the DOE Job Summary table. It should look like that below:

Review

Status

Now you can monitor the progress of your job from the Status tab. To run your job, Rescale boots the cluster as you defined it, runs the simulation, and shuts down the cluster immediately upon completion. The entire process is completely automated and secure, and requires no further input from the user. The whole analysis should take less than thirty minutes.

While your analysis is running, you have the ability to follow its progress in real-time using Rescale’s live tailing feature. Live tailing allows you to pick individual runs, and look at the executing code to assess if the analysis is running correctly.

To use live tailing, move your mouse down to the Live Tailing section and click on an active run in the Runs list. Once you have selected an active run, a list of files should appear in the second box. If you pick any of these files, you will see a real-time rendering of what that file is doing. You can look at up to 5000 lines at the same time, and pressing Refresh will give you the most up-to-date activity in the analysis.

The Status window with live tailing will look like that shown below:

Live Tailing

Results

The Results tab shows all the resulting files that are associated with your job. Given that some analyses result in many output files, Rescale gives you the option to download all files simultaneously or individually as needed.

As individual runs complete, the results show up on this page. Click on Refresh Results to show all of the completed results, and then click on Download to download your files. Note that if you click on Download before the Status page shows Cluster stopped in the Job Log section, then you may download a zip file containing data for only some of the runs.

Here is a screenshot of the Results page as the job is running; information for each individual run will get added to the table as they complete:

Results

Charts

Additionally, Rescale has the capability to display this data in charts before the user downloads the data. The Charts tab will bring you to a graphical representation of the data that resulted from the analysis. You can experiment with different configurations of the variables to get an idea of how the data looks.

An example chart is shown below:

Charts

Last Updated: Feb 10, 2016 12:03PM PST

Powered by Desk.com
c63bcf49f4eed122cd69ef16269a7198@rescale.desk-mail.com
https://cdn.desk.com/
false
desk
Loading
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
about
false
Invalid characters found
/customer/en/portal/articles/autocomplete