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

How to define cells which belongs to ratating patch in MRFSImpleFoam

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 6, 2008, 11:25
Default hii.. i am working on a 3D c
  #1
New Member
 
bharat varshney
Join Date: Mar 2009
Location: iit-delhi, new delhi, india
Posts: 12
Rep Power: 17
bharat is on a distinguished road
hii..
i am working on a 3D case of francis turbine (rotor+stator+draft tube). i have successfully converted the Mesh from fluent to foam. Now the problem is inside the constant/polymesh i do not have blockMeshDict file, instead of that i have separate files defining cells, faces and points.
How do i define the cells which belongs to the rotating patches ??
In Mixervessel2D case it is defined in the makeMesh file,as i dont have blockMeshDict how can i go ahead ??

regards
bharat
bharat is offline   Reply With Quote

Old   May 6, 2008, 11:35
Default Hi Bharat The process is ve
  #2
Senior Member
 
Join Date: Mar 2009
Posts: 248
Rep Power: 18
jaswi is on a distinguished road
Hi Bharat

The process is very simple if you have created your mesh in the gambit. Please let me know about your meshing software as we can take onwards from there.

Regards
Jaswinder
jaswi is offline   Reply With Quote

Old   May 6, 2008, 14:53
Default hii jaswinder The mesh was
  #3
New Member
 
bharat varshney
Join Date: Mar 2009
Location: iit-delhi, new delhi, india
Posts: 12
Rep Power: 17
bharat is on a distinguished road
hii jaswinder
The mesh was initially created in ICEM and then saved in fluent format i.e. with extension .msh
. after that it's transported in FoamX.

regards
bharat
bharat is offline   Reply With Quote

Old   May 6, 2008, 18:45
Default Hi Bharat As far as I know
  #4
Senior Member
 
Join Date: Mar 2009
Posts: 248
Rep Power: 18
jaswi is on a distinguished road
Hi Bharat

As far as I know, for the MRF appraoch to work you have to define the rotating and stationary zones and when you mesh such a geometry you have an internal surface which defines this interanl boundary between the zones.

The ICEM does not let you assign the interface between the two region as internal. It does has the BC interface but when you assign it to the internal surface, the conversion gives an error.

I wonder what BC you assigned for the thin surface dividing the two zones while saving the mesh for fluent. Please let me know as we can take on form there.

Regards
Jaswi
jaswi is offline   Reply With Quote

Old   May 7, 2008, 07:20
Default Hi, For I know, all you nee
  #5
Member
 
Kati Laakkonen
Join Date: Mar 2009
Location: Espoo, Finland
Posts: 35
Rep Power: 17
kati is on a distinguished road
Hi,

For I know, all you need from the meshing program is a Fluent type cell zone for the rotating part in the .msh file, and also ICEMCFD can create those, if I remember correctly. You might find something about it in ICEMCFD documentation.

When you have a zone for the rotating part in the Fluent mesh, fluent3DMeshToFoam converts it into OF format, and then you can use the Makemesh script to extract also faces of the rotating zone.

Regards,
Kati
kati is offline   Reply With Quote

Old   May 8, 2008, 04:22
Default Thanx Jaswi & Kati, Yesterd
  #6
New Member
 
bharat varshney
Join Date: Mar 2009
Location: iit-delhi, new delhi, india
Posts: 12
Rep Power: 17
bharat is on a distinguished road
Thanx Jaswi & Kati,
Yesterday I looked in to the ICEM and found that I have to define BC while converting mesh from ICEM to Fluent. Today I will do it and let you know the BC defined for the interface.

Regards
bharat
bharat is offline   Reply With Quote

Old   May 8, 2008, 10:49
Default hi I converted the mesh once
  #7
New Member
 
bharat varshney
Join Date: Mar 2009
Location: iit-delhi, new delhi, india
Posts: 12
Rep Power: 17
bharat is on a distinguished road
hi
I converted the mesh once again in to OpenFoam from ICEM via Fluent after defining the BC´s to the rotating blade. As the rotating blade has 6 surfaces i defined them like this:

a) interface (side 1)of rotating blade and guide vane :- wall
b) interface (side 1) of rotating blade and tripode :- wall
c) rotating blade lower surface :- wall
d) rotating blade upper surface :- wall
e) left side of blade: cyclic
f) right side of blade :- cyclic

As I am using FoamX, so i can change the BC if requires. So tell whether the BC are correct or need change ?

Also, i don´t have blockMeshDict file inside constant/polymesh. There are seperate files defining points, cellzones,faces etc.How to merge them to make a single blockMeshDict ??

Regards
bharat
bharat is offline   Reply With Quote

Old   May 8, 2008, 14:04
Default bharat, You are creating th
  #8
Member
 
Kati Laakkonen
Join Date: Mar 2009
Location: Espoo, Finland
Posts: 35
Rep Power: 17
kati is on a distinguished road
bharat,

You are creating the mesh with Icem, not with blockMesh. You don't need blockMeshDict, which includes instructions for blockMesh to create the mesh files. You already have the necessary mesh files.

I didn't mean that you need interfaces in the Fluent mesh. Internal "boundaries" i.e. internal 2D surfaces that Fluent can use for postprocessing, porous jumps etc. create problems in OpenFoam. What you need is zone of cells. Those are the cells in which MRF models solves flow equations with the rotational acceleration terms. I don't remember how IcemCFD creates them for Fluent. It was something with naming the volumes...

Regards,
Kati
kati is offline   Reply With Quote

Old   May 9, 2008, 06:19
Default Thanks kati, It means I hav
  #9
New Member
 
bharat varshney
Join Date: Mar 2009
Location: iit-delhi, new delhi, india
Posts: 12
Rep Power: 17
bharat is on a distinguished road
Thanks kati,
It means I have all the required mesh files with me. For defining the cell zones related to rotating blade, I added a file named MRFZones inside the constant folder and there I defined the zones which have cells belonging to rotating zone, like this

1
(
BB
{ patches (BB INT-BO-SIDE-1 INT-BT-SIDE-1 PER-B-SIDE-1 PER-B-SIDE-2 SB-E SB-I VB_DEFAULT);
origin origin [0 1 0 0 0 0 0] (0 0 0);
axis axis [0 0 0 0 0 0 0 ] (0 0 -1);
omega omega [0 0 -1 0 0 0 0] 19.625;
}
)

Tell me will it work now or not?
Also, tell me about makeMesh file. Is it necessary for running the simulation? or I can run the simulation directly without it.

Regards
bharat
bharat is offline   Reply With Quote

Old   May 9, 2008, 07:33
Default Hi Bharat I am a bit busy t
  #10
Senior Member
 
Join Date: Mar 2009
Posts: 248
Rep Power: 18
jaswi is on a distinguished road
Hi Bharat

I am a bit busy today, Please wait until tomorrow, I will send you all the details and the explanation to the makeMesh file.

Perhaps you know that its just a script file and executes a number of steps to get the cellzones and face zones you need for the successful execution of the MRF solver.

Regards
Jaswinder

PS: It will be nice if you could post a couple of pictures of your geometry as then we can talk refering to it directly. The whole setup is very simple and easy to understand.
jaswi is offline   Reply With Quote

Old   May 9, 2008, 07:36
Default You'll need to run the makeMes
  #11
Member
 
Kati Laakkonen
Join Date: Mar 2009
Location: Espoo, Finland
Posts: 35
Rep Power: 17
kati is on a distinguished road
You'll need to run the makeMesh script before it works. Read it and modify accordingly. It runs a few utilities that form face zones based on the cell zone that you already have. You'll need to change of course the case name in the script, and then the rotating zone name in the dictionaries, which you should copy from the MRFSimpleFoam tutorial.

Good luck,
Kati
kati is offline   Reply With Quote

Old   May 13, 2008, 05:32
Default Thanx jaswi nd kati, Inside
  #12
New Member
 
bharat varshney
Join Date: Mar 2009
Location: iit-delhi, new delhi, india
Posts: 12
Rep Power: 17
bharat is on a distinguished road
Thanx jaswi nd kati,
Inside the polymesh folder, I have 9 files. Among which pointzones and facezones files are empty, rest all ( points , faces, cellzones, neighbour, owner, boundary) have values inside them.
Tell me how to run the makeMesh file to get the cellzones and facezones require for the MRFSimpleFoam ? I am not good with the Linux so tell me the proper commands nedded. I copied the makeMesh file from tutorial to my case and also I changed the case name in it.
I think I am very near to run my case successfully.

Regards
bharat
bharat is offline   Reply With Quote

Old   May 13, 2008, 10:21
Default Hi Bharat Sorry for the del
  #13
Senior Member
 
Join Date: Mar 2009
Posts: 248
Rep Power: 18
jaswi is on a distinguished road
Hi Bharat

Sorry for the delay. Below given is the description of makeMesh upto my understanding. it might have mistake and I hope forum experts will correct me if its wrong.

Provided you have the correct cellZone corresponding to your rotating domain, your makeMesh shall look like this:

(Note:replace mixerVessel2D with your case name everywhere.)
---------------------------------------------
cellSet .. mixerVessel2D
cp system/faceSetDict_rotorFaces system/faceSetDict
faceSet .. mixerVessel2D
cp system/faceSetDict_noBoundaryFaces system/faceSetDict
faceSet .. mixerVessel2D
setsToZones .. mixerVessel2D -noFlipMap

---------------
Now lets take a quick look what all these commands do. Its all very logical and easy....

1)cellSet .. mixerVessel2D

creates a cell set according to the definition given in the cellSetDict (this file lives in <case>/system). now the cellSetDict given for the mixerVessel2D has the following in it:

-----------------------------------
// Name of set to operate on
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
zoneToCell
{
name rotor; // name of cellZone
}

);
-------------------------
It says that create a cellSet (action new;) called
rotor (name rotor;) from a topological source. The source can be set by calling topoSetSources(). The argument which is passed to the topoSetSources() is the cellZone called rotor (name rotor;) hence the code

zoneToCell
{
name rotor; // name of cellZone
}

At the successfull execution of this step one will get a cellSet called rotor in the directory /polyMesh/sets

2)faceSet .. mixerVessel2D

This creates a face set according to the definition given in the faceSetDict (this file lives in <case>/system). One can clearly observe the analogy with the cellSet command and cellSetDict.

Now the faceSet creation for the rotor is a two step process.

2.1) create a face set corresponding to the cellSet rotor (created in step 1). Thus the faceSetDict for this step should look like this:

+++++++++++++++++++++++++++++++++++++
// Name of set to operate on
name rotor;

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

// Actions to apply to pointSet. These are all the topoSetSource's ending
// in ..ToFace (see the meshTools library).
topoSetSources
(
// Select based on cellSet
cellToFace
{
set rotor;
option all; // All faces of cells
}
);
++++++++++++++++++++++++++++++++++++++++++++++++++
One can see that its structure is similar to cellSetDict i.e. create a face set from a topological source which in this case is a cellSet named rotor. The "option all" implies that the created faceSet has all the faces of the cells in cellSet rotor

2.2) remove the faces corresponding to the boundary faces from the faceSet created in the step 2.1). and the faceSetDict for this step should look like this:
+++++++++++++++++
// Name of set to operate on
name rotor;

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

// Actions to apply to pointSet. These are all the topoSetSource's ending
// in ..ToFace (see the meshTools library).
topoSetSources
(
// Select boundary faces
boundaryToFace
{
}
);
++++++++++++++++++++++++
Now this faceSetDict says that delete the faces corresponding to the boundary, from the existing faceSet rotor and the topological source for this operation is the faceSet created in the previous step.

3)setsToZones .. mixerVessel2D -noFlipMap

the last command create the faceZone from the faceSet created in the step 2.2. what does the switch -noFlipMap does is not clear to me yet but no using it throws up error so use it.


Now if you still wonder what does this statement does :-) :
cp system/faceSetDict_noBoundaryFaces system/faceSetDict

then it should be clear by now.

I encourage you to try the easy step from the console. If at the end you still wonder whether you have the correct faceSet then you can use the following to visualize the set in paraFoam

foamToVTK root case -faceSet rotor

This will create a folder VTK and in there it saves your cellset rotor in VTK format which you can see with paraFOAM

I hope that you will now be able to execute the script and if required modify it to suit your needs.

Regards
Jaswi

P.S: For a detailed list of options for the topoSetSources() look in the sample cellSet, face set, pointSet dictionaries given in the

mesh/manipulation/cellSet
mesh/manipulation/faceSet
mesh/manipulation/poinTSet
jaswi is offline   Reply With Quote

Old   May 14, 2008, 06:07
Default hii.. Thanx jaswi, your matt
  #14
New Member
 
bharat varshney
Join Date: Mar 2009
Location: iit-delhi, new delhi, india
Posts: 12
Rep Power: 17
bharat is on a distinguished road
hii..
Thanx jaswi, your matter is a great help for me. I tried with the comands given by you. It worked well till second comand and created the folder constant/sets with the rotating zone file which is having all cells related to rotating zones in it.

But when a applied the third comand i.e.

setsToZones .. Turbine2-noFlipMap ,

it gave me error

FOAM FATAL ERRORS: setsToZones: cannnot open case directory "../Turbine2-noFlipMap"
FOAM exiting

what could be the reason for this error ?? how do i eliminate this.

regards
bharat v
bharat is offline   Reply With Quote

Old   May 14, 2008, 08:12
Default Hi Bharat You are missing t
  #15
Senior Member
 
Join Date: Mar 2009
Posts: 248
Rep Power: 18
jaswi is on a distinguished road
Hi Bharat

You are missing the space before -noFlipMap

setsToZones .. mixerVessel2D -noFlipMap

Regards
Jaswi

PS: if you please take a look at the error message, its self explanatory :-)
jaswi is offline   Reply With Quote

Old   May 14, 2008, 09:08
Default hi jaswi, Thanx again, its
  #16
New Member
 
bharat varshney
Join Date: Mar 2009
Location: iit-delhi, new delhi, india
Posts: 12
Rep Power: 17
bharat is on a distinguished road
hi jaswi,
Thanx again, its working now
So,finally my makeMesh file is ready. shall i run it now ??
Now, can I run it by using FoamX ?? or by using console only.

Regards
bharat
bharat is offline   Reply With Quote

Old   May 14, 2008, 09:16
Default Hi Bharat, Try to folow visua
  #17
Senior Member
 
dmoroian's Avatar
 
Dragos
Join Date: Mar 2009
Posts: 648
Rep Power: 20
dmoroian is on a distinguished road
Hi Bharat,
Try to folow visualy the 9 steps presented in this tutorial: MRFSimpleFoam Tutorial. The tutorial is using Gambit, but it seems to be similar in ICEM, too.
It is always a good idea to start with the simplest case and then go to a more complex one.

Dragos
dmoroian is offline   Reply With Quote

Old   May 14, 2008, 09:37
Default Hi Bharat I repeat again:
  #18
Senior Member
 
Join Date: Mar 2009
Posts: 248
Rep Power: 18
jaswi is on a distinguished road
Hi Bharat

I repeat again:

makeMesh is a script which does everything for the mixerVessel2D.

Provided your case has the neccessary
cellSetDict and faceSetDict in the system folder, edit the makeMesh(replace mixerVessel2D with your case name), it will do the job for you.

Now in you case you have done each of the individual steps (listed in makeMesh) from console so there is no need to execute the makeMesh anymore. You can run your case now as usual. Try to be more console oriented as FoamX will not help you in long run and that is just my opinion.

Also go through the tutorial Dragos mentioned in the previous post. it shows how easy it really is to rum such problems if you access to Gambit as fluentMeshToFoam does all the work during conversion and writes the required zones.

wish you a successful run

Jaswi
jaswi is offline   Reply With Quote

Old   May 19, 2008, 05:36
Default Thanx a lot Dragos, for your s
  #19
New Member
 
bharat varshney
Join Date: Mar 2009
Location: iit-delhi, new delhi, india
Posts: 12
Rep Power: 17
bharat is on a distinguished road
Thanx a lot Dragos, for your simple tutorial and Jaswi for your all info about makemesh script.
sorry for the late reply. finally i run my simulation but i got lots of error. In last 3-4 days, I removed most of them and now left with one. I suppose this error is very simple but still I am not getting it. Its as follows:

Exec : MRFSimpleFoam ./ Turbine2
Date : May 13 2008
Time : 06:08:31
Host : localhost
PID : 22439
Root : /home/caelinux/
Case : Turbine2
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 kEpsilon


--> FOAM FATAL IO ERROR : wrong token type - expected word found on line 34 the punctuation token ')'

file: /home/caelinux//Turbine2/constant/MRFZones at line 34.

From function operator>>(Istream&, word&)
in file primitives/strings/word/wordIO.C at line 60.

FOAM exiting


and my file written for constant/MRFZones is like this :

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

FoamFile
{
version 2.0;
format ascii;

root "/home/caelinux";
case "Turbine2";
instance "system";
local "";

class dictionary;
object MRFZones;
}

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

8
(
VB
{
patches (BB INT-BO-SIDE-1 INT-BT-SIDE-1 PER-B-SIDE-1 PER-B-SIDE-2 SB-E SB-I VB-DEFAULT);
origin origin [0 1 0 0 0 0 0] (0 0 0);
axis axis [0 0 0 0 0 0 0] (0 0 -1);
omega omega [0 0 -1 0 0 0 0] 19.625;
}
)


please help me out with this problem.


regards
bharat
bharat is offline   Reply With Quote

Old   May 19, 2008, 09:44
Default Hi Bharat Frankly speaking,
  #20
Senior Member
 
Join Date: Mar 2009
Posts: 248
Rep Power: 18
jaswi is on a distinguished road
Hi Bharat

Frankly speaking, I have no clue why this error is showing up. In my opinion the error message indicates that it is looking for a word instead of the closing bracket ")" in the MRFZones dict.

My guess is that as you have more than 1 patch, it might be looking for another word for rest of the patches. But as I said before I have no idea why that error is there except that it leaves me scratching my head :-(.

Let me know if you find out the solution.

Regards
Jaswi
jaswi 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
MRFSimpleFoam command to run shyam OpenFOAM Running, Solving & CFD 2 February 5, 2009 05:38
MRFSimpleFoam xdanielx OpenFOAM Running, Solving & CFD 0 December 17, 2008 01:28
How to define a patch group number in pre-process? jacky CFX 4 December 19, 2002 04:31
How to define a patch group number in pre-process? jacky CFX 0 December 19, 2002 02:46
Define a zone to patch Maurizio Barbato FLUENT 1 October 13, 2000 00:10


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