CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Meshing & Mesh Conversion

[blockMesh] What is $posY and why it is defined in edgeGrading?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 18, 2021, 14:05
Default What is $posY and why it is defined in edgeGrading?
  #1
New Member
 
FOAMraj
Join Date: Apr 2021
Posts: 19
Rep Power: 5
BIRAJ is on a distinguished road
What are $posY, $negY, and $posYR, and why they are defined in edgeGrading? Can anyone explain this geometrically? I extracted this code from this link. https://bit.ly/3v0uhCf
Thank you.



/*--------------------------------*- C++ -*----------------------------------*\
2| ========= | |
3| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
4| \\ / O peration | Version: v2006 |
5| \\ / A nd | Website: www.openfoam.com |
6| \\/ M anipulation | |
7\*---------------------------------------------------------------------------*/
8FoamFile
9{
10 version 2.0;
11 format ascii;
12 class dictionary;
13 object blockMeshDict;
14}
15// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
16
17scale 0.001;
18
19vertices
20(
21 (-20.6 0 -0.5)
22 (-20.6 25.4 -0.5)
23 (0 -25.4 -0.5)
24 (0 0 -0.5)
25 (0 25.4 -0.5)
26 (206 -25.4 -0.5)
27 (206 0 -0.5)
28 (206 25.4 -0.5)
29 (290 -16.6 -0.5)
30 (290 0 -0.5)
31 (290 16.6 -0.5)
32
33 (-20.6 0 0.5)
34 (-20.6 25.4 0.5)
35 (0 -25.4 0.5)
36 (0 0 0.5)
37 (0 25.4 0.5)
38 (206 -25.4 0.5)
39 (206 0 0.5)
40 (206 25.4 0.5)
41 (290 -16.6 0.5)
42 (290 0 0.5)
43 (290 16.6 0.5)
44);
45
46negY
47(
48 (2 4 1)
49 (1 3 0.3)
50);
51
52posY
53(
54 (1 4 2)
55 (2 3 4)
56 (2 4 0.25)
57);
58
59posYR
60(
61 (2 1 1)
62 (1 1 0.25)
63);
64
65
66blocks
67(
68 hex (0 3 4 1 11 14 15 12)
69 (18 30 1)
70 simpleGrading (0.5 $posY 1)
71
72 hex (2 5 6 3 13 16 17 14)
73 (180 27 1)
74 edgeGrading (4 4 4 4 $negY 1 1 $negY 1 1 1 1)
75
76 hex (3 6 7 4 14 17 18 15)
77 (180 30 1)
78 edgeGrading (4 4 4 4 $posY $posYR $posYR $posY 1 1 1 1)
79
80 hex (5 8 9 6 16 19 20 17)
81 (25 27 1)
82 simpleGrading (2.5 1 1)
83
84 hex (6 9 10 7 17 20 21 18)
85 (25 30 1)
86 simpleGrading (2.5 $posYR 1)
87);
88
89edges
90(
91);
92
93boundary
94(
95 inlet
96 {
97 type patch;
98 faces
99 (
100 (0 1 12 11)
101 );
102 }
103 outlet
104 {
105 type patch;
106 faces
107 (
108 (8 9 20 19)
109 (9 10 21 20)
110 );
111 }
112 upperWall
113 {
114 type wall;
115 faces
116 (
117 (1 4 15 12)
118 (4 7 18 15)
119 (7 10 21 18)
120 );
121 }
122 lowerWall
123 {
124 type wall;
125 faces
126 (
127 (0 3 14 11)
128 (3 2 13 14)
129 (2 5 16 13)
130 (5 8 19 16)
131 );
132 }
133 frontAndBack
134 {
135 type empty;
136 faces
137 (
138 (0 3 4 1)
139 (2 5 6 3)
140 (3 6 7 4)
141 (5 8 9 6)
142 (6 9 10 7)
143 (11 14 15 12)
144 (13 16 17 14)
145 (14 17 18 15)
146 (16 19 20 17)
147 (17 20 21 18)
148 );
149 }
150);
151
BIRAJ is offline   Reply With Quote

Old   May 18, 2021, 15:12
Default
  #2
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,714
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
The OpenFOAM dictionary syntax supports variable substitution, somewhat like you might have seen with shell script.

- look within the file to see where the variables are defined.
- it will look very ugly for the blockMeshDict but don't forget that you can always use "foamDictionary -expand" to see what the final form (after substitution) looks like.
olesen is offline   Reply With Quote

Old   May 23, 2021, 09:48
Default
  #3
New Member
 
FOAMraj
Join Date: Apr 2021
Posts: 19
Rep Power: 5
BIRAJ is on a distinguished road
Quote:
Originally Posted by olesen View Post
The OpenFOAM dictionary syntax supports variable substitution, somewhat like you might have seen with a shell script.

- look within the file to see where the variables are defined.
- it will look very ugly for the blockMeshDict but don't forget that you can always use "foamDictionary -expand" to see what the final form (after substitution) looks like.
Dear Mark,

I am just a beginner in OpenFoam and what I have understood is they are just variables that store the coordinates. One question: What will be the form in line 78(say) if I didn't write it? Will there be errors or any change in the mesh? Thank you.
BIRAJ is offline   Reply With Quote

Reply

Tags
mesh and grid, turbulence


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 07:49.