CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Pre-Processing

problem in toposet

Register Blogs Community New Posts Updated Threads Search

Like Tree6Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 17, 2012, 14:21
Question problem in toposet
  #1
Senior Member
 
Ahmed Khattab's Avatar
 
ahmed
Join Date: Feb 2010
Posts: 182
Blog Entries: 1
Rep Power: 16
Ahmed Khattab is on a distinguished road
Hi Foamers,

i'm trying to run chtMultiRegionFoam on my own case, it's a tube with outer diameter 11cm, inner diameter 10cm and length 100cm i created a cylinder in blockMesh file with outer diameter 11cm and length 100 cm asin this code
Code:
convertToMeters 0.01;

vertices
(
    (0  0           0)       // point 0


    (0  11          0)       // point 01
    (0  16.5        1.47372) // point 02
    (0  20.52628    5.5)     // point 03
    (0  22          11)      // point 04
    (0  20.52628    16.5)    // point 05
    (0  16.5        20.52628)// point 06
    (0  11          22)      // point 07
    (0  5.5         20.52628)// point 08
    (0  1.47372     16.5)    // point 09
    (0  0           11)      // point 10
    (0  1.47372     5.5)     // point 11
    (0  5.5         1.47372) // point 12
   


    (100  11          0)       // point 13
    (100  16.5        1.47372) // point 14
    (100  20.52628    5.5)     // point 15
    (100  22          11)      // point 16
    (100  20.52628    16.5)    // point 17
    (100  16.5        20.52628)// point 18
    (100  11          22)      // point 19
    (100  5.5         20.52628)// point 20
    (100  1.47372     16.5)    // point 21
    (100  0           11)      // point 22
    (100  1.47372     5.5)     // point 23
    (100  5.5         1.47372) // point 24
    (0    11          11)      // point 25
    (100  11          11)      // point 26 


);

blocks

(

  hex (25 1 3 25 26 13 15 26) (10 10 10) simpleGrading (1 1 1)

  

  hex (25 3 5 25 26 15 17 26) (10 10 10) simpleGrading (1 1 1)
  
  hex (25 5 7 25 26 17 19 26) (10 10 10) simpleGrading (1 1 1)
 
  hex (25 7 9 25 26 19 21 26) (10 10 10) simpleGrading (1 1 1)

  hex (25 9 11 25 26 21 23 26) (10 10 10) simpleGrading (1 1 1)
 
  hex (25 11 1 25 26 23 13 26) (10 10 10) simpleGrading (1 1 1)

  

);

edges
(

arc 1 3 (0  16.5        1.47372)

arc 3 5 (0  22          11)

arc 5 7 (0  16.5        20.52628)

arc 7 9 (0  5.5         20.52628)

arc 9 11 (0  0           11)

arc 11 1 (0  5.5         1.47372)




arc 13 15 (100  16.5        1.47372)

arc 15 17 (100  22          11)

arc 17 19 (100  16.5        20.52628)

arc 19 21 (100  5.5         20.52628)

arc 21 23 (100  0           11)

arc 23 13 (100  5.5         1.47372)
);

boundary
(
    
    outerface
    {
        type wall;
        faces
        (
            (1 13 15 3)
            
            (3 15 17 5)
            
            (5 17 19 7) 
            
            (7 19 21 9)
            
            (9 21 23 11)
           
            (11 23 13 1)
            
        );
    }
    inlet
    {
        type wall;
        faces
        (
            (25 1 3 25)
              
            (25 3 5 25)
            
            (25 5 7 25)
            
            (25 7 9 25)
            
            (25 9 11 25)
           
            (25 11 1 25)
          
            
        );
    }
    outlet
    {
        type wall;
        faces
        (
            (26 15 13 26)
            
            (26 17 15 26)
            
            (26 19 17 26)
            
            (26 21 19 26)
           
            (26 23 21 26)
            
            (26 13 23 26)
            
       );
    }
 );


mergePatchPairs
(
);
and created a file topoSetDict to divide it to two regions flow, and tube like this:
Code:
actions
(
    // flow inside the tube
    {
        name    flow;
        type    cellSet;
        action  new;
        source  cylinderToCell;
        sourceInfo
        {
            p1 (0   11 11);   // start point on cylinder axis//
            p2 (100 11 11);   // end point on cylinder axis//
            radius 10.0; 
              
            
        }
    }
  
    {
        name    flow;
        type    cellZoneSet;
        action  new;
        source  setToCellZone;
        sourceInfo
        {
            set flow;           // name of cellSet
        }
    }

//tube
     {
        name    tube;
        type    cellZoneSet;
        action  clear;
    }
    {
        name    tube;
        type    cellSet;
        action  add;
        source  cellToCell;
        sourceInfo
        {
            set flow;
        }
    }
    {
        name    tube;
        type    cellSet;
        action  invert;
    }
    {
        name    tube;
        type    cellZoneSet;
        action  new;
        source  setToCellZone;
        sourceInfo
        {
            set tube;
        }
    }
);
but when running blockMesh, topoSet, splitMeshRegion it divide it to one region (tube) and this is log file log.topoSet
Code:
Create time

Create polyMesh for time = 0

Reading topoSetDict

Time = 0
    mesh not changed.
Created set flow
    Applying source cylinderToCell
    Adding cells with centre within cylinder, with p1 = (0 11 11), p2 = (100 11 11) and radius = 10
    Set flow now size 0
Created set flow
    Applying source setToCellZone
    Adding all cells from cellSet flow ...
    Set flow now size 0
Created set tube
    Clearing set
    Set tube now size 0
Read set tube with size 0
    Applying source cellToCell
    Adding all elements of cellSet flow ...
    Set tube now size 0
Read set tube with size 0
    Inverting set
    Set tube now size 6000
Created set tube
    Applying source setToCellZone
    Adding all cells from cellSet tube ...
    Set tube now size 6000

End
and log.splitMeshRegions
Code:
Create time

Create mesh for time = 0

Creating single patch per inter-region interface.

Trying to match regions to existing cell zones.


Number of regions:1

Writing region per cell file (for manual decomposition) to "/home/khattab/ahmed.2.0.1/tutorials/heatTransfer/chtMultiRegionFoam/Graetz10/constant/cellToRegion"

Writing region per cell as volScalarField to "/home/khattab/ahmed.2.0.1/tutorials/heatTransfer/chtMultiRegionFoam/Graetz10/0/cellToRegion"

Region    Cells
------    -----
0    6000

Region    Zone    Name
------    ----    ----
0    1    tube

Sizes of interfaces between regions:

Interface    Region    Region    Faces
---------    ------    ------    -----

Reading volScalarField Y_char
Reading volScalarField cellToRegion
Reading volScalarField p
Reading volScalarField T
Reading volScalarField k
Reading volScalarField epsilon
Reading volScalarField P_rgh
Reading volScalarField Y_pmma
Reading volVectorField U

Only one region. Doing nothing.
End
please help
13722617 and lomesht like this.
Ahmed Khattab is offline   Reply With Quote

Old   May 28, 2012, 04:18
Default
  #2
Senior Member
 
Ahmed Khattab's Avatar
 
ahmed
Join Date: Feb 2010
Posts: 182
Blog Entries: 1
Rep Power: 16
Ahmed Khattab is on a distinguished road
Dears,

finally i have found the problem. in blockMeshDict i have converted units to centimeter so i have wrote 0.1m as 10. in toposet i used same value but it red it as meters so 10 became 10m. it red only tube region because it was invert of other region which had been red as empty. as assigned all cells for tube region.
now every thing is do well.
thanks for all who red this post.
ahmed
farahiam, range_rover and kooki_13 like this.
Ahmed Khattab is offline   Reply With Quote

Old   May 28, 2012, 05:56
Default
  #3
kid
Senior Member
 
cfdkid
Join Date: Mar 2009
Posts: 133
Rep Power: 17
kid is on a distinguished road
Hi,
What does topoSet do ?
__________________
________________________________________
Regards,
CFDkid

It never gets easier You just get Better
kid is offline   Reply With Quote

Old   May 28, 2012, 11:44
Default
  #4
Senior Member
 
Ahmed Khattab's Avatar
 
ahmed
Join Date: Feb 2010
Posts: 182
Blog Entries: 1
Rep Power: 16
Ahmed Khattab is on a distinguished road
Quote:
Originally Posted by kid View Post
Hi,
What does topoSet do ?
Dear Kid,

topoSet is used to split your mesh into many regions so you can give properties to the entire region not only for patches. i used for the first time for heat transfer problem in chtMultiRegioFoam solver with multiRegionHeater case. you can try the case and will get a good experience of it.

if any question don't hesitate to post for me.

good luck
Ahmed Khattab is offline   Reply With Quote

Old   May 28, 2012, 16:08
Default
  #5
New Member
 
Andrew Kettner
Join Date: May 2012
Posts: 4
Rep Power: 13
kettnera is on a distinguished road
New to OpenFoam and I am attempting post process the results from the the chtMultiRegionFoam tutorials. I cannot seem to get paraview to read any of the files. If I attempt to look at the with a gedit the file does not load correctly and I get nonsense. This has not been a problem for other tutorials. I am running open foam on a virtually install Ubuntu 12.04.

Suggestions please
Thanks
kettnera is offline   Reply With Quote

Old   May 29, 2012, 05:50
Default
  #6
Senior Member
 
Ahmed Khattab's Avatar
 
ahmed
Join Date: Feb 2010
Posts: 182
Blog Entries: 1
Rep Power: 16
Ahmed Khattab is on a distinguished road
Quote:
Originally Posted by kettnera View Post
New to OpenFoam and I am attempting post process the results from the the chtMultiRegionFoam tutorials. I cannot seem to get paraview to read any of the files. If I attempt to look at the with a gedit the file does not load correctly and I get nonsense. This has not been a problem for other tutorials. I am running open foam on a virtually install Ubuntu 12.04.

Suggestions please
Thanks
Hi Kettnera,
i experienced same problem before, after processing chtMultiRegionFoam solver, as usual type paraFoam and paraview will open then from toolbar choose file then open, it will open window for you shows the directory of your case choose the five files with .openfoam extension (bottomair topair heater rightssolid leftsolid), click apply. now you can see results.

the problem with gedit is that results are written in binary so you can't see it correctly. if you want go to controlDict file in system directory then change ninary to Ascii code then you will see results correctly.

good luck
kettnera likes this.
Ahmed Khattab is offline   Reply With Quote

Old   May 29, 2012, 16:28
Default
  #7
New Member
 
Andrew Kettner
Join Date: May 2012
Posts: 4
Rep Power: 13
kettnera is on a distinguished road
Thx

Ahmed
That did it.
kettnera is offline   Reply With Quote

Old   June 4, 2012, 00:31
Default
  #8
Senior Member
 
Ahmed Khattab's Avatar
 
ahmed
Join Date: Feb 2010
Posts: 182
Blog Entries: 1
Rep Power: 16
Ahmed Khattab is on a distinguished road
you are welcome.
Ahmed Khattab is offline   Reply With Quote

Old   June 7, 2012, 07:19
Default
  #9
New Member
 
Rehan amin
Join Date: May 2012
Posts: 3
Rep Power: 13
rehan is on a distinguished road
Hello sir,
1)can you please tell me the significance of 'invert' action?
also 2) what does 'type cellset' & 'type cellzoneset' mean?
rehan is offline   Reply With Quote

Old   June 7, 2012, 12:21
Smile
  #10
Senior Member
 
Ahmed Khattab's Avatar
 
ahmed
Join Date: Feb 2010
Posts: 182
Blog Entries: 1
Rep Power: 16
Ahmed Khattab is on a distinguished road
Quote:
Originally Posted by rehan View Post
Hello sir,
1)can you please tell me the significance of 'invert' action?
also 2) what does 'type cellset' & 'type cellzoneset' mean?
Hi Rehan,

1- invert is used to specify region which is the rest of the domain instead of specify it as every region you can just say that it is the invert of all regions in the domain.

2- about this question give me more time to get a detailed answer for you.

Ahmed Khattab is offline   Reply With Quote

Old   March 24, 2013, 15:18
Default
  #11
New Member
 
Meinan Chen
Join Date: Mar 2013
Posts: 5
Rep Power: 13
Meinan is on a distinguished road
Hi ~~ I wonder do you still work on chtMultiRegionFoam? cuz I see that the time you replied is really long time ago, I am totally new to OPenFoam, and now I am trying to split the region into solid and fluid. I generated my mesh in ICEM, and converted it in Openfoam, and now I am trying to split the region, I try to define the region in MakeCellSets file, I wonder am I doing right? Should I split the region in MakeCellSets or topoSet? I feel so confused, really hope that you can reply me! THanks!!!
Meinan is offline   Reply With Quote

Old   October 29, 2015, 08:26
Default
  #12
Member
 
Mahdi
Join Date: Jul 2012
Posts: 53
Rep Power: 13
Mahdi2010 is on a distinguished road
Hi all

I am building a test case with 2 main regions (1 solid and 1 fluid attached together). I built it simply by using topoSet. My question is if I wanna create a wallFilmRegion between these two regions, how can I address the source info for that? I mean what it the correct source info for this patch?

If you look at the case "tutorail/lagrangian/reactingParcelFilmFoam/rivuletpanel", the wallFilmRegion is created using a source from blockMeshDict.
{
name wallFilm;
type faceSet;
action new;
source patchToFace;
sourceInfo
{
name filmWalls;
}
}
{
name wallFilm;
type faceZoneSet;
action new;
source setToFaceZone;
sourceInfo
{
faceSet wallFilmFaces;
}
}

But in my case the connecting patch between solid region and fluid region is not defined in advance and should be created within the topoSet itself! (First by topoSet I define 2 regions and now I wanna address the patch in between as source for wallFilmRegion.) any idea for that!?
Mahdi2010 is offline   Reply With Quote

Old   December 10, 2016, 10:56
Default topoSetDict
  #13
New Member
 
AliReza
Join Date: Nov 2016
Posts: 3
Rep Power: 9
AliRezaJafari is on a distinguished road
Hi
How can be defined for a triangular box?
Attached Images
File Type: png unnamed.png (38.7 KB, 104 views)
AliRezaJafari is offline   Reply With Quote

Old   September 7, 2017, 06:17
Default
  #14
us7
New Member
 
Umer
Join Date: Aug 2016
Posts: 29
Rep Power: 9
us7 is on a distinguished road
Quote:
Originally Posted by AliRezaJafari View Post
Hi
How can be defined for a triangular box?
Hello Ali,
Did you find the solution for this geometry. I also have same problem?

Umer
us7 is offline   Reply With Quote

Old   September 18, 2017, 13:08
Default topoSet in inclined box
  #15
New Member
 
karundev
Join Date: Jun 2017
Location: India
Posts: 25
Rep Power: 8
krndv is on a distinguished road
Hello all,

How can I define an inclined cell zone (a rectangular box inclined at an angle), as boxToCell gives horizontal

Thank you
krndv is offline   Reply With Quote

Old   September 18, 2017, 22:42
Default
  #16
Senior Member
 
M. C.
Join Date: May 2013
Location: Italy
Posts: 286
Blog Entries: 6
Rep Power: 16
student666 is on a distinguished road
Hi,

according to this
https://openfoamwiki.net/index.php/TopoSet

you could use
Code:
surfaceToCell
first to create a cellSet, then by
Code:
setToCellZone
you can have your cellZone as well.

In any case the problem is that you have to get to a mesh with cells not intersecating your stl surface or you won't get a smooth and plained "surface" at your cellZone.

Regards.
student666 is offline   Reply With Quote

Old   October 26, 2017, 06:29
Default Usage of topoSetDict
  #17
New Member
 
Anil Kumar
Join Date: Jul 2017
Posts: 1
Rep Power: 0
Anil kumar is on a distinguished road
Hello,

Can any one help me in understanding, how the topoSetDict is functioning and what exactly is box defines. Will this box collects all the information from the cells ?
Anil kumar is offline   Reply With Quote

Old   November 1, 2017, 02:20
Default creating square patch (for air inlet) on the bottom face using cellset in toposet
  #18
New Member
 
Join Date: Feb 2013
Posts: 24
Rep Power: 13
me12p1006 is on a distinguished road
Hi all,

I am trying to feed air through a square inlet on the bottom face of a 3D rectangular tank filled with water. I am able to do this using faceset in toposet dict as follows:
{
name faceGrabbed;
type faceSet;
action new;
source boxToFace;
sourceInfo
{
box (0.035 0.035 0.08)(0.04 0.04 0.08);
}
}

But when i tried to do it with cellset (by replacing the type with cellset) as given below in toposet dict then I am facing the following error: unexpected class name cellset expected faceset while reading object faceGrabbed.

{
name faceGrabbed;
type cellSet;
action new;
source boxToCell;
sourceInfo
{
box (0.015 0.015 0)(0.02 0.02 0);
}
}
)

My create patch dictionary is as follows:

{
//- name of new patch
name bubble;

//- type of new patch
patchInfo
{
type patch;
}
//- How to construct: either from 'patches' or 'set'
constructFrom set;
//- if constructionFrom = set : name of faceSet
set faceGrabbed;
}
);

I am running the following commands:
blockMesh
TopoSet
CreatePatchDict -overwrite
-------here I am getting error: Foam fatal IO error: unexpected class name cellset expected faceset while reading object faceGrabbed.

Can anyone please help as I tried a lot to retrieve this.





Quote:
Originally Posted by Ahmed Khattab View Post
Dears,

finally i have found the problem. in blockMeshDict i have converted units to centimeter so i have wrote 0.1m as 10. in toposet i used same value but it red it as meters so 10 became 10m. it red only tube region because it was invert of other region which had been red as empty. as assigned all cells for tube region.
now every thing is do well.
thanks for all who red this post.
ahmed
me12p1006 is offline   Reply With Quote

Old   November 1, 2017, 23:50
Default
  #19
Senior Member
 
M. C.
Join Date: May 2013
Location: Italy
Posts: 286
Blog Entries: 6
Rep Power: 16
student666 is on a distinguished road
From your topoSetDict:

Quote:
name faceGrabbed;
type cellSet;
From your createPatchDict error:

Quote:
unexpected class name cellset expected faceset while reading object faceGrabbed
Hint:
Maybe you should define a faceSet into your topoSet...
student666 is offline   Reply With Quote

Old   November 2, 2017, 00:21
Default
  #20
New Member
 
Rajesh
Join Date: Sep 2017
Location: Israel
Posts: 6
Rep Power: 8
Rajesh Nimmagadda is on a distinguished road
Yes, I did it with faceset. But I want to try the same with cellset also. The reason for using cellset is to create circular patch in future instead of square patch as mentioned above. As far as I know, we can only create circular patch using cellset.

So I want to know how can i do it with cellset in toposet.

Thanks for your reply.





Quote:
Originally Posted by student666 View Post
From your topoSetDict:

From your createPatchDict error:

Hint:
Maybe you should define a faceSet into your topoSet...
Rajesh Nimmagadda is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
UDF compiling problem Wouter Fluent UDF and Scheme Programming 6 June 6, 2012 04:43
Gambit - meshing over airfoil wrapping (?) problem JFDC FLUENT 1 July 11, 2011 05:59
natural convection problem for a CHT problem Se-Hee CFX 2 June 10, 2007 06:29
Adiabatic and Rotating wall (Convection problem) ParodDav CFX 5 April 29, 2007 19:13
Is this problem well posed? Thomas P. Abraham Main CFD Forum 5 September 8, 1999 14:52


All times are GMT -4. The time now is 17:08.