CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Defining a cellZone from a region in topoSet

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree1Likes
  • 1 Post By volker1

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 17, 2022, 01:00
Default Defining a cellZone from a region in topoSet
  #1
Senior Member
 
Desh
Join Date: Mar 2021
Location: Sydney
Posts: 109
Rep Power: 5
dasith0001 is on a distinguished road
Hi Foamers,

I am new to OF, I could not find much in literature to the following question.

I have a region (say regionA) already defined in topoSet (and in splitMeshRegion) as a new cellZone.

Can I select only a section of a 'regionA' and under a different name so I can call it in from fvOptions as a cellZone?

Can I use subset to do this or it is possible at all in OF?

Thank you in advance.
Dasith
dasith0001 is offline   Reply With Quote

Old   March 23, 2022, 00:59
Default
  #2
Senior Member
 
Desh
Join Date: Mar 2021
Location: Sydney
Posts: 109
Rep Power: 5
dasith0001 is on a distinguished road
Any directions? thank you
dasith0001 is offline   Reply With Quote

Old   March 23, 2022, 03:20
Default
  #3
New Member
 
ajithnair's Avatar
 
Ajith U K Nair
Join Date: Sep 2021
Location: Kerala
Posts: 18
Rep Power: 4
ajithnair is on a distinguished road
it is possible. Maybe this video will be of help on topoSet
https://www.youtube.com/watch?v=6bx1_B3CcME
ajithnair is offline   Reply With Quote

Old   March 24, 2022, 23:40
Default
  #4
Senior Member
 
Desh
Join Date: Mar 2021
Location: Sydney
Posts: 109
Rep Power: 5
dasith0001 is on a distinguished road
Hi Ajith,

topSet do not like defining a cellzone within already defined region. It just takes the first defined cellzone region and dump the latter.

Can I name set of cells in the region with setFields?

Thank you
Dasith
dasith0001 is offline   Reply With Quote

Old   August 1, 2022, 09:40
Default
  #5
New Member
 
Join Date: Jul 2022
Posts: 6
Rep Power: 3
sudo_rm is on a distinguished road
If I understand correctly you just want a subset of a cellSet?

So just create the cellSet two times and use the subset action on one of them?

e.g.

Code:
actions
(
{
name    cellSet1; // This is the first cellSet
type    cellSet;
action  new;
source  boxToCell;
sourceInfo
{
   box  (0 -1 -1) (0.1 1 1);
}
}

{
name    cellSet2; // Same as fist one
type    cellSet;
action  new;
source  boxToCell;
sourceInfo
{
   box  (0 -1 -1) (0.1 1 1);
}
}

{
name    cellSet2; // This is a subset of cellSet2
type    cellSet;
action  subset;
source  boxToCell;
sourceInfo
{
   box  (0 -1 -1) (0.01 1 1);
}
}

);
sudo_rm is offline   Reply With Quote

Old   April 19, 2023, 03:32
Question
  #6
Senior Member
 
Desh
Join Date: Mar 2021
Location: Sydney
Posts: 109
Rep Power: 5
dasith0001 is on a distinguished road
Hi,

Apologies for the late reply, I use alternative method for the time being and the issue is boomeranged back to me after years!

The issue with subset is that , the fvOption cannot find the subSet or cellSet in the polymesh in the master region ( region A). That is because topoSet do not write on the polymesh folder unless it is defined as a cellZone. ( correct me if I am wrong ).

Then why not define the region i want as a cellZone???, because that creates huge set of extra problems - it creates internal boundaries whereas I need region A to act as a single zone.

Any ideas are much appreciated.

Thanks,
Dasith
dasith0001 is offline   Reply With Quote

Old   April 21, 2023, 06:20
Default
  #7
New Member
 
Volker
Join Date: Aug 2014
Location: Germany
Posts: 16
Rep Power: 11
volker1 is on a distinguished road
Hi Dasith,

Try "type cellZoneSet;" instead of "type cellSet;" in topoSetDict when you define the specific part of your region that should be regarded by fvOptions.
"sourceInfo" can be the cellSet you already have now and you may keep this name for the "cellZoneSet", too. This should generate the cellSet in this region mesh that you are missing now.
In fvOptions you can address this part as "cellSet" again.

Hope it works that way for you, too
dasith0001 likes this.
volker1 is offline   Reply With Quote

Old   May 3, 2023, 03:06
Red face
  #8
Senior Member
 
Desh
Join Date: Mar 2021
Location: Sydney
Posts: 109
Rep Power: 5
dasith0001 is on a distinguished road
Hi Volker,

I just cannot figure it out, I think I am lost in old and new version topoSet terminology.

my Main (big) region is 'fluidRegion' and the smaller (sub) is the 'fan' region.
Fluid region is already define.

Either topoSet or the splitMesh giving me erros!

could you please have a look,

PHP Code:
    {
        
name    fanCellZoneSet;
        
type    cellZoneSet;
        
action  new;
        
source  zoneToCell;
        
set     fluidRegionCellSet;     
    } 
    
    {
        
name    fan;
        
type    cellZoneSet;
        
action  subset;
        
source  cylinderToCell;
        
p1      (0 0 2.0); //top center
        
p2      (0 0 1.8); // bottom center
        
radius   0.8;
        
innerRadius 0.5//0.05 
    

where am I going wrong ?

Update - 04/05/2023

Silly me, it works fine now, thank you very much guys. if anyone interested

PHP Code:
actions
(
    
// rotor cell zone
    
{
        
name    rotorCells;
        
type    cellZoneSet//cellSet;
        
action  new;
        
source  zoneToCell;
        
zone    fluidRegion;
    }
    {
        
name    rotorCells;
        
type    cellZoneSet//cellSet;
        
action  subset;
        
source  cylinderToCell;
        
p1      (0 0 2.0); //top center
        
p2      (0 0 1.8); // bottom center
        
radius   0.8;
        
innerRadius 0.5//0.05
    
}
    {
        
name    rotor;
        
type    cellZoneSet;
        
action  new;
        
source  setToCellZone;
        
set rotorCells;
    } 
); 

Last edited by dasith0001; May 3, 2023 at 21:01.
dasith0001 is offline   Reply With Quote

Reply

Tags
cellzones, subset, toposet

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Error when solving p_rgh bob94 OpenFOAM 0 March 17, 2020 08:12
Defining Vacuum region in Parabolic Trough Collector. usamaa908 FLUENT 8 November 13, 2019 05:49
Defining the region between two layers of fluid in a reacting flow bamidoao FLUENT 0 February 15, 2017 21:49
[Commercial meshers] Trimmed cell and embedded refinement mesh conversion issues michele OpenFOAM Meshing & Mesh Conversion 2 July 15, 2005 04:15
[Gmsh] Import gmsh msh to Foam adorean OpenFOAM Meshing & Mesh Conversion 24 April 27, 2005 08:19


All times are GMT -4. The time now is 06:28.