SimScale CAE Forum

Step-by-Step Tutorial: Homework of Session 2


#1

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

If you would like to watch the second session of the F1 Workshop again or in the case you missed it, you can access the full recording below.

Exercise

Here you have to set up a fully fledged flow simulations of the aerodynamics of a rear wing. This simulations will later on enable you to calculate drag and lift forces as well as identify flow separations. Overall you have to create two meshes as well as six simulation runs.

Your task is to investigate the effect of louvres in the endplate the rear wing

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

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

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

The outer 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.

There is no relative motion between the air and the floor since the car is driving thourgh our domain. We will therefore apply a wall velocity on the lower sorrounding wall (cyan)

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 80m/s. For the other velocities you have to adapt also the initial values for k and omega which you can find in the table below.

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

To make this project public, edit the project properties:

and change the visibility to public and save:

Click on the geometry Rear Wing in the project tree. This will open an additional column in the middle. Here click New Mesh to crate a meshing setup for this geometry.

Now select the Hex-dominant parametric (only CFD) from the list. In the same panel under Bounding Box Discretization specify the following values for number of cells in each X,Y and Z directions for the BaseMeshBox

  • Number of cells in x direction: 40
  • Number of cells in y direction: 10
  • Number of cells in y direction: 10
  • and under ‘Parallel Processing’, the number of processors as : 32
    Click on Save to save selection. After saving, sub-trees named Geometry Primitives and Mesh Refinements will automatically appear under the default project tree

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

  • Min. Point (x): -5
  • Min. Point (y): -5
  • Min. Point (z): 0
  • Max. Point (x): 15
  • Max. Point (y): 0
  • Max. Point (z): 5

Next, click on “MaterialPoint” and specify the following values:

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, we create an additional geometry primitive 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.

Create a Cartesian Box geometry primitive with following proporties:

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

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: 7
  • Level max: 8

Finally, assign it to the whole geometry of the rear wing (all solids)


Next we will create a refinement item to create a region refinement around the wing 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 improve the represenation of edges:

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

Next, we will add a layer elements to the surface of the rear wing:

  • Name: Layers_Wing
  • Type: Layer addition
  • Number of layers [-]: 5
  • expansionRatio [-]: 1.3
  • finalLayerThickness [-]: 0.3
  • minThickness [-]: 0.01

Assign it to all surfaces of the rear wing.

Finally, we will add layer elements to the floor of the base mesh box:

  • Name: Layers_Floor
  • Type Bounding Box Layer Addition
  • Bounding box face: Zmin
  • Number of layers [-]: 5
  • expansionRatio [-]: 1.3
  • finalLayerThickness [-]: 0.3
  • minThickness [-]: 0.01

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

Now move to the Simulation Designer and 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 wing 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 Rear Wing Mesh 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 sub-item in the project tree and click New to add new material.

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 (region0)

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 3.84

Next change the initial value of omega to 71.55

Now you can start to specify the physical behavior of the rear wing 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 rear wing. Please select Symmetry as the type and the symmetry plane(boundingBox1) which intersects with the rear wing.

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 80 m/s in x-directon.
Now select the face in front on the rear wing (boundingBox3)

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 rear wing (boundingBox4)

Slip-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 functionfor the wall treatment. Now select boundingBox6 and boundingBox2, and add them to the list of faces.

Floor

There is no relative motion between the air and the floor since the car is driving thourgh our domain. We will therefore apply a wall velocity on the lower sorrounding wall.

Please select Wall as the type and Moving wall velocity as the sub-type. Next apply a velocity of 60 m/s in x direction and apply in on boundingBox5.

Rear wing
Finally we will apply the boundary condition to the rear wing.
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 rear wing

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 rear wing we have to add Result Control item. Click on the corresponding item in the project tree and click on the New against “Add Forces and moments” item.

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

To start the simulation, click on the Simulation Run item in the tree and click on the Create new run button at the bottom of the middle column menu. This will create a snapshot of your simulation settings as a new sub-item.

Post Processing

You will be notifired when your simulation run is finished. Please switch to the post-processing envoirment by clicking the related tab in the main ribbon bar

Here you can investiage the forces which are generated by the rear wing for every single interation of the simulation.

You can also analyze the 3D simulation results by clicking the Solution fields item in the post processing tree. We will provide some dedicated instructions for rear wing post processing in the next days. If you have any questions regarding this tutorial please post it here.

Congratulations, you have completed the Homework of Session 2 and can now move on to Session 3:

Homework of Session 3


Step-by-Step Tutorial: Homework of Session 1
Error while doing simulation run
#2

#3

#4

@Milad, thanks for posting this. But I’ve got a quick questions.
There is mentioned of “Overall you have to create two meshes as well as six simulation runs.”.
I’ve quickly gone through the tutorial, there are 5 velocities Under the ‘Step-by-Step’ instruction, and there is (1) set of instruction for meshing. Is there another variation of meshing we just pick any (3) velocities for our homework?


#5

Inspecting the mesh generated with the given parameters, I found it was not fine enough.For example you can look at the gap separators and other small details, such as fillets and faces.

The solution was to augment the refinement levels in the Surface Refinement operation, from 7-8 to 8-9.

Waiting for the posprocessing instructions.


#6

Hi,

sorry for the confusion. In detail you have to create:

  • One mesh for the rear wing with louvres
  • One mesh for the rear wing without louvres
  • Simulation at 40 m/s, 60 m/s, 80 m/s for the reat wind with louvres
  • Simulation at 40 m/s, 60 m/s, 80 m/s for the reat wind without louvres

Overall you need 2 meshes and six simulation runs!

Cheers,

Milad


#7

Hi,

you are right. It would make sense to use a finer mesh. Would you be so kind and share your investiagtion about the difference between your mesh and the initial one?

Cheers,

Milad


#8

Shure, look at this pictures:

Mesh with tutorial parameters (Surface Refinement levels 7-8)

Mesh with finer refinement (Surface Refinement levels 8-9)

You can see the ficticous serrated edges on the gap separator and low quality surface of some end plate fillets for the first picture. Those are absent from the second picture.


'Alerón' simulation project by javieram312
#9

Hello all,

I hope you all are enjoying this webinar as I am.
It might be a silly question and sorry about that but I would like to know some details of the material point.

  • Is the material point the center of mass of the half of the rear wing?
  • If it is, I can get it by any CAD software but can you get it by Simscale platform?

Regards,
Andres


#10

@agarciadelgado

https://docs.simscale.com/docs/content/preprocessing/meshing/snappyHexMesh/SHM_MainSettings.html#material-point


#11

@agarciadelgado - The material point is used to detemine which part of the mesh will be kept (depending on whether you are doing an internal flow simulation or an external flow simulation.) Take a look here for a detailed explanation with images - https://www.simscale.com/docs/content/preprocessing/meshing/snappyHexMesh/SHM_MainSettings.html#material-point

Best,
Anna


#12

@Maciek - responded at the same time, ooops :slight_smile:


#13

@Maciek @AnnaFless
Thank you for the information. It is clear now!


#14

Hi, I have a question about surface refinement level that we have to use for this homework, i have done a first simulation with refinement levels 7-8 following the tutorial and the results achieved convergence in about 20 minutes (32cores) with mesh created in about 11 minutes. After i have setted the same simulation with finer mesh (refinement levels 8-9), and the time for create mesh and to achieve convergence increased respectively to 33 minutes and 77 minutes! I had a look at the results in terms of force plots and seems similar in their final values, another thing is that, with refinement parameters setted like in the tutorial, the simulation time in the first run stops at about 550 seconds whereas in the second run, with finer mesh, it stops at the setted end (1000seconds).

How can I evaluate in post processing if the benefits of finer mesh balance the increase of execution time and if is it necessary to use finer mesh?

Thanks, Best regards

Here the link to my project
https://www.simscale.com/workbench?publiclink=e562fc21-77bc-439e-b1ce-a14c782c1c0e


#15

Well, without geting too deep in the theory, I can tell you that:

  1. Increasing the refinement level is equivalent to specify smaller cells, so the total number of elements increases, if I am not wrong in this particular case it doubles from 2+ million to 4+ million. That explains the increase in computation time (and memory usage, tough I think you didn’t notice that).

  2. I think the convergence is expected to be faster for the model with the less number of cells. That is because the bigger cells capture less variations in the flow. You can think of this as some kind of ponderation over the flow variables. But you risk losing accuracy.

  3. If the simulation reaches the 1000 steps (be careful with this, it is not seconds), this means it hasn’t converged. This is, at least to the control level indicated in the numerics section (default residual of 1e-5). If it reaches this level for all variables before the maximum number of steps, the simulation stops (in your case at step 550). Anyway, this doesn’t assure that the result is correct.

  4. To asses the benefits of a finer mesh, the usual procedure is to simulate with many meshes (a minimum of 3), and compare the results of interest variables. Specially see if they converge to some value. You got it the right way by comparing the forces, but you can share with us the variation and we can discuss. If it is small enough (say for example less than 2%), I guess the higher computational cost is not worth it. I think it could be in this case, as the pressure field is what dominates this forces. But be aware that this is not general, as for example if the interest variable were the velocioties or formation of vortexes, I think it won’t be so close.

  5. Also be aware that I raised the question of the refinement levels because the geometry was not being correctly modelled. In my opinion, this is not acceptable.

Greetings, hope I could shed some light on your doubts.


#16

if i try to go to my dashboard I receive the following message:
This XML file does not appear to have any style information associated with it. The document tree is shown below.

NoSuchBucket
The specified bucket does not exist
www.simscale.com
B40F9CD44E9B7D82

FAgzYEaKRI7n31dm8JTqJcfvc98fSj+JYQvu8Zex1Gd0kOyiGnWapQxmAjN3MlZToZhEej+S2ho=

What can I do?


#17

@aceci - it’s a technical problem from our end, we will get the platform up and running as soon as we can!


#18

I’ve followed the steps to mesh the geometry as described and although the log states there are no errors it has failed the mesh quality check.
Does it make sense to run the simulation with the poor mesh? Seems a strange outcome for a tutorial


'F1_Workshop_Session_2_SAK' simulation project by SAK
#19

Hi,

this the my mesh log file:

Checking final mesh …
Checking faces in error :
non-orthogonality > 70 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 = 214.58 s.
End
Finalising parallel run

There are no errors regarding the mesh quality. If you are talking about this one:

Don’t worry. This is a different kind mesh quality test which is not mandatory for CFD simulations.

Cheers,

Milad


#20

Yes that is the one i see, thanks