Main ContribExamples/AxiSymmetric

From OpenFOAMWiki
< Main ContribExamples
Revision as of 09:18, 18 June 2008 by Rafalzietara (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
  1. Aim:

Create an axisymetric mesh with blockMesh

  1. Mesh description:

I want to run a simulation on axisymetric mesh that has 0.19 m in diameter and 1.1 m in height. The density of the mesh should be 300 cells in axial and 19 in radial direction. Schematically the drawing of the mesh is shown on the picture. "X","Y","Z" - coordinates, 0-5 points in blockMesh description. File:/home/rafal/Desktop/Schematic.svg

  1. Writing blockMeshDict:
    1. How to get points 1,4,5,2 ?

from Python:

 
rafal@tux ~/Desktop/axi/constant/polyMesh $ python
Python 2.4.4 (#1, May 30 2008, 12:21:58)
[GCC 4.1.2 (Gentoo 4.1.2 p1.1)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import math
>>> 0.19*math.sin(math.pi*2.5/180)
0.0082876835994138403
>>> 0.19*math.cos(math.pi*2.5/180)
0.189819162100553
>>>
<\Python>
 
first value 0.008288 corresponds to z and second 0.1898 to x.
blockMeshDict will have form:
 
<cpp>
convertToMeters 0.005;
 
vertices
(
(0 0 0)
(0.1898 0 -0.008288)
(0.1898 1.1 -0.008288)
(0 1.1 0)
(0.1898 0 0.008288)
(0.1898 1.1 0.008288)
);
 
 
blocks
(
hex (0 1 4 0 3 2 5 3) (19  1 300) simpleGrading (1 1 1)
);
 
edges
(
);
 
patches
(
 wedge front
 (
 (0 1 2 3)
 )
 wedge back
 (
 (0 3 5 4)
 )
 wall tankWall
 (
 (1 4 5 2)
 )
 patch inlet
 (
 (0 4 1 0)
 )
 patch outlet
 (
 (3 2 5 3)
 )
 empty axis
 (
 (0 3 3 0)
 )
);
 
mergePatchPairs
(
);
<\cpp>
 
 
=== Disclaimer: ===
On this page appeared as a 20 minutes work. It can therefore contain some mistakes.
This is probably not a proper way to do the axisymetric mesh, but the one that worked for me. If you have any comments, feel free to modify the case.
 
Rafal Zietara
--~~~~