|
[Sponsors] |
March 20, 2015, 20:23 |
autoPatch creates too many patches on O-mesh
|
#1 |
Senior Member
Klaus
Join Date: Mar 2009
Posts: 250
Rep Power: 22 |
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; } ) |
|
August 18, 2019, 11:01 |
|
#2 |
Senior Member
chandra shekhar pant
Join Date: Oct 2010
Posts: 220
Rep Power: 16 |
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! |
|
August 18, 2019, 14:35 |
|
#3 |
Senior Member
Klaus
Join Date: Mar 2009
Posts: 250
Rep Power: 22 |
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 |
|
August 19, 2019, 04:01 |
|
#4 |
Senior Member
chandra shekhar pant
Join Date: Oct 2010
Posts: 220
Rep Power: 16 |
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! |
|
August 19, 2019, 04:38 |
|
#5 |
Senior Member
Carlo_P
Join Date: May 2019
Location: Italy
Posts: 176
Rep Power: 7 |
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 |
|
August 19, 2019, 04:50 |
|
#6 |
Senior Member
chandra shekhar pant
Join Date: Oct 2010
Posts: 220
Rep Power: 16 |
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. |
|
August 19, 2019, 14:17 |
|
#7 |
Senior Member
Klaus
Join Date: Mar 2009
Posts: 250
Rep Power: 22 |
I haven't done it as I work with:
Code:
farfield { type inletOutlet; inletValue $internalField; value $internalField; } This thread might include the answer to your problem: How to create a subpatch from a patch |
|
August 20, 2019, 01:47 |
|
#8 |
Senior Member
chandra shekhar pant
Join Date: Oct 2010
Posts: 220
Rep Power: 16 |
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! |
|
August 20, 2019, 03:15 |
|
#9 |
Senior Member
Carlo_P
Join Date: May 2019
Location: Italy
Posts: 176
Rep Power: 7 |
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) ); } ); // ************************************************** *********************** // |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[snappyHexMesh] problems generating clean mesh | Christian_tt | OpenFOAM Meshing & Mesh Conversion | 2 | June 20, 2019 05:39 |
[snappyHexMesh] Number of cells in mesh don't match with size of cellLevel | colinB | OpenFOAM Meshing & Mesh Conversion | 14 | December 12, 2018 08:07 |
Star CCM Overset Mesh Error (Rotating Turbine) | thezack | Siemens | 7 | October 12, 2016 11:14 |
[ICEM] Problem making structural mesh on a surface | froztbear | ANSYS Meshing & Geometry | 1 | November 10, 2011 08:52 |
autoPatch error, mesh quality related...? | Alexvader | OpenFOAM | 0 | October 6, 2011 17:57 |