1

Previous: Results visualization Up: Advanced Training Next: Mesh generation

This is an automatically generated documentation by LaTeX2HTML utility. In case of any issue, please, contact us at info@cfdsupport.com.

Test case: Wind Turbine

  • This tutorial is focused on advanced meshing with snappyHexMesh (the hexa-dominant unstructured mesh generator included in the OpenFOAM toolbox) and advanced postprocessing namely the torque of turbine blades.
  • There are two main challenges
    1. a combination of a static and a moving mesh
    2. the axis of rotation is not parallel with any of the main axes (this fact complicates meshing with snappyHexMesh and evaluation of the torque)

Figure: Wind turbine tutorial. The axis of rotation vs. original coordinate system.

  • There is shown a way how to deal with such circumstances – how to prepare an appropriate mesh from stl files and how to evaluate the torque and power of the wind turbine in this case.
  • There is also described the whole process – meshing, case setup, running the simulation and the results evaluation.
  • Test case parameters:
    Inlet air velocity: 186
    Computation area dimensions: 187
    Speed of rotation: 188 ( )
    189Incompressible transient flow
CFDsupport meshing training wind turbine mesh 1

Figure: Wind turbine tutorial. Model of wind turbine.

  • The case setup can be found in the enclosed training materials. Copy the corresponding directory to your run directory.

    # cp -r training/run/windTurbine $FOAM_RUN
    # cd $FOAM_RUN/windTurbine

  • The computation of simulation can be launched by

    # ./Allrun-rotating.sh

  • This is a script-file that does all the necessary steps (commands which have to be executed) for the mesh generation and running the CFD simulation.
  • The first step in this tutorial that needs to be done is a mesh generation, then a simulation setup follows and the third step is running simulation and evaluation of the torque.
  • For completeness the listing of the Allrun-rotating.sh follows:
    #!/bin/bash
    # --------------------------------------------------------------------------- #
    #   ==   ===  ==                                                              #
    #  ||   ||=  || ))  support s. r. o. 2017, www.cfdsupport.com                 #
    #   ==  ||    ==                                                              #
    # --------------------------------------------------------------------------- #
    
    # number of CPUs to run on
    numProcs=12
    # endTime
    endTime=1
    
    # check environment
    if [[ $(echo $WM_PROJECT_VERSION |  cut -c1-3) != "dev" ]];
    then
        echo "Use OpenFOAM dev with this example script, please."
        exit
    fi
    
    echo
    echo "Cleaning..."
       ./Allclean.sh
    
    sed -i "s/\(.*numberOfSubdomains[ \t]*\)[0-9].*;/numberOfSubdomains $numProcs;/g" system/decomposeParDict
    sed -i "s/\(.*endTime[ \t]*\)[0-9].*;/\1$endTime;/g" system/controlDict
    
    
       ./makeMesh.sh $numProcs
    
    echo "Running Simulation..."
       cp -r 0.org 0
       decomposePar > log.simulation-decomposePar  2>&1 
       mpiexec -np $numProcs renumberMesh -overwrite -parallel > log.simulation-renumberMesh 2>&1
       mpiexec -np $numProcs pimpleFoam -parallel > log.simulation-pimpleFoam 2>&1
    

Subsections