![]() |
select disk with faceSet
Hi everyone,
This is my first thread but I already spent a lot of time to read yours threads. This forum is a blessing for every new user of Openfoam like me. So this is my case, I want to simulate the landing of an helicopter in aerodynamic corridor disrupted by structures. I chose to model the rotors with actuator disks. I used snappyHexMesh for create my Mesh (helicoptere without rotors + ground structures) and I use toposet and createBaffles to create my rotors. Then I use type fan BC for my rotors. My problem: In my toposet I only know create rectangular:mad: rotor with these lines: actions ( { name cyclicfanFaces; type faceSet; action new; source boxToFace; sourceInfo { box (13 -1.5 9.4) (16 1.5 9.6); } } { name cyclicfanFacesSlaveCells; type cellSet; action new; source boxToCell; sourceInfo { box (13 -1.5 9.5) (16 1.5 13); } } { name cyclicfanZoneFaces; type faceZoneSet; action new; source setsToFaceZone; sourceInfo { faceSet cyclicfanFaces; cellSet cyclicfanFacesSlaveCells; } } ); // ************************************************** *********************** // And I Want to select a DISK rotor, because a rotor is a disk:D. I think this problem is boxToFace in faceSet but I don't know what other faceSet keyword choose. With CellSet we can use cylinderToCell but with faceSet it's not possible. So have you suggestions to solve that simple but annoying problem. Thanks ahead for your comments Regards, Cyril PS: Don't hesitate to correct my english. I must improve my writing skills;). |
If you take a look in
applications/utilities/mesh/manipulation/topoSet/topoSetDict you can see various functions that you can use to select cells/faces/points. Something that you could do perhaps is a cylinderToCell to select cells on both sides of the wanted faces and then cellToFace with the option "both". Assuming off course that your faces are appropriately shaped and positioned to create a perfect disk. |
Thanks for your reply anon_a, I'll take a look tomorrow.
After reading the post on the forum and after taking a look on the tutorial with "type fan BC"(Tjunctionfan), I found it strange that in these cases the actuator disk was modeled by a rectangular surface and never with disk. What a pity that cylinderToFace doesn't exist in OpenFoam. This would be so much easier. Regards, Cyril |
Quote:
expression "mag(pos().z)<1 && sqrt(pow(pos().x,2)+ pow(pos().y,2))<1" will select all faces on the boundary of a cylinder expression "mag(fpos().z)<1 && sqrt(pow(fpos().x,2)+ pow(fpos().y,2))<1" will select all faces INSIDE the cylinder |
It works! Thanks for yours replies, it was helpful.
Here is my toposet if someone want to select a disk: /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.0.1 | | \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object topoSetDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // actions ( { name c0; type cellSet; action new; source cylinderToCell; sourceInfo { //box (12.5 -2 9.5) (16 2 13); p1 (14.5 0 9); p2 (14.5 0 11); radius 3.4; } } { name cyclicfanFaces; type faceSet; action new; source cellToFace; sourceInfo { set c0; option both; } } { name c1; type cellSet; action new; source cylinderToCell; sourceInfo { //box (12.5 -2 9.5) (16 2 13); p1 (14.5 0 10); p2 (14.5 0 11); radius 3.4; } } { name f1; type faceSet; action new; source cellToFace; sourceInfo { set c1; option both; } } { name c2; type cellSet; action new; source cylinderToCell; sourceInfo { //box (12.5 -2 9.5) (16 2 13); p1 (14.5 0 9); p2 (14.5 0 10); radius 3.4; } } { name f2; type faceSet; action new; source cellToFace; sourceInfo { set c2; option both; } } { name cyclicfanFaces; type faceSet; action delete; source faceToFace; sourceInfo { set f1; } } { name cyclicfanFaces; type faceSet; action delete; source faceToFace; sourceInfo { set f2; } } It's a succession of boolean operations. Regards, Cyril |
All times are GMT -4. The time now is 10:10. |