Step-by-Step Tutorial: Homework of Session 5 - Level 1

NOTE: This tutorial was updated on 08/2016 to match the updated version of the platform

In this homework assignment we will review the lessons from the fifth webinar of our Drone Workshop series. You will learn how to set up and optimize an external aerodynamics simulation of a plane.

Exercise:

Here you have to set up a fully fledged flow simulation of the aerodynamics of a drone. This simulation will later on enable you to calculate drag and lift forces as well as identify flow separations. Your task is to investigate the behaviour of drag and lift for a airflow velocity of 20m/s, 25m/s, 30m/s 35m/s and 40m/s

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

As a first simplification we can exploit the symmetry of the drone. It is therefore practical to simulate only one half of the drone to reduce the computational effort by defining the inner surrounding wall (yellow) as a symmetry plane.

The body of the drone is a physical wall (grey), which means that it involves friction. This faces should be considered as non-slip walls.

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

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

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

Step-by-Step instruction:

Note: These instructions refer to the simulation setup for a airflow velocity of 30m/s.

Meshing:
First of all you have to import the geometry into your SimScale workspace. For this, you only have to click on this link and create a private copy of the project. Please note that this can take several minutes.

You will be notified when the project has been imported and you will be automatically redirected to the Mesh Creator

Click on the geometry Plane in the project tree and click New Mesh in the middle column. This will create an instant mesh setup.

First you have to rename the mesh. For that move to the “Plane mesh” under Meshes and rename it to Mesh 1 and click the Save button.

Now click on the Operation 1 in the mesh tree, select the Hex-dominant parametric (only CFD) and set the parameters according to the following:

• Number of cells in x direction: 18
• Number of cells in y direction: 63
• Number of cells in y direction: 36
• and under ‘Parallel Processing’, the number of processors as : 16
After saving , sub-trees named Geometry Primitives and Mesh Refinements will automatically appear under the default project tree.

Under Geometry Primitives, click on BaseMeshBox and specify the following values as and click on save

• Min. Point (x): 0
• Min. Point (y): -10
• Min. Point (z): -10
• Max. Point (x): 10
• Max. Point (y): 25
• Max. Point (z): 10

Next, click on “material point” and specify the following values:
Center (x) : 1.013
Center (y) : 0.017
Center (z) : 0.133

This will place the material point in the space between the Bounding BaseMeshBox and the geometry surfaces. So, this is the confined space that will be meshed.

Next, create 3 additional geometry primitives by clicking on Geometry Primitives and then New from the options panel and select type. These will be used to define Region Refinements later on. Make sure you save after each one.

Create a Cartesian Box geometry primitive with following proporties:

• Min. Point (x): 0
• Min. Point (y): -1
• Min. Point (z): -1
• Max. Point (x): 2
• Max. Point (y): 4
• Max. Point (z): 1.5

Next, create a Cylinder geometry primitive with following properties:

• Reference Point (x): 0
• Reference Point (y): 1.275
• Reference Point (z): 0.07
• Axis (x): 0
• Axis (y): 0.035
• Axis (z): 0.3

Finally, create a Sphere geometry primitive with following proporties:

• Center (x): 0
• Center (y): 0.125
• Center (z): -0.01

Now, we add the necessary surface, and region refinements for the mesh.

Click on Mesh refinements item in the tree and “New” from the options panel to create a new refinement item and adapt the following settings:

• Name: Surface Refinement
• Type: Surface refinement
• Level min: 6
• Level max: 8
• Finally, assign it to the whole geometry of the plane (solid_0)

Next we will create a refinement item to create a region refinement around the airplane with the following settings:

• Name: Region Refinement
• Type: Region refinement
• Region Refinement mode: inside
• Level: 4
• Finally, assign it to the Cartesian Box geometry primitive

Next we will create a refinement item to create a region refinement around the leading edge of the vertical fin with the following settings:

• Name: Vertical Fin
• Type: Region refinement
• Region Refinement mode: inside
• Level: 8
• Finally, assign it to the Cylinder geometry primitive

Next we will create a refinement item to create a region refinement around the lower side of the aircraft nose with the following settings:

• Name: Nose
• Type: Region refinement
• Region Refinement mode: inside
• Level: 7
• Finally, assign it to the Sphere geometry primitive

Finally, we will create a refinement item to create a region refinement around the lower side of the aircraft nose with the following settings:

• Name: Feature Refinement
• Type: Feature refinement
• Edge feature extraction method: extractFromSurface
• Include angle: 150
• Distance: 0.005
• Level: 9

All the mesh refinements are now complete. We will now adjust some additional (advanced) settings to get a better quality mesh. Click therefore on the main item of your mesh operation in the project tree. This will open the Settings menu in the middle column.

• Castellated mesh controls
• maxLocalCells: 5000000
• maxGlobalCells: 18000000
• minRefinementCells: 10
• nCellsBetweenLevels: 4

• Snap controls
• tolerance: 2
• nSolveIter: 250

• featureAngle: 250
• slipFeatureAngle: 270
• nSmoothSurface: 2
• maxFaceThicknessRatio: 0.55
• maxThicknessToMedialRatio: 0.35

Once done, click save and start the meshing process by clicking on the start button at top. The meshing process will take less than 20 minutes to finish.

Simulation

Click on the New simulation button to create a simulation run. This will open an additional column in the middle. Here you can select which kind of simulation you want to run.

In our case we will run a Fluid dynamics simulation of an incompressible fluid:

Now you can define some additional settings. First of all choose the k-omega SST turbulence model. This is necessary since the airflow around the propeller will be highly turbulent. Then choose Steady-State from the drop down field below. This means that we will simulate the stationary flow field. Finally save your settings by clicking the related button at the bottom, which will create additional items in the project tree on the left side.

Going forward, this tree will guide us through all necessary steps. Please note that some of the items are optional.

Next you have to specify which mesh you want to use for your simulation. Click on Domain item in the project tree and select Mesh 1 from the menu which disappears in the middle column. Don’t forget to save your selection.

Now we have to specify the material properties of the fluid by defining the kinematic viscosity. Therefore click on the Materials and then New button.

This will open a new middle column windows where you can assign fluids to your mesh. SimScale also comes with a “material library” which we will use. Click on the Import from material library button.
Here choose Air from the list on the left side and save your selection.

Finally we have to assign which parts of the mesh should be from this material. Please assign the material model to your mesh (volumeOnGeoVolumes_0)

Next we will set up the initial conditions. Click on the Initial Conditions sub-item.The Initial Conditions define the initial values for all physical quantities like pressure, velocity, etc. To understand this you have to keep in mind how engineering simulation actually works: Since the mathematical equations which describe the motion of fluids can only be solved numerically, the solver needs an initial solution to iterate. In some special cases it can be necessary to adapt this in order to make the simulation more stable.

The initial conditions for velocity and pressure does not need to be modified in general.

In contrast to that it is quite important to use the right turbulence model paramters k and omega. They can be calculated following this instructions:
http://www.cfd-online.com/Wiki/Turbulence_free-stream_boundary_conditions

Please change the initial value of k to 0.54

Next change the initial value of omega to 134.16

Now you can start to specify the physical behavior of the drone and its interaction with the environment by defining the Boundary Conditions for all faces of the mesh.

Click on the Boundary Condition item in the project tree which will again open a new column in the middle of the windows. Here you can see an overview of all boundary conditions which are applied to your mesh. To add a new Boundary Condition, please click on the related button at the bottom of the middle column.

This will add a sub-item to the project list and open again a new window where you can define the boundary condition. Here you can define a name for the boundary condition, choose the type and assign it to faces by using the list below.

It is also possible and recommended to select the faces which you want to assign to the boundary condition graphically. Therefore you have to select the faces in the 3D model window on the left side by clicking on them with the left mouse button; to add them to the list, just click on the Add selection from Viewer button in the middle column.

Since the full mesh domain is displayed, it is necessary to hide these faces in order to be able to select the inner faces. For this, just select the faces you want to hide and click on the Hide Selection button from the drop down menu on top of the 3D model windows. Note that you can unselect faces by re-clicking on them.

Symmetry
This boundary condition is required because we are using a half model of the drone.
Please select Symmetry as the type and the symmetry plane(boundingBox3) which intersects with the drone body.

Walls
As already discussed, this boundary conditions will reduce the interaction of the other surrounding walls. It is necessary because these walls do not exist in reality.
Please select Wall as the type and Slip for Velocity and Wall function for the wall treatment. Now select the surrounding faces (boundingBox1, boundingBox2, boundingBox4, boundingBox6) and add them to the list of faces.

Inlet
This boundary conditions is necessary to define where the flow should enter the domain.
Please select Velocity inlet with Fixed value and Value or Function as the input type with a velocity of 30 m/s in y-directon.
Now select the face in front on the drone (boundingBox2)

Outlet
This boundary condition is necessary to define where the flow should leave the domain.
Please select Pressure outlet with Fixed value and Value or Function as the input type with zero pressure.
Now select the face behind the drone (boundingBox1)

Drone
Finally we will apply the boundary condition to the drone.
Please select Wall as the type and No-Slip for Velocity and Wall function for the wall treatment and assign it to all faces of the drone (solid_0_face_0, solid_0_face_2)

Now we have to modify some of the numerical settings. This is not absolutely necessary but it will help to reduce the simulation time and make it more stable. Click on the Numerics items in the tree and change the settings and values according to the image below (Please note that you have scroll down).

Click on the Simulation Control item in the project tree to specify how fast and accurate you want the simulation to be computed.

Choose 0 as the Start time value and 1000 as the end time value. The time step length must be 1 and the write intervall 1000. Finally, choose 16 computing cores from the drop down menu and define a maximum runtime of 7200 seconds (this is the time after the simulation will automatically be aborted).

To “measure” the lift and drag force of the drone we have to add Result Control item. Click on the corresponding item in the project tree and click on the New button against “Forces and moments”.

Choose Forces and moments as a type, define a Density of 1.205 kg/m³ and (0 0 0) as the Center of rotation. Skip the remaining settings and add all surfaces of the drone to the surface list (workflow according to the drone boundary condition)

To start the simulation, click on the Simulation Run item in the tree and click on the New. This will create a snapshot of your simulation settings as a new sub-item.

You can now start the simulation run by selecting it from the project tree and then click on the Start button.

Congratulations, you have completed the Homework of Session 5 - Level 1 and can now move on to the next level:

Homework of Session 5 - Level 2

I just tried to copy the model but somehow the link you posted and sent us via email does not work.

Just to let you know! Maybe you can fix that. Thanks in advance!

Hi Jousef,

Cheers,

I was logged in but now it works perfectly fine…whatever

Have a nice day!

I´ve got an error message when the mesh operations ran. The event can also be showed below. Should I redo it again or just keep going?

Greetings
Alex

Hey Alex,

You can just ignore this message.

If you take a look at the Meshing Log you willl notice that everything is right with the mesh.

Checking final mesh …
Checking faces in error :
non-orthogonality > 65 degrees : 0
faces with face pyramid volume < 1e-13 : 0
faces with concavity > 80 degrees : 0
faces with skewness > 4 (internal) or 20 (boundary) : 0
faces with interpolation weights (0…1) < 0.02 : 0
faces with volume ratio of neighbour cells < 0.01 : 0
faces with face twist < 0.01 : 0
faces on cells with determinant < 0.001 : 0
Finished meshing without any errors
Finished meshing in = 251.82 s.
End
Finalising parallel run

Cheers,

Hi there,
I have some problems with first simulation of the new workshop session. After 62 min the status is 0.0034%!!! and 80 mg in size. The simulation check is ok, and I think also the other settings (maybe there is some little discrepancy in the tutorial about Layer adding controls and BC slip wall between pictures and text).
I started again the simulation, but the result is the same!!!
thank you
Luca

Hi Luca,

everything Milad posted was perfectly fine for the simulation in my opinion.

Maybe you could post a link of your project here. Guess you missed something. That’s why you have an error.

Hi jousefm,
thanks for your reply, but for the BC, how many the slip walls? 3 or 4?? from the tutorial “Please select Wall as the type and Slip for Velocity and Wall function for the wall treatment. Now select the surrounding faces (boundingBox1, boundingBox2, boundingBox4, boundingBox6) and add them to the list of faces.” but the boundingBox2 is the inlet…

thanks
Luca

Hi Luca,

he meant boundingBox4,boundingBox5 and boundingBox6. BoundingBox2 is the inlet and boundingBox1 the outlet so that does not make much sense in that case.

Also see the picture Milad posted! Sometimes the text might have mistakes.

Hope that fixes your problem mate!

Hi jousefm,
I am starting again the simulation. I hope well

cheers Luca