|
[Sponsors] |
![]() |
![]() |
#1 |
New Member
Join Date: Feb 2013
Posts: 24
Rep Power: 14 ![]() |
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. |
|
![]() |
![]() |
![]() |
![]() |
#2 |
Senior Member
Join Date: Aug 2015
Posts: 494
Rep Power: 15 ![]() |
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 |
|
![]() |
![]() |
![]() |
![]() |
#3 | |
New Member
Join Date: Feb 2013
Posts: 24
Rep Power: 14 ![]() |
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 |
||
![]() |
![]() |
![]() |
![]() |
#4 |
Senior Member
Join Date: Aug 2015
Posts: 494
Rep Power: 15 ![]() |
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 |
|
![]() |
![]() |
![]() |
![]() |
#5 |
New Member
Yuncheng Xu (Cloud)
Join Date: May 2011
Location: State College, PA
Posts: 20
Rep Power: 16 ![]() |
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.
|
|
![]() |
![]() |
![]() |
![]() |
#6 | |
New Member
Join Date: Feb 2013
Posts: 24
Rep Power: 14 ![]() |
Quote:
|
||
![]() |
![]() |
![]() |
![]() |
#7 | |
New Member
Yuncheng Xu (Cloud)
Join Date: May 2011
Location: State College, PA
Posts: 20
Rep Power: 16 ![]() |
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. |
||
![]() |
![]() |
![]() |
![]() |
#8 |
Senior Member
Join Date: Aug 2015
Posts: 494
Rep Power: 15 ![]() |
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 |
|
![]() |
![]() |
![]() |
![]() |
#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. |
|
![]() |
![]() |
![]() |
![]() |
#10 |
New Member
Josh Williams
Join Date: Jun 2018
Location: Scotland
Posts: 8
Rep Power: 9 ![]() |
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; } |
|
![]() |
![]() |
![]() |
![]() |
#11 |
Member
James
Join Date: Jan 2014
Posts: 38
Rep Power: 13 ![]() |
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; } ); |
|
![]() |
![]() |
![]() |
![]() |
#12 |
New Member
Manjiri Relkar
Join Date: Oct 2024
Posts: 15
Rep Power: 2 ![]() |
Hello all,
I am facing same issue related to circular inlet for cylindrical computational domain. I am trying to create circular inlet but it's not selecting faces and not craeting circular patch correctly; If same if I am doing for pool fire 3D case it's working perfectly fine but not for cylindrical and circular inlet case.Here is my toposet file actions ( // Step 1: Select bottom patch faces using bounding box { name f0; type faceSet; action new; source boxToFace; // Select rectangular region at the base sourceInfo { box (-0.375 0 -0.375) (0.375 0.002 0.375); // Full cylinder bottom face //includeInside true; } } // Step 2: Subset circular region inside the patch { name f0; // Final Vent FaceSet type faceSet; action subset; source cylinderToFace; // Apply only on selected faces sourceInfo { //set baseFaces; p1 (0 -0.1 0); // Center of the base p2 (0 0.1 0); // Thin thickness radius 0.15; // 0.3m diameter //sense inside; } } ); Please do lt me know if I am missing something. |
|
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
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 |