# LES 2D multiphase simulation error using imported gmsh mesh

 Register Blogs Members List Search Today's Posts Mark Forums Read

 April 13, 2015, 04:09 LES 2D multiphase simulation error using imported gmsh mesh #1 New Member   thomas Join Date: Jul 2014 Posts: 17 Rep Power: 3 Hello all, I am trying to simulate a multiphase flow using interFoam and using LES for turbulence modelling. I will try to be as accurate as possible regarding the description of the problem, so I will quote all error/warnings messages from terminal. I would really appreciate your help. Thanks in advance for your time! So, the geometry file in gmsh is: Code: // Gmsh project created on Thu Apr 9 09:24:11 2015 el = 1; pi = 3.14159265; theta = (pi/4 + pi/2); theta2 = (pi/4); r = 40; r2 = 40+20*Cos(theta2); Point(1) = {0, 0, 0, el}; Point(2) = {0, 15, 0, el}; Point(3) = {r2*Cos(theta), 15+r2*Sin(theta), 0, el}; Point(4) = {r*Cos(theta), 35+r*Sin(theta), 0, el}; Point(5) = {0, 35, 0, el}; Point(6) = {0, 40, 0, el}; Point(7) = {120, 40, 0, el}; Point(8) = {120, 35, 0, el}; Point(9) = {160, 35, 0, el}; Point(10) = {160, 15, 0, el}; Point(11) = {120, 15, 0, el}; Point(12) = {120, 0, 0, el}; Line(1) = {1, 2}; Line(2) = {2, 3}; Line(3) = {3, 4}; Line(4) = {4, 5}; Line(5) = {5, 6}; Line(6) = {6, 7}; Line(7) = {7, 8}; Line(8) = {8, 9}; Line(9) = {9, 10}; Line(10) = {10, 11}; Line(11) = {11, 12}; Line(12) = {12, 1}; Line Loop(13) = {6, 7, 8, 9, 10, 11, 12, 1, 2, 3, 4, 5}; Plane Surface(14) = {13}; Extrude {0, 0, 10} { Surface{14}; Layers{1}; Recombine; } Physical Surface("back") = {14}; Physical Surface("front") = {76}; Physical Surface("inlet") = {67}; Physical Surface("outlet") = {43}; Physical Surface("walls") = {59, 63, 71, 75, 31, 35, 39, 43, 47, 55}; Physical Volume("interior") = {1}; After converting the mesh file using gmshToFoam, I get following warning: Code: --> FOAM Warning : From function polyMesh:polyMesh(... construct from shapes...) in file meshes/polyMesh/polyMeshFromShapeMesh.C at line 627 Found 248400 undefined faces in mesh; adding to default patch. The resulting boundary file looks like this: Code: 6 ( back { type patch; physicalType patch; nFaces 122260; startFace 609360; } walls { type patch; physicalType patch; nFaces 3496; startFace 731620; } outlet { type patch; physicalType patch; nFaces 156; startFace 735116; } inlet { type patch; physicalType patch; nFaces 112; startFace 735272; } front { type patch; physicalType patch; nFaces 122260; startFace 735384; } defaultFaces { type patch; nFaces 116; startFace 857644; } ) As I change the type and physical type for front and back to "empty" while leaving the defaultFaces type as "patch" and I try to run interFoam, I get following error: Code: --> FOAM FATAL IO ERROR: Cannot find patchField entry for defaultFaces file: /home/thomas/CFD/OpenFOAM/thomas-2.3.1/run/tutorials/multiphase/interFoam/thomasCaseLES/0/p_rgh.boundaryField from line 25 to line 42. From function GeometricField::GeometricBoundaryField::readField(const DimensionedField&, const dictionary&) in file /home/opencfd/OpenFOAM/OpenFOAM-2.3.0/src/OpenFOAM/lnInclude/GeometricBoundaryField.C at line 209. FOAM exiting And if I change the defaultFaces type to "empty", I get following error: Code: --> FOAM FATAL ERROR: Case is not 3D or 2D, LES is not applicable From function cubeRootVolDelta::calcDelta() in file cubeRootVolDelta/cubeRootVolDelta.C at line 72. FOAM exiting Once again, thank you in advance for reading and trying to help!

April 13, 2015, 04:27
#2
Senior Member

Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,161
Rep Power: 20
Hi,

You have forgotten to add one surface into walls patch (see attached image), so they went into defaultFaces and this ended with final error (as for 2D case only front and back should be empty).

Also, you have to edit boundary dictionary (with changeDictionary utility for example), so front and back have type empty, walls has type wall (or your next question will be about wall functions those complain about walls not being walls ).

And finally, why not make hexagonal mesh using transfinite algorithm? The geometry is very simple.
Attached Images
 default-faces.png (5.5 KB, 9 views)

 April 13, 2015, 07:56 #3 New Member   thomas Join Date: Jul 2014 Posts: 17 Rep Power: 3 Hi, first of all, thank you very much for responding. Your comment helped me to find where I was messing up: I checked the wall boundaries definition and I noticed, that I had surface 43 defined as an outlet and as a wall. In stead of defining surface 43 as a wall, I have to define surface 51 as a wall. Regarding the transfinite algoritm: that's the next step! Thanks again!

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post bobburnquist OpenFOAM Native Meshers: snappyHexMesh and Others 6 August 26, 2015 09:38 Doginal CFX 2 January 12, 2014 07:21 dcggames ANSYS Meshing & Geometry 9 January 8, 2013 10:51 ESC FLUENT 2 September 4, 2012 10:56 aeroslacker Open Source Meshers: Gmsh, Netgen, CGNS, ... 12 January 19, 2012 04:52

All times are GMT -4. The time now is 22:34.