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

[mesh manipulation] OpenFoam 2.1.0/x: creation of sets and cellZones.

Register Blogs Community New Posts Updated Threads Search

Like Tree44Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 31, 2012, 20:49
Default OpenFoam 2.1.0/x: creation of sets and cellZones.
  #1
Member
 
Elh. A2. BAH
Join Date: Jan 2012
Posts: 64
Rep Power: 14
ebah6 is on a distinguished road
Dear all,

I exported a mesh to OpenFoam and the files I got are: boundary, faces, neighbour, owner and points.
How can I proceed to create cellZones to define rotating parts?
I saw that earlier versions have cellSet utilities which I can not find.

Can anyone help on this issue?

Thank you all.
ebah6 is offline   Reply With Quote

Old   March 31, 2012, 22:37
Default
  #2
Senior Member
 
sail's Avatar
 
Vieri Abolaffio
Join Date: Jul 2010
Location: Always on the move.
Posts: 308
Rep Power: 17
sail is on a distinguished road
Quote:
Originally Posted by ebah6 View Post
Dear all,

I exported a mesh to OpenFoam and the files I got are: boundary, faces, neighbour, owner and points.
How can I proceed to create cellZones to define rotating parts?
I saw that earlier versions have cellSet utilities which I can not find.

Can anyone help on this issue?

Thank you all.
CellSet have been replaced by setSet
__________________
http://www.leadingedge.it/
Naval architecture and CFD consultancy
sail is offline   Reply With Quote

Old   March 31, 2012, 23:13
Default
  #3
Member
 
Elh. A2. BAH
Join Date: Jan 2012
Posts: 64
Rep Power: 14
ebah6 is on a distinguished road
Thanks Sail,

Can you please elaborate on how to use this feature.
I did try to utilise it but doesn't require that a set exists in the constant/polyMesh/sets directory?
So how would go along from the primary faces, points, etc. files to that that set then to the cellZones?

Thanks very much for your time.
ebah6 is offline   Reply With Quote

Old   April 1, 2012, 00:27
Default
  #4
Member
 
Elh. A2. BAH
Join Date: Jan 2012
Posts: 64
Rep Power: 14
ebah6 is on a distinguished road
Hello Vieri,

I think I get how to do it.

Again, thank you.
saadouda likes this.
ebah6 is offline   Reply With Quote

Old   April 1, 2012, 10:20
Default
  #5
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 ebah6 View Post
Hello Vieri,

I think I get how to do it.

Again, thank you.

Dear ebah6

Could you please help me how setSet is working, please?
I am looking at the the Openfoam tutorial files for chtMultiRegionFoam and they used the same utility. but i can not understand how it is working.
i was thinking that for specifinng a part of mesh as new one , i need to input the number of grids or the coordinates


Best Mehdi
saadouda likes this.
mm.abdollahzadeh is offline   Reply With Quote

Old   April 1, 2012, 11:57
Default
  #6
Senior Member
 
Nima Samkhaniani
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,267
Blog Entries: 1
Rep Power: 25
nimasam is on a distinguished road
send me a private message contains your email to send you a tutorial in persian
s.m, ali-group and saadouda like this.
nimasam is offline   Reply With Quote

Old   April 1, 2012, 19:44
Default
  #7
Member
 
Elh. A2. BAH
Join Date: Jan 2012
Posts: 64
Rep Power: 14
ebah6 is on a distinguished road
Quote:
Originally Posted by mm.abdollahzadeh View Post
Dear ebah6

Could you please help me how setSet is working, please?
I am looking at the the Openfoam tutorial files for chtMultiRegionFoam and they used the same utility. but i can not understand how it is working.
i was thinking that for specifinng a part of mesh as new one , i need to input the number of grids or the coordinates


Best Mehdi

Hello Mehdi,

I just did it on a dummy example for to see first how to get it.
So consider the following:
setSet
faceSet f0 new patchToFace bc_patch
cellSet c0 new faceToCell f0 any
cellZoneSet c0 new setToCellZone c0

Note: bc_patch is the boundary that you want to use for the cellZone.

Hope this helps.
ebah6 is offline   Reply With Quote

Old   April 1, 2012, 20:13
Default
  #8
Senior Member
 
lore
Join Date: Mar 2010
Location: Italy
Posts: 460
Rep Power: 18
lovecraft22 is on a distinguished road
Send a message via Skype™ to lovecraft22
I think you could also use topoSet instead of setSet.
I tried both of them and I got the same result. The only difference is that topoSet seems to be easier to use…
vs1 likes this.
lovecraft22 is offline   Reply With Quote

Old   April 2, 2012, 11:56
Default
  #9
Senior Member
 
mahdi abdollahzadeh
Join Date: Mar 2011
Location: Covilha,Portugal
Posts: 153
Rep Power: 15
mm.abdollahzadeh is on a distinguished road
thanks all
I understand how setSet utility is working .
today i tried to test a case with chtMultiregionFoam.
my case includes natural convection in an enclosure with a block at the bottom. the bottom surface of block was heated.
the strange thing is that the temperature is not passing throgh solid zone to fluid zone. I am using turbulentTemperatureCoupledBaffleMixed as the boundary condition on the interface of soid and liquid zone.
I thinck there should be sth related to boundary condition. I will be too much thankful to recive you oponions .

Best
Mehdi
mm.abdollahzadeh is offline   Reply With Quote

Old   April 2, 2012, 12:39
Default
  #10
Member
 
Elh. A2. BAH
Join Date: Jan 2012
Posts: 64
Rep Power: 14
ebah6 is on a distinguished road
Quote:
Originally Posted by mm.abdollahzadeh View Post
thanks all
I understand how setSet utility is working .
today i tried to test a case with chtMultiregionFoam.
my case includes natural convection in an enclosure with a block at the bottom. the bottom surface of block was heated.
the strange thing is that the temperature is not passing throgh solid zone to fluid zone. I am using turbulentTemperatureCoupledBaffleMixed as the boundary condition on the interface of soid and liquid zone.
I thinck there should be sth related to boundary condition. I will be too much thankful to recive you oponions .

Best
Mehdi

I fear I do not know about this issue; I am beginner.
Hope someone can help.

Regards.
ebah6 is offline   Reply With Quote

Old   April 10, 2012, 07:16
Default
  #11
Senior Member
 
Samuele Z
Join Date: Oct 2009
Location: Mozzate - Co - Italy
Posts: 520
Rep Power: 19
samiam1000 is on a distinguished road
Hi All,

I would need help about using the topoSet feature.

I have a .msh mesh imported from Fluent. I give the fluent3DMeshToFoam command and I have a cell zones (in the cellZone file!).

Which is the right topoSetDict in order to be able to run chtMultiRegion properly?

Thanks a lot,
Samuele
samiam1000 is offline   Reply With Quote

Old   April 10, 2012, 08:01
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

I don't know how to work with toposet. but the easiest way in my opinion is to export your mesh from fluent to openfoam. if you have just one interface between your solid and interface zone . just create the different zones in gambit and after exporting your grid use

runApplication fluentMeshToFoam name.msh -writeSets
runApplication setsToZones -noFlipMap
runApplication splitMeshRegions -cellZones -overwrite

but if you have a more complicated situation. for example that you have a block in the steam of fluid and half of th block surface is insulated and the other half is conductive. if you use the above command you will have just one interface and you can not be able to define different boundary condition. but instead you can create the mesh of different zones separately in gambit and export them separately to openfoam and place them in the folders with name of zones. then if u want conjugate heat transfer at an interface use this boundary condition other wise use other boundary condition:
**** it is the boundary in solid zone
heater_to_surrondingAir2
{
type compressible::turbulentTemperatureCoupledBaffleMix ed;
neighbourFieldName T;
K solidThermo;
KName none;
value uniform 300;
}

* it is the boundary in fluid zone

surrondingAir_to_heater2
{
type compressible::turbulentTemperatureCoupledBaffleMix ed;
neighbourFieldName T;
K basicThermo;
KName none;
value uniform 300;
}
CROS, Mojtaba.a, jiaojiao and 2 others like this.
mm.abdollahzadeh is offline   Reply With Quote

Old   April 10, 2012, 10:26
Default
  #13
Senior Member
 
Samuele Z
Join Date: Oct 2009
Location: Mozzate - Co - Italy
Posts: 520
Rep Power: 19
samiam1000 is on a distinguished road
When I give the
Code:
splitMeshRegions -cellZones -overwrite
I get this error:
Code:
lab@lab-laptop:~/Documenti/cases_OF/OF_case11_test$ splitMeshRegions -cellZones -overwrite
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.1.0                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
Build  : 2.1.0-0bc225064152
Exec   : splitMeshRegions -cellZones -overwrite
Date   : Apr 10 2012
Time   : 14:11:09
Host   : "lab-laptop"
PID    : 5028
Case   : /home/lab/Documenti/cases_OF/OF_case11_test
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Disallowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
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:5

Writing region per cell file (for manual decomposition) to "/home/lab/Documenti/cases_OF/OF_case11_test/constant/cellToRegion"

Writing region per cell as volScalarField to "/home/lab/Documenti/cases_OF/OF_case11_test/0/cellToRegion"

Region	Cells
------	-----
0	15450
1	9450
2	81885
3	2940
4	54675

Region	Zone	Name
------	----	----
0	0	door
1	4	roof
2	2	internal_air
3	3	infinite_air
4	1	external_air

Sizes of interfaces between regions:

Interface	Region	Region	Faces
---------	------	------	-----
0		3	4	420
1		0	1	150
2		1	2	795
3		0	4	1545
4		0	2	1545
5		1	4	1095

Reading volScalarField Ypmma


--> FOAM FATAL IO ERROR: 
inconsistent patch and patchField types for 
    patch type symmetryPlane and patchField type calculated

file: /home/lab/Documenti/cases_OF/OF_case11_test/0/Ypmma::boundaryField::.* from line 25 to line 26.

    From function fvPatchField<Type>::New(const fvPatch&, const DimensionedField<Type, volMesh>&, const dictionary&)
    in file /home/opencfd/OpenFOAM/OpenFOAM-2.1.0/src/finiteVolume/lnInclude/fvPatchFieldNew.C at line 164.

FOAM exiting

lab@lab-laptop:~/Documenti/cases_OF/OF_case11_test$
Any idea?
samiam1000 is offline   Reply With Quote

Old   April 10, 2012, 10:30
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
i am not sure but I guess sth,
you may have putted some dictionys for your variables in 0 folder which are not empty.
may be the problem is related that.
mm.abdollahzadeh is offline   Reply With Quote

Old   May 15, 2012, 08:51
Default compressible::turbulentTemperatureCoupledBaffle
  #15
New Member
 
namdar
Join Date: Mar 2012
Posts: 17
Rep Power: 14
Budlo is on a distinguished road
Hi dear
I want set a boundary condition for conjugate boundary in chtMultiRegionFoam.
But I dont find any information about this.

What boundary condition we can set for conjugate boundary? (please discribe it)
Budlo is offline   Reply With Quote

Old   May 21, 2012, 15:15
Default
  #16
Senior Member
 
mahdi abdollahzadeh
Join Date: Mar 2011
Location: Covilha,Portugal
Posts: 153
Rep Power: 15
mm.abdollahzadeh is on a distinguished road
Dear namdar

As i know you can use

type compressible::turbulentTemperatureCoupledBaffleMix ed;
neighbourFieldName T;
K basicThermo;
KName none;
value uniform 300;

for conjucate heat transfer....
K is the name of your diffusity
mm.abdollahzadeh is offline   Reply With Quote

Old   May 22, 2012, 04:03
Default
  #17
New Member
 
namdar
Join Date: Mar 2012
Posts: 17
Rep Power: 14
Budlo is on a distinguished road
Why we use uniform value(300) in conjugate B.C ? (the conjugate boundary must to be solve)
What is diferent between: Compressible::turbulentTemperatureCoupledBaffleMix ed,
Compressible::turbulentTemperatureCoupledBaffle,
Budlo is offline   Reply With Quote

Old   May 22, 2012, 04:04
Default
  #18
Senior Member
 
Samuele Z
Join Date: Oct 2009
Location: Mozzate - Co - Italy
Posts: 520
Rep Power: 19
samiam1000 is on a distinguished road
Dear mm.abdollahzadeh,

does this allow you to have 2 fluid regions that have a coincident interface?
samiam1000 is offline   Reply With Quote

Old   May 23, 2012, 08:51
Default
  #19
New Member
 
namdar
Join Date: Mar 2012
Posts: 17
Rep Power: 14
Budlo is on a distinguished road
Hi All

1-Why we use uniform value(300) in conjugate B.C ? (the conjugate boundary must to be solve)
What is diferent between: Compressible::turbulentTemperatureCoupledBaffleMix ed,
Compressible::turbulentTemperatureCoupledBaffle,

2- In chtMultiRegionFoam in OpenFoam 2011:
What is Ychar and Ypmma files in boundary condition ?
samiam1000 likes this.
Budlo is offline   Reply With Quote

Old   June 17, 2012, 21:40
Default
  #20
Senior Member
 
Jie
Join Date: Jan 2010
Location: Australia
Posts: 134
Rep Power: 16
jiejie is on a distinguished road
Dear foamers

For those who are doing rotating mesh with AMI. I have summarized the procedures after I received the advice from ebah6. I was using GGI from the OF1.6-ext and the procedure was a bit different in the OF2.1.x.

Since I am using ICEM for the mesh, I created a rotor zone (an inner-cycliner) inside a stator zone (a hollow cylinder around the rotor zone). The interfaces between the rotor zone and the stator zone are defined as AMI1 and AMI2 (AMI1=AMI2, I am not sure whether you can leave a tiny gap in between as the old GGI requires a small gap in between). Save the mesh as fluent format.

1. use fluent3DMeshToFoam to convert the icem mesh to openfoam compatible.
2. set up the AMI boundaries under case/constant/boundary:

AMI_1
{
type cyclicAMI;
nFaces 17893;
startFace 721902;
matchTolerance 0.0001;
neighbourPatch AMI_2;
transform noOrdering;
}

AMI_2
{
type cyclicAMI;
nFaces 6844;
startFace 741999;
matchTolerance 0.0001;
neighbourPatch AMI_1;
transform noOrdering;
}

3. Create Sets and cellZones (here is what I received from ebah6):

Suppose that your rotating block is comprised within a cylinder of axis z and that the points of intersection of this axis with the bases of the cylinder are (0 0 0) and (0 0 1); and your cylinder radius is 0.5.
All you need in such a case is to use the setSet command as follows: only that which is between quotes without the quotes.
0) type "setSet" from your case directory.
1) "cellSet c0 new cylinderToCell (0 0 0) (0 0 1) 0.5"
2) "cellZoneSet c0Zone new setToCellZone c0"
your rotating zone will be c0Zone.
by the way, c0 ans c0Zone are just made-up names, you can choose your own.

I think the simulation is ready to go now. Hopefully this is handy to whoever whats to use AMI.

Jie
wyldckat, Blanco, Soheyl and 15 others like this.
jiejie 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
Getting Started with OpenFOAM wyldckat OpenFOAM 26 June 21, 2024 07:54


All times are GMT -4. The time now is 10:16.