|
[Sponsors] |
[Gmsh] Internal faces from gmsh how to create patches in OpenFoam |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
June 5, 2008, 12:21 |
Internal faces from gmsh how to create patches in OpenFoam
|
#1 |
Senior Member
Pierre-Olivier Dallaire
Join Date: Mar 2009
Location: Montreal, Quebec, Canada
Posts: 192
Rep Power: 17 |
Good morning,
I created a simple geometry with gmsh which represents a box with a tube inside. As suggested by Takuya, the geometry is made with 2 volumes so all faces are recognized by gmsh2ToFoam. Those inner faces are removed by gmsh2ToFoam but saved ("sets" directory). Is there a way to import those internal faces as patches ? Best regards, Pierre-Olivier (how can I post the geo file ?) |
|
June 6, 2008, 07:00 |
Hi Pierre-Olivier,
For severa
|
#2 |
Super Moderator
Takuya OSHIMA
Join Date: Mar 2009
Location: Niigata City, Japan
Posts: 518
Blog Entries: 1
Rep Power: 20 |
Hi Pierre-Olivier,
For several reasons I also wanted a testcase with baffles so I changed your .geo to inlets.geo and as you mentioned applying createBaffles to FanCenter and FanShell did the trick. I assigned wall boundary conditions to the outer surfaces ("Inlet," "Outlet" and "Room"), and assigned inlet- and outlet- conditions to each side of the fan baffle (I'm not an axial fan expert so there should be the correct way though). Trying the case a bit with simpleFoam it seems to be working: Takuya |
|
June 6, 2008, 08:10 |
Thanks a lot Takuya, I will tr
|
#4 |
Senior Member
Pierre-Olivier Dallaire
Join Date: Mar 2009
Location: Montreal, Quebec, Canada
Posts: 192
Rep Power: 17 |
Thanks a lot Takuya, I will try this today.
Really appreciated. Have a good day PO |
|
June 6, 2008, 09:26 |
Takuya,
did you modify your
|
#5 |
Senior Member
Pierre-Olivier Dallaire
Join Date: Mar 2009
Location: Montreal, Quebec, Canada
Posts: 192
Rep Power: 17 |
Takuya,
did you modify your boundary file in order to use createBaffles ? Regards, PO |
|
June 6, 2008, 09:58 |
Yes, I think you have to creat
|
#6 |
Super Moderator
Takuya OSHIMA
Join Date: Mar 2009
Location: Niigata City, Japan
Posts: 518
Blog Entries: 1
Rep Power: 20 |
Yes, I think you have to create the target patch with nFaces 0 in polyMesh/boundary.
In fact at first I thought I could post the case here with some sort of tutorial-ish makeMesh scripts, but had to give up the idea since it involved a good amount of hand-editing and mesh manipulation. For example it seems you have to recreate faceSets from faceZones using the faceSet command before the second run of createBaffles, since createBaffles writes the updated faceZones with the new mesh but does not write faceSets. Further if you would like to employ separate boundary conditions on each side of FanCenter (like I did), I think you have to select each side of FanCenter faces with faceSet using the directions of the face normals as clue and run createPatches. T. |
|
June 6, 2008, 10:42 |
Thanks for those infos, it wor
|
#7 |
Senior Member
Pierre-Olivier Dallaire
Join Date: Mar 2009
Location: Montreal, Quebec, Canada
Posts: 192
Rep Power: 17 |
Thanks for those infos, it worked !
What I did : 1) Modified boundary file and added new patch nFaces 0 in polyMesh/boundary 2) Modified all files in 0 3) createBaffles root case set patch 4) created a faceSetDict to select a second faceZone 5) faceSet root case 6) Moved my mesh from 0 to constant 7) ... restart at 1) to 3) Regards, PO |
|
June 10, 2008, 22:25 |
Hi Takuya,
I'd like to have
|
#8 |
Senior Member
Pierre-Olivier Dallaire
Join Date: Mar 2009
Location: Montreal, Quebec, Canada
Posts: 192
Rep Power: 17 |
Hi Takuya,
I'd like to have more details on how to create two different patches (inlet/outlet) for one surface (FanCenter). The createBaffles procedure was successful - I want to understand how to run createPatches. Thanks ! PO |
|
June 11, 2008, 03:39 |
Hi Pierre-Olivier,
If I rem
|
#9 |
Super Moderator
Takuya OSHIMA
Join Date: Mar 2009
Location: Niigata City, Japan
Posts: 518
Blog Entries: 1
Rep Power: 20 |
Hi Pierre-Olivier,
If I remember correctly, the procedure continues as follows after 7) of your post. 8) Move your mesh from 0 to constant after a second createBaffles run 9) Create a faceSetDict to select FanCenter 10) faceSet root case 11) Create another faceSetDict to select a subset of FanCenter according to normalToFace<pre>name FanCenter; action subset; topoSetSources ( normalToFace { normal (1 0 0); // Vector cos 0.01; // Tolerance (max cos of angle) } );</pre>12) faceSet root case 13) Create a createPatchDict to create a patch FanCenter2 from the faceSet<pre>patches ( { name FanCenter2; type patch; constructFrom set; set FanCenter; } );</pre>14) createPatch root case And you will see FanCenter and FanCenter2 separated by their normal directions, with FanCenter2 being the intake-side of the fan. Takuya |
|
June 12, 2008, 09:44 |
Ok, thanks Takuya !
About c
|
#10 |
Senior Member
Pierre-Olivier Dallaire
Join Date: Mar 2009
Location: Montreal, Quebec, Canada
Posts: 192
Rep Power: 17 |
Ok, thanks Takuya !
About createBaffles - by default, it generates double-sided walls - right ? Can you confirm that the following procedure is not needed : http://openfoamwiki.net/index.php/Howto_importing_fluent_mesh_with_internal_wall s I want to be sure that each side of the shell is considered to be a wall - not only one side. Best regards, PO |
|
June 12, 2008, 10:28 |
Hi Pierre-Olivier,
Yes crea
|
#11 |
Super Moderator
Takuya OSHIMA
Join Date: Mar 2009
Location: Niigata City, Japan
Posts: 518
Blog Entries: 1
Rep Power: 20 |
Hi Pierre-Olivier,
Yes createBaffles does create dobule-sided walls. So for example if you see the baffle patch (before splitting) having 50 faces when displayed with ParaView you can confirm the nFaces entry of the patch in polyMesh/boundary is in fact 100. splitMesh may work as written in the Wiki you mentioned (and things will be simpler if it does work), but I was not able to find how splitMesh determines which side of the wall belongs to which patch (i. e. the notion of master/slave patches). Takuya |
|
June 12, 2008, 10:49 |
Hi Takuya,
perfect, I wante
|
#12 |
Senior Member
Pierre-Olivier Dallaire
Join Date: Mar 2009
Location: Montreal, Quebec, Canada
Posts: 192
Rep Power: 17 |
Hi Takuya,
perfect, I wanted to be sure. I tried to use splitMesh because checkMesh complains about "multiply connected surface (shared edge)" but the procedure from the Wiki did not work for me - trying to split the shell (selected again using faceSet) returns an error saying it is not an internal face. I guess that's not a big deal since I already have double-sided walls. Best regards, PO |
|
July 20, 2008, 19:45 |
Hi, Takuya,
I am interested
|
#13 |
Senior Member
Pei-Ying Hsieh
Join Date: Mar 2009
Posts: 317
Rep Power: 18 |
Hi, Takuya,
I am interested in modeling a "fan" inside fluid domain too. I am wondering if you are willing to send the me the simple test case that you posted picture above (axial fan inside a box)? I am curious about how you setup BCs expecially. Thanks! Pei |
|
July 21, 2008, 15:15 |
Hi, Pierre-Olivier,
I am tr
|
#14 |
Senior Member
Pei-Ying Hsieh
Join Date: Mar 2009
Posts: 317
Rep Power: 18 |
Hi, Pierre-Olivier,
I am trying to follow your steps, but, has a couple of questions. It will be appreciated if you can clarify: 1. After generating the inlet.msh (using inlet.geo posted above), boundary has 6 patches, FanCenter (nFaces =0), inlet (nFaces =1932), Oulet (nFaces = 1976), Room (nFaces = 10174), FanShell (nFaces = 0), defaultFaces (nFaces = 0). Also, in sets directory, I have faceZone_4 and Fluid. 2. In step #1, do I need to add a new patch (say I give it a patch name, fanInletOutlet) in boundary with nFaces = 0? 3. In step 3, exactly what do I type in the terminal window? Is it "createBaffles root case set fanInletOut"? 4. can you post the createSetDict in step 4? 5. In step 7, why you say "restart at 1) to 3)? Thanks! Pei |
|
July 21, 2008, 21:03 |
Hi Pei,
The inlet/outlet BCs
|
#15 |
Super Moderator
Takuya OSHIMA
Join Date: Mar 2009
Location: Niigata City, Japan
Posts: 518
Blog Entries: 1
Rep Power: 20 |
Hi Pei,
The inlet/outlet BCs I used were a verbatim copy of simpleFoam/pitzDaily case where fixedValue (1 0 0)/zeroGradient for U and zeroGradient/fixedValue 0 for p. But I don't think these were physically correct for emulating an axial fan as far as reading another thread [1]. My main purpose was to obtain a baffle case to test my ParaView3-reader so I didn't elaborated more. Maybe Pierre-Olivier could give you a better suggestion. [1] http://www.cfd-online.com/OpenFOAM_D...es/1/8239.html T |
|
July 21, 2008, 21:55 |
Hey guys,
2. -> Since Fance
|
#16 |
Senior Member
Pierre-Olivier Dallaire
Join Date: Mar 2009
Location: Montreal, Quebec, Canada
Posts: 192
Rep Power: 17 |
Hey guys,
2. -> Since Fancenter is considered as a wall, it should be splitted in two patches using the command createPatch (as described by Takuya). 3. -> Should be something like "createBaffle root case nameofset patchname" where the nameofset was FanCenter or FanShell (if I remember correctly...) 4. -> Could be something like : FoamFile { version 2.0; format ascii; root ""; case ""; instance "system"; local ""; class dictionary; object createPatcheDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // patches ( { // Name of new patch name FanCenter2; // Type of new patch type patch; // How to construct: either 'patches' or 'set' constructFrom set; set FanCenter; } ); // ************************************************** *********************** // An example of this dictionnary is avaible in applications/utilities/mesh/manipulation/createPatch 5. Because I had to apply the createBaffle command for two internal patches: FanCenter and FanShell. Now, for the boundary conditions, I have working on this in the last few weeks. On each face on the fan, a fixed velocity can be used coupled with zero-gradient on pressure. For the room inlet and outlet, pressureInlet and pressureInletOutlet physical patches are possibilities. It really depends of your case. Hope this helps, PO |
|
July 21, 2008, 22:39 |
Hi, Takuya and Pierre-Olivier,
|
#17 |
Senior Member
Pei-Ying Hsieh
Join Date: Mar 2009
Posts: 317
Rep Power: 18 |
Hi, Takuya and Pierre-Olivier,
Thanks a lot for the answer! I am mostly interested in the fan BCs. Can you commend on whether the following is correct? The original FanCenter (imported from gmsh) is now split into FanCenter and FanCenter2 (two sides of the same patch). Fixed velocity (say, (1 0 0)) and zeroGradient are applied to both FanCenter and FanCenter2, correct? In OF-1.5, a new "fan type" BC was implemented (basically a cyclic BC with pressure jump). Will it be more appropriated for this? I did some testing of the fan type BC, but, still are not quite sure about whether I did it correctly. Pei |
|
July 22, 2008, 09:40 |
Hi Pei,
The attached applic
|
#18 |
Senior Member
Eugene de Villiers
Join Date: Mar 2009
Posts: 725
Rep Power: 21 |
Hi Pei,
The attached application creates an internal cyclic boundary usable for jump conditions using a circular cutting disk as input. createJump.tgz |
|
July 22, 2008, 09:52 |
sounds interesting - will it c
|
#19 |
Senior Member
Pierre-Olivier Dallaire
Join Date: Mar 2009
Location: Montreal, Quebec, Canada
Posts: 192
Rep Power: 17 |
sounds interesting - will it compile under 1.5 ?
Thanks PO |
|
July 22, 2008, 10:12 |
Not sure, I haven't tried yet.
|
#20 |
Senior Member
Eugene de Villiers
Join Date: Mar 2009
Posts: 725
Rep Power: 21 |
Not sure, I haven't tried yet.
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
parallel run OpenFoam | Srinath Reddy | OpenFOAM Running, Solving & CFD | 13 | February 27, 2019 10:15 |
[snappyHexMesh] SHM is not extruding/adding Layers everywhere | matthiasd | OpenFOAM Meshing & Mesh Conversion | 2 | October 16, 2016 17:45 |
[OpenFOAM.org] OF2.3.1 + OS13.2 - Trying to use the dummy Pstream library | aylalisa | OpenFOAM Installation | 23 | June 15, 2015 15:49 |
createPatch Segmentation Fault (CORE DUMPED) | sam.ho | OpenFOAM Pre-Processing | 2 | April 21, 2014 03:01 |
fluent add additional zones for the mesh file | SSL | FLUENT | 2 | January 26, 2008 12:55 |