Tutorial calculation in “An Introduction to Computational Fluid Dynamics” yotakagi77 August 5th, 2017
Ex. 11.1 Heat conduction problem in unstructured grid.
Grid generation • First trial – blockMesh w/ wedge – blockMesh wo/ wedge – Square to triangle – Shift, mirror, shift, merge, mirror, rotate, …. – Modification of boundary patches is boring.
Grid generation • Second trial – Hand writing polyMesh data – Investigation of a simple grid, e.g. two triangles.
polyMesh • points • faces • owner • neighbor • boundary 0 1
Let’s try manual meshing! • Three triangles
Mesh generation with section paper
Mesh generation with section paper
polyMesh of half model • 22 points • 37 faces • 8 internal faces • 6 patches – adiabatic, low T., middle T., high T., symmetry, empty
Heat conduction calculation • Solver: laplacianFoam • Physical property – Thermal diffusivity, DT (=a) • r = 7.83 x 103 kg/m3 • Cp = 461 J/kg·K • k = 50 W/m·K • a = k / (rCp) = 0.0147 m2/s
Result
refineMesh $ refineMesh
refineMeshDict // Cells to refine; name of cell set set c0; // Type of coordinate system: // - global : coordinate system same for every cell. Usually aligned with // x,y,z axis. Specify in globalCoeffs section below. // - patchLocal : coordinate system different for every cell. Specify in // patchLocalCoeffs section below. // - fieldBased : uses the list of field names from the directions list for // selecting the directions to cut. Meant to be used with geometricCut, but // can also be used with useHexTopology. //coordinateSystem global; coordinateSystem patchLocal; //coordinateSystem fieldBased; // .. and its coefficients. x,y in this case. (normal direction is calculated as tan1^tan2) globalCoeffs { tan1 (1 0 0); tan2 (0 1 0); }
refineMeshDict patchLocalCoeffs { patch frontAndBack; // Normal direction is facenormal of zero'th face of patch tan1 (1 0 0); tan2 (0 1 0); } // List of directions to refine, if global or patchLocal directions ( tan1 tan2 normal ); // List of directions to refine, if "fieldBased". Keep in mind that these // fields must be of type "vectorField", not "volVectorField". //directions //( // radialDirectionFieldName // angularDirectionFieldName // heightDirectionFieldName //);
refineMeshDict // Whether to use hex topology. This will // - if patchLocal: all cells on selected patch should be hex // - split all hexes in 2x2x2 through the middle of edges. //useHexTopology true; useHexTopology false; // Cut purely geometric (will cut hexes through vertices) or take topology // into account. Incompatible with useHexTopology //geometricCut false; geometricCut true; // Write meshes from intermediate steps writeMesh false;

Tutorial calculation in “An Introduction to Computational Fluid Dynamics”

  • 1.
    Tutorial calculation in“An Introduction to Computational Fluid Dynamics” yotakagi77 August 5th, 2017
  • 2.
    Ex. 11.1 Heatconduction problem in unstructured grid.
  • 3.
    Grid generation • Firsttrial – blockMesh w/ wedge – blockMesh wo/ wedge – Square to triangle – Shift, mirror, shift, merge, mirror, rotate, …. – Modification of boundary patches is boring.
  • 4.
    Grid generation • Secondtrial – Hand writing polyMesh data – Investigation of a simple grid, e.g. two triangles.
  • 5.
    polyMesh • points • faces •owner • neighbor • boundary 0 1
  • 6.
    Let’s try manualmeshing! • Three triangles
  • 7.
    Mesh generation withsection paper
  • 8.
    Mesh generation withsection paper
  • 9.
    polyMesh of halfmodel • 22 points • 37 faces • 8 internal faces • 6 patches – adiabatic, low T., middle T., high T., symmetry, empty
  • 10.
    Heat conduction calculation •Solver: laplacianFoam • Physical property – Thermal diffusivity, DT (=a) • r = 7.83 x 103 kg/m3 • Cp = 461 J/kg·K • k = 50 W/m·K • a = k / (rCp) = 0.0147 m2/s
  • 11.
  • 12.
  • 13.
    refineMeshDict // Cells torefine; name of cell set set c0; // Type of coordinate system: // - global : coordinate system same for every cell. Usually aligned with // x,y,z axis. Specify in globalCoeffs section below. // - patchLocal : coordinate system different for every cell. Specify in // patchLocalCoeffs section below. // - fieldBased : uses the list of field names from the directions list for // selecting the directions to cut. Meant to be used with geometricCut, but // can also be used with useHexTopology. //coordinateSystem global; coordinateSystem patchLocal; //coordinateSystem fieldBased; // .. and its coefficients. x,y in this case. (normal direction is calculated as tan1^tan2) globalCoeffs { tan1 (1 0 0); tan2 (0 1 0); }
  • 14.
    refineMeshDict patchLocalCoeffs { patch frontAndBack; //Normal direction is facenormal of zero'th face of patch tan1 (1 0 0); tan2 (0 1 0); } // List of directions to refine, if global or patchLocal directions ( tan1 tan2 normal ); // List of directions to refine, if "fieldBased". Keep in mind that these // fields must be of type "vectorField", not "volVectorField". //directions //( // radialDirectionFieldName // angularDirectionFieldName // heightDirectionFieldName //);
  • 15.
    refineMeshDict // Whether touse hex topology. This will // - if patchLocal: all cells on selected patch should be hex // - split all hexes in 2x2x2 through the middle of edges. //useHexTopology true; useHexTopology false; // Cut purely geometric (will cut hexes through vertices) or take topology // into account. Incompatible with useHexTopology //geometricCut false; geometricCut true; // Write meshes from intermediate steps writeMesh false;