1

Previous: Non-rotating part mesh generation Up: Mesh generation Next: Simulation and Evaluation set

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

Merging meshes of rotating and non-rotating parts together

  • How merge (join) rotating and non-rotating parts together is described in this section.
  • The utility mergeMeshes is used to do that.
  • The typical way of merging mesh A with the mesh B together is like adding the mesh B to the mesh A, i.e. after the merge there will be mesh A containing the merge of A and B and the mesh B remains unchanged. So, first of all, let’s make a copy of mesh A and let’s add the mesh B to the copy of A.
  • In this case – mesh A is a non-rotating part and mesh B is rotating part. And let’s call the copy of mesh A as “final”.
  • First of all, make a copy of non-rotating mesh – i.e. copy constant and system folders from nonRotatingPart directory to new “final” mesh directory.

    # cd $FOAM_RUN/windTurbine/mesh
    # mkdir final
    # cp -rv nonRotatingPart/constant final/
    # cp -rv nonRotatingPart/system final/

     

  • Use mergeMeshes utility. The command below merges adds the rotating part to the final mesh (i.e. nonRotatingPart mesh because it was copied it into final mesh in pervious step). The switch -overwrite ensures creation of the merged mesh in constant directory in final mesh.

    # mergeMeshes final rotatingPart -overwrite > \
    ../log.finalMesh-mergeMeshes 2>&1

     

  • The command createPatch creates patches ‘rotBox1-outlet’ and ‘rotBox2-outlet’ from three smaller patches in each case. (see createPatchDict in mesh/nonRotatingPart/system for setup information).

     

  • The utility changeDictionary with appropriate changeDictionaryDict in system directory sets properly the cyclicAMI boundary type there – for smooth mapping of flow field variables on non-conformal interfaces.

    # cd final
    # createPatch -overwrite > ../../log.finalMesh-createPatch 2>&1
    # changeDictionary -dict "../../system/changeDictionaryDict" > \
    ../../log.caseMesh-changeDictionary 2>&1

     

  • The utility transformPoints is employed for scaling of the final mesh from millimeters to meters because in OpenFOAM the SI units have to be always used.

    # transformPoints -scale '(0.001 0.001 0.001)' > \
    ../../log.finalMesh-transformPoints 2>&1

     

  • Finaly, the mesh shall be copied into the case diretory.

     

  • The same procedure can be seen in makeMesh.sh script again – its listing follows:

     

echo "Merging meshes..."
   mkdir final
   cp -rv nonRotatingPart/constant final/ > ../log.finalMesh-cp 2>&1
   cp -rv nonRotatingPart/system final/ >> ../log.finalMesh-cp 2>&1
   mergeMeshes final rotatingPart -overwrite > ../log.finalMesh-mergeMeshes 2>&1
   cd final
   createPatch -overwrite > ../../log.finalMesh-createPatch 2>&1
   changeDictionary -dict "../../system/changeDictionaryDict" > ../../log.caseMesh-changeDictionary 2>&1
   transformPoints -scale '(0.001 0.001 0.001)' > ../../log.finalMesh-transformPoints 2>&1
   cd ../..

echo "Copying mesh into case directory..."
   cp -rv mesh/final/constant/polyMesh constant > log.finalMesh-cpMeshToCase 2>&1