Flow around a running motorcycle (LES)

OpenFOAM 4.x

Case directory

$FOAM_TUTORIALS/incompressible/pisoFoam/les/motorBike

Summary

We calculate the wind flow around a motorcycle. The fluid flows in at (20, 0, 0) m/s from the region "inlet" (minimum X-plane) and out at the region "outlet" (maximum X-plane). The surface of the motorcycle is assumed to be a no-slip wall condition, and the ground is assumed to have a velocity of (20, 0, 0) m/s. The other walls (region "upperWall", "frontAndBack") are assumed to be in the slip wall condition.

The first step is to perform steady-state calculations using RANS (Spalart Allmaras model) in simpleFoam. Then, using the results obtained from the steady-state calculation as initial conditions, an unsteady calculation from 0 sec to 0.7 sec is performed using LES (Spalart Allmaras DDES).

Model geometry (entire) Model geometry (entire)
Model geometry (near the motorcycle) Model geometry (near the motorcycle)

The meshes are as follows, and the number of mesh is 6615102.

Mesh (entire) Mesh (entire)
Meshes (near the motorcycle) Meshes (near the motorcycle)
Meshes (XY-Plane) Meshes (XY-Plane)

The calculation result is as follows.

Flow velocity (U)
Flow velocity (U) Flow velocity (U)
Pressure (p) Pressure (p)

Commands

cp -r $FOAM_TUTORIALS/incompressible/pisoFoam/les/motorBike motorBike

### First, calculate steady state with RANS
cd motorBike/motorBike

# Make meshes
cp $FOAM_TUTORIALS/resources/geometry/motorBike.obj.gz constant/triSurface/
mkdir 0
blockMesh
cp system/decomposeParDict.hierarchical system/decomposeParDict
decomposePar
cp system/decomposeParDict.ptscotch system/decomposeParDict
mpirun -np 8 snappyHexMesh -overwrite -parallel

# Search for files "*level*" and delete all of them
find . -type f -iname "*level*" -exec rm {} \;

# Search for the directory "processor*" and update the directory "0" in the found directory with 0.orig
ls -d processor* | xargs -I {} cp -r 0.orig ./{}/0

# Steady state calculation with RANS
mpirun -np 8 renumberMesh -overwrite -parallel
mpirun -np 8 potentialFoam -initialiseUBCs -parallel
mpirun -np 8 simpleFoam -parallel
cd ../

### Calculate the flow with LES using the calculation results as initial conditions
mkdir motorBikeLES
cd motorBikeLES
cp -r ../motorBike/processor* .
cp -r ../motorBike/system .
cp -r ../motorBike/constant .
cp ../lesFiles/fvS* ../lesFiles/controlDict system/
cp ../lesFiles/turbulenceProperties constant/

# Search for the directory "processor*" and update the directory "0" in the found directory with the results of the RANS calculation
ls -d processor* | xargs -I {} rm -rf ./{}/0
ls -d processor* | xargs -I {} mv ./{}/500 ./{}/0
ls -d processor* | xargs -I {} rm -rf ./{}/0/uniform

# Calculation with LES
mpirun -np 8 pisoFoam -parallel

# Merge splited meshes and results
reconstructParMesh -constant -mergeTol 1e-6
reconstructPar

paraFoam

Calculation time

  • Making meshes: 9 minutes 16.31 seconds
  • Calculation (RANS): 52 minutes 39.82 seconds
  • Calculation (LES): 27 hours 56 minutes 58 seconds

*8 parallel, Inter(R) Core(TM) i7-2600 CPU @ 3.40GHz 3.40GHz

Reference