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

CellZons and MRFSimpleFoam

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

Like Tree5Likes
  • 3 Post By dmoroian
  • 1 Post By dmoroian
  • 1 Post By dmoroian

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 5, 2008, 03:48
Default Hi everybody, I would like
  #1
Senior Member
 
Vincent RIVOLA
Join Date: Mar 2009
Location: France
Posts: 283
Rep Power: 18
vinz is on a distinguished road
Hi everybody,

I would like to run a rotating propeller using MRFSimpleFoam.

It looks like I need to create a cellZone file in polymesh directory. The problem is I don't know how to do that.

I created my mesh using GridPro, but gridpro2FOAM does not incorporate a feature to create this file. Do I have to modify the converter and create this feature or is there a tool in OpenFOAM to create this file from the common files (points,faces,owner, neighbour..)?

Thanks in advance for any help.

Vincent
vinz is offline   Reply With Quote

Old   June 5, 2008, 04:09
Default Hi Vincent, Check the cellSet
  #2
Senior Member
 
dmoroian's Avatar
 
Dragos
Join Date: Mar 2009
Posts: 648
Rep Power: 20
dmoroian is on a distinguished road
Hi Vincent,
Check the cellSet and setsToZones utilities.
With cellSet you can define a set of cells that rotate, and then convert this set into a zone with setsToZones.

I hope this is helpful,
Dragos
dmoroian is offline   Reply With Quote

Old   June 5, 2008, 05:23
Default Hi Dragos, And thank you fo
  #3
Senior Member
 
Vincent RIVOLA
Join Date: Mar 2009
Location: France
Posts: 283
Rep Power: 18
vinz is on a distinguished road
Hi Dragos,

And thank you for your quick answer.
I saw the cellSet utility is using a cellSetDict in which different things have to be entered:
- name: should it be one of the patch which is in boundary file
- action: is "new" the right choice to create the cellZone file I want.
- topoSetSources: I have no idea what to put there.

Is there an explanation of this tool somewhere? I didn't find anything interesting in the user guide.
Thanks again for your help.

Vincent
vinz is offline   Reply With Quote

Old   June 5, 2008, 05:35
Default Hello Vincent, Few explanator
  #4
Senior Member
 
dmoroian's Avatar
 
Dragos
Join Date: Mar 2009
Posts: 648
Rep Power: 20
dmoroian is on a distinguished road
Hello Vincent,
Few explanatory remarks:
- name is the name of the rotating cell set. If you want, it can be the same as the rotating patch, but is not mandatory.
- action new, indeed, you create a new set of cells.
- topoSetSources, here you choose a method of selecting the cells. Probably boxToCell is the one you want, in which the set is defined by the cells contained in a rectangular box.

I hope this is helpful,
Dragos
mm.abdollahzadeh likes this.
dmoroian is offline   Reply With Quote

Old   June 5, 2008, 06:36
Default Hello again, You helped me
  #5
Senior Member
 
Vincent RIVOLA
Join Date: Mar 2009
Location: France
Posts: 283
Rep Power: 18
vinz is on a distinguished road
Hello again,

You helped me a lot! Your advices were very usefull.
I managed to get a cellSetdict working.
Here it is:

name rotor;

// One of clear/new/invert/add/delete|subset/list
action new;

// Actions to apply to cellSet. These are all the topoSetSource's ending
// in ..ToCell (see the meshTools library).

topoSetSources
(
// Cells in cell zone
boxToCell
{
box (-1.2 -0.6 -1.2) (1.2 2.3 1.2); // name of cellZone
}

);

I still have some doubts about what I should put into topoSetSources. boxToCell is selecting all the cell in a certain rectangular right? But, I just want certain surfaces to rotate, so is it the right thing to do here?


Then I tried to run the case. It was saying that cellZone rotor was not resent in polymesh directory. So I just copied the file from the tutorial case and replaced the values of the cell inside by the values I had in the "rotor" file in sets directory. Hope this is what I should do. Is there a best way to obtain the file?

And finally, I run my case but I get the followinf error for which I have no idea how to solve it:

/*---------------------------------------------------------------------------*\
| ========= | |
| \ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \ / O peration | Version: 1.4.1 |
| \ / A nd | Web: http://www.openfoam.org |
| \/ M anipulation | |
\*---------------------------------------------------------------------------*/

Exec : MRFSimpleFoam . rotatingPropeller
Date : Jun 05 2008
Time : 10:48:46
Host : bigbrain.rtech.fr
PID : 26139
Root : /home/vincent/OpenFOAM/vincent-1.4.1/run/tutorials/MRFSimpleFoam
Case : rotatingPropeller
Nprocs : 1
Create time

Create mesh for time = 0

Reading field p

Reading field U

Reading/calculating face flux field phi

Selecting incompressible transport model Newtonian
Selecting turbulence model laminar

Starting time loop

Time = 1

*** glibc detected *** MRFSimpleFoam: malloc(): memory corruption: 0x0000000002c78310 ***
======= Backtrace: =========
/lib64/libc.so.6[0x3a12472fec]
/lib64/libc.so.6(__libc_malloc+0x7a)[0x3a124748fa]
/home/vincent/OpenFOAM/linux64/gcc-4.2.1/lib64/libstdc++.so.6(_Znwm+0x1d)[0x2aaa ac4be16d]
/home/vincent/OpenFOAM/linux64/gcc-4.2.1/lib64/libstdc++.so.6(_Znam+0x9)[0x2aaaa c4be289]
MRFSimpleFoam[0x4327e4]
MRFSimpleFoam[0x414b67]
/lib64/libc.so.6(__libc_start_main+0xf4)[0x3a1241e074]
MRFSimpleFoam(_ZN4Foam11regIOobject14readIfModifie dEv+0x201)[0x412ff9]
======= Memory map: ========
00400000-00459000 r-xp 00000000 fd:00 45793285 /home/vincent/OpenFOAM/vincent-1.4.1/applications/bin/linux64GccDPOpt/MRFSimpleF oam
00659000-0065b000 rw-p 00059000 fd:00 45793285 /home/vincent/OpenFOAM/vincent-1.4.1/applications/bin/linux64GccDPOpt/MRFSimpleF oam
0065b000-04b80000 rw-p 0065b000 00:00 0 [heap]
3a12000000-3a1201b000 r-xp 00000000 fd:00 41107457 /lib64/ld-2.7.so
3a1221a000-3a1221b000 r--p 0001a000 fd:00 41107457 /lib64/ld-2.7.so
3a1221b000-3a1221c000 rw-p 0001b000 fd:00 41107457 /lib64/ld-2.7.so
3a12400000-3a1254d000 r-xp 00000000 fd:00 41107458 /lib64/libc-2.7.so
3a1254d000-3a1274d000 ---p 0014d000 fd:00 41107458 /lib64/libc-2.7.so
3a1274d000-3a12751000 r--p 0014d000 fd:00 41107458 /lib64/libc-2.7.so
3a12751000-3a12752000 rw-p 00151000 fd:00 41107458 /lib64/libc-2.7.so
3a12752000-3a12757000 rw-p 3a12752000 00:00 0
3a12800000-3a12802000 r-xp 00000000 fd:00 41107465 /lib64/libdl-2.7.so
3a12802000-3a12a02000 ---p 00002000 fd:00 41107465 /lib64/libdl-2.7.so
3a12a02000-3a12a03000 r--p 00002000 fd:00 41107465 /lib64/libdl-2.7.so
3a12a03000-3a12a04000 rw-p 00003000 fd:00 41107465 /lib64/libdl-2.7.so
3a12c00000-3a12c82000 r-xp 00000000 fd:00 41107464 /lib64/libm-2.7.so
3a12c82000-3a12e81000 ---p 00082000 fd:00 41107464 /lib64/libm-2.7.so
3a12e81000-3a12e82000 r--p 00081000 fd:00 41107464 /lib64/libm-2.7.so
3a12e82000-3a12e83000 rw-p 00082000 fd:00 41107464 /lib64/libm-2.7.so
3a13000000-3a13016000 r-xp 00000000 fd:00 41107461 /lib64/libpthread-2.7.so
3a13016000-3a13215000 ---p 00016000 fd:00 41107461 /lib64/libpthread-2.7.so
3a13215000-3a13216000 r--p 00015000 fd:00 41107461 /lib64/libpthread-2.7.so
3a13216000-3a13217000 rw-p 00016000 fd:00 41107461 /lib64/libpthread-2.7.so
3a13217000-3a1321b000 rw-p 3a13217000 00:00 0
3a1ba00000-3a1ba15000 r-xp 00000000 fd:00 41107479 /lib64/libnsl-2.7.so
3a1ba15000-3a1bc14000 ---p 00015000 fd:00 41107479 /lib64/libnsl-2.7.so
3a1bc14000-3a1bc15000 r--p 00014000 fd:00 41107479 /lib64/libnsl-2.7.so
3a1bc15000-3a1bc16000 rw-p 00015000 fd:00 41107479 /lib64/libnsl-2.7.so
....


Do you have some idea on this problem?
Thanks again,


Vincent
vinz is offline   Reply With Quote

Old   June 5, 2008, 06:55
Default Hi Vincent Please take a l
  #6
Senior Member
 
Join Date: Mar 2009
Posts: 248
Rep Power: 18
jaswi is on a distinguished road
Hi Vincent

Please take a look in the:

/home/openfoam/OpenFOAM/OpenFOAM-1.4.1/applications/utilities/mesh/manipulation/ cellSet

You will find a file cellSetDict. This file shows
all the possible topSetSources one could use to define a cellSet. It also shows how a particular option can be put to use.

Hope that it will of some use...

Regards
Jaswi
jaswi is offline   Reply With Quote

Old   June 5, 2008, 07:02
Default Hi Jaswinder, Thanks for yo
  #7
Senior Member
 
Vincent RIVOLA
Join Date: Mar 2009
Location: France
Posts: 283
Rep Power: 18
vinz is on a distinguished road
Hi Jaswinder,

Thanks for your help, but I actually already saw this dict. Maybe, it's coming from me but I don't find it very clear.

I keep looking at it but I don't see which option would be the best for my case.

And the error I posted above is very strange. Actually I don't know if it comes from the definition of the rotating parts or the boundary conditions which I chose like this:

p:
dimensions [0 2 -2 0 0 0 0];

internalField uniform 0;

boundaryField
{
blade1
{
type zeroGradient;
}
blade2
{
type zeroGradient;
}
blade3
{
type zeroGradient;
}
tube
{
type zeroGradient;
}
external
{
type symmetryPlane;
}

outlet
{
type fixedValue;
value uniform 0;
}

inlet
{
type zeroGradient;
}
}

U:
dimensions [0 1 -1 0 0 0 0];

internalField uniform (0 0 0);

boundaryField
{
blade1
{
type fixedValue;
value uniform (0 0 0);
}
blade2
{
type fixedValue;
value uniform (0 0 0);
}
blade3
{
type fixedValue;
value uniform (0 0 0);
}
tube
{
type fixedValue;
value uniform (0 0 0);
}
outlet
{
type zeroGradient;
}

inlet
{
type inletOutlet;
inletValue uniform (0 10 0);
value uniform (0 10 0);
}

external
{
type symmetryPlane;
}
}

Regards,

Vincent
vinz is offline   Reply With Quote

Old   June 5, 2008, 07:12
Default Hi Vincent I can't say muc
  #8
Senior Member
 
Join Date: Mar 2009
Posts: 248
Rep Power: 18
jaswi is on a distinguished road
Hi Vincent

I can't say much from the backtrace given in the last post.

If you have no copyright related issues then send over the testCase and I can take a look.

mail it to me.

Regards
Jaswi
jaswi is offline   Reply With Quote

Old   June 5, 2008, 08:07
Default Hello Vincent, Did you run se
  #9
Senior Member
 
dmoroian's Avatar
 
Dragos
Join Date: Mar 2009
Posts: 648
Rep Power: 20
dmoroian is on a distinguished road
Hello Vincent,
Did you run setsToZones after you obtained your sets?
MRFSimpleFoam needs a zone to be defined, not a set!

Quote:
I still have some doubts about what I should put into topoSetSources. boxToCell is selecting all the cell in a certain rectangular right? But, I just want certain surfaces to rotate, so is it the right thing to do here?
Yes you did right. Later you will specify inside the MRFZones dictionary which wall/patch is rotating inside the defined zone.

Dragos
mm.abdollahzadeh likes this.
dmoroian is offline   Reply With Quote

Old   June 5, 2008, 08:11
Default Oh, now I see what you did. It
  #10
Senior Member
 
dmoroian's Avatar
 
Dragos
Join Date: Mar 2009
Posts: 648
Rep Power: 20
dmoroian is on a distinguished road
Oh, now I see what you did. It is wrong to just copy the cellZones file from the tutorial directory!!! You have to get it right from the sets, using setsToZones

Dragos
dmoroian is offline   Reply With Quote

Old   June 5, 2008, 08:17
Default Actually yes I ran setsToZones
  #11
Senior Member
 
Vincent RIVOLA
Join Date: Mar 2009
Location: France
Posts: 283
Rep Power: 18
vinz is on a distinguished road
Actually yes I ran setsToZones since I ran the makeMesh script and it is inside with the option -noflipmap (I don't know what it is but I just kept it as it was).
This is the output of setsToZones:
/*---------------------------------------------------------------------------*\
| ========= | |
| \ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \ / O peration | Version: 1.4.1 |
| \ / A nd | Web: http://www.openfoam.org |
| \/ M anipulation | |
\*---------------------------------------------------------------------------*/

Exec : setsToZones . rotatingPropeller -noFlipMap
Date : Jun 05 2008
Time : 12:40:18
Host : bigbrain.rtech.fr
PID : 26186
Root : /home/vincent/OpenFOAM/vincent-1.4.1/run/tutorials/MRFSimpleFoam
Case : rotatingPropeller
Nprocs : 1
Create time

Create polyMesh for time = 0

Seached : "constant/polyMesh/sets"
Found :
2
(
rotor
rotor_old
)


pointSets:
0
(
)

cellSets:
0
(
)

faceSets:
1
(
rotor
)

Writing mesh.

End

Thanks you dragos for the explanation about MRFzones, I now better understand how it works.

Regards,


Vincent
vinz is offline   Reply With Quote

Old   June 5, 2008, 08:22
Default Ok Dragos, So I deleted ev
  #12
Senior Member
 
Vincent RIVOLA
Join Date: Mar 2009
Location: France
Posts: 283
Rep Power: 18
vinz is on a distinguished road
Ok Dragos,

So I deleted everything and I get back to the start.
I just used the right cellSetDict and ran makeMesh.
Everything is going fine.

But, when I want to run the case I get this:

/*---------------------------------------------------------------------------*\
| ========= | |
| \ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \ / O peration | Version: 1.4.1 |
| \ / A nd | Web: http://www.openfoam.org |
| \/ M anipulation | |
\*---------------------------------------------------------------------------*/

Exec : MRFSimpleFoam . rotatingPropeller
Date : Jun 05 2008
Time : 12:43:20
Host : bigbrain.rtech.fr
PID : 26194
Root : /home/vincent/OpenFOAM/vincent-1.4.1/run/tutorials/MRFSimpleFoam
Case : rotatingPropeller
Nprocs : 1
Create time

Create mesh for time = 0

Reading field p

Reading field U

Reading/calculating face flux field phi

Selecting incompressible transport model Newtonian
Selecting turbulence model laminar


--> FOAM FATAL ERROR : cannot find MRF cellZone rotor

From function Foam::MRFZone::MRFZone(const fvMesh& , const dictionary&)
in file cfdTools/general/MRF/MRFZone.C at line 59.

FOAM exiting


This is the reason why earlier I copied the tutorial cellZone and changed it. But it looks like a wrong solution. What should I do from here?
vinz is offline   Reply With Quote

Old   June 5, 2008, 08:42
Default Do you have in the constant/po
  #13
Senior Member
 
dmoroian's Avatar
 
Dragos
Join Date: Mar 2009
Posts: 648
Rep Power: 20
dmoroian is on a distinguished road
Do you have in the constant/polyMesh/cellZones file an entry like this?
rotor
{
<blockquote>type cellZone;
cellLabels List<label>
....
</blockquote>


If you don't, then you did not produce the right zone.
Why do you use makeMesh utility? In your case, I think all you need is to run first cellSet and second setsToZones.

Dragos
dmoroian is offline   Reply With Quote

Old   June 5, 2008, 08:58
Default Thank you, I finally did it
  #14
Senior Member
 
Vincent RIVOLA
Join Date: Mar 2009
Location: France
Posts: 283
Rep Power: 18
vinz is on a distinguished road
Thank you,

I finally did it!
Here is what I finally did:

1)cellset . rotatingPropeller
2)setsToZones . rotatingPropeller
3)faceSet . rotatingPropeller
4)setsTozones . rotatingPropeller

And now it is running.
Really, thank you both of you for your facts answers. I'll try to post some pictures of the results.

Vincent
vinz is offline   Reply With Quote

Old   June 12, 2008, 07:17
Default Hello, Actually I am trying
  #15
New Member
 
Anand
Join Date: Mar 2009
Posts: 6
Rep Power: 17
aganesan is on a distinguished road
Hello,
Actually I am trying to run a Fluent Generated Mesh case using MRFSimpleFoam (my application is impeller in a tank with baffles very similar to mixerVessel2D but the outer cylinder's dimension is bigger than the inner one). But when I try to compile it, I am getting the following errors (very similar to the one that has been reported in this discussion forum):
/*---------------------------------------------------------------------------*\
| ========= | |
| \ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \ / O peration | Version: 1.4.1 |
| \ / A nd | Web: http://www.openfoam.org |
| \/ M anipulation | |
\*---------------------------------------------------------------------------*/

Exec : MRFSimpleFoam ./ impeller
Date : Jun 12 2008
Time : 15:43:01
Host : linux-02
PID : 18936
Root : /home/ang/OpenFOAM/ang-1.4.1/run/tutorials/MRFSimpleFoam/
Case : impeller
Nprocs : 1
Create time

Create mesh for time = 0

Reading field p

Reading field U

Reading/calculating face flux field phi

Selecting incompressible transport model Newtonian
Selecting turbulence model laminar


--> FOAM FATAL ERROR : cannot find MRF patch rotor

From function Foam::MRFZone::MRFZone(const fvMesh& , const dictionary&)
in file cfdTools/general/MRF/MRFZone.C at line 86.

FOAM exiting

Actually I tried doing cellSet (successful) and setstoZones (unsuccessful, it basically complains of the some missing file called wallcells...).
It would be great if I can get help to run this case successfully.
Thanks.

Anand
aganesan is offline   Reply With Quote

Old   October 21, 2009, 05:21
Default Help please!
  #16
Member
 
toto
Join Date: Jun 2009
Posts: 71
Rep Power: 16
ronaldo is on a distinguished road
Quote:
Originally Posted by dmoroian View Post
Hello Vincent,
Few explanatory remarks:
- name is the name of the rotating cell set. If you want, it can be the same as the rotating patch, but is not mandatory.
- action new, indeed, you create a new set of cells.
- topoSetSources, here you choose a method of selecting the cells. Probably boxToCell is the one you want, in which the set is defined by the cells contained in a rectangular box.

I hope this is helpful,
Dragos

Hi Dragos,

please use the attach picture "geometry" to explain me in more detail how to set the cellSetDict file before runing cellSet! Make please an example relevant to this case (picture)!

Thank you in advance!
(very important )
Attached Files
File Type: doc geaom.doc (67.5 KB, 160 views)
ronaldo is offline   Reply With Quote

Old   July 20, 2010, 19:18
Default Rotor Question
  #17
New Member
 
Join Date: Jul 2010
Posts: 17
Rep Power: 15
hm86 is on a distinguished road
This is just a general question about modelling rotors in openfoam. If I wanted to do just one blade and use periodic BCs, should I use the cyclic BC or the symmetryplane BC?

Thanks!
hm86 is offline   Reply With Quote

Old   July 21, 2010, 05:53
Default
  #18
Senior Member
 
Anonymous
Join Date: Mar 2009
Posts: 110
Rep Power: 17
madad2005 is on a distinguished road
Cyclic BC on the two "periodic" face zones.
madad2005 is offline   Reply With Quote

Old   July 30, 2012, 09:11
Default howToGet cellZone
  #19
Senior Member
 
sivakumar selvaraju
Join Date: Mar 2009
Location: India
Posts: 205
Rep Power: 18
sivakumar is on a distinguished road
Send a message via Skype™ to sivakumar
Hi guys,
I have a problem, i am trying to run fan using MRFSimpleFoam, I have tried the same case in simpleFoam, it was running. then I have copied the same files to MRFSimpleFoam. now my question is what are the files, I need to have to run MRFSimpleFoam and how can I get it.
Please explain me some steps,


thanks and regards,
Siva
sivakumar is offline   Reply With Quote

Old   December 1, 2016, 16:18
Default FOAM Error: cann't find MRF cellZone rotatingZone
  #20
New Member
 
N/A
Join Date: Dec 2016
Posts: 5
Rep Power: 9
GKARIMI is on a distinguished road
Hi All,

I'm dealing with the same problem in version 4.0. I use snappyHexMesh and as I see I repeated all steps that training manual (CFD Direct Training Manual, Applied CFD, C.J.Greenshields, Chicago 2016) says, still there is an error says ", Could anyone help me? Thank you in advance!
GKARIMI is offline   Reply With Quote

Reply

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
Equations in the MRFsimpleFOAM waynezw0618 OpenFOAM Running, Solving & CFD 5 May 7, 2015 05:43
MRFSimpleFoam ERROR waynezw0618 OpenFOAM Running, Solving & CFD 5 July 28, 2011 11:34
MRFSimpleFoam PropellerMixer tino_boelke OpenFOAM Running, Solving & CFD 0 December 17, 2008 11:25
MRFSimpleFoam xdanielx OpenFOAM Running, Solving & CFD 0 December 17, 2008 02:28
MRFSimpleFoam with 2 rotors tommie OpenFOAM Running, Solving & CFD 3 December 16, 2008 11:57


All times are GMT -4. The time now is 12:00.