autoPatch creates too many patches on O-mesh
1 Attachment(s)
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; } ) |
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! |
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 |
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! |
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 |
2 Attachment(s)
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. |
I haven't done it as I work with:
Code:
farfield This thread might include the answer to your problem: https://www.cfd-online.com/Forums/op...tch-patch.html |
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! |
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) ); } ); // ************************************************** *********************** // |
All times are GMT -4. The time now is 08:27. |