Projects‎ > ‎Vespa CFD/3D Model‎ > ‎

OpenFOAM Vespa Tutorial

In Work - just dumping notes for now... things that need to be done...

  • Fix mesh holes which will be causing issues (inside of scooter is being snap meshed when it shouldn't be)
  • Look at the SpalartAllmaras solver which was suggested as the bext for this type of problem (example in Air foil tutorial)
  • Update page info with CFD jargon

vespa_model.png OpenFOAM Motorbike Tutorial

The following is based on copy called motorBikeParallel6_100, which is the motorbike tutorial tweaked for 6 cpus and a speed of 100km/hr (28/ms). The final Vespa version will be attached...

cp -rf motorBikeParallel6_100/ vespaParallel6_100

Rider Modelling

Here we will talk about how to model the rider

Also and note about the rider being in full leathers with armour, due to modeling technque he looks like a muscle man in lycra

Scooter Rider Modelling

Frontal Area Calculation

To correctly calculated the forces, such as drag, we need the frontal area and update the value in system/forceCoeffs. Working out frontal area proves to be difficult. Using the notes on working out frontal area:

Another approach, which is similar to the above, is to remesh the surface from points so that it doesn't matter that some of the points/cells are missing as we get a complete surface at the end. The disadvantage is that the shape may be rounded but even so it gives a more accurate value and it is obvious where the "rounding" errors are introduced (I calculated an area 0.660839 compared to 0.64438 for Rhino3D below and 0.506266 for the method above).

Do the following in ParaView:

  1. Instead of selecting "cells on", select "points on"
  2. Extract the selection (so you end up with a bunch of points)
  3. Use the transform filter to scale the Vespa flat (so the points are all on the plane you wish to calculate)
  4. Then apply a Delaunay2D filter, which will triangulate all the dots (you will need to play with the settings to get a nice shape fit)
  5. Then extract surface
  6. Then Integrate Variables - Area of Cell data

The solution so far is to use Rhino 3D

Vespa rider upright with screen - Cumulative Area = 0.815188109

Scaling the Model

The 3D Vespa scan is in mm and the OpenFOAM motorbike model is in metres. The model could be scaled down manually in ParaView, by adding a transform filter and setting it to scale all x,y,z coordinates by 0.001. A command line alternative is

Translating the Model

The 3D Vespa scan has the floorboards as the zero point, but the motorbike tutorial uses the contact point of the wheels as zero. Again in ParaView this can be done manually by adding a transform filter and translating z by 0.26 (once the scaling above has been done). I wanted a command line version so I wrote a C++ VTK application to read/write STL files (note vtk-5.10.0 has a bug so I had to use a previous version). I also created this application so I could experiment with creating geometry on the fly :).

Adapting Case for More Accurate Results

Might need to play about with parameters for snappyHexMesh

Refinement Level

Playing with refinement level in system/snappyHexMeshDict increases mesh quality. It appears that this quality can be refined further until things start slowing down significantly when system memory is maxed out. With the following setting a run could be done overnight on a 12G machine, with most of the time in snappyHexMesh. On a 48G machine... (notes to be added). On a 192G machine...  (notes to be added).

            // Surface-wise min and max refinement level
            // level (5 6); // left below
            level (7 9);    // right below

meshrefinement_level_5_6.png meshrefinement_level_7_9.png


Using checkMesh

Checking geometry...

 ***Max skewness = 17.118, 663 highly skew faces detected which may impair the quality of the results

Failed 1 mesh checks.

Using the following in system/snappyHexMeshDict removed the errors on the unrefined mesh but there are still issues with the refined mesh... more work to do on this area...


    //- Max skewness allowed. Set to <0 to disable.
    // maxBoundarySkewness 20;
    // maxInternalSkewness 4;
    maxBoundarySkewness 1;
    maxInternalSkewness 1;
Paul McIntosh,
Mar 25, 2015, 1:01 AM
Paul McIntosh,
Mar 25, 2015, 1:01 AM
Paul McIntosh,
Mar 25, 2015, 1:00 AM
Paul McIntosh,
Mar 25, 2015, 1:01 AM
Paul McIntosh,
Mar 25, 2015, 1:01 AM
Paul McIntosh,
Mar 25, 2015, 1:01 AM