CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Meshing & Mesh Conversion

[snappyHexMesh] MultiRegion(Snappy): how to define new zones

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 12, 2015, 04:52
Default MultiRegion(Snappy): how to define new zones
  #1
New Member
 
Cartuns11's Avatar
 
Join Date: May 2015
Location: Barcelona
Posts: 24
Rep Power: 11
Cartuns11 is on a distinguished road
Hi everybody,

My case is.....

The model consists in one cylinder inside a athmospheric domain ( 3D ). The mesh has been generated by SHM and the geometry of the cylinder is a stl. The model is a multiRegion because the cylinder is solid and the domain is air. I want to define three cellZones on the cylinder, top, bot and wall. I started to define these in the stl file:
cylinder.stl
Code:
solid top
...
ensolidtop
solid bot
.....
endsolid bot
solid wall
.....
endsolid wall
At the end of the SHM process, I obtained in the boundary file of general polyMesh:
cyliner_top
cyliner_top_slave
cylinder_bot
cylinder_bot_slave
cylinder_wall
cylinder_wall_slave

But, when I used splitMeshRegions..( splitMeshRegions -cellZones -overwrite) ... I obtained: cylinder_to_domain0 and domain0_to_cylinder.

I have seen in the cellZone file, the top,bot and wall don't exist....are only boundaries.

I would like to have others cellzones after splitMeshRegion:
cylinder_top_to_domain0
cylinder_bot_to_domain0
cylinder_wall_to_domain0
domain0_to_cylinder_top
......etc

The target is to define thermal conditions in these patchs.
Any idea?


Thanks
Greetings
Attached Images
File Type: png cylinder.png (6.2 KB, 42 views)
Cartuns11 is offline   Reply With Quote

Old   June 12, 2015, 06:55
Default
  #2
Member
 
amine
Join Date: Jan 2014
Location: FRANCE
Posts: 84
Rep Power: 12
aminem is on a distinguished road
Hi,

I think It's possible by using toposet.

toposetDit file like this: you can alson create your air zone

N.B: I have creat three STL file

Code:
FoamFile
{
	location		"system";
	class		dictionary;
	object		topoSetDict;
	format		ascii;
	version		2.0;
}

actions               (
	{
		name    bot;
		type    cellSet;
		action  new;
		source  surfaceToCell;
		sourceInfo
		{
file	"constant/triSurface/bot.stl";
outsidePoints	((0 0 0));
includeInside	true;
includeOutside	false;
includeCut	true;
nearDistance	-1;
curvature	-100;
		}
	}
	{
		name    bot;
		type    cellZoneSet;
		action  new;
		source  setToCellZone;
		sourceInfo
		{
			set   bot;
		}
	}
	{
		name    top;
		type    cellSet;
		action  new;
		source  surfaceToCell;
		sourceInfo
		{
file	"constant/triSurface/top.stl";
outsidePoints	((0 0 0));
includeInside	true;
includeOutside	false;
includeCut	true;
nearDistance	-1;
curvature	-100;
		}
	}
	{
		name    top;
		type    cellZoneSet;
		action  new;
		source  setToCellZone;
		sourceInfo
		{
			set   top;
		}
	}
	{
		name    wall;
		type    cellSet;
		action  new;
		source  surfaceToCell;
		sourceInfo
		{
file	"constant/triSurface/wall.stl";
outsidePoints	((0 0 0));
includeInside	true;
includeOutside	false;
includeCut	true;
nearDistance	-1;
curvature	-100;
		}
	}
	{
		name    wall;
		type    cellZoneSet;
		action  new;
		source  setToCellZone;
		sourceInfo
		{
			set   wall;
		}
	}
    // clear To cellSet
    {
        name    air;
        type    cellSet;
        action  clear;

    }

    // new To cellSet
    {
        name    air;
        type    cellSet;
        action  new;
        // Copy elements from cellSet
        source cellToCell;
        sourceInfo
        {
            set  top;
        }
    }

    // add To cellSet
    {
        name    air;
        type    cellSet;
        action  add;
        // Copy elements from cellSet
        source cellToCell;
        sourceInfo
        {
            set  wall;
        }
    }

    // add To cellSet
    {
        name    air;
        type    cellSet;
        action  add;
        // Copy elements from cellSet
        source cellToCell;
        sourceInfo
        {
            set  bot;
        }
    }

    // invert To cellSet
    {
        name    air;
        type    cellSet;
        action  invert;

    }

    // new To cellZoneSet
    {
        name    air;
        type    cellZoneSet;
        action  new;
        // Select based on cellSet
        source setToCellZone;
        sourceInfo
        {
            set  air;           // name of cellSet
        }
    }
);
aminem is offline   Reply With Quote

Old   June 16, 2015, 06:52
Default
  #3
New Member
 
Cartuns11's Avatar
 
Join Date: May 2015
Location: Barcelona
Posts: 24
Rep Power: 11
Cartuns11 is on a distinguished road
Hi aminem,

It's a nice idea, but I haven't achieved my target. This is a simple model, because I will do a multiRegion simulation. I've loaded a image, which depicts three regions (fluid and solids), this is the complex model.

I need to carry out snappy and splitMeshRegion,.. I tried your proposal, before SMR......but after SMR, the cylinder's BC (top, wall and bot) were not defined..... I only obtained one BC, cylinder_to_domain0.

To sum up, I want to define three BC on a cylinder, which is inside 2 domains/regions. And the principal requirement is that the model have to be built using snappy and splitMeshRegion. But I can use topoSet or other...

Thanks.
Attached Images
File Type: png cylinder_2domains.png (7.7 KB, 17 views)
Cartuns11 is offline   Reply With Quote

Old   June 26, 2015, 06:52
Default
  #4
Member
 
amine
Join Date: Jan 2014
Location: FRANCE
Posts: 84
Rep Power: 12
aminem is on a distinguished road
Hi

Do you have found a solution?

Thanks
aminem is offline   Reply With Quote

Old   June 26, 2015, 07:24
Default
  #5
New Member
 
Cartuns11's Avatar
 
Join Date: May 2015
Location: Barcelona
Posts: 24
Rep Power: 11
Cartuns11 is on a distinguished road
Hi!

I haven't still found a solution..... because now, it isn't an important requirement for my model. But, in the future, I'll have to resolve it and if I find a solution, I'll write a post.

Thanks!
Cartuns11 is offline   Reply With Quote

Old   May 3, 2019, 12:47
Default
  #6
New Member
 
SC
Join Date: Dec 2018
Posts: 3
Rep Power: 8
leogermer is on a distinguished road
Hi

Did you found any solution?

I have a similar problem on my case. It's a design of a heat exchanger.

I tried to load at SHM the whole surface (multiregion stl file). Within that surface lies regions where i wanted to create cellZones.

My questions is basically, is it possible to create cellZones coming from patches defined at 'refinementSurfaces' at SHM?

---

I already tried to build this case with two different stl (one for the solid region and another for the fluid region). But after the snap it either creates a lot of other domains or it just cuts off the fins which is the interception between the two surfaces.
leogermer is offline   Reply With Quote

Old   May 3, 2019, 13:02
Default
  #7
New Member
 
SC
Join Date: Dec 2018
Posts: 3
Rep Power: 8
leogermer is on a distinguished road
Just attached the geometry

There's and inlet and outlet pipe and a main (transparent) domain. These are all fluid, which represents the water through the heat exchanger.

And there's the solid domain which has the fins along the board and the outer plate.

The problem is between the fins and the main domain. The fins get cut off at the snap or it creates other domains.

I'm not sure if it's just a refinement problem, or maybe i should just increase the blockMesh refinement level.



Any advice and suggestions are welcome.
Attached Images
File Type: png ss.png (27.6 KB, 18 views)
File Type: png aa.png (21.3 KB, 10 views)
leogermer 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
Hydrogen storage by metal hydride longbk FLUENT 12 August 1, 2023 21:13
Different define of psi uesd in pEqn.H zqlhzx OpenFOAM Running, Solving & CFD 0 December 24, 2013 09:45
Robin B.C. Yu FLUENT 3 May 27, 2012 05:19
Defining dynamic zones for Define CG motion aamer Main CFD Forum 0 March 21, 2011 04:51
UDF FOR UNSTEADY TIME STEP mayur FLUENT 3 August 9, 2006 11:19


All times are GMT -4. The time now is 19:07.