Cyclic boundary condition on SALOME mesh
Hello everybody,
I want to set up a cyclic boundary condition on a mesh made in SALOME. I export mesh to i-deas and run ideasUnvToFoam. I get this: Code:
--> FOAM FATAL ERROR: This is my boundary file: Code:
/*--------------------------------*- C++ -*----------------------------------*\ |
It's funny how I banged my head on this for two weeks and now that I gave up and asked I immediately found the solution while looking for something totally different.
For future reference for lost souls like me, here's how it's done: It's the "Projection" algorithm in SALOME. One face is meshed separately with a submesh, the other is meshed separately again but with Projection 1D-2D algorithm. http://docs.salome-platform.org/late...lgos_page.html Enjoy! |
Hi Nejc,
How did you solve it with projection 2D. I tried it but can't get it to work. How do I create a surface mesh before meshing the whole volume or is this the wrong approach? Could you make a small step by step list on how to do this? Regards Henrik |
1 Attachment(s)
Hi, sorry for a late reply, I had to do it again to check if it still works :)
Here's roughly what to do:
See the attachment for a simple example. Good luck! |
I was created cyclicBoundary in Salome, but when I convert to OpenFoam and set boundary cyclic (I am using repeatAMi) for them , it this error:
''face 0 area does not match neighbour by 59.88569801% -- possible face ordering problem. patch:cyclic_Out1 my area:2.01556304e-06 neighbour area:1.086666987e-06 matching tolerance:0.01 Mesh face:591751 fc:(0.129768 0.05073526667 -0.07932823333) Neighbour fc:(0.09832853333 0.00576254 0.01105083333) If you are certain your matching is correct you can increase the 'matchTolerance' setting in the patch dictionary in the boundary file. Rerun with cyclic debug flag set for more information.'' Can anyone help me with this problem? |
Hi,
Could you share your boundary file? Maybe you have specified your patches faulty. Do you use createPatch? COuld you share your mesh or images of the cyclic boundaries? / Henrik |
Thanks for your repply,
https://drive.google.com/file/d/1D2Q...ew?usp=sharingThis is my boundary
/*--------------------------------*- C++ -*----------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Version: 6 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class polyBoundaryMesh; location "constant/polyMesh"; object boundary; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 12 ( inlet { type patch; nFaces 891; startFace 1407711; } cyclicIn1 { type patch; nFaces 1714; startFace 1408602; } cyclicIn2 { type patch; nFaces 1714; startFace 1410316; } stationaryWalls { type patch; nFaces 3076; startFace 1412030; } couple1 { type patch; nFaces 863; startFace 1415106; } statorBlade { type patch; nFaces 4134; startFace 1415969; } couple2 { type patch; nFaces 2585; startFace 1420103; } movingWalls I used CreatePatch /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: plus | | \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object createPatchDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // pointSync false; patches ( { // Name of new patch name cyclic_In1; // Type of new patch patchInfo { type cyclic; neighbourPatch cyclic_In2; matchTolerance 1E-2; } // How to construct: either from 'patches' or 'set' constructFrom patches; // If constructFrom = patches : names of patches. Wildcards allowed. patches (cyclicIn1); } { // Name of new patch name cyclic_In2; // Type of new patch patchInfo { type cyclic; neighbourPatch cyclic_In1; matchTolerance 1E-2; } // How to construct: either from 'patches' or 'set' constructFrom patches; // If constructFrom = patches : names of patches. Wildcards allowed. patches (cyclicIn2); } { // Name of new patch name cyclic_Out1; // Type of new patch patchInfo { type cyclic; neighbourPatch cyclic_Out2; matchTolerance 1E-2; } // How to construct: either from 'patches' or 'set' constructFrom patches; // If constructFrom = patches : names of patches. Wildcards allowed. patches (cyclicOut1); } { // Name of new patch name cyclic_Out2; // Type of new patch patchInfo { type cyclic; neighbourPatch cyclic_Out1; matchTolerance 1E-2; } // How to construct: either from 'patches' or 'set' constructFrom patches; // If constructFrom = patches : names of patches. Wildcards allowed. patches (cyclicOut2); } ); and this this images of the cyclicBoudary ( cyclicIn1 and cyclicIn2) https://drive.google.com/file/d/1D2Q...ew?usp=sharing https://drive.google.com/file/d/1fjM...ew?usp=sharing https://drive.google.com/file/d/1fjM...aNrXaPUf7/view |
Thanks,
It is not complaning about the patches you show on the images, cyclicIn1/cyclicIn2, but Code:
patch:cyclic_Out1 my area:2.01556304e-06 neighbour area:1.086666987e-06 matching tolerance:0.01 |
Try specifying more details about your cyclic. In case of rotational symmetry, it would be something like this:
Code:
cyclicRight |
Like Nejc said,
Using cyclicAMI or cyclicGGI could solve the problem. Since they dont care about the face ordering like the cyclic does. I have never tried using cyclic with 1:1 from Salome just cyclicGGI in foam-extend. Which worked with salomeToOpenFOAM as importer to foam-extend. Depending on how you export your model from Salome to openfoam the face ordering might not be conserved or even correct for the cyclic condition in OpenFOAM. |
hi Johansson,
Sorry about my mistakes There ary my boundary and creatPatch https://drive.google.com/drive/folde...zO?usp=sharing |
Try using cyclicAMI instead of the classic 1:1 cyclic. Since your mesh is 1:1 it shall not make any difference to the result but might increase the solution time slightly.
https://www.cfdsupport.com/OpenFOAM-...t/node116.html I think the face ordering from Salome of the 1:1 cyclic boundaries are not correct to how OpenFOAM wants it. |
Problem when using cyclicAMI
3 Attachment(s)
Hi Johansson,
It's me again, but this time, I used TurborGird for created mesh and imported it to Of6. I tried using CyclicAMI instead of Cyclic but when l run PImpleFoam I am facing an error: Code:
AMI: Creating addressing and weights between 6625 source faces and 6625 target faces Please have a look at my geometry in the attached images. My boundaries is like below:: Code:
12 Attachment 68646 Attachment 68647 Attachment 68648 |
I have no personal experince with cyclicAMI but it looks like there is a problem with your cyclicOut. If you won't figure it out you could try cyclicGGI in foam-extend. That I have used and can help you with.
|
Hi Johansson,
Thanks a lot for guiding me. In boundary file l have edited the cyclicAmi to be made cyclicGGi and which is given below Code:
12 Code:
/*---------------------------------------------------------------------------*\ Thanks, |
Hi,
I don't think GGi is implemented in OpenFOAM. You would have to install the extended version to use it. But I think that would be unnecessary. I would try to fix the AMI. Double check your boundary. Maybe there is a typo or you have not pointed to the correct shadow patches. |
Hi,
l tried my boundary but l do not see any problem, this is my case, could you help me? https://github.com/anhkenyt/turbineU...bineTurborCase |
Quote:
|
All times are GMT -4. The time now is 03:53. |