CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Meshing & Mesh Conversion (https://www.cfd-online.com/Forums/openfoam-meshing/)
-   -   [Commercial meshers] Boundary condition problems (OpenFOAM) (https://www.cfd-online.com/Forums/openfoam-meshing/16466-boundary-condition-problems-openfoam.html)

Milos March 14, 2009 18:22

Boundary condition problems (OpenFOAM)
 
Hi everyone!

I managed to transfer a file from ProEngineer to Gambit and afterwards to a .msh file, which I transfered again into an OpenFOAM format so I could run the simulation with OpenFOAM.

Everything seems all right, checkMesh says that the mesh is fine, but I'm constantly getting the following error after starting the simulation:

------------------------------------------- Create time

Create mesh for time = 0

Reading field p

keyword wall is undefined in dictionary "/home/milos/OpenFOAM/milos-1.5/run/test3/0/p::boundaryField"

file: /home/milos/OpenFOAM/milos-1.5/run/test3/0/p::boundaryField from line 25 to line 45.

From function dictionary::subDict(const word& keyword) const

in file db/dictionary/dictionary.C at line 271.

FOAM exiting

-------------------------------------------

My geometry is actually a pipe elbow with 3 blocks, inlet and an outlet. I guess it doesn't get much more simple than that.

If anyone knows what does this error means, please let me know.

Thanks a lot!


Hrvoje Jasak March 15, 2009 04:05

Re: Boundary condition problems (OpenFOAM)
 
Please try the OpenFOAM forum - it will be easier to find help there:

http://openfoam.cfd-online.com/cgi-bin/forum/discus.cgi

Hrv

Milos March 15, 2009 05:28

Re: Boundary condition problems (OpenFOAM)
 
Thnx Hrvoje, I suppose you're right.

wjarrah June 7, 2010 16:50

Hello everyone,

I'd like to know if the initial and boundary conditions, the turbulence model, solution methods and controls are stored in the .cas file under fluent.

In other words, if I set all those parameters and save them in a .cas file using fluent (ascii mode), and then convert the .cas file using fluent3DMeshToFoam tool, do I have to reset those parameters with openFoam, or the converter does it automatically ?

Thank you in advance !

robyn July 15, 2010 10:27

Hello Milos,

I also had the same problem with OpenFoam when I first started.

The file will not read the boundary fields as they don't match the ones (inlet, outlet, wall etc) within the .msh file. If you scroll to the very last portion of your .msh file there will be a list that looks similar to this:

2 fluid fluid
3 wall wall
4 pressure-outlet outlet
5 velocity-inlet inlet
7 interior default- interior


Each of these settings must be the same in your boundary fields of the p, U etc. files located in the 0 directory.

mvoss November 17, 2010 11:02

hi
you can either change the entries in the msh.-file or just adjust the polymesh\"boundary" after running fluentMeshToFoam.

i go with setting everything to wall whilst meshing and change it afterwards.

neewbie

P.S.: and .. yes... change to OF-Forum is a good idea.

xbook June 30, 2011 10:15

Similar problem here (I think). I'd really love to be able to transfer my boundaries, because my geometry is really complex and it's very tedious to define the boundary conditions after converting in OpenFoam. I get this when I try to convert my .msh file with fluent3DMeshToFoam:

Dimension of grid: 3
Number of points: 46892
PointGroup: 1 start: 0 end: 46891. Reading points...done.
Number of faces: 329574
FaceGroup: 2 start: 0 end: 88129. Reading uniform faces...done.
FaceGroup: 3 start: 88130 end: 319775. Reading uniform faces...done.
FaceGroup: 4 start: 319776 end: 321655. Reading uniform faces...done.
FaceGroup: 5 start: 321656 end: 323515. Reading uniform faces...done.
FaceGroup: 6 start: 323516 end: 325533. Reading uniform faces...done.
FaceGroup: 7 start: 325534 end: 327413. Reading uniform faces...done.
FaceGroup: 8 start: 327414 end: 328465. Reading uniform faces...done.
FaceGroup: 9 start: 328466 end: 329573. Reading uniform faces...done.
Number of cells: 140305
CellGroup: 10 start: 0 end: 140304 type: 1
Zone: 2 name: from-mask-1-to-background-wall type: wall. Reading zone data...done.
Zone: 3 name: mask-1-interior type: interior. Reading zone data...done.
Zone: 4 name: from-mask-1-to-xmin-wall type: wall. Reading zone data...done.
Zone: 5 name: from-mask-1-to-xmax-wall type: wall. Reading zone data...done.
Zone: 6 name: from-mask-1-to-ymin-wall type: wall. Reading zone data...done.
Zone: 7 name: from-mask-1-to-ymax-wall type: wall. Reading zone data...done.
Zone: 8 name: from-mask-1-to-zmin-wall type: wall. Reading zone data...done.
Zone: 9 name: from-mask-1-to-zmax-wall type: wall. Reading zone data...done.

FINISHED LEXING



--> FOAM FATAL ERROR:
10 not found in table. Valid entries: 8(2 3 4 5 6 7 8 9)

From function HashTable<T, Key, Hash>::operator[](const Key&)
in file /home/opencfd/OpenFOAM/OpenFOAM-1.7.x/src/OpenFOAM/lnInclude/HashTableI.H at line 110.

FOAM exiting


Any hints? What could I be doing wrong?

robyn June 30, 2011 12:53

Hello xbook!

I wrote it down in my note (which is not currently in my possession) but it has something to do with the mesh you created. It needs to match within the bashrc file I believe. Can you post the last few bottom lines of the .msh file? The error occurs when the file names of the faces do not match with one another. How are you creating your .msh?

~R

xbook July 1, 2011 03:51

Hello, thanks for the answer! Yes, I was already thinking that the problem must be somewhere in that direction. But I don't know exactly which files need to be adjusted in which way. The software that creates the .msh file is Simpleware's ScanIP ( www.simpleware.com ). The bottom lines in the .msh file:

(0 " Cells declaration: (0 first-index last-index cell-type-ignored-zero) ")
(12 (0 1 22411 0))

(0 " Cells: (zone-ix first-index last-index cell-type-active element-type-tetrahedral) ")
(0 " Zone: Mask 1 ")
(0 " zone-name: mask-1-fluid ")
(12 (a 1 22411 1 2))

(0 " Zone definitions: (zone-ix zone-type zone-name domain-id-one) ")

(0 " Zone: From Mask 1 to Background ")
(45 (2 wall from-mask-1-to-background-wall 1) ())

(0 " Zone: Mask 1 ")
(45 (3 interior mask-1-interior 1) ())

(0 " Zone: From Mask 1 to XMIN ")
(45 (4 wall from-mask-1-to-xmin-wall 1) ())

(0 " Zone: From Mask 1 to XMAX ")
(45 (5 wall from-mask-1-to-xmax-wall 1) ())

(0 " Zone: From Mask 1 to YMIN ")
(45 (6 wall from-mask-1-to-ymin-wall 1) ())

(0 " Zone: From Mask 1 to YMAX ")
(45 (7 wall from-mask-1-to-ymax-wall 1) ())

(0 " Zone: From Mask 1 to ZMIN ")
(45 (8 wall from-mask-1-to-zmin-wall 1) ())

(0 " Zone: From Mask 1 to ZMAX ")
(45 (9 wall from-mask-1-to-zmax-wall 1) ())

xbook July 1, 2011 09:00

Ok, looks like I solved the problem though I don't quite fully understand it. He somehow wanted a boundary 10, so I just duplicated the last line in the mesh file and edited it to a 10 and it worked:

(0 " Cells declaration: (0 first-index last-index cell-type-ignored-zero) ")
(12 (0 1 22411 0))

(0 " Cells: (zone-ix first-index last-index cell-type-active element-type-tetrahedral) ")
(0 " Zone: Mask 1 ")
(0 " zone-name: mask-1-fluid ")
(12 (a 1 22411 1 2))

(0 " Zone definitions: (zone-ix zone-type zone-name domain-id-one) ")

(0 " Zone: From Mask 1 to Background ")
(45 (2 wall from-mask-1-to-background-wall 1) ())

(0 " Zone: Mask 1 ")
(45 (3 interior mask-1-interior 1) ())

(0 " Zone: From Mask 1 to XMIN ")
(45 (4 wall from-mask-1-to-xmin-wall 1) ())

(0 " Zone: From Mask 1 to XMAX ")
(45 (5 wall from-mask-1-to-xmax-wall 1) ())

(0 " Zone: From Mask 1 to YMIN ")
(45 (6 wall from-mask-1-to-ymin-wall 1) ())

(0 " Zone: From Mask 1 to YMAX ")
(45 (7 wall from-mask-1-to-ymax-wall 1) ())

(0 " Zone: From Mask 1 to ZMIN ")
(45 (8 wall from-mask-1-to-zmin-wall 1) ())

(0 " Zone: From Mask 1 to ZMAX ")
(45 (9 wall from-mask-1-to-zmax-wall 1) ())

(45 (10 wall from-mask-1-to-zmax-wall 1) ())




Where in openFoam do I edit the number of boundary conditions he expects so I don't have to mess around with the .msh files I import?

Stephy July 8, 2011 19:33

Hello all,
As I have ne answer from the OF forum, I come here to post my problem (very similar as those here) and hopefully find an answer.
I have a problem after importing my mesh.neu from Gambit. As it is imported from Gambit, it does not need a BlockMeshDict to work (as far as I noticed, but I might be wrong). So then, I have a problem when it comes to match this mesh with the files in the "0" folder, the boundary conditions like 'p' or 'U'. How should I fill them to make them correspond to my mesh and make my simulation work ? I have not really any wall and wall type defined as I did the Boundary Conditions in Gambit.


OpenFoam says, for "icoFoam" for example:
Create time
Create mesh for time=0
Reading TransportProperties
Reading field p

--> FOAM FATAL IO ERROR:
keyword wall is undefined in dictionary ".../0/p::boundaryField"
file: /home/.../0/p::boundaryField from line 25 to line 35.
From function dictionary::subDict(const word& keyword) const
in file db/dictionary/dictionary.C at line 461.
FOAM exiting


Could someone help me and tell me how to make it work ?

thank you very much !!

xbook July 11, 2011 04:08

Check the boundary file in constant/polyMesh, it contains the imported mesh's boundary names. Then go to the /0 folder and open the files there. Below "boundary field" you have to replace the default boundary names with your boundary names (and choose its type) with an editor.

jignesh_thaker2007 June 10, 2014 16:35

Boundary conditions of pressure and velocityfor air-water two phase pipe flow problem
 
1 Attachment(s)
How can i define the boundary condition for velocity and pressure at interface of air-water two phase pipe flow in OpenFOAM?
I am trying to solve the problem of two-phase air water mixture in OpenFOAM. Air is coming from the perforated pipe which has number of holes on its periphery and then mix with water. Actually in gambit i gave interface boundary condition at perforated holes. but when i convert in to openFOAM i am finding difficulty to define the proper boundary condition for velocity and pressure at this interface between air and water in 0 directory.
I drew the geometry in Gambit which is attached here for the reference.

Please some tell me what is the proper boundary condition of velocity and pressure at interface for my problem.

hakolekar October 13, 2016 19:58

Meshing around Blade - leading to Boundary problems
 
2 Attachment(s)
Hi everyone,

I am trying to import a mesh for a blade from an ascii format into OpenFoam using plot3dToFoam

Next, I follow it up with autoPatch 35 -overwrite.

The autoPatch command creates 2 unnecessary boundary patches of 1 face each (which are overlapping), wAttachment 51114

Attachment 51115hich don't fit into any boundary, and which I don't want. (please see attached pictures)

Is there any way of getting rid of these extra patches?

If I ignore these patches from the boundary file and then run simpleFoam - simpleFoam runs successfully. On opening Paraview to view the solution, Paraview crashes after pressing the 'Apply' button and there is an error

FOAM FATAL Error:
0 not in Table. Valid entries are:
3258
{ (3258 numbers are present in this bracket)
}

Does anyone have any idea about this matter?
Thank you.
Regards,
Harshal


All times are GMT -4. The time now is 09:05.