CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Pre-Processing

autoPatch creates too many patches on O-mesh

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

Like Tree1Likes
  • 1 Post By klausb

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 20, 2015, 21:23
Default autoPatch creates too many patches on O-mesh
  #1
Senior Member
 
Klaus
Join Date: Mar 2009
Posts: 250
Rep Power: 22
klausb will become famous soon enough
Hello,

I created an O-mesh using construct2d, converted it into GMSH format as plot3dToFoam for the native construct2d file format didn't work (streaming issues/errors...), gmshToFoam worked fine, checkMesh is happy with the mesh as well.

In order to create the boundary patches I used autoPatch - overwrite 59 (and a number of other angles in an attempt to fix the issue).

The problem is, that I end up with 6 patches instead of 4. There are always 2 band like strips of 136 faces starting at the trailing edge of the airfoil, leading to the farfield boundary. These two bands are very close together.

How should I deal with this?


The boundaries are:

6
(
auto0
{
type patch;
nFaces 136;
startFace 81164;
}
front //auto1
{
type patch;
nFaces 40800;
startFace 81300;
}
back //auto2
{
type patch;
nFaces 40800;
startFace 122100;
}
airfoil //auto3
{
type patch;
nFaces 300;
startFace 162900;
}
farfield //auto4
{
type patch;
nFaces 300;
startFace 163200;
}
auto5
{
type patch;
nFaces 136;
startFace 163500;
}
)
Attached Images
File Type: jpg problem_patches.jpg (31.3 KB, 55 views)
klausb is offline   Reply With Quote

Old   August 18, 2019, 12:01
Default
  #2
Senior Member
 
chandra shekhar pant
Join Date: Oct 2010
Posts: 220
Rep Power: 16
chandra shekhar pant is on a distinguished road
Hello Klausb,


Have you resolved this issue, I am also facing similar kind of problem. It will be very helpful if you could suggest something in this regard.


Many thanks!
chandra shekhar pant is offline   Reply With Quote

Old   August 18, 2019, 15:35
Default
  #3
Senior Member
 
Klaus
Join Date: Mar 2009
Posts: 250
Rep Power: 22
klausb will become famous soon enough
The following procedure works in general, adjust the number in step two if it doesn't:


Import of construct3d .p3d meshes:

1: import mesh
plot3dToFoam mesh_name.p3d -noBlank

2: create patches
autoPatch -overwrite 89
klausb is offline   Reply With Quote

Old   August 19, 2019, 05:01
Default
  #4
Senior Member
 
chandra shekhar pant
Join Date: Oct 2010
Posts: 220
Rep Power: 16
chandra shekhar pant is on a distinguished road
Many thanks for your reply and the help. I got the 4 patches using command autoPatch 80 -overwrite , but the problem is I need explicit boundary conditions for inlet and outlet. I think with the upper mentioned command I got the 4 boundaries which are auto0 ---auto3 and in this auto0 is the wall (aerofoil), auto1,auto2 is the front and back and remaining auto3 is for farfield.



I explicitly need velocity inlet and pressure outlet to calculate the cavitation number (using interPhaseChangeFoam). Is it possible through it ? May be its possible to somehow give the half circle as inlet and other half as outlet.



Any help is highly welcomed.



Thanks a lot!
chandra shekhar pant is offline   Reply With Quote

Old   August 19, 2019, 05:38
Default
  #5
Senior Member
 
Carlo_P
Join Date: May 2019
Location: Italy
Posts: 176
Rep Power: 7
Carlo_P is on a distinguished road
Hey Chandra,
did you find a solution?
Normally, I use the surfaceToPatch command.
You have to create your Inlet.stl file with the geoemtry of the Inlet and then use surfaceToPatch Inlet.stl


It is very usefull, because is very simple to create a stl geometry of a plane also manually.


Cheers,
Carlo
Carlo_P is offline   Reply With Quote

Old   August 19, 2019, 05:50
Default
  #6
Senior Member
 
chandra shekhar pant
Join Date: Oct 2010
Posts: 220
Rep Power: 16
chandra shekhar pant is on a distinguished road
Hello Carlo,


Many thanks for your prompt reply, infact never got so prompt reply, it was amazing. Not sure that if you are asking for another stl/inlet artifically included in the mesh? Does it be done here also, since the domain and mesh are already very large, please look at the mesh attached herewith. Does the inlet stl file can be created using blockmesh?



May be I am very new to OF, so that could not understand. Sorry for that!


Thanks for the help.
Attached Images
File Type: jpg figure_1-1.jpg (101.5 KB, 16 views)
File Type: jpg figure_1.jpg (195.9 KB, 13 views)
chandra shekhar pant is offline   Reply With Quote

Old   August 19, 2019, 15:17
Default
  #7
Senior Member
 
Klaus
Join Date: Mar 2009
Posts: 250
Rep Power: 22
klausb will become famous soon enough
I haven't done it as I work with:


Code:
    farfield
    {
        type            inletOutlet;
        inletValue      $internalField;
        value           $internalField;
    }
where needed.


This thread might include the answer to your problem:
How to create a subpatch from a patch
klausb is offline   Reply With Quote

Old   August 20, 2019, 02:47
Default
  #8
Senior Member
 
chandra shekhar pant
Join Date: Oct 2010
Posts: 220
Rep Power: 16
chandra shekhar pant is on a distinguished road
Hello Klaus,



Many thanks for your prompt and helpful reply. I will check and try to implement it and accordingly update you.



Thanks a lot!
chandra shekhar pant is offline   Reply With Quote

Old   August 20, 2019, 04:15
Default
  #9
Senior Member
 
Carlo_P
Join Date: May 2019
Location: Italy
Posts: 176
Rep Power: 7
Carlo_P is on a distinguished road
Hey Chandra,
since you are working with blockmesh, the easiest way is to create the patch directly in blockMesh.




/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 6 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
|*---------------------------------------------------------------------------*|
| File created by Carlo Pasquinucci for cfd-online.com |
| linkedin.com/in/carloaugustopasquinucci carlo.a.pasquinucci@gmail.com |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object blockMeshDict;
}

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

convertToMeters 1;

xMinGeo -0.024;
xMaxGeo 0.052;
yMinGeo -0.008;
yMaxGeo 0.03;
zMinGeo -0.009;
zMaxGeo 0;


xMin #calc "$xMinGeo +0.0001";
xMax #calc "$xMaxGeo -0.0001";
yMin $yMinGeo;
yMax #calc "$yMaxGeo-0.0001";
zMin $zMinGeo;
zMax $zMaxGeo;

deltax 0.001;
deltay 0.001;
deltaz 0.001;

lx #calc "$xMax - $xMin";
ly #calc "$yMax - $yMin";
lz #calc "$zMax - $zMin";

xcells #calc "round($lx/$deltax)";
ycells #calc "round($ly/$deltay)";
zcells #calc "round($lz/$deltaz)";

vertices
(
($xMin $yMin $zMin)
($xMax $yMin $zMin)
($xMax $yMax $zMin)
($xMin $yMax $zMin)

($xMin $yMin $zMax)
($xMax $yMin $zMax)
($xMax $yMax $zMax)
($xMin $yMax $zMax)
);


blocks
(

hex (0 1 2 3 4 5 6 7) ($xcells $ycells $zcells) simpleGrading (1 1 1)


);

edges
(
);

boundary
(
Wall2
{
type wall;
faces
(
(0 3 2 1)
);
}
Sym
{
type symmetry;
faces
(
(4 5 6 7)
);
}
Inlet_sx
{
type patch;
faces
(
(0 4 7 3)
);
}
Walls1
{
type wall;
faces
(
(1 5 4 0)
);
}
Outlet
{
type patch;
faces
(
(2 6 5 1)
);
}

Inlet_up
{
type patch;
faces
(
(3 7 6 2)
);
}

);

// ************************************************** *********************** //
Carlo_P is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[snappyHexMesh] problems generating clean mesh Christian_tt OpenFOAM Meshing & Mesh Conversion 2 June 20, 2019 06:39
[snappyHexMesh] Number of cells in mesh don't match with size of cellLevel colinB OpenFOAM Meshing & Mesh Conversion 14 December 12, 2018 09:07
Star CCM Overset Mesh Error (Rotating Turbine) thezack Siemens 7 October 12, 2016 12:14
[ICEM] Problem making structural mesh on a surface froztbear ANSYS Meshing & Geometry 1 November 10, 2011 09:52
autoPatch error, mesh quality related...? Alexvader OpenFOAM 0 October 6, 2011 18:57


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