|
[Sponsors] |
OpenFOAM + Gmesh + NACA airfoil: Boundary condition set-up!? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
December 5, 2014, 11:29 |
OpenFOAM + Gmesh + NACA airfoil: Boundary condition set-up!?
|
#1 | |
Member
Join Date: Mar 2014
Location: Austrian abroad in Germany
Posts: 48
Rep Power: 12 |
I have a question regarding this tutorial. On page 3 one has to make some adjustments to the constant/polyMesh/boundary file:
Quote:
|
||
December 5, 2014, 11:38 |
|
#2 |
Senior Member
|
Hi,
Yes, you can leave it like this. Though there are faces in defaultFaces patch and it means you've missed certain parts of the mesh during description of the physical groups in Gmsh (and it's hard to imagine where there faces really belong to). Could you post a screen shot of your mesh, marking defaultFaces patch with special colour? |
|
December 5, 2014, 18:18 |
|
#3 | |
Member
Join Date: Mar 2014
Location: Austrian abroad in Germany
Posts: 48
Rep Power: 12 |
Quote:
I'm not sure, I got the point. What Do you mean by "defaultFaces patch"? Could I ask you kindly to check the attached geo file!? |
||
December 6, 2014, 09:24 |
|
#4 |
Senior Member
|
Hi,
(I'll use OpenFOAM terminology: patch == boundary) In general when you construct a mesh for 2D case, you have 2 patches front and back (or you can make single patch), they have empty type. In your case this is not so (see attached screenshot of your mesh). I.e. you've got front patch which is OK, but your back patch is in fact outlet (or exit). Your exit patch doesn't exist Code:
exit { type patch; physicalType patch; nFaces 0; startFace 107946; } If you keep in mind this fancy naming of the mesh boundaries while setting boundary conditions in 0 folder everything will be OK. But according to your boundary.txt file (attached to the first message) it's not the case. |
|
December 6, 2014, 14:23 |
|
#5 |
Senior Member
|
Hi,
I've looked through your geo-file, here's corrected definitions of the physical groups: Code:
Physical Surface("inlet") = {31}; Physical Surface("exit") = {39}; Physical Surface("bottom") = {35}; Physical Surface("top") = {27}; Physical Surface("front") = {40}; Physical Surface("back") = {1}; Physical Surface("airfoil") = {19, 23}; Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.3.0 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format binary; class polyBoundaryMesh; location "constant/polyMesh"; object boundary; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 7 ( back { type empty; nFaces 43074; startFace 64300; } front { type empty; nFaces 43074; startFace 107374; } airfoil { type wall; nFaces 412; startFace 150448; } top { type patch; nFaces 55; startFace 150860; } inlet { type patch; nFaces 50; startFace 150915; } bottom { type patch; nFaces 55; startFace 150965; } exit { type patch; nFaces 50; startFace 151020; } ) // ************************************************************************* // |
|
December 6, 2014, 19:25 |
|
#6 |
Member
Join Date: Mar 2014
Location: Austrian abroad in Germany
Posts: 48
Rep Power: 12 |
Thanks for checking the boundary file! Many thanks for your help alexeym! It's working now
|
|
June 20, 2015, 14:40 |
|
#7 |
New Member
adhi makayasa
Join Date: Apr 2015
Posts: 20
Rep Power: 11 |
hi alexeym
hi I also have the same problem . after I made a physical group and displayed in parafoam get an error message Can not find an entry for airfoil patchField how do I fix it ? this p file /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.3.0 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; object p; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 2 -2 0 0 0 0]; internalField uniform 0; boundaryField { inlet { type freestreamPressure; } outlet { type freestreamPressure; } walls { type zeroGradient; } airfoil { type zeroGradient; } frontAndBack { type empty; } } // ************************************************** *********************** // |
|
June 20, 2015, 14:43 |
|
#8 |
New Member
adhi makayasa
Join Date: Apr 2015
Posts: 20
Rep Power: 11 |
this my geo file
lc = 0.01; Point(1) = {0, 0, 0, lc}; Point(2) = {0.0005839, -0.0042603, 0, lc}; Point(3) = {0.0023342, -0.0084289, 0, lc}; Point(4) = {0.0052468, -0.0125011, 0, lc}; Point(5) = {0.0093149, -0.0164706, 0, lc}; Point(6) = {0.0145291, -0.02033, 0, lc}; Point(7) = {0.0208771, -0.0240706, 0, lc}; Point(8) = {0.0283441, -0.0276827, 0, lc}; Point(9) = {0.0369127, -0.0311559, 0, lc}; Point(10) = {0.0465628, -0.0344792, 0, lc}; Point(11) = {0.057272, -0.0376414, 0, lc}; Point(12) = {0.0690152, -0.040631, 0, lc}; Point(13) = {0.0817649, -0.0434371, 0, lc}; Point(14) = {0.0954915, -0.0460489, 0, lc}; Point(15) = {0.1101628, -0.0484567, 0, lc}; Point(16) = {0.1257446, -0.0506513, 0, lc}; Point(17) = {0.1422005, -0.0526251, 0, lc}; Point(18) = {0.1594921, -0.0543715, 0, lc}; Point(19) = {0.1775789, -0.0558856, 0, lc}; Point(20) = {0.1964187, -0.057164, 0, lc}; Point(21) = {0.2159676, -0.0582048, 0, lc}; Point(22) = {0.2361799, -0.0590081, 0, lc}; Point(23) = {0.2570083, -0.0595755, 0, lc}; Point(24) = {0.2784042, -0.0599102, 0, lc}; Point(25) = {0.3003177, -0.0600172, 0, lc}; Point(26) = {0.3226976, -0.0599028, 0, lc}; Point(27) = {0.3454915, -0.0595747, 0, lc}; Point(28) = {0.3686463, -0.0590419, 0, lc}; Point(29) = {0.3921079, -0.0583145, 0, lc}; Point(30) = {0.4158215, -0.0574033, 0, lc}; Point(31) = {0.4397317, -0.05632, 0, lc}; Point(32) = {0.4637826, -0.0550769, 0, lc}; Point(33) = {0.4879181, -0.0536866, 0, lc}; Point(34) = {0.5120819, -0.052162, 0, lc}; Point(35) = {0.5362174, -0.0505161, 0, lc}; Point(36) = {0.5602683, -0.0487619, 0, lc}; Point(37) = {0.5841786, -0.0469124, 0, lc}; Point(38) = {0.6078921, -0.0449802, 0, lc}; Point(39) = {0.6313537, -0.0429778, 0, lc}; Point(40) = {0.6545085, -0.0409174, 0, lc}; Point(41) = {0.6773025, -0.0388109, 0, lc}; Point(42) = {0.6996823, -0.03667, 0, lc}; Point(43) = {0.7215958, -0.0345058, 0, lc}; Point(44) = {0.7429917, -0.0323294, 0, lc}; Point(45) = {0.7638202, -0.0301515, 0, lc}; Point(46) = {0.7840324, -0.0279828, 0, lc}; Point(47) = {0.8035813, -0.0258337, 0, lc}; Point(48) = {0.8224211, -0.0237142, 0, lc}; Point(49) = {0.8405079, -0.0216347, 0, lc}; Point(50) = {0.8577995, -0.0196051, 0, lc}; Point(51) = {0.8742554, -0.0176353, 0, lc}; Point(52) = {0.8898372, -0.0157351, 0, lc}; Point(53) = {0.9045085, -0.0139143, 0, lc}; Point(54) = {0.9309849, -0.0105485, 0, lc}; Point(55) = {0.942728, -0.0090217, 0, lc}; Point(56) = {0.9534372, -0.0076108, 0, lc}; Point(57) = {0.9630873, -0.0063238, 0, lc}; Point(58) = {0.9716559, -0.0051685, 0, lc}; Point(59) = {0.9791229, -0.0041519, 0, lc}; Point(60) = {0.9854709, -0.0032804, 0, lc}; Point(61) = {0.990685, -0.0025595, 0, lc}; Point(62) = {0.9947532, -0.0019938, 0, lc}; Point(63) = {0.9976658, -0.001587, 0, lc}; Point(64) = {0.9994161, -0.0013419, 0, lc}; Point(65) = {1, -0.00126, 0, lc}; Point(66) = {1, 0.00126, 0, lc}; Point(67) = {0.9994161, 0.0013419, 0, lc}; Point(68) = {0.9976658, 0.001587, 0, lc}; Point(69) = {0.9947532, 0.0019938, 0, lc}; Point(70) = {0.990685, 0.0025595, 0, lc}; Point(71) = {0.9854709, 0.0032804, 0, lc}; Point(72) = {0.9791229, 0.0041519, 0, lc}; Point(73) = {0.9716559, 0.0051685, 0, lc}; Point(74) = {0.9630873, 0.0063238, 0, lc}; Point(75) = {0.9534372, 0.0076108, 0, lc}; Point(76) = {0.942728, 0.0090217, 0, lc}; Point(77) = {0.9309849, 0.0105485, 0, lc}; Point(78) = {0.9182351, 0.0121823, 0, lc}; Point(79) = {0.9045085, 0.0139143, 0, lc}; Point(80) = {0.8898372, 0.0157351, 0, lc}; Point(81) = {0.8742554, 0.0176353, 0, lc}; Point(82) = {0.8577995, 0.0196051, 0, lc}; Point(83) = {0.8405079, 0.0216347, 0, lc}; Point(84) = {0.8224211, 0.0237142, 0, lc}; Point(85) = {0.8035813, 0.0258337, 0, lc}; Point(86) = {0.7840324, 0.0279828, 0, lc}; Point(87) = {0.7638202, 0.0301515, 0, lc}; Point(88) = {0.7429917, 0.0323294, 0, lc}; Point(89) = {0.7215958, 0.0345058, 0, lc}; Point(90) = {0.6996823, 0.03667, 0, lc}; Point(91) = {0.6773025, 0.0388109, 0, lc}; Point(92) = {0.6545085, 0.0409174, 0, lc}; Point(93) = {0.6313537, 0.0429778, 0, lc}; Point(94) = {0.6078921, 0.0449802, 0, lc}; Point(95) = {0.5841786, 0.0469124, 0, lc}; Point(96) = {0.5602683, 0.0487619, 0, lc}; Point(97) = {0.5362174, 0.0505161, 0, lc}; Point(98) = {0.5120819, 0.052162, 0, lc}; Point(99) = {0.4879181, 0.0536866, 0, lc}; Point(100) = {0.4637826, 0.0550769, 0, lc}; Point(101) = {0.4397317, 0.05632, 0, lc}; Point(102) = {0.4158215, 0.0574033, 0, lc}; Point(103) = {0.3921079, 0.0583145, 0, lc}; Point(104) = {0.3686463, 0.0590419, 0, lc}; Point(105) = {0.3454915, 0.0595747, 0, lc}; Point(106) = {0.3226976, 0.0599028, 0, lc}; Point(107) = {0.3003177, 0.0600172, 0, lc}; Point(108) = {0.2784042, 0.0599102, 0, lc}; Point(109) = {0.2570083, 0.0595755, 0, lc}; Point(110) = {0.2361799, 0.0590081, 0, lc}; Point(111) = {0.2159676, 0.0582048, 0, lc}; Point(112) = {0.1964187, 0.057164, 0, lc}; Point(113) = {0.1775789, 0.0558856, 0, lc}; Point(114) = {0.1594921, 0.0543715, 0, lc}; Point(115) = {0.1422005, 0.0526251, 0, lc}; Point(116) = {0.1257446, 0.0506513, 0, lc}; Point(117) = {0.1101628, 0.0484567, 0, lc}; Point(118) = {0.0954915, 0.0460489, 0, lc}; Point(119) = {0.0817649, 0.0434371, 0, lc}; Point(120) = {0.0690152, 0.040631, 0, lc}; Point(121) = {0.057272, 0.0376414, 0, lc}; Point(122) = {0.0465628, 0.0344792, 0, lc}; Point(123) = {0.0369127, 0.0311559, 0, lc}; Point(124) = {0.0283441, 0.0276827, 0, lc}; Point(125) = {0.0208771, 0.0240706, 0, lc}; Point(126) = {0.0145291, 0.02033, 0, lc}; Point(127) = {0.0093149, 0.0164706, 0, lc}; Point(128) = {0.0052468, 0.0125011, 0, lc}; Point(129) = {0.0023342, 0.0084289, 0, lc}; Point(130) = {0.0005839, 0.0042603, 0, lc}; Point(131) = {1, 0, 0, lc}; Spline(1) = {65, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25}; Spline(2) = {25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1}; Spline(3) = {1, 130, 129, 128, 127, 126, 125, 124, 123, 122, 121, 120, 119, 118, 117, 116, 115, 114, 113, 112, 111, 110, 109, 108, 107}; Spline(4) = {107, 106, 105, 104, 103, 102, 101, 100, 99, 98, 97, 96, 95, 94, 93, 92, 91, 90, 89, 88, 87, 86, 85, 84, 83, 82, 81, 80, 79, 78, 77, 76, 75, 74, 73, 72, 71, 70, 69, 68, 67, 66}; Spline(5) = {66, 131}; Spline(6) = {131, 65}; lc = 0.5; Point(132) = {4, -4, 0, lc}; Point(133) = {4, 4, 0, lc}; Point(134) = {-3, -4, 0, lc}; Point(135) = {-3, 4, 0, lc}; Point(136) = {4, 0, 0, lc}; Point(137) = {-3, 0, 0, lc}; Line(7) = {135, 133}; Line(8) = {133, 136}; Line(9) = {136, 132}; Line(10) = {132, 134}; Line(11) = {134, 137}; Line(12) = {137, 135}; Line(13) = {107, 135}; Line(14) = {25, 134}; Line(15) = {1, 137}; Line(16) = {133, 66}; Line(17) = {131, 136}; Line(18) = {132, 65}; Line Loop(19) = {12, -13, -3, 15}; Plane Surface(20) = {19}; Line Loop(21) = {13, 7, 16, -4}; Plane Surface(22) = {21}; Line Loop(23) = {8, -17, -5, -16}; Plane Surface(24) = {23}; Line Loop(25) = {17, 9, 18, -6}; Plane Surface(26) = {25}; Line Loop(27) = {18, 1, 14, -10}; Plane Surface(28) = {27}; Line Loop(29) = {14, 11, -15, -2}; Plane Surface(30) = {29}; Field[1] = Box; Background Field = 1; Transfinite Line {12, 13, 3, 15} = 20 Using Progression 1; Transfinite Surface {20}; Recombine Surface {20}; Transfinite Line {11, 15, 2, 14} = 20 Using Progression 1; Transfinite Surface {30}; Recombine Surface {30}; Transfinite Line {7, 16, 4, 13} = 20 Using Progression 1; Transfinite Surface {22}; Recombine Surface {22}; Transfinite Line {10, 14, 1, 18} = 20 Using Progression 1; Transfinite Surface {28}; Recombine Surface {28}; Transfinite Line {8, 17, 5, 16} = 20 Using Progression 1; Transfinite Surface {24}; Recombine Surface {24}; Transfinite Line {9, 18, 6, 17} = 20 Using Progression 1; Transfinite Surface {26}; Recombine Surface {26}; Extrude {0, 0, 2} { Surface{20, 22, 24, 26, 28, 30}; Layers{1}; Recombine; } Physical Surface(163) = {20, 22, 24, 26, 28, 30}; Back = 163; Physical Surface(164) = {52, 74, 96, 118, 140, 162}; front = 164; Physical Surface(165) = {65}; top = 165; Physical Surface(166) = {139}; bottom = 166; Physical Surface(167) = {39, 153}; inlet = 167; Physical Surface(168) = {83, 109}; outlet = 168; Physical Surface(169) = {47, 161, 73, 131, 117, 91}; airfoil = 169; Physical Volume(170) = {1, 2, 3, 4, 5, 6}; internal = 170; /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.3.0 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class polyBoundaryMesh; location "constant/polyMesh"; object boundary; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 6 ( frontAndBack { type empty; physicalType empty; nFaces 4332; startFace 4218; } inlet { type patch; physicalType inlet; nFaces 38; startFace 8550; } airfoil { type wall; physicalType airfoil; nFaces 76; startFace 8588; } walls { type patch; physicalType wall; nFaces 38; startFace 8664; } outlet { type patch; physicalType outlet; nFaces 38; startFace 8702; } defaultFaces { type empty; nFaces 38; startFace 8740; } ) // ************************************************** *********************** // Thank you for the help.... |
|
June 20, 2015, 17:41 |
|
#9 |
Senior Member
|
@makayasa
And the error message itself? Was not able to find it in your posts. |
|
June 20, 2015, 18:04 |
|
#10 |
New Member
adhi makayasa
Join Date: Apr 2015
Posts: 20
Rep Power: 11 |
I get an error message
" --> FOAM FATAL IO ERROR: Cannot find patchField entry for movingwalls file: /home/yasa/OpenFOAM/yasa-2.3.0/run/naca/0/nut.boundaryField from line 25 to line 43. From function GeometricField<Type, PatchField, GeoMesh>::GeometricBoundaryField::readField(const DimensionedField<Type, GeoMesh>&, const dictionary&) in file /home/opencfd/OpenFOAM/OpenFOAM-2.3.0/src/OpenFOAM/lnInclude/GeometricBoundaryField.C at line 209. FOAM exiting yasa@yasa-X455LD:~/OpenFOAM/yasa-2.3.0/run/naca$ |
|
June 20, 2015, 18:27 |
|
#11 |
Senior Member
|
The error is self-explanatory: you do not have description of movingwalls boundary in 0/nut file. And it is quite strange as I do not see this patch in constant/polyMesh/boundary file.
Still your initial message contradicts with the latest, as initially the error (oh, it helped to re-read the first message) was about airfoil patch, in the latest message it is about movingwalls boundary. |
|
June 23, 2015, 14:10 |
|
#12 |
New Member
adhi makayasa
Join Date: Apr 2015
Posts: 20
Rep Power: 11 |
Hello all. After converting gmsh to foam and I run , why the results in the show is not like the one in the tutorial ? I run simplefoam for airfoil2d case . How do I fix it ? please advise Thank you very much
Last edited by makayasa; June 23, 2015 at 15:52. |
|
June 25, 2015, 05:22 |
|
#13 |
New Member
adhi makayasa
Join Date: Apr 2015
Posts: 20
Rep Power: 11 |
hi alexeym Thank you for the advice. Once the problem is solved . Which is a problem now , how to set the angle of attack and velocity on the airfoil without changing the mesh? I use simplefoam for this case Thank you for the help
|
|
June 25, 2015, 05:32 |
|
#14 |
Senior Member
|
Can't you just change magnitude and direction of velocity at the inlet? For O-type grids this is done naturally (using inletOutlet boundary condition), do not know what kind of mesh you have in your geo-file (but since you have got walls patch there, guess airfoil is in some kind of wind tunnel, so the method is not applicable for your case).
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Question about heat transfer coefficient setting for CFX | Anna Tian | CFX | 1 | June 16, 2013 07:28 |
How to set the velocity inlet boundary condition in the compressible flow? | lienien | FLUENT | 2 | March 11, 2013 09:25 |
How to transfer boundary condition from Openfoam to fluent | sachinlb | OpenFOAM Post-Processing | 1 | January 6, 2012 02:41 |
How to set boundary condition in supersonic airflow | sailor | FLUENT | 0 | December 14, 2011 02:44 |
asking for Boundary condition in FLUENT | Destry | FLUENT | 0 | July 27, 2010 01:55 |