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

multiple cellSets in a region

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By mabinty

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 29, 2011, 11:16
Default multiple cellSets in a region
  #1
Senior Member
 
Aram Amouzandeh
Join Date: Mar 2009
Location: Vienna, Vienna, Austria
Posts: 190
Rep Power: 17
mabinty is on a distinguished road
Dear all!

Does anybody have experience with creating multiple cellSets/cellZones in a specific region which is produced by "splitMeshRegions"?

I have three cellSets: setA, setB and setC, and I d like to put them into two regions as follows: region0 = setA, region1 = setB+setC in order to be able to access setB and setC explicitly in region1.

Currently I study/play with the "splitMeshRegions -cellZonesFileOnly <zoneFile>" utility but for now I ve no idea how the <zoneFile> has to look like!

Appreciate your comments!

Cheers,
Aram
mabinty is offline   Reply With Quote

Old   May 10, 2011, 08:45
Default
  #2
Senior Member
 
ZHOU Bin
Join Date: Mar 2009
Location: Nanjing/Torino, Nanjing/Piemente, China/Italy
Posts: 164
Rep Power: 17
zhoubinwx is on a distinguished road
Send a message via ICQ to zhoubinwx Send a message via MSN to zhoubinwx Send a message via Skype™ to zhoubinwx
Hi Aram,

I am also playing with this problem these days. I would like to suggest you to investigate the test case entitled "chtMultiRegionFoam" first. After that when you have some questions, you can post it online.

Good luck.

Bin
zhoubinwx is offline   Reply With Quote

Old   May 11, 2011, 04:35
Default
  #3
Senior Member
 
ZHOU Bin
Join Date: Mar 2009
Location: Nanjing/Torino, Nanjing/Piemente, China/Italy
Posts: 164
Rep Power: 17
zhoubinwx is on a distinguished road
Send a message via ICQ to zhoubinwx Send a message via MSN to zhoubinwx Send a message via Skype™ to zhoubinwx
Hi Aram and OF friends,

I want to simulate 4 circles in a rectangle. I need to define 4 circles as "cylinder" while the rest of the domain "water".

After studying the test case of multiRegionHeater, I set up mine.

1) After the command "setSet -batch makeCellSets.setSet", I could see from log.setSet, everything goes on well; At this stage, 4 circles are included as "cylinder" while the rest of the domain "water".

2) After the comment "setsToZones -noFlipMap", I get:
------------------------------------------
Create polyMesh for time = 0
Searched : "constant/polyMesh/sets"
Found :
2
(
cylinder
water
)
Overwriting contents of existing cellZone 1 with that of set water.
Overwriting contents of existing cellZone 2 with that of set cylinder.
Writing mesh.
------------------------------------------

3) However, when I launch the command "splitMeshRegions -cellZones -overwrite", I find that 4 circles are no longer together. The "cylinder" now is only one of the circles:
------------------------------------------
Region Zone Name
------------------------------------------
0 1 water
1 -1 domain1
2 -1 domain2
3 2 cylinder
4 -1 domain4
------------------------------------------
The number of regions is 5 instead of 2 (cylinder and water).

Do any one have any opinion about this problem? Thank you.

Bin
zhoubinwx is offline   Reply With Quote

Old   May 11, 2011, 07:32
Default
  #4
Senior Member
 
Aram Amouzandeh
Join Date: Mar 2009
Location: Vienna, Vienna, Austria
Posts: 190
Rep Power: 17
mabinty is on a distinguished road
hi bin,

as far as i experienced splitMeshRegion creates regions called "domain<n>" when something went wrong in the previous steps of setting up the cellSets and setsToZones. hence, I d suggest you to check the log-files of cellSets and setsToZones if any error messages were outputted. be aware of the fact that the flag "-cellZones" does not allow disconnected domains in a single region. if you want to have that use "-cellZonesOnly" (see utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C).

hope that helps!

cheers,
aram
mabinty is offline   Reply With Quote

Old   May 11, 2011, 07:51
Default
  #5
Senior Member
 
Aram Amouzandeh
Join Date: Mar 2009
Location: Vienna, Vienna, Austria
Posts: 190
Rep Power: 17
mabinty is on a distinguished road
dear all,

i continued playing around with the cellSets in different regions. after establishing the region air i created a cellSet "heatSource" stored in constant/polyMesh/sets. i then moved it to constant/air/polyMesh/sets and the command "set(heatSource)" used in the code of region air can find and access the cellSet. the problem now is that due to different cell addressing the region air the cellSet constant/air/polyMesh/sets/heatSource is not put at the intended location (see attached pics: cellSet at constant/polyMesh/sets = heatSource.png, cellSet at constant/air/polyMesh/sets = heatSourceAir.png). So I m looking for a way to translate the cellSet in constant/polyMesh/sets to constant/air/polyMesh/sets. i ll keep on digging.

appreciate your comments!
aram
Attached Images
File Type: png heatSource.png (11.7 KB, 184 views)
File Type: png heatSourceAir.png (25.0 KB, 173 views)
mabinty is offline   Reply With Quote

Old   May 12, 2011, 06:18
Default
  #6
Senior Member
 
Aram Amouzandeh
Join Date: Mar 2009
Location: Vienna, Vienna, Austria
Posts: 190
Rep Power: 17
mabinty is on a distinguished road
Dear all!

finally I could solve the problem. one should better read the output of "-help". I simply had to add the flag "-region <regionName>" to the setSet utility, e.g.:

Code:
setSet -batch makeCellSets.heatSource -region air
where makeCellSets.heatSource defines the location of the cellSet heatSource. Voila and the correct cellSet heatSource is produced and stored in constant/air/polyMesh/sets also see attached pic. In case one wants to make a cellZone out of the cellSet, use

Code:
setsToZones -region air
and the zone "heatSource" is added to constant/air/polyMesh/cellZones.

Cheers,
Aram
Attached Images
File Type: png heatSourceAir.png (21.5 KB, 120 views)
mgg likes this.
mabinty is offline   Reply With Quote

Old   May 12, 2011, 21:02
Default
  #7
Senior Member
 
ZHOU Bin
Join Date: Mar 2009
Location: Nanjing/Torino, Nanjing/Piemente, China/Italy
Posts: 164
Rep Power: 17
zhoubinwx is on a distinguished road
Send a message via ICQ to zhoubinwx Send a message via MSN to zhoubinwx Send a message via Skype™ to zhoubinwx
Hi Aram,

Sorry for my delayed reply. Today I saw your post and try again. it works with "-cellZonesOnly"!

Thank you very much.

Bin

Quote:
Originally Posted by mabinty View Post
hi bin,

as far as i experienced splitMeshRegion creates regions called "domain<n>" when something went wrong in the previous steps of setting up the cellSets and setsToZones. hence, I d suggest you to check the log-files of cellSets and setsToZones if any error messages were outputted. be aware of the fact that the flag "-cellZones" does not allow disconnected domains in a single region. if you want to have that use "-cellZonesOnly" (see utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C).

hope that helps!

cheers,
aram
zhoubinwx is offline   Reply With Quote

Old   August 11, 2011, 10:45
Default
  #8
Senior Member
 
calim_cfd's Avatar
 
mauricio
Join Date: Jun 2011
Posts: 172
Rep Power: 17
calim_cfd is on a distinguished road
Quote:
Originally Posted by mabinty View Post
Dear all!

finally I could solve the problem. one should better read the output of "-help". I simply had to add the flag "-region <regionName>" to the setSet utility, e.g.:

Code:
setSet -batch makeCellSets.heatSource -region air
where makeCellSets.heatSource defines the location of the cellSet heatSource. Voila and the correct cellSet heatSource is produced and stored in constant/air/polyMesh/sets also see attached pic. In case one wants to make a cellZone out of the cellSet, use

Code:
setsToZones -region air
and the zone "heatSource" is added to constant/air/polyMesh/cellZones.

Cheers,
Aram
wow!

i find these findings particularly intererting to me!

thx for sharing
calim_cfd is offline   Reply With Quote

Old   September 19, 2011, 10:01
Default
  #9
Member
 
Miles
Join Date: Sep 2011
Posts: 48
Rep Power: 14
miles_davis is on a distinguished road
Hi guys,

I have the same problem: i want to split a mesh and then set some initial conditions.

I am simulating a two phase flow and I have defined two cell zones, one for the air on for the water.
I have used splitMeshRegions to get those two regions.
Therefore, now in the last temporary file (in wich the mesh was slitted into two zones) I have two folders one for each cell regions.
I have* for instance for vol fraction alpha:
- case_folder/0.0005/zone1/alpha
- case_folder/0.0005/zone2/alpha
I have no file in the directory case_folder/0.0005.
That sounded quite consistent to me.
So I have defined all the BC in each zone folder (e.g. case_folder/0.0005/zone1 and case_folder/0.0005/zone2).
Thought this would be enough but when I launch the simulation, OF says that he cannot find the initial condition file in the folder case_folder/0.0005.

--> FOAM FATAL IO ERROR:
cannot find file

file: /media/DATA/CFD/OpenFOAM/sydney-2.0.1/run/copy-bubbleColumn-cas-test-tri-2D-V2-degazage/0.0005/Ua at line 0.

From function regIOobject::readStream()
in file db/regIOobject/regIOobjectRead.C at line 73.

FOAM exiting


Why does it need for? Everything is defined in the folder of each zone??

So my question is: After you managed to devide your cases in many zones: how did you set initial values on them.


Thaks for your help.
miles_davis is offline   Reply With Quote

Old   September 19, 2011, 17:16
Cool
  #10
Senior Member
 
calim_cfd's Avatar
 
mauricio
Join Date: Jun 2011
Posts: 172
Rep Power: 17
calim_cfd is on a distinguished road
hello miles!

**************************
cannot find file

file: /media/DATA/CFD/OpenFOAM/sydney-2.0.1/run/copy-bubbleColumn-cas-test-tri-2D-V2-degazage/0.0005/Ua at line 0
*************************

this kinda of error usually happens when u split ur case to parallel processing and u dont have the folder indicated in your controlDict file. There, as u know, is the timestep when ur analysis will start, so u need to make sure u have the correspondent time folder (0 or 0.0005, as pointed by controlDict) b4 splitting anything through either utility.

also.. check the damBreak case $FOAM-2.0.0/tutorials/multiphase/interFoam/ras/damBreak (i dont recall the path atm but its sth like this)

try using the tool setFields instead

idk if it helps anything but gl!
calim_cfd is offline   Reply With Quote

Old   September 20, 2011, 02:57
Default
  #11
Member
 
Miles
Join Date: Sep 2011
Posts: 48
Rep Power: 14
miles_davis is on a distinguished road
Thanks a lot
I'll check and let you know.


regards
miles_davis is offline   Reply With Quote

Old   April 3, 2012, 09:53
Default
  #12
Senior Member
 
mahdi abdollahzadeh
Join Date: Mar 2011
Location: Covilha,Portugal
Posts: 153
Rep Power: 15
mm.abdollahzadeh is on a distinguished road
Dear All.

Is it possible to spilt the zones in way that i have two interface between the region1 and region2?
I am transorming the fluent mesh and the spliting in to zones. i have a cube in the flow stream. one of the edges of my cube is insulated and the others are conductive.

Best
Mehdi
mm.abdollahzadeh is offline   Reply With Quote

Old   April 3, 2012, 10:05
Default
  #13
Senior Member
 
calim_cfd's Avatar
 
mauricio
Join Date: Jun 2011
Posts: 172
Rep Power: 17
calim_cfd is on a distinguished road
Quote:
Originally Posted by mm.abdollahzadeh View Post
Dear All.

Is it possible to spilt the zones in way that i have two interface between the region1 and region2?
I am transorming the fluent mesh and the spliting in to zones. i have a cube in the flow stream. one of the edges of my cube is insulated and the others are conductive.

Best
Mehdi
hi!
check the following tutorials

/tutorials/incompressible/pimpleFoam/TJunctionFan/
/tutorials/incompressible/pimpleDyMFoam/propeller/
/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/

they deal with the app: createBaffles, topoSet and more stuff on BC mapping. Maybe you'll have to create a set or even a patch from your current interface patches and go from there.

hope it helps
__________________
Best Regards
/calim

"Elune will grant us the strength"
calim_cfd is offline   Reply With Quote

Old   April 3, 2012, 10:37
Default
  #14
Senior Member
 
mahdi abdollahzadeh
Join Date: Mar 2011
Location: Covilha,Portugal
Posts: 153
Rep Power: 15
mm.abdollahzadeh is on a distinguished road
Quote:
Originally Posted by calim_cfd View Post
hi!
check the following tutorials

/tutorials/incompressible/pimpleFoam/TJunctionFan/
/tutorials/incompressible/pimpleDyMFoam/propeller/
/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/

they deal with the app: createBaffles, topoSet and more stuff on BC mapping. Maybe you'll have to create a set or even a patch from your current interface patches and go from there.

hope it helps

Many thanks for your kind reply.

I will certainly look at these application.
but however i have seen a option for splitMeshFaces "-useFaceZones"
it is to use faceZones to patch inter- region faces instead of single patch.
when i am transforming the msh file from fluent to openfoam it recognize the diffrent boundry condition at interface and even setsToZones command is adding thoese interfaces to faceZone. but when i used "-useFaceZones" nothing happend!!!

Best
Mehdi
mm.abdollahzadeh is offline   Reply With Quote

Old   April 3, 2012, 10:59
Default
  #15
Senior Member
 
calim_cfd's Avatar
 
mauricio
Join Date: Jun 2011
Posts: 172
Rep Power: 17
calim_cfd is on a distinguished road
Quote:
Originally Posted by mm.abdollahzadeh View Post
Many thanks for your kind reply.

I will certainly look at these application.
but however i have seen a option for splitMeshFaces "-useFaceZones"
it is to use faceZones to patch inter- region faces instead of single patch.
when i am transforming the msh file from fluent to openfoam it recognize the diffrent boundry condition at interface and even setsToZones command is adding thoese interfaces to faceZone. but when i used "-useFaceZones" nothing happend!!!

Best
Mehdi
i'm sorry but i don't have much time to help because i myself have only glanced at these options on a few cases so i dont have much xp. But i can tell you to remove all interface patches b4 exporting the case. Then in OF you create sets/patches using the option based on solid zones. I guess you have diferent solid domains, but even if the fluid/solid is the same split anyways so that you can use OF's options easier

sry i cant be of more help.. maybe some1 with more xp can add a comment l8r gl
__________________
Best Regards
/calim

"Elune will grant us the strength"
calim_cfd is offline   Reply With Quote

Old   June 15, 2020, 23:01
Default
  #16
New Member
 
Mooen
Join Date: Jun 2020
Posts: 1
Rep Power: 0
Nolan_King is on a distinguished road
Quote:
Originally Posted by mabinty View Post
Dear all!

finally I could solve the problem. one should better read the output of "-help". I simply had to add the flag "-region <regionName>" to the setSet utility, e.g.:

Code:
setSet -batch makeCellSets.heatSource -region air
where makeCellSets.heatSource defines the location of the cellSet heatSource. Voila and the correct cellSet heatSource is produced and stored in constant/air/polyMesh/sets also see attached pic. In case one wants to make a cellZone out of the cellSet, use

Code:
setsToZones -region air
and the zone "heatSource" is added to constant/air/polyMesh/cellZones.

Cheers,
Aram
hi Aram,
it is very kind of you. I have played a problems for many days. I wonder if you have any idea.
I am simulating a silding mesh case, i.e. there is a translational zone and a stationary zone. Inner the translational zone, there is a small zone which is set as porous medi. Therefore, two zonw are set in toposet files, i.e. zone 1 for the porous media, zone 2 for the translatinal zone. Zone 1 was included by Zone 2.
However, when i start the simualtion. the zone 1(porous media) cannot move with zone 1.
I would like to kone, how to move this porous media or how to make two cellSets in one zone.

Best regards.
Nolan_King 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
[Commercial meshers] Using starToFoam clo OpenFOAM Meshing & Mesh Conversion 33 September 26, 2012 04:04
OpenFOAM static build on Cray XT5 asaijo OpenFOAM Installation 9 April 6, 2011 12:21
[Other] StarToFoam error Kart OpenFOAM Meshing & Mesh Conversion 1 February 4, 2010 04:38
[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 05:15.