SimScale CAE Forum

Step-by-Step Tutorial Session 4 - Design Process


#1

Recording


Homework submission

Your homework for this session is to design your own front wing for a Formula SAE car, and test it using SimScale by following the same setup and steps as in the 2nd session.

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

To submit your homework assignment, please generate a public link of your project (Sharing a Project)

Homework Deadline: October 24th, 11:59 pm CEST

Homework Extension

Hey everyone, we have reviewed the comments on the tutorial and have decided to accept homework submissions until the 27 of October at 11:59PM CEST. We will be accepting homeworks until the end of Friday. Be warned, the homework link will not be changed, and thus when you click on the homework submission link you will still see the old deadline.

We hope this gives you time to submit some really awesome homeworks!

Click Here to Submit your Homework


Outline

  1. Introduction

  2. CAD Models
    a. Car without the front wing (STL)
    b. Reference Geometry (STEP)
    c. Reference Wing (STEP)

  3. Goal

  4. Advice

  5. STL File Export

  6. Merging STL Files
    a. Using Script
    b. Using Text Editor

  7. Creating a Project on SimScale

  8. Common Mistakes/Problems

  9. CAD Tool Specific Videos
    a. Autodesk Inventor
    b. Solid Works
    c. CATIA
    d. Siemens NX

  10. Recommendations About Comments


Introduction

In this last session, we want to challenge you and see the skills that you have acquired during the course. For this exercise we want you to design your own front wing for Formula SAE, and test it using SimScale by following the same setup and steps in the 2nd session.

Your task is to design your own front wing and combine it with an existing car model that we have used in the previous exercises.

To start this exercise, you first need to have your own CAD software to model the front wing. Due to the variety of CAD tools available, with the help of our sponsored FSAE teams we have created a series of videos that quickly explain how to import, export, and merge all the files for four of the most common CAD tools.

You can download the car model without the front wing by proceeding to the next section


CAD Models

Important Note - This tutorial provides you with two different files:

1. Car model without front wing (STL)

This is the model you will attach your front wing to and the one you will use for your simulation as the STL file format has very high quality surfaces. As discussed in the fourth video lecture, we recommend that you prepare a STL master model for your own CFD process with SimScale.

Car model without front wing (STL)

2. Reference Geometry

If you already have a wing design, we provide you this reference geometry of the nose, front wheels, and floor as a STEP file you can import into your CAD tool. With this you can make sure that your front wing is in the correct position before merging it with the whole car. Please make sure that you create the each wing component as a separate part/solid so that you can export each component individually as an STL file to be merged with the car.

Reference Geometry

3. Reference Wing

For those users who don’t have their own wing design and those that don’t have extensive experience with CAD modeling to create a wing from the start, we will provide you a STEP file of the front wing used in the first session. With this you should be able to get an idea on how to start, you can obtain the airfoil profiles used and adapt them to your new design, etc. But remember, the whole point of this homework is to submit your own design

Reference Wing


Goal

The idea is to create a better design than the existing one by creating more downforce with higher efficiency (i.e. can you produce less drag?) within the FSAE regulations.


Advice

For a successful simulation we suggest the following things:

  • Make sure that you create a clean geometry This means that you have to make sure that your model is a watertight, closed volume (**no open surfaces or edges). Be sure to avoid intersections and overlapping of surfaces when you create your CAD model.

  • If you have an existing model and you want to test it, first defeature it and remove all of the construction details such as screws, bolts, and logos. (See image below)

To run the simulation on SimScale, it is recommended to use an STL file, that’s why you have to convert your CAD model into an STL model. In some CAD software when you export an STL file, you will lose the identity of the parts and solids, and you will have only one solid for all the parts.

Thus, it is important to follow the following steps to make sure that you will have an STL file with different parts, where you can apply different mesh refinements levels.

Creating your CAD model with different parts

Reference Model: Downloadable version of the Front Wing


STL File Export

Exporting a file depends on the CAD software that you are using, but here are the most common approaches to export different STL files for different parts.

Some software keeps the same identity of the parts using colors when you convert the CAD model to STL model, and if you are using this kind of software you will not have any problems. Adjust the tessellation of your surface to high quality tessellation, to give an accurate representation of the curvatures. For STL files, there are two types: STL ASCII and Binary. Please choose the STL ASCII format, name your file, and export it.

For other softwares, you have to export a different file for each part.This can be done in two ways:

  1. By selecting the specific part and exporting it as a single part per file. Again, it is important to adjust the tessellation to high quality and the Format to Text (option in Onshape renamed from ASCII to Text). Then name the file and export it to a specific folder.

  2. Or you have to hide all the other parts, and keep only the part that you want to export. Export it with the same setup as detailed above.

To illustrate this you can see this example (the following steps can change from one software to another).

  1. Rightclick on the tab at the bottom and choose the Format of your file as STL.

  1. Select TEXT format for the STL file.

  1. Please make sure that you have built your model using meter units otherwise scale your model to [m], the unit of SimScale is meter [m].

  1. Adjust your tessellation to good quality using automatic adjustment or customize it.

  1. If you have this function in your software of exporting STL with multi parts, activate it otherwise follow the above steps.

  1. Finally name your file and export it.

  1. In result you will get a file for every part.

DO NOT use symbols or spaces when naming your STL files. Please just use alphanumeric characters. If it’s absolutely necessary, just use an underscore ( _ )

Make sure you select the correct units (most likely it’s meters) when exporting the STL’s


Merging STL Files

Now that you have all the individual parts for your wing, you need to merge them together and include the car model. We will show you two possibilities to make this happen.

1. Using a script

We will provide you with a script that will do this step automatically for you.

  1. First of all create new folder and name it FSAE 4th session optional.

  2. Then put all STL (your front wing design and the car body) files inside the folder which you want to merge.

  3. Download the script file from here (Script file download)

  4. Now put the script inside the folder FSAE 4th session

  1. To merge all the STL files in the same file you have to run the script (right click on file Merge_STL, and run with PowerShell).

  1. A new window will appear. Click on open.

  1. The merging process can take up to 20 min. After this you will have a new file in the folder FSAE 4th session, containing all the parts together in one file.

2. Using text editor (alternative)

Merging the STL files can be done using another option by editing the STL file itself, to do this you need a text editor. If the script option does not work for you, we suggest this option as an alternative

An STL file is essentially a text file with coordinates that define the geometry. In an STL file a geometry begins with a text that says solid NAME where NAME is the name you saved the file with, and it ends with endsolid NAME where again, NAME is the name you saved the file with. Refer to the following picture:

To start merging your STL files first open a new text file and open one of the STL files to be merged. The first step would be copying everything from the STL text to the new text file.

Follow the next steps:

  1. Right click on the STL file and choose Edit with (your text editor)

  1. A new window will open with the text editor.

  1. Click on the first line solid NAME, scroll down to the end of the text, press Shift and click on the last line in the text, (make sure that you select all the text).

  1. Copy the text Ctrl+C and paste it in the the empty text file that you have created using Ctrl+V.

  2. Repeat the same steps with the other STL files, but this time you have to paste the STL text after the end of the previous text in the new text file

  1. Do the same steps with all the files of your front wing and car model. You will end up with one file containing all of the car parts.

As soon as you finish this step, save the file with the name of the file, but make sure that you add the extension .STL


Creating a SimScale Project

Now that we have the full model with your front wing design and the car body, it’s time to move to the next step, Uploading the new STL to the platform.

To do this go to www.simscale.com and log in.

Then in the Dashboard click on New project in the top right corner.

A new window will appear. Fill the information in with the title of the project, description of the project, category of your project, and you can Drag and drop your CAD files, or select the file from the folder, (select the last file where you have merged all the STL files together).

When you finish, click on Create new project, you can proceed with the mesh generation and simulation setup steps describes in the exercise from Session 2.


Common Mistakes/Problems

1. Selecting the incorrect units during export

Most likely you will have to select meters when exporting the STL file to make sure that it will fit with the car model.

  • How do you know if you exported with the right units? When you merge the wing with the car, it should fit appropriately.
  • How do you know if you exported with the wrong units? When you merge the wing with the car, it will be disproportionately big or small.

2. Selecting the correct STL format

When you export your STL you should select ASCII format. This will create a file that can be merged with the car and imported into SimScale.

  • How do you know if you selected the right format (ASCII)? If you open an STL file with a text editor you will see normal text in Roman Alphabet. And you will be able to merge and upload successfully.
  • How do you know if you selected the wrong format (BINARY)? If you open an STL file with a text editor you will see random symbols. And you will not be able to merge and upload successfully.

3. Selecting the correct export quality for STL’s

When you export an STL you should have options to select the quality of the export, and you should always select the highest. If not, you might get an incorrect representation of your design.

4. Wing is out of bounds

When you have your wing design, before you go through the meshing process, make sure that it doesn’t intersect with the nose or the floor or the front wheels.

5. File naming

Never use spaces when naming your STL files, and avoid as much as possible using any symbols. You should stick to letters and numbers. This is just to avoid any silly issues.

6. Exporting all wing parts in the same STL

When you’re generating the solids for your wing, make sure that each component is a new solid, and make sure that you export each component individually.

  • How to know if you exported it correctly? You’re going to have to merge multiple files and when you upload it into SimScale you will be able to select each component individually.
  • How to know if you exported it incorrectly? When you upload it into SimScale you will only be able to select the whole wing which won’t be good for the meshing or simulation process.

7. Illegal cells/Simulation quit due to numerical instability

After you finish meshing (and remember to mesh only half the car to take advantage of symmetry), go to the Meshing Log and scroll down to the bottom of the text. Look for illegal cells and make sure the number is very small when compared to your mesh (a good recommendation would be for it to be below 0.003%).

Remember that this is not always the case and you might be able to get a a successful simulation with more illegal cells. Equally, you could have a simulation fail with less illegal cells.

If you ran a simulation and it failed due to numerical instability go back to your mesh and check your illegal cells. This is a good way to start troubleshooting.

8. Mesh operation event log

When your meshing is done, under the Mesh Operation Event Log you might get messages like:

  • Illegal triangles were found after surface tesselation. There could be a problem with the CAD geometry. Trying to proceed anyway.
  • The tesselated surface is not closed. There could be a problem with the CAD geometry (such as self-intersections). Please inspect your geometry. Trying to proceed anyway.
  • Mesh quality check failed. Mesh is not okay

Please don’t be alarmed. Inspect your mesh, do the surfaces look good? Do you have few illegal cells? You most probably can go ahead with the simulation setup with no problem.

You should have, ideally, below 10 million cells. The model for Session 2 had 8.3 million cells.


CAD Tool Specific Videos

We know that the process of this tutorial can vary greatly between CAD tools. In the video(s) below, you will find an example of how to export your own front wing design using Autodesk Inventor. Of course, this is not the only CAD tool you can use: SolidWorks, CATIA, Siemens NX and the list goes on.

Autodesk Inventor

Solid Works

(Looking for a volunteer…)

Do you use SolidWorks? Create a short screen recording of how to edit and export the front wing and car as an STL and share it in the comments section. I’m sure your fellow workshop participants will thank you :slight_smile:

CATIA

(Looking for a volunteer…)

Do you use CATIA? Create a short screen recording of how to edit and export the front wing and car as an STL and share it in the comments section. I’m sure your fellow workshop participants will thank you :slight_smile:

Siemens NX

(Looking for a volunteer…)

Do you use CATIA? Create a short screen recording of how to edit and export the front wing and car as an STL and share it in the comments section. I’m sure your fellow workshop participants will thank you :slight_smile:


Recommendations About Comments

Before you comment:

  • Make sure that you have thoroughly gone through the tutorial, especially the Common Mistakes/Problems section.
  • Check the comments to see if someone has had a similar problem and it has been solved.

CAD Export Rules
CFD convergence issue of a full body car simulation
Group Faces
#4

I found the model of the wing in Onshape, made modifications, and tried to export. It will not allow [no choice] me to list stl as an export option. The parts are listed as surfaces - should they be made solid [and how is that accomplished]? Thanks,


#5

Hi @dond!

Can you share the OnShape link with me?

Best,

Jousef


#6

The Onshape link is: https://cad.onshape.com/documents/cc08cc1a5bdab1d8161a5481/w/a3d992425b282f1c05e56deb/e/c3ff1b386197375211c6a88a


#7

To make matters worse, I tried to download the car’s CAD file and an alternate wing file, unzipped it, and I keep getting "Translation failed
S4_home_work_model_.stl failed to translate:
Conversion error.

Created at 4:49 PM Today
So with that, I’m quitting for today [sometimes it is better to quit and tackle the problems tomorrow, when you are fresh…].
Don


#8

Thanks for letting me know @dond! Also had a look at it and it seems that OnShape does not longer provide the STL export option. Let me get in touch with my colleague @drodriguez32. Will come back to you soon with some information and a possible workaround. Cheer up! :slight_smile: We will get this done together no worries!

All the best!

Jousef


#9

Please do provide some help regarding the construction of front wing as I have no idea of how to give aerofoils. I do want to complete the submission on time @jousefm .


#10

Hi @dond & @adeouskar as well as all the other participants of the workshop!

Please have a look at point 3 (section: STL File Export) of the tutorial. I have updated the picture. You can see that you have to rightclick on the tab on the bottom of the page in order to export it as STL. Please note that you have to select TEXT for the STL format.

Hope that helps! Let me know if you have any questions or need help.

Happy SimScaling!

Jousef


#11

I have a problem with positioning the wing in the model you provided. I have a stl model of my wing composed of all the individual parts and when I use the code of “Merge_sTL” it does the job and when I open the text file it includes all the wing parts and the model. but, I don’t see the wing when I open the file in solidworks or on the simscale website. I think that I need to open the wing with the model you sent and position the wing inside the model and then turn it to stl file again but I cant work on the model on solidworks.
So, how do I position my wing in the right place in the model you sent?


#12

Hi @pmoscovitz!

Can you try the following modifications:

  1. In the Mesh Creator tab go to the Background Mesh Box
  2. Change the Min. Point (z) coordinate to -0.592
  3. Change the Max. Point (z) coordinate to 6.608

Tell me if this worked. If not please make sure you share the project with me. I will then have a closer look at the issue :+1:

Happy SimScaling!

Jousef


#13

Hey @jousefm shared my project with you. I did what you said and it is not the problem - i don’t see the wing when i open the STL file or in the sim-scale software but when i open the text file of the STL i see all the wing elements.


#14

Hi @pmoscovitz! Having a look at it later on and will get back to you when I found the solution.

Cheers!

Jousef


#15

@jousefm - Some more information : In the sim-scale site i can see my wing in the STL file i uploaded but it is located in the middle of the car inside the car and i can’t change the wing location at the general STL file i have that includes the car and the wing. so the problem is - how i do i change the location of the wing?


#16

A new day - and the sun is shining!
Made your corrections and have the whole model now. Just need to follow your instructions to rotate the wing and connect it to the car.
Thanks


#17

@pmoscovitz,

You have to make sure that when you create your front wing it is in the same coordinate system as the car we provide. This is why we give you a reference geometry in step format which you can import into your CAD modeling software to make sure the wing is properly oriented and placed. You can also use the reference wing that we provide, that STEP file has the correct coordinate system for our car. So you could import it into the CAD tool you’re using and compare.

This is how it looks when imported:

Cheers,
Diego


#18

I used the Onshape models [car and wing] and followed the use of Powershell’s one step merger [twice] but my merged model has the wing 90 degrees off. How do I fix that since I can’t rotate the wing independent from the car?
Resultant at:: https://www.simscale.com/workbench/?pid=6169782790502329962#tab_0-0


#19

Hi. I have designed my front wing with SolidWorks, but the new coordinate system isn’t properly taken into account when exported to STL (even when selecting it in the exporting options). I’ve been searching for a solution to that for the past hour, to no avail.

Thank you in advance.


#20

Hi @ameunier!

For SolidWorks the following two “tricks” might help:

  1. Try ticking off the option “Do not translate STL output data to positive space
  2. Another user already has given a good instruction on how to overcome this problem
    —> SolidWorks - Coordinate System

Let me know if you were successful!

Jousef


#22

It worked ! The only thing I was missing was that “do not translate option”. Thank you for your swift response.


#23

Hi @dond!

You could rotate it in such a way in OnShape that it is in the right position when merged. Not an optimal solution but that is the first thing that came into my mind :wink: Will think about another solution too. Let me know if you managed to fix the issue by yourself in the meantime.

Cheers buddy!

Jousef