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/)
-   -   [Netgen] Create boundary (https://www.cfd-online.com/Forums/openfoam-meshing/61947-create-boundary.html)

fabrizio October 26, 2008 08:54

Create boundary
 
Hi everybody I have created a polymesh from Netgen and all went fine. Now I have to fix boundaries, and I have this boundary file:

/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \ / O peration | Version: 1.4.1 |
| \ / A nd | Web: http://www.openfoam.org |
| \/ M anipulation | |
\*---------------------------------------------------------------------------*/

FoamFile
{
version 2.0;
format ascii;

root "/home/fabrizio/OpenFOAM/fabrizio-1.4.1/run";
case "prova";
instance "constant";
local "polyMesh";

class polyBoundaryMesh;
object boundary;
}

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

12
(

patch1
{
type patch;
physicalType patch;
nFaces 14;
startFace 294;
}

patch2
{
type patch;
physicalType patch;
nFaces 18;
startFace 308;
}

patch3
{
type patch;
physicalType patch;
nFaces 16;
startFace 326;
}

patch4
{
type patch;
physicalType patch;
nFaces 14;
startFace 342;
}

patch5
{
type patch;
physicalType patch;
nFaces 14;
startFace 356;
}

patch6
{
type patch;
physicalType patch;
nFaces 14;
startFace 370;
}

patch7
{
type patch;
physicalType patch;
nFaces 6;
startFace 384;
}

patch8
{
type patch;
physicalType patch;
nFaces 6;
startFace 390;
}

patch9
{
type patch;
physicalType patch;
nFaces 6;
startFace 396;
}

patch10
{
type patch;
physicalType patch;
nFaces 8;
startFace 402;
}

patch11
{
type patch;
physicalType patch;
nFaces 6;
startFace 410;
}

patch12
{
type patch;
physicalType patch;
nFaces 6;
startFace 416;
}
)

// ************************************************** *********************** //

I want patch1 to be inlet, patch 2 to be outlet and all the other patches to be walls. I haven't found nothing about in the forum, so I hope someone can help me.

Thanks to all

Fabrizio

philippose October 26, 2008 14:12

Hello Fabrizio, A Good even
 
Hello Fabrizio,

A Good evening to you....!

Well... a short answer to your question would be... there is no automatic method to tell netgenNeutral2Foam which patches have what names.

During the import, the converter automatically recognises the boundary definitions available, and gives them default names "patch<n>"....

You will have to manually change these to the names you want.

If you have many such cases with the same boundary patch names, I would suggest that you quickly cook up a bash script which uses something like "sed" to automatically rename the patches based on a "configuration file" which you provide.

In addition, note that you would also have to change the "type" of the patch to the relevant ones (as you mentioned, wall, etc...)

As for defining a patch to be an inlet or an outlet.... this is not specified in the "boundary" file. Such definitions are made in the "p", and "U" files in the "0" time-step folder of the case.

Hope this helps!

Have a nice day!

Philippose


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