|
[Sponsors] |
January 25, 2018, 07:56 |
Creating circular inlet on a square face
|
#1 |
New Member
Join Date: Feb 2013
Posts: 24
Rep Power: 13 |
Hi,
I would like to create 1cm circular air inlet on 4cm by 4cm square face that is treated as a wall. I would like to use patching in openFoam. Can anyone help me with this. |
|
January 26, 2018, 19:22 |
|
#2 |
Senior Member
Join Date: Aug 2015
Posts: 494
Rep Power: 14 |
I've selected cells within a cylinder using cylinderToCells in conjunction with topoSet before. It looks like topoSet also has a cellToFace option -- please see this link https://github.com/OpenFOAM/OpenFOAM...em/topoSetDict. Combining these should give you what you're looking for.
Caelan |
|
January 27, 2018, 01:27 |
|
#3 | |
New Member
Join Date: Feb 2013
Posts: 24
Rep Power: 13 |
Quote:
Toposet: actions ( { name z; type cellSet; action new; source boxToCell; sourceInfo { box (-100 -100 -0.2)(100 100 100); } } { name bubble; type faceSet; action new; source cellToFace; sourceInfo { set z; option all; } } { name z; type cellSet; action invert; } { name bubble; type faceSet; action subset; source cellToFace; sourceInfo { set z; option all; } } Createpatchdict: patches ( { //- name of new patch name inlet; //- type of new patch patchInfo { type patch; } //- How to construct: either from 'patches' or 'set' constructFrom set; //- if constructionFrom = set : name of faceSet set bubble; } ); I the boundary conditions file I used "inlet" as the name and then i defined my boundary conditions. I ran the following commands and i couldnt find any error. But, I couldnt get flow through the inlet. blockMesh topoSet createPatch -overWrite setFields interFoam |
||
January 29, 2018, 17:43 |
|
#4 |
Senior Member
Join Date: Aug 2015
Posts: 494
Rep Power: 14 |
Starting with a square inlet might be a good first step -- this can be done using topoSet's boxToFace and then createPatch. Check out this fireFoam tutorial : https://github.com/OpenFOAM/OpenFOAM...mallPoolFire3D.
Caelan |
|
January 30, 2018, 00:06 |
|
#5 |
New Member
Yuncheng Xu (Cloud)
Join Date: May 2011
Location: State College, PA
Posts: 20
Rep Power: 14 |
Well, if you want some perfect circular mesh instead of zigzag mesh, you might want to use snappyHexMesh. You need to split the stl file into two parts.
|
|
January 30, 2018, 08:34 |
|
#6 | |
New Member
Join Date: Feb 2013
Posts: 24
Rep Power: 13 |
Quote:
|
||
January 31, 2018, 01:24 |
|
#7 | |
New Member
Yuncheng Xu (Cloud)
Join Date: May 2011
Location: State College, PA
Posts: 20
Rep Power: 14 |
Quote:
Code:
tutorials/incompressible/simpleFoam/rotorDisk/system/snappyHexMeshDict
Remeber, you only need to use the plane to cut the domain and generate the inlet boundary. |
||
April 18, 2018, 13:56 |
|
#8 |
Senior Member
Join Date: Aug 2015
Posts: 494
Rep Power: 14 |
Hi All,
I've recently revisited this problem. You can create the inlet by first creating a cylindrical faceZoneSet then converting it to a faceSet. If you start with hex cells this will preserve your hex cells while getting you a mostly circular inlet. The inlet will get more and more circular as your mesh resolution increases. Caelan |
|
May 14, 2019, 18:34 |
|
#9 |
New Member
Join Date: Apr 2019
Posts: 2
Rep Power: 0 |
Hi, If someone is still struggling with this problem what you need to do in order to obtain circular patch is:
1). create cellset using cylinderToCell option 2) create faceSet based on coolingSet 3) use faceSet action - subset - source - boxtoFace to choose only external faces of cells. Hope it helped. |
|
May 15, 2019, 07:07 |
|
#10 |
New Member
Josh Williams
Join Date: Jun 2018
Location: Scotland
Posts: 8
Rep Power: 7 |
If you have your blockMesh you should be able to take a slice from the wall and change it into another patch, the new inlet, using topoSet and createPatch. I realise you have done this above so I have attached some code I used if this helps. Maybe the problem is where you use setFields, everything else sounds fine.
I would use topoSet to define a cylinder that overlaps the cells you want to become your inlet, then you get all faces in this cellSet. From here you can find the faces in your newly defined faceSet which intersect with your wall patch. Finally you remove the initial cellSet to keep things tidy. Code:
{ name i1; type cellSet; action new; source cylinderToCell; sourceInfo { p1 (0.0165 -0.1375 -0.229); // start point on cylinder axis p2 (0.0130 -0.1365 -0.2330); // end point on cylinder axis radius 5.0; } } // Get all faces in cellSet { name inlet1; type faceSet; action new; source cellToFace; sourceInfo { set i1; option all; } } { name inlet1; type faceSet; action subset; source patchToFace; sourceInfo { name "walls"; } } { name i1; type cellSet; action remove; } Code:
{ // Name of new patch name inlet; // Dictionary to construct new patch from patchInfo { type patch; } // How to construct: either from 'patches' or 'set' constructFrom set; // If constructFrom = set : name of faceSet set inlet1; } |
|
February 5, 2021, 16:35 |
|
#11 |
Member
James
Join Date: Jan 2014
Posts: 38
Rep Power: 12 |
Hi Josh,
I had been following this method and also followed the instruction your provided but I just can't seem to get it right. It does create a new circular patch but it doesn't contain all the cells within that radius as shown in the picture attached. Several cells are missing within the new patch. Would you have idea why is that? my topoSetDict Code:
actions ( { name jetCells; type cellSet; action new; source cylinderToCell; sourceInfo { p1 (0.05 0.015 0); // start point on cylinder axis// p2 (0.05 0.0148 0); // end point on cylinder axis// radius 0.009; } } { name f0; type faceSet; action new; source cellToFace; sourceInfo { set jetCells; option all; } } { name f0; type faceSet; action subset; source patchToFace; sourceInfo { name "topAtmosphere"; } } { name jetCells; type cellSet; action remove; } ); Code:
pointSync true; // Patches to create. patches ( { name shieldGasInlet; // Type of new patch patchInfo { type patch; } // How to construct: either from 'patches' or 'set' constructFrom set; //constructFrom patches; // If constructFrom = patches : names of patches. Wildcards allowed. //patches ("periodic.*"); // If constructFrom = set : name of faceSet set f0; } ); |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
creating square patch (for air inlet) on the bottom face using cellset in toposet | Rajesh Nimmagadda | OpenFOAM Running, Solving & CFD | 0 | October 31, 2017 12:27 |
[ICEM] Circular Tangential Inlet Mesh Distorted | amirkh | ANSYS Meshing & Geometry | 4 | September 9, 2016 18:32 |
[snappyHexMesh] How to define to right point for locationInMesh | Mirage12 | OpenFOAM Meshing & Mesh Conversion | 7 | March 13, 2016 14:07 |
flow around a circular cylinder with velocity inlet and outflow outlet | shuoxue | OpenFOAM Running, Solving & CFD | 0 | November 2, 2013 04:32 |
Gambit error creating face | Haridas Attur | Main CFD Forum | 1 | February 17, 2009 03:31 |