CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Meshing & Mesh Conversion (https://www.cfd-online.com/Forums/openfoam-meshing/)
-   -   [Commercial meshers] Fluent3DMeshtoFoam (https://www.cfd-online.com/Forums/openfoam-meshing/61698-fluent3dmeshtofoam.html)

r2d2 September 25, 2007 05:32

Fluent3DMeshtoFoam
 
Hi ,
My question is about the fact that the newly implemented fluent3DMeshToFoam does not write sets anymore. I need that in order to set some properties to sets with the setFieldByCellSet...
I see that it writes out cellZones, though. What is the difference between a cellZone and a cellSet and what would be the correct syntax for setting a value of some (scalar) field on that cellZone? I mean, to do the same thing as in setFieldsByCellSet.
Thanx,
Radu

lr103476 September 25, 2007 05:38

I had the same problem with th
 
I had the same problem with the fluentMeshToFoam utility. I just compiled the old utility using the new OF-1.4.1.....now it writes sets again....

Regards, Frank

mattijs September 25, 2007 13:50

You can fairly easily convert
 
You can fairly easily convert a zone to a set and vice versa.

setsToZones will convert sets to zones.

cellSet with 'zoneToCell' converts a cellZone into a cellSet

r2d2 September 26, 2007 03:46

Thank you Mattijs for your sug
 
Thank you Mattijs for your suggestions. Will look into it.
Cheers,
Radu

dmoroian February 7, 2008 04:35

Can anyone explain what is the
 
Can anyone explain what is the conceptual difference between cellSets and cellZones? Why are they both necessary?

Dragos

r2d2 February 7, 2008 04:47

I might not be the most approp
 
I might not be the most appropriate person to answer the first part but for the second question, I guess that one does not need them both. Unless you want to use some "old" tools like the aforementioned setFiedlbyCellSet or foamToVTK that does not use Zones (or it did not use zones when I used it) but Sets.
Radu

eugene February 7, 2008 05:08

The difference is historical i
 
The difference is historical in origin and maintained due to inertia. Ideally there should be only one very flexible element grouping construct.

Zones are supported by mesh topo change engines, sets are not. As Radu mentioned, sets are older and used in many utilities including cellSet, pointSet, faceSet, setSet, foamToVTK and a few more.

dmoroian February 7, 2008 05:26

Thanks both of you for the exp
 
Thanks both of you for the explanations. Can you add something about regions? Are they different from zones or sets?

Dragos

eugene February 7, 2008 06:51

Regions are the seeds of a mul
 
Regions are the seeds of a multi-mesh system. They don't do much at present.

danielle March 12, 2008 18:31

Hi , The fluent3DMeshToFoam
 
Hi ,
The fluent3DMeshToFoam does not write faceZones. I need that in order to use the MRF (impeller and zone MRF).
How can I get the faceZones?
Thanks a lot.

plmauk March 13, 2008 03:29

Hi, Danielle, You need first
 
Hi, Danielle,
You need first faceSets, using faceSets you can
make faceZones (setsToZones).

Paul.

danielle March 14, 2008 11:38

Thank you for your answer Paul
 
Thank you for your answer Paul,
I have tree zones. and I should have the zone_MRF in faceCells.
I make this steps:
1) flunet3DMeshToFoam . case3dMRF
2) in faceSetDict I make the name of zone zone_MRF and action new
3) faceSet . Test_zones
4) to create zone_MRFCells file I make in cellSetDict
name zone_MRFCells;
action new;
zoneToCell
{
name zone_MRF;
}

5) cellSet . Test_zones
6)setsToZones . Test_zones

My first question is:
is that the right commandes to have a corresponding face of my zone_MRF is faceCells file ?

my second is:
what is the roole of flipMap?
I make -noFlipMap like option

Thank you for your precious help!

bannari March 14, 2008 15:58

Hi, the steps are exactly:
 
Hi,

the steps are exactly:

1) fluent3DMeshToFoam .. yourCase file.msh (you are in the folder yourCase)

2)copy the file cellSetDict from the case mixerVessel2D of MRFSimpleFoam to system of your case.

3)cellSet .. yourCase

4) copy the file faceSetDict_rotorFaces from the case mixerVessel2D of MRFSimpleFoam to system/faceSetDict of your case.

5)faceSet .. yourCase

6)copy the file faceSetDict_noBoundaryFaces from the case mixerVessel2D of MRFSimpleFoam to system/faceSetDict of your case.

7)faceSet .. yourCase

8)setsToZones .. yourCase -noFlipMap

Good luck

--
Rachid

waynezw0618 March 27, 2008 04:01

dear everyone, when i do the s
 
dear everyone, when i do the step 1) as BANNARI ,i can not get the mesh .for the error message is :
-->FOAM FATAL ERROR : Do not understan characters:
from function fluentMeshToFoam::lexer
in file FluentMeshToFoam.L at line 703
how can i resolve it?

r2d2 March 27, 2008 04:18

You must have some unrecognise
 
You must have some unrecognised character in the .msh file. Check fluentMeshToFoam.L to see what is accepted and what not.
Radu

caw March 27, 2008 05:31

Typpically this occurs when th
 
Typpically this occurs when the mesh was exported from a gambit running under windows.

Therefore: do a dos2unix on the mesh file before converting it with fluent3dmeshtofoam

waynezw0618 March 28, 2008 00:47

Thanks a lot i resolve it by
 
Thanks a lot i resolve it by do a dos2unix
but when i finished all steps accordig to Rachid,and running my case there is FATAL EEROR!
cannot find MRFzone cellzone ,what is the problem?
thanks!

wayne

waynezw0618 March 28, 2008 00:51

i think it may be caused by th
 
i think it may be caused by the name "rotor" in the MRFsimplefoam tut.,for too much name "rotor",cellzone name is "rotor",boundary name also "rotor",set name still "rotor",could you please give me more about that tut?

waynezw0618 March 29, 2008 08:18

Hi my case is running now,bu
 
Hi
my case is running now,but i am not quiet sure it is right,for just modify the cellzone name and some boudary name.i do not clearly understand the procedure of cellSet and faceSet.
1why should do faceset and cellset?
2what is the meannig of the both?
3when do these what changes?
4what is setTozone

waynezw0618 March 29, 2008 10:36

by the way: 5 when i just wan
 
by the way:
5 when i just want to simulate the a rotated zone like impeller without interaction with station zone do i still need to do cellSet and faceSet?

6 in object MRFZones the definition of omega omega omega [0 0 -1 0 0 0 0] ,does that mean the dimension is revolution per second? or rad/s?

wayne

plmauk March 29, 2008 18:14

Hi, cellSets and faceSets are
 
Hi,
cellSets and faceSets are a community of cells or faces. These supply certain geometrical (but not only)conditions, for example a box or a surfase inside the mesh.
You need sets, to create face- or cellZones (even MRFzone "rotor" from MRFsimpleFoam tutorial). The zones were created using setToZone-utility.

plmauk March 29, 2008 18:25

by the way, important is, that
 
by the way, important is, that the names of the zones in faceZones-list and in MRFzones-dictionary are the same. You shouldn't repeat the name of boundary "rotor", you can call they "stator", "John" or "Diana" - what ever you want...

waynezw0618 March 30, 2008 10:48

Hi thanks! but what is the "
 
Hi
thanks! but what is the "rotor" in facesetdict and cellsetdict?there are two "rotor" in both of the two file?could you tell me more?

plmauk March 30, 2008 14:49

Hi, I tell you much more abou
 
Hi,
I tell you much more about this case and its zones on monday, when I'll be on my workplace - I don't have any linux-PC at the moment.
OK?

waynezw0618 March 30, 2008 23:59

thanksa lot!
 
thanksa lot!

plmauk March 31, 2008 04:52

Hi, As promised, I tell you a
 
Hi,
As promised, I tell you about Mixer2D case.
In the constant-dictionary is a "file MRF-zones". It should declare, which part of the mesh will rotate. The name of the MRF-zone is "rotor", so we need to create a cellZone, that consists of the cells, that will rotate. To create this cellZone, we need first create cellSet.

In the mixer Vessel2D-dictionary is an Utility named makeMesh. Open it and look carefully at all the steps, that were done:

1-2 blockMesh .. mixerVessel2D - mesh is generated.
3. cellSet .. mixerVessel2D - sellSet is created using sellSet-dictionary.
Now we have cells, that should rotate, but the cellSet contains also faces, wich belong to bondary. These have to be deleted.
4-5 cp system/faceSetDict_rotorFaces system/faceSetDict faceSet .. mixerVessel2D - faceSet of boundary-faces is created using faceSetDict_rotorFaces.
6-7 cp system/faceSetDict_noBoundaryFaces system/faceSetDict faceSet .. mixerVessel2D
- boundary-Faces were deleted using faceSetDict_noBoundaryFaces.
8.setsToZones .. mixerVessel2D -noFlipMap - the cellZone is created. The name of the Zone should be the same, that the name of MRFZone.
That's the end.
Now, you can start first the makeMesh-utility and then run your MRF-case.

waynezw0618 March 31, 2008 09:44

Hi Q1: in 3 to 8 ,your aim is
 
Hi
Q1: in 3 to 8 ,your aim is to creat a "Zone" for "MRFZones",which should rotate.So is

that mean if the whole zone of the mesh is rotating,there is no need to delete these

faces,the only thing is to make the name of zone in the file MRFZone the same as in the

cellZone file? take impeller of pump for example, the boundary of hub and shroud is also

rotating,so do i still need to do the step 3 to 8 to remove the hub and shroud or not?(i

guess there is no need to delete the boundary for they do have rotating speed, or just

deleting the none rotating boundary)

Q2:you say the cellSets contains faces,i don`t understand the faces mean,are they

surface of zone makeup of lots of cell or the faces of a cell? so if it is surface of the

zone,after deleting the boundary .the remainder are cells of rotating zone and interface

between rotor and stator,is that right?

Q3:when we do cellSet and faceSet there is two "rotor", one in cellZones("A"),the

other in boundary("B"),when we do cellSet there is the 3rd--in "set"("C"). so i

guess in the cellSetDict:

// Name of set to operate on
name rotor; this one is "C",which will be created after cellSet

// 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 this one is "A" ,which is the

utility
cellSet will convert from cellZone to cellset
}

);

And in thefaceSetDict_rotor:
// Name of set to operate on
name rotor; this one is "C",which has been created before


// 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; what is the rotor refer to?"B"? the boundary one?
option all; // All faces of cells
}
);

waynezw0618 March 31, 2008 10:48

by the way Q4: according to
 
by the way
Q4: according to Q2,if we delete the boundary from cellSet ,how can i add the angular velocity to the boundary (i.e. blade,rotor,hub and shroud)
Q5: in the dynamicMeshDict
mixerFvMeshCoeffs
{
coordinateSystem
{
type cylindrical;
origin (0 0 0);
axis (0 0 1);
direction (1 0 0); what is this direction
}

rpm 10; what is this angular speed?

slider
{
inside insideSlider;
outside outsideSlider;
}
}

wayne

thanks!

plmauk March 31, 2008 11:08

Only cells belonging to MRF-Zo
 
Only cells belonging to MRF-Zone should rotate. And you specify this zone when you create cellSet and then cellZone from this cellSet.
By the way, did you run makeMesh utility befor you run the case?
You are desperate to do that, on the other way the solver can't find MRF-Zones.

waynezw0618 March 31, 2008 11:16

i can run that case ,but i wa
 
i can run that case ,but i want to do my case-- a centrifugal pump impeller,so could you please give me help about the question above?

plmauk March 31, 2008 11:24

yuo don't need the dynamicMesh
 
yuo don't need the dynamicMeshDict, and you can delete it. You don't solve any moving meshes using MRFSimpleFoam. The required dictionary is the MRFZonesDictionary.

plmauk March 31, 2008 12:01

After you succesfully converte
 
After you succesfully converted the mesh using fluent3DMeshToFoam, you need first need specify a part of the mesh, that should rotate. This happens with help of a sellSetDict. this one is not the same dictionary, that is located at the system directory. You have to create it youself. For example, as a rotating box. Possible sellSetDict. were:


name Mixer;

action new;

topoSetSources
(
boxToCell
{
box (-25 -7.5 -35) (25 7.5 35);
}
);

this one is from my own case.
After you made the cellSet, you have to create a cellZone from this cellSet:

setsToZones root case -cellSet nameOfcellSet -no flipmap.

When it'done, you can delete this cellsetDict. or replace it with this one:

// Name of set to operate on
name rotor; this one is "C",which will be created after cellSet

// 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 this one is "A" ,which is the

utility cellSet will convert from cellZone to cellset
}

You need also the faceZone, that represent the surface area of your impeller (or even of the part of the mesh, that should rotate). The faceZone for it is for Example:

arguments "/home/cfduser/kesselMRF";

name mixer;//name of the zone

action new;

topoSetSources
(
patchToFace
{
name Ruehrer;//name of boundary
}

);

Now you have to build once again a zone - not a cellZone, but a faceZone. And once again using setsToZones-command.

Now you can add two faseSetDict. from MixerVessel2D case into your system-directory. Be carefull, look after names in each Dict.
Then you should edit the makeMesh utility. Steps, that you don't need are beeng deleted.
I hope, my advices help.

waynezw0618 April 1, 2008 01:50

Hi thanks lot! i have got lot
 
Hi
thanks lot! i have got lot from you,but still questions!
Q1:do i still need to add the two faseSetDict from MixerVessel2D case into my system-directory? i think faceSetDict_rotor is to make surfaces from cellSet and faceSetDict_noboundary is deleted the boundary from sufaces which have been maked by faceSetDict_rotor .by using setsTonZones-commond after these two steps, the aim is to add some special rotate faceZones for case.so if i have had the all faceZones defined such as rotating boundary,there is no need to do these steps.is that rigt?

Q2:there is boudary correction in the MRFZones.c,but if i have rotating boundary,such as hub shround, do i still need to patch or give the angular velocity to the rotating boundary in 0-directory??

thanks!
wayne

plmauk April 1, 2008 04:34

toQ1 : my opinion is: you need
 
toQ1 : my opinion is: you need these two faceSetDict. To check that, simply try to run the case without makeMesh (and makeMesh-utility is designed for making steps defined in these faceSetDict.)
to Q2 -I don't know. I've never seen the MRFZones.c,because I had no need in that. I simply created my own case, and this case worked. That's all.
Greetings,
Paul.

waynezw0618 April 1, 2008 05:09

thanks! i mean if i need to
 
thanks!
i mean if i need to run the makemesh for my case. i have seen the makemesh file fot mixvessel2D case.
thank!

wayne

samiam1000 June 8, 2012 11:08

Dear All,

I know that it is an old conversation. I hope that someone is still following it.

Anyway, I am trying to solve this kind of problem.

I am running OpenFOAM 2.1. I have a msh mesh (built with Workbanch) and I have converted it with fluent3DMeshToFoam.

I want to simulate an opening door. And I want that a zone of my domain remains fixed. I have 2 different zones, called fixed and moving.
How can I make the fixed zone stay fixed?

Thanks,
Samuele

WernerW November 30, 2015 12:22

fluent3DMeshToFoam not writing mesh
 
Hi All,

I'm using fluent3DMeshToFoam to export a mesh to OpenFoam and the process seems to work fine but it simply doesn't save any folder with the mesh in the directory constant/region0. I'm working with a cluster and submiting this command through a submission file whose only comannd is:

fluent3DMeshToFoam nrel.msh

and the mesh: nrel.msh is located in the case folder besides 0.org, system and constant.

Does anyone know what could be the reason and the fix for it ?

Here is the output of the converter. I replaced many lines reporting the conversion of the several faceGroups and patches for "..." and the host and Case name for "###".

Quote:


Build : 2.4.0-dcea1e13ff76
Exec : fluent3DMeshToFoam nrel.msh
Date : Nov 30 2015
Time : 12:00:52
Host : ######
PID : 28590
Case : ######
nProcs : 1
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Allowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Dimension of grid: 3
Number of points: 5818249
PointGroup: 1 start: 0 end: 5818248. Reading points...done.
Number of faces: 17176189
FaceGroup: 4 start: 0 end: 5433. Reading mixed faces...done.
...
FaceGroup: 24 start: 278804 end: 17176188. Reading mixed faces...done.
Number of cells: 5678929
CellGroup: 2 start: 0 end: 3776481 type: 1
CellGroup: 3 start: 3776482 end: 5678928 type: 1
Zone: 2 name: sliding_mesh type: fluid. Reading zone data...done.
...
Zone: 24 name: default-interior type: interior. Reading zone data...done.

FINISHED LEXING

Creating patch 0 for zone: 4 name: top_walls type: wall
...
Creating patch 18 for zone: 22 name: inlet type: velocity-inlet
Creating cellZone 0 name: sliding_mesh type: fluid
Creating cellZone 1 name: farfield type: fluid
Creating faceZone 0 name: default-interior type: interior
faceZone from Fluent indices: 278804 to: 17176188 type: interior
patch 0 from Fluent indices: 0 to: 5433 type: wall
...
patch 18 from Fluent indices: 267456 to: 278803 type: velocity-inlet

Writing mesh to "/scratch/carter/w/wwahanik/WT/NREL/str/constant/region0"

End


All times are GMT -4. The time now is 15:05.