SimScale CAE Forum

Step-by-Step Tutorial: Homework of Session 1


#1

Recording

Homework Submission

Submitting all four homework assignments will qualify you for a free Professional Training (value of 500€) as well as a SimScale Certificate of Completion.

Homework 1 - Deadline: Date, 6th of December, 12pm

Homework Submission Form

Introduction

In this exercise you will be doing a full fledged flow simulation of the aerodynamics of a front wing. The focus of this simulation is to investigate the drag and lift forces on the wing and identify flow separations.

Your task is to investigate the behavior of drag and lift and determine the stall zone for different front wing flap angles from 0 to 18 degrees considering a constant inlet velocity of 20 m/s.

Let’s take a look at the physics of the front wing before we start to set up our simulations:

As a first simplification we can exploit the symmetry of the front wing. Simulating only half of the wing reduces the computational effort by defining the inner surrounding wall (brown) as a symmetry plane.

The body of the wing is a physical wall (grey), which means that it involves friction and should be defined as so-called “no-slip walls”.

The outer (not visible here) and upper surrounding walls (blue) are necessary to limit the size of the domain we want to simulate since we are not able to simulate an infinitely large domain. In reality, these walls do not exist and should not interact with the flow. A good approximation here is to assume this wall as frictionless or so-called “slip walls”.

There is no relative motion between the air and the floor since the car is in motion. Thus, we will apply a wall velocity on the lower surrounding wall (cyan).

The bounding face on the right-hand side (red) will be defined as an inlet with a constant flow velocity profile.

The bounding face on the left-hand side (green) will be defined as an outlet with a constant pressure.

The different configurations which will be simulated in this exercise are shown in the table below:

Select 3 configurations for your own simulations. In order to conserve core hours it is not recommended to simulate all 8 configurations

First we will start with Configuration 1 and follow all the steps in detail. The other configurations will follow the same procedure and therefore will not be documented in detail.

To start this exercise, please import the project into your workspace by clicking on the link below:

https://www.simscale.com/workbench?publiclink=c0a59583-ba11-4b42-aa87-91e9ee93331c

Mesh Generation

In the Mesh Creator tab, click on the geometry FW-0deg-model

Click the New Mesh button in order to start creating a new mesh on this geometry.

The new mesh operation will be generated automatically. Next change:

  1. Set the Type to Hex-dominant parametric (only CFD).

  2. Configure the Bounding Box geometry primitive to the following:
    Number of cells in x direction to 60
    Number of cells in y direction to 16
    Number of cells in z direction to 16

  3. Set the Number of parallel computing cores to 16

  4. Scroll down to change other values to optimize the meshing parameters

  5. Cell limit for refinement termination to 15

  6. Max iterations for meshing algorithm to 100

  7. Max iterations for mesh conformation to 1

  8. Max face aspect ratio for layers and Max ratio of layer thickness to medial length to 0.6 and 0.4 respectively.

  9. Max overall iterations for layer addition to 3

  10. Click Save to register changes.

Background Mesh Box

Next go to the Background Mesh Box and change the Mesh Box dimensions to:

  • Min. Point (x) = - 3.6
  • Min. Point (y) = .003
  • Min. Point (z) = - 0.6
  • Max. Point (x) = 6
  • Max. Point (y) = 2.403
  • Max. Point (z) = 1.8

Click Save to save the changes. Click on the reset icon over the viewer to see the created mesh box in viewer.

Material Point

Go to the MaterialPoint and change the values to the following:

  • center (x) = - 1.5
  • center (y) = 0.5
  • center (z) = - 0.5

Then click Save

Cartesian Box

Next go back to the Geometry Primitives and click on + New and then Cartesian Box to define a new Cartesian Box that will be used to define a mesh refinement region.

After creating a new Cartesian Box, you will be directed to the definition of this Cartesian Box. Change the dimensions of the box to the following:

  • Min. Point (x) = - 1.8
  • Min. Point (y) = .003
  • Min. Point (z) = - 0.6
  • Max. Point (x) = 1
  • Max. Point (y) = 0.9
  • Max. Point (z) = 0.4

Click Save to register your changes.

Cartesian Box 2

Follow the same procedure to define another Cartesian Box for further refinement definitions. Rename it to Cartesian Box 2. This time change the values to the following:

  • Min. Point (x) = -2.2
  • Min. Point (y) = .003
  • Min. Point (z) = -0.6
  • Max. Point (x) = 3
  • Max. Point (y) = 1.5
  • Max. Point (z) = 1

Click Save to register your changes

A good mesh requires well defined refinements. Now we will start creating the mesh refinements. For this proceed to Mesh Refinements and click +New

Mesh Refinement 1

The new mesh refinement will be created. Rename it to surf-wing-flap (optional).

Change the Type to Surface refinement and then both Level min and Level max to 7 respectively.

Change the Filter for entity types to faces and select FWing and flap

Click Select assignment in order to see the selected assignment highlighted in the viewer.

Click Save to register your changes.

Mesh Refinement 2

Following the same procedure,create a new refinement and name it feature (optional).

Change Feature refinement levels Distance and Level to 0.001 and 7 respectively.

Then click Save

Mesh Refinement 3

In order to create a separate region refinement for the inner Cartesian Box, create a new refinement and rename it to region-inner (optional).

Change Type to Region refinement and then Feature refinement levels Level to 3

Select Cartesian Box under Assigned Geometry Primitives and click Save to register the refinements for this specific cartesian box.

Mesh Refinement 4

Create a new refinement for the other Cartesian Box. This time rename it to region-outer (optional).

Change Type to Region refinement and then and then Feature refinement levels Level to 1

Select Cartesian Box 2 under Assigned Geometry Primitives and click Save to register the refinements for this specific Cartesian Box.

Mesh Refinement 5

Next we will define layers over the surfaces on the whole wing and the floor. Layers will allow us to capture the results more accurately within the areas we are interested in.

Create a new refinement and rename it to Layer-wing (optional).

Change Type to Inflate boundary layer and further change Expansion ratio for layer cell thickness [-] and Minimum overall layer thickness [-] to 1.8 and 0.0001 respectively.

Select FWing and flap under Surfaces with layers and click Select assignment in order to review the selected surfaces in the viewer.

Click Save to register your changes.

Mesh Refinement 6

For the floor layers, create a new refinement and rename it to Floor-layer (optional).

Change Type to Boundary box layer addition

Change Bounding box face to Zmin and then the Number of layers [-] and Thickness of the final layer [-] to 3 and 0.35 respectively.

Once you have defined all of the mesh refinements, go back to the Operation 1 and click Start in order to submit the meshing job to the server. Due to the fineness of the mesh, the meshing could take 15 to 20 minutes to finish.

Additional Meshes

While the first mesh job is running, take advantage of the parallel computing and proceed to start setting up all the other configurations. You don’t have to perform all the meshing operations again from scratch. Just duplicate the already created mesh by right clicking on it and then click Duplicate.

Rename the duplicated mesh to FW-XXdeg-model mesh (where XX is the flap degrees) and use the dropdown to change the Base Geometry to the model with the corresponding angle. Then click Save. Now you will have to reassign the Fwing and flap faces for surf-wing-flap and Layer-wing refinements and start the meshing operation.

Once the meshing of the first geometry i.e. FW-0deg-model is finished, you can proceed to Simulation Designer without waiting for others to complete in order to set up the simulation in parallel.

Simulation Setup

Once you are in Simulation Designer, click New Simulation in order to start setting up the simulation. A new simulation creating window will pop up. Rename it to Flap-0deg-deflection-sim (optional) and click Create in order to create a new simulation.

Analysis type

In Analysis Type, switch to Fluid dynamics and then select Incompressible. You don’t have to change any properties here.

Click Save to select this analysis type.

Once you save the analysis type, you will see the expanded tree. All the red entities shows that they must be set up in order to perform a successful simulation run.

Domain

Next you have to select a domain on which this simulation will be performed. Proceed to Domain and select FW-0deg-model mesh and click Save.

After a while you will see the loaded mesh of the selected domain in the viewer. For the easier mesh handling, it is recommended to switch to the surfaces render mode in the top viewer bar.

Material

Next we have to define the fluid material. Go to Materials and click on +New to create a new material.

Click on Import from material library to import the desired material from the material database.

Select Air and click Save to import this material directly from the library.

Select region0 under Topological Mapping and then click Save in order to define the material for this region.

Initial Conditions

We will now proceed to change the initial conditions. Go to k and change the Turbulent kinetic energy value [m²/s²] value to 0.24 and click Save

Next go to Omega and change Specific turbulence dissipation rate [1/s] to 44.7 and click Save

Boundary Conditions

Now we will proceed to the most crucial and important section of the simulation setup. We will define one by one the inlet and outlet boundary conditions. We will then define the boundary condition for the sides, symmetry, floor and wing.

Go to Boundary Conditions and click +New in order to create a new boundary condition.

Inlet

Rename the newly created boundary condition to Inlet (optional).

Change the x value [m/s] of Velocity to 20

Select the front surface of the domain from the viewer and click on Add selection from viewer. This will add the selected surface under Topological Mapping i.e. boundingBox3 in this case.

Click Save to define the inlet boundary condition.

Outlet

Create a new Boundary Condition and name it Outlet (optional).

Change Type to Pressure Outlet and select the back surface of the domain and click on Add selection from viewer. This will add the selected surface under Topological Mapping i.e. boundingBox4 in this case.

Click Save to define the outlet boundary condition.

Sides

Create a new Boundary Condition and name it Sides (optional).

Change Type to Wall and Velocity to Slip.

Next select the two side surfaces of the domain and click on Add selection from viewer. This will add the selected surfaces under Topological Mapping i.e. boundingBox1 and boundingBox6 in this case.

  • Click Save to define the boundary condition for the sides.

Symmetry

Next we will define the symmetry condition. Create a new Boundary Condition and name it Symmetry (optional).

Change Type and select the surface along symmetry of the domain and click on Add selection from viewer. This will add the selected surface under Topological Mapping i.e. boundingBox2 in this case.

Click Save to define the symmetry boundary condition.

Floor

Create a new boundary condition and rename it to Floor (optional).

Change Type to Wall and select the lower surface of the domain and click on Add selection from viewer. This will add the selected surfaces under Topological Mapping i.e. boundingBox5 in this case.

Click Save to define the floor boundary condition.

Wing

Lastly, we will define the boundary condition for the wing. Create a new boundary condition and rename it to Wing (optional).

Change Type to Wall and Wall treatment to Zero gradient.

Select solid_0_FWing and solid_0_flap under Topological Mapping and click Select assignment to see the selection in the viewer.

Click Save to define the boundary condition for the wing.

Numerics

After defining all the boundary conditions, we will proceed to set up the numerics for our simulation. Go to Numerics and scroll down until you reach Solver.

Under Solver, change [U] velocity solver to Smooth solver. Expand Details and change Smoother to symGaussSeidel and Absolute tolerance to 1e-7.

Do similar changes for [k] Turbulent kinetic energy solver and [omega] Specific turbulence dissipation solver.

Click Save to register your changes.

Simulation Control

Next we will define the our simulation interval and steps that needs to be recorded. Go to Simulation Control and change End time value [s] to 1500.

Expand Details under Write control and change Write interval (simulation time steps) to 1500.

Next change Number of computing cores and Maximum runtime [s] to 32 and 120000 respectively. The Maximum runtime [s] is set too high just to be on a safe side.

Click Save to register your changes.

Result Control

As our last step before running the simulation, we will create result control items in order to get graphical data sets of interest. Firstly, we will create the result control item for the forces and moments.

Go to Result Control and click New next to Forces and Moments.

A new force and moment result control item will be created. Rename it to Wing main (optional).

Then change Density value [kg/m³], x value [m], z value [m] and Write interval (simulation time steps) to 1.2, -1.4, 0.47 and 10 respectively.

Select solid_0_FWing under Faces for force calculation and click Save to register your changes.

Create another force and moment result control item and rename it to Flap (optional). Change the same values as defined above but this time select solid_0_flap under Faces for force calculation.

Click Save to save your changes.

Next, we will create the field calculation items. For this go back to Result Control and click New next to Field calculations.

Rename the newly created field calculation item to Yplus (optional).

Change the Type to Turbulence and click Save to register your changes.

Create another field calculation item and rename it to WallShearStress (optional).

Change the Type to Wall fluxes and click Save to register your changes.

Simulation Run

Once all the above steps are defined, we will proceed to create our first simulation run. Go to Simulation Runs and click on New.

A window will pop up, give a reasonable name to the run e.g. Run-Flap-0deg in this case (optional) and click Create in order to create a new run.

After the run is created, click Start to start the created run. The simulation run can take up to ~120 minutes (~2 hrs.).

Additional Simulation Runs

While the first simulation job is running, take advantage of the parallel computing and proceed to start setting up all the other configurations. You don’t have to perform all the simulation set up operations again from scratch. Just duplicate the already created simulation by right clicking on it and then click Duplicate.

Rename the duplicated simulation to FW-XXdeg-deflection-sim (where XX is the flap degrees) and assign your new domain to the duplicated simulation under Domain.

Then click Save. Now you have to just assign back all the entities to the material, boundary conditions and result control force plot items and then start the simulation job.

When your simulation is completed, proceed to Post-Processor tab in order to post-process your results.

Post-processing

We will show the post-processing only for the first simulation results. You can then follow the same steps in order to post-process other configuration results

Once in Post-Processor, click on Solution fields under Run-Flap-0deg in order to load the results in viewer. Due to fine mesh it can take up to 5 minutes to load the results in to the viewer.

For faster and efficient reviewing of the results, we will use slice filter. In order to add the filter, do the following:

  1. Go to Add Filter and select Slice

  2. Change Origin middle value i.e. y value to 0.6

  3. Change Normal to (0,1,0)

  4. Uncheck Show Plane.

  5. Click Apply to save the changes.

  6. Next set camera orientation to +Y from the View tool over the viewer to get a proper view.

Next change the Field to U [point-data] in order to see the velocity field. Zoom the results with the mouse roller and drag from middle mouse button to get a reasonable view. Turn on the color bar and drag it by holding mouse left button to the bottom.

Next we will plot the pressure coefficient. Since this field doesn’t exist therefore we need to create one. First uncheck the colorbar (important; if you don’t do it, you may end up with two different colorbars in the next step) then select Calculator from Add Filter.

Once the calculator filter is added:

  1. Change the Result Array Name and Function to Cp and (p-6.2)/(0.52020) respectively.

  2. Click Apply to create a pressure coefficient field.

  3. Change Field to Cp[point-data] to see the results.

If you want to take a screenshot of your results, click on the camera icon under View tools. Your screenshot will appear under Result Evaluation section.

Furthermore, in order to save the state for later use, click on the Save State button. A window will pop up, give a reasonable name e.g. Saved state - 0deg (optional) in this case. Your saved state will also appear under Result Evaluation section.

Lastly to see the plotted data requested beforehand during the simulation setup, switch over to WingMain under the Force plot.


'FSAE-Workshop-S1-FrontWing Analysis HW' simulation project by Ali_Arafat
F1 Aerodynamics Tutorial
'First Iteration of a Formula Student Wing Analysis' simulation project by AMDA_Steffen
CFD School Project
#2

#3

#4

Mesh Operation failed two times on 18deg-5mm-up wing. Setup has been checked once again and it is same like this Tutorial. Any idea?


#5

I had the same problem then I just changed the computing cores from 16 down to 8. Then it worked for me.


#6

Thank you! It helped me and solve this issue.


#7

14deg meshing finished successfully, but can’t select the 14deg mesh in domain. Ideas?


#8

Hello Everyone,

Important Note:

If you are encountering Errors in Meshing of “Configuration-7: 18deg-5mm-up wing” geometry Please follow the steps below: (The reason for the mesh error is a small glitch in the decomposition of the domain for this case)

Step-1 : For this case, change the number of compute cores (from 16) to: 32 (or 8, but it will be slow) and rerun

If the above change does not result in a successful mesh then,

Step-2 : Change the number of cells for Background Mesh as shown in figure below and run with either 16 or 32 cores. (This helps to avoid the glitch in the decomposition process for this case)

.

If the issue still persists, then please do let us know.
Thanks.

Best,
Ali


#9

Hey @ChristianF! Seems like it worked for you. Do let us know if you have any other issue! :slight_smile:

Best,
Ahmed


#10

As boundary conditions are very variable depending on the problem, wouldn’t it be more accurate to ask the solver to extract Pressure Coefficient (from static pressure field values) rather than using the Calculator filter? Cp values over 1.0 do not sound good for me…

Best,
Alex


#11

Is there a way to do a “Plot over line”/“Plot on intersection curves” like filter, to extract surface data from a slice? (let’s say, get a surface slice from the main wing and flap and plot Cp vs X-coordinate).
If the solution is downloaded is an operation easy to do with Paraview or other post-processors. I was wondering if it’s possible to do it with the online-postprocessor of SimScale.

Thanks,
Alex


#12

Hey Alex!

Thanks a lot for your query. This is quite a nice question and therefore need to be answered in detail.

You are absolutely right here, you can of course output the Pressure Coefficient solution field but the purpose here was to show the user how to calculate this value if they have forgot to output it initially.

This is because of the reason that according to the formula pressure at infinity is required which solely depends on the bounding box. the value of 6.2 which we are giving here depends on the inlet pressure value we are getting for the bounding box we have used. Since this bounding box is not big enough (in order to reduce mesh size), you can expect the Cp values larger than 1. If it would have been bigger, you should have got values either near or less than 1.

I hope this helps. If you have any further question/s, feel free to ask.

Best,
Ahmed


#13

Yes you can do it but locally. After opening the results in Paraview you have to just apply the slice filter and then select a plot data filter over this slice filter which will plot the values over the whole slice.

Let me know if this doesn’t work for you.

Best,
Ahmed


#14

Thanks for the quick reply Ahmed :slight_smile:.
I agree that is didactic to show how to use the Calculator filter, but as on the Webinar there were some people that didn’t know what was the Pressure Coefficient, maybe showing wrong values of it could lead to confusion to aerodynamic students. Your explanation, however, explains a lot about how the distance from/to the boundary conditions may affect the solution, so in one way or the other more valuable information is being added to the workshop!

Best,
Alex


#15

Thanks for answering. I had updated my question after you quote it, I’m afraid. I knew how to do it locally, I was just wondering if it was possible to do it on the online-postprocessor tool.

Cheers,
Alex


#16

Absolutely right Alex! But due to time constraint some information may not be delivered properly in the workshop. But glad that you asked here so now everyone has an answer :slight_smile:

Best,
Ahmed


#17

Ah! I didn’t get that right! my bad! :grin: Unfortunately for now its not possible. Each plotting feature of Paraview need some more improvements and modifications in online version. Therefore, needs sometime but we are looking forward to it.

Best,
Ahemd


#18

Hello,

I would like to know how could I contact Rene Hilhorst for a student non-comercial licence of Optiprof, which is the software he used in this first webinar session. Thanks,

Carles


#19

Hi @cbolart,

We will be sending out additional information about this soon via email, so keep an eye out.

Best,
Anna


#20

I am getting popup that the run may cross your qouta, so change your settings under simulation control , i had kept the same seetings as given above, what is the solution for this problem ?