CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   boundray conditions in OpenFoam (http://www.cfd-online.com/Forums/openfoam/84787-boundray-conditions-openfoam.html)

xiyuqiu February 8, 2011 17:46

boundray conditions in OpenFoam
 
Hello all,

I have a mesh generated from netgen and is now converted into foam format using netgenNeutralToFoam command. I ran a checkMesh and got the following.

/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.7.0 |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
Build : 1.7.0-21131bcbd876
Exec : checkMesh
Date : Feb 08 2011
Time : 13:43:22
Host : tribe.cse.ucdavis.edu
PID : 25031
Case : /home/yuhou/my_foam_test_dir/test_runs/lam_pipe
nProcs : 1
SigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create polyMesh for time = 0

Time = 0

Mesh stats
points: 21203
faces: 213440
internal faces: 197952
cells: 102848
boundary patches: 4
point zones: 0
face zones: 0
cell zones: 0

Overall number of cells of each type:
hexahedra: 0
prisms: 0
wedges: 0
pyramids: 0
tet wedges: 0
tetrahedra: 102848
polyhedra: 0

Checking topology...
Boundary definition OK.
Point usage OK.
Upper triangular ordering OK.
Face vertices OK.
Number of regions: 1 (OK).

Checking patch topology for multiply connected surfaces ...
Patch Faces Points Surface topology
patch0 0 0 ok (empty)
patch1 14720 7408 ok (non-closed singly connected)
patch2 384 217 ok (non-closed singly connected)
patch3 384 217 ok (non-closed singly connected)

Checking geometry...
Overall domain bounding box (-15.2205 -12.5436 0) (7.77949 10.4564 224)
Mesh (non-empty, non-wedge) directions (1 1 1)
Mesh (non-empty) directions (1 1 1)
Boundary openness (6.97395e-16 4.61931e-17 2.7422e-19) OK.
Max cell openness = 3.15752e-16 OK.
Max aspect ratio = 8.26039 OK.
Minumum face area = 0.574487. Maximum face area = 5.89857. Face area magnitudes OK.
Min volume = 0.256933. Max volume = 2.45927. Total volume = 92844. Cell volumes OK.
Mesh non-orthogonality Max: 71.363 average: 31.0839
*Number of severely non-orthogonal faces: 14.
Non-orthogonality check OK.
<<Writing 14 non-orthogonal faces to set nonOrthoFaces
Face pyramids OK.
Max skewness = 0.759258 OK.

Mesh OK.

End

I tried to ran simpleFoam solver for this (this is just a pipe flow) but the code crashed. give
--> FOAM FATAL IO ERROR:
keyword patch0 is undefined in dictionary "/home/yuhou/my_foam_test_dir/test_runs/lam_pipe/0/p::boundaryField"

file: /home/yuhou/my_foam_test_dir/test_runs/lam_pipe/0/p::boundaryField from line 25 to line 46.

From function dictionary::subDict(const word& keyword) const
in file db/dictionary/dictionary.C at line 456.

FOAM exiting


I think it is because I don't have the boundary condition defined.
How can I defined the boundary conditions here? Or it has to be defined in netgen? thank you so much.

JasonG February 9, 2011 15:19

It appears "patch0" is defined in netgen, but doesn't contain anything.

xiyuqiu February 9, 2011 15:40

Thanks, Jason. I will going into the patch. Do you know other than define them by index of vertex, is there a better way? and what are the options. I found inlet, outlet, fixwall and such. What happen if I would like to define say a parabolic velocity profile at the inlet or something. Is there are good tutorial on this topic? thank you so much

aerothermal February 9, 2011 15:41

yu,

define the names of our patches in constant/polyMesh/boundary file.
use the same name of the patches to assign your BC's in 0/ directory.
that should work for you.

guilherme

xiyuqiu February 9, 2011 15:44

Thank you Guilherme. I will try it right away.


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