Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • An aerobody model (solidworks, step, parasolid) which can be knitted and thickened to at least 10mm (higher is better).
  • Lots of patience and something to kill time with as ANSYS loads and solves

CFD Overview

We want to calculate what air particles are doing around our car. Essentially we are looking to build a virtual wind tunnel and shoot air at our car to see how it reacts. To do so we must:

  1. Geometry: Load our car aerobody CAD and define our wind tunnel dimensions
  2. Mesh: Build an accurate mesh that represents reality 
  3. Solution: Define parameters to solve

The Process

Note: Steps in BLUE represent actions to perform inside ANSYS.

ANSYS

This is ANSYS workbench. ANSYS's Fluent Module is used to perform the analysis. 

0.0) Double click on "Fluid Flow "Fluent" to load the module.

Expand
titleANSYS Fluent Screenshot

...

Our current module has everything unfulfilled and attention is required on the geometry step. Each cell must be "Up to Date" before starting the next step. If "Update Required" ever appears, simply press "Update Project".

Double 0.1) Right click on geometry to open the Geometry Modeller (not Space Claim)


Geometry

In this step we will load in the car model and build our "wind tunnel". Additionally, since the car is symmetrical, we will slice and simulate with only half the car model and wind tunnel in half. This reduces our calculation time by over 50%!

Note that the simulation will have the air move around the car (as opposed to car moving thorugh air). For a fully accurate representation, the ground can be simulated to be moving; but this is not worth the additional complexity and solving time (the accuracy improvements is marginal).


1.1) To load the model: Click "File > Import External Geometry File", then click "Generate".

Expand
titleGenerate Button Location

...

We can proceed to build the wind tunnel to contain our "air" (and cut in car in half in the same step).


1.2) Click "Tools>Enclosure" 

Under details view, you can select how large the wind tunnel should be by changing values of the cushion. The cushion is the shortest distance between the wall and any part of the car. Input the desired cushion values. Note that the -Y value in this case represents the cushion distance to the ground, this value will depend on the suspensions and wheels (how far the bottom of the aerobody sits away from the ground).

...


Our car is symmetrical about the YZ plane (this may vary for other models), so a symmetry plane will be 


1.3) Select "Number of Planes" to 1 and the symmetry plane to be YZPlane. Input the cushion values as seen below. 


1.4) Click "Generate"

Expand
titleHalf Wind Tunnel and Car Screenshot

...

Half the car and wind tunnel should appear. The car body needs to be subtracted from the fluid body (it'll be clear why during meshing).


1.5) Click "Tools> Create> Boolean". Select "Operation" as "Subtract". Select the wind tunnel and target body and car as tool body. Click "Generate"

Expand
titleBoolean Subtract Screenshot


Image Removed


Check the workbench to confirm our Geometry stage is "Up to Date".

Image Added

The geometery is ready to be meshed.

1.6) Double click "Mesh" to open Meshing


Meshing

This is the most critical step in the entire process. Building accurate meshes is a massive topic of study (many workshops and tutorials based on only meshing). This tutorial hopes to build basic intuition of proper meshing techniques specifically for vehicle aerodynamics. 

...

Expand
titleMeshing and CFD Intuition

Meshing Intuition: In general, all finite element techniques looks to break down a difficult problem into smaller simpler parts (each part is a "finite element"). Instead of analyzing flow on the entire tunnel at once, the problem is divided into a network of many air parcels. Each air parcel is represented as a node on the mesh, and every connection between parcels is an edge between nodes. Notice no nodes inside the car shaped cavity; this forces air flow to goes through edges around the car (which is why the car model is subtracted from the fluid model).

Later we will define some nodes to have boundary conditions (ie. the wind tunnel inlet nodes have set velocity and car surface nodes are static walls). When solving begins every node will send/receive information (such as pressure, velocity, volume or momentum) to/from adjacent nodes through the edges and update itself. For example, if a high pressure parcel is connected to a low pressure parcel, it is not in equilibrium; thus, there must be some movement (mass flow or velocity change) from the high to low pressure nodes. ANSYS will solve hundreds-thousands of these equations between nodes for thousands of iterations until a steady state is acheived. (Note: This is NOT the full story, but an easy way to imagine what's happening inside the simulation)

For the CFD technician, this means we want few nodes in locations where accuracy is insignificant and more nodes in important areas (orientated and positioned in a way to accurately simulate reality). As with all FEA, it is easy to get an accurate simulation (simply make the densest mesh possible and have it solve for three weeks); however, being proficient at CFD means being able to create a minimal mesh which keep computational time low and providing meaningful and accurate results.

You can click "Generate Mesh" and mesh based on default properties (click Show Mesh to view the mesh). This gives us a very poor mesh.

The current mesh is unacceptable: the top surface of the car only has a handful of nodes, the bottom of the car to the ground only has one row of cells and the mesh has no nodes to represent the boundary layer.



Let us improve the mesh quality to more accurately resemble reality.

2.1) Click "Mesh" in the sidebar and expand "Sizing". Change "Advanced Size Function" to "On: Proximity and Curvature". Change "Smoothing" to "High". Change "Num Cells Across Gap" to "5-10"

Expand
titleMesh Sizing Screenshot


These are the global mesh controls. These settings affect everything in our geometry. Advanced Size Function (On: Proximity and Curvature) is chosen as we want the car's curvature to be accurately represented; as the car is a thickened surface, the proximity portion prevents undesirable geometry. 


2.2) To add the inflation layer (to model the boundary layer). Expand Inflation and set "Use Automatic Inflation" to "Program Controlled"

Expand
titleInflation Layer Screenshot

Or Highlight Surface of Car

Create Named Selection → label "car"

Use "All Faces in Chosen Name Selection" (vs Program Controlled) → select "car"

2.3) Click Generate Mesh.

This mesh is far better than the default settings. The bottom has enough cells to appropriately model ground effects. The mesh is denser overall to provide higher resolution and accurately represent the geometry. A boundary layer is added around the entire car.

...


To finish, the mesh components must be labelled. 


2.4) Highlight and right click the front wall > "Create Named Selection". Name the face "Inlet".

Expand
titleNamed Selection Screenshot


2.5) Repeat the process. The wall behind the car is "outlet". The car cavity is "car". The symmetry plane "symmetry". The remaining three walls are "walls".


2.6) The mesh is completeGo back to ANSYS workbench and double click "setup" to begin setting up boundary conditions and solution parameters.

Setup/Solution

 Our  3.1) Our computer sucks so keep settings at default and click "ok".

Expand
titleFluent Launcher Screenshot



 3.2) Click Model > Viscous (Laminar) Model. Select k-epsilon and Realizable.

Expand
titleModels Screenshot


These are different CFD models which can be used to solve the simulation. Realizable k-epsilon is the better ones for our purposes.


 3.3) Edit boundary conditions for the inlet. 25m/s (90km/h) is used for this simulation.

Expand
titleInlet Boundary Conditions Screenshot

...

Next, the projected area of the car is required for the simulation to compute an accurate drag coefficient. If the frontal projected area is already known, the next step can be skipped.


 3.4) Select Reports>Projected Areas and highlight "car" and compute.

Expand
titleProjected Area Screenshot


 3.5) Go to "Reference Value" and replace the "Area" with the car frontal area and "Velocity" with the inlet velocity.

Expand
titleReference Values Screenshot

 

3.6) "Monitors". Here we can add various values to monitor. For this simulation, only the drag coeffient is relevant (we may look at lift/downforce in other simulations). 

Click Create > Drag. Highlight car and click "OK". Ensure the force vector is pointing in same direction of the car.


Solution > Report Definitions > Drag 

Expand
titleDrag Monitor Screenshot


 3.7) Start the simulation: Go to "Run Calculation" and set number of iterations to around 1000. Click "Calculate" and press "Yes".

Expand
titleRun Calculation Screenshot


...

Expand
titleSolving and Converged Screenshot



Post Processing

This stage is where we look at out results. What is possible?

Graphical or plots are availible for airflow, pressure, forces, etc.

Results → Reports → Forces → Direction Vector (in direction of air movement) → Print


Graphics → Pathlines → More Steps = Longer Line (500 - 2000) → Make sure to start with some path skips (i.e. 20) and lower as needed

Select Options → Draw Mesh (to see mesh) with path lines (select car)

You can view pathlines for entire car or for a specific line

Line/Rake → select endpoints for line


If you ever lose track of the model, use this button to zoom back to default.

...