CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Other Meshers: ICEM, Star, Ansys, Pointwise, GridPro, Ansa, ... (http://www.cfd-online.com/Forums/openfoam-meshing-other/)
-   -   help:fluent3DMeshToFoam (http://www.cfd-online.com/Forums/openfoam-meshing-other/68166-help-fluent3dmeshtofoam.html)

renyun0511 September 9, 2009 03:55

help:fluent3DMeshToFoam
 
hi all,
I'm trying to import a mesh that was generated in Gambit(in order to compare OpenFOAM with Fluent),i use the system:OpenSuse10.3,the version:of-1.5.
I'm afraid that i have some problem with the convertion of mesh,would you please give me some advice?
the step i used ware:
1).i exported a .msh file case from Gambit-2.2,then copied it under the mixerVessel2D of MRFSimpleFOAM folder:
2).ry@linux-pw3p:~/OpenFOAM/ry-1.5/tutorials/MRFSimpleFoam/voim/mixerVessel2D> dos2unix msh/voim2.msh
3).ry@linux-pw3p:~/OpenFOAM/ry-1.5/tutorials/MRFSimpleFoam/voim/mixerVessel2D> fluent3DMeshToFoam msh/voim2.msh
but I have the following error message when converting fluent 3d mesh using fluent3DMeshToFoam:

Dimension of grid: 3
Number of points: 80727
PointGroup: 1 start: 0 end: 80726. Reading points...done.
--> FOAM Warning : Found unknown block of type: "13"
--> FOAM Warning : Found unknown block of type: "13"
--> FOAM Warning : Found unknown block of type: "13"
--> FOAM Warning : Found unknown block of type: "13"
--> FOAM Warning : Found unknown block of type: "13"
--> FOAM Warning : Found unknown block of type: "13"
--> FOAM Warning : Found unknown block of type: "13"
Number of cells: 385309
CellGroup: 2 start: 0 end: 278416 type: 1
CellGroup: 3 start: 278417 end: 385308 type: 1
Zone: 2 name: rotor type: fluid. Reading zone data...done.
Zone: 3 name: stator type: fluid. Reading zone data...done.
Zone: 4 name: wall type: wall. Reading zone data...done.
Zone: 5 name: interface.4 type: interface. Reading zone data...done.
Zone: 6 name: interface.3 type: interface. Reading zone data...done.
Zone: 7 name: pressure_outlet.2 type: pressure-outlet. Reading zone data...done.
Zone: 8 name: inlet type: velocity-inlet. Reading zone data...done.
Zone: 10 name: default-interior type: interior. Reading zone data...done.

FINISHED LEXING

--> FOAM Warning :
From function boundBox::boundBox(const pointField& points)
in file meshes/boundBox/boundBox.C at line 52
Cannot find bounding box for zero sized pointField, returning zero
Creating cellZone 0 name: fluid type: fluid
#0 Foam::error::printStack(Foam:stream&) in "/home/ry/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libOpenFOAM.so"
#1 Foam::sigSegv::sigSegvHandler(int) in "/home/ry/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libOpenFOAM.so"
#2 Uninterpreted: [0xffffe420]
#3 Foam::polyTopoChange::getFaceOrder(int, Foam::List<int> const&, Foam::List<int> const&, Foam::List<int>&, Foam::List<int>&, Foam::List<int>&) const in "/home/ry/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libdynamicMesh.so"
#4 Foam::olyTopoChange::compact(bool, bool, int&, Foam::List<int>&, Foam::List<int>&) in "/home/ry/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libdynamicMesh.so"
...
#7 main in "/home/ry/OpenFOAM/OpenFOAM-1.5/applications/bin/linuxGccDPOpt/fluent3DMeshToFoam"
#8 __libc_start_main in "/lib/libc.so.6"
#9 __gxx_personality_v0 in "/home/ry/OpenFOAM/OpenFOAM-1.5/applications/bin/linuxGccDPOpt/fluent3DMeshToFoam"
段错误
what can i do ?
thanks in advance!
regards,
jennifer

bigphil November 4, 2009 08:12

Hi Jennifer,

You don't need to 'dos2unix' the mesh file.
Just use 'fluentMeshToFoam' on the mesh file exported from Gambit.

Hope it helps,
Philip

renyun0511 November 4, 2009 21:03

Quote:

Originally Posted by bigphil (Post 235074)
Hi Jennifer,

You don't need to 'dos2unix' the mesh file.
Just use 'fluentMeshToFoam' on the mesh file exported from Gambit.

Hope it helps,
Philip

Thanks! Is there any difference beteewn FluentMeshToFoam and Fluent3DMeshToFoam?

bigphil November 5, 2009 06:36

Jennifer,

There must be a difference between 'fluentMeshToFoam' and 'fluent3DMeshToFoam', but I don't know what it is.

I usually use 'fluentMeshToFoam' and it works fine for 3D geometry, or I use 'gambitToFoam'. 'gambitToFoam' takes a Gambit neutral mesh type '.neu' and converts it to OpenFOAM, so that works too.

But you must define your boundary patches in Gambit prior to exporting, then you can change their type once they are in OpenFOAM in the './constant/polyMesh/boundary' file.


Philip

vishal May 20, 2010 12:39

Quote:

Originally Posted by bigphil (Post 235180)
Jennifer,

There must be a difference between 'fluentMeshToFoam' and 'fluent3DMeshToFoam', but I don't know what it is.

I usually use 'fluentMeshToFoam' and it works fine for 3D geometry, or I use 'gambitToFoam'. 'gambitToFoam' takes a Gambit neutral mesh type '.neu' and converts it to OpenFOAM, so that works too.

But you must define your boundary patches in Gambit prior to exporting, then you can change their type once they are in OpenFOAM in the './constant/polyMesh/boundary' file.


Philip

I guess fluent3DMeshtoFoam wworks better for tetrahedral elements..... as for me fluentMeshtoFoam was not working however other worked prity well........!!!

renyun0511 May 21, 2010 06:22

hi vishal,
thank you for your reply,and i have resoled the problem. and i still thank you very much.
the problem is my error mesh file,after i changed it .and it works OK!

farhagim May 31, 2010 16:10

Hello guys,

I have very simple question. I dont know how to convert the values for the mesh to meter after importing from fluent. as far as i know, for the mesh which is created by OF, we have to do it in blockmeshdic. but how can we convert it to meter or.. when we import the mesh from fluent???


Thanks,

Mehran
Quote:

Originally Posted by renyun0511 (Post 259695)
hi vishal,
thank you for your reply,and i have resoled the problem. and i still thank you very much.
the problem is my error mesh file,after i changed it .and it works OK!


bigphil June 1, 2010 05:29

Mehran,

The mesh can be scaled when converting with fluentMeshToFoam using the scale option.

ie
fluentMeshToFoam YOURMESH.msh -scale 1000

where 1000 is the scaling factor in this example, and YOURMESH.msh is your mesh.


Or
if you already have your mesh in OpenFOAM, the transformPoints command can be used to scale the mesh:

transformPoints -scale "(1000 1000 1000)"

this command allows the mesh to be scaled differently in the x, y and z directions.


Hope it helps,
Philip C

renyun0511 June 1, 2010 19:51

Quote:

Originally Posted by farhagim (Post 261064)
Hello guys,

I have very simple question. I dont know how to convert the values for the mesh to meter after importing from fluent. as far as i know, for the mesh which is created by OF, we have to do it in blockmeshdic. but how can we convert it to meter or.. when we import the mesh from fluent???


Thanks,

Mehran

hi Mehran
you just input"transformPoints -scale "(0.001 0.001 0.001)""under your root case,then you can see the value which in the file boudary/polymesh/sets/points convert into meter
Good luck
jennifer

farhagim June 2, 2010 12:54

Thanks Philip &Jennifer

Quote:

Originally Posted by renyun0511 (Post 261272)
hi Mehran
you just input"transformPoints -scale "(0.001 0.001 0.001)""under your root case,then you can see the value which in the file boudary/polymesh/sets/points convert into meter
Good luck
jennifer


vishal July 29, 2010 05:31

Hi,

i am trying to convert a mesh using following and i am facing following error fo both Fluent3DMeshToFoam and FluentMeshToFoam do some know what can be the remidy......!!!

transsolar@linux-u5tz:~/OpenFOAM/run/meshFiles/cavity> fluent3DMeshToFoam WK_Modell_Konf_mit_Hochhaus_endg_Druckbohrungen_me shed_1-05~3.msh
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
Build : 1.6-53b7f692aa41
Exec : fluent3DMeshToFoam WK_Modell_Konf_mit_Hochhaus_endg_Druckbohrungen_me shed_1-05~3.msh
Date : Jul 29 2010
Time : 11:28:44
Host : linux-u5tz
PID : 4493
Case : /home/transsolar/OpenFOAM/run/meshFiles/cavity
nProcs : 1
SigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).

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

Header: "TGrid 3D 5.0.6"
Dimension of grid: 3
Number of points: 1907883
Number of faces: 9120079
Number of cells: 3616970
--> FOAM Warning : Found unknown block of type: "3010"
on line 9


Do not understand characters:
on line 10

From function fluentMeshToFoam::lexer
in file fluent3DMeshToFoam.L at line 747.

FOAM exiting

transsolar@linux-u5tz:~/OpenFOAM/run/meshFiles/cavity>

================================================== ==============

transsolar@linux-u5tz:~/OpenFOAM/run/meshFiles/cavity> fluentMeshToFoam WK_Modell_Konf_mit_Hochhaus_endg_Druckbohrungen_me shed_1-05~3.msh
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
Build : 1.6-53b7f692aa41
Exec : fluentMeshToFoam WK_Modell_Konf_mit_Hochhaus_endg_Druckbohrungen_me shed_1-05~3.msh
Date : Jul 29 2010
Time : 11:31:31
Host : linux-u5tz
PID : 4517
Case : /home/transsolar/OpenFOAM/run/meshFiles/cavity
nProcs : 1
SigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).

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

Reading header: "TGrid 3D 5.0.6"
Found unknown block:(4
Embedded blocks in comment or unknown: (
Found end of section in unknown:)
Found end of section in unknown:)
Dimension of grid: 3
Number of points: 1907883

number of faces: 9120079
Number of cells: 3616970
Found unknown block:(3010
Embedded blocks in comment or unknown: (
Found end of section in unknown:)
Embedded blocks in comment or unknown:
(
���Embedded blocks in comment or unknown:(
�@�ۆ�Embedded blocks in comment or unknown:@�
Found end of section in unknown:�
�����@��@��▒Embedded blocks in comment or unknown:@�
���,@�}��@]��Found end of section in unknown:�
(�+�
@��Embedded blocks in comment or unknown:��
Embedded blocks in comment or unknown:��
��Found end of section in unknown:$
,@Embedded blocks in comment or unknown:��
Found end of section in unknown:�
@��@Embedded blocks in comment or unknown:�


Illegal hex digit: '�'

file: IStringStream.sourceFile at line 0.

From function readHexLabel(ISstream&)
in file db/IOstreams/Sstreams/readHexLabel.C at line 54.

FOAM exiting




please help me in this regard......... thanks in advance

bigphil July 29, 2010 05:44

Hi Vishal,


Was your ".msh" file created in fluent/gambit?

I notice
Quote:

Originally Posted by vishal (Post 269321)
Header: "TGrid 3D 5.0.6"

which looks to me that your mesh was created in TGrid and is in some TGrid format,
hence fluentMeshToFoam will not work.

If your mesh was created in TGrid, then maybe TGrid can export as a fluent mesh or a gambit mesh, I have not used TGrid so I don't know.

Best Regards,
Philip

bastil July 29, 2010 05:55

Quote:

Originally Posted by bigphil (Post 269323)
I notice
which looks to me that your mesh was created in TGrid and is in some TGrid format,
hence fluentMeshToFoam will not work.

Fluent3DMeshToFoam works with msh-Files saved in TGrid 5.0.6 - definitely.
You should use file -> write case in TGrid and check "Save as Polyhedra" and uncheck "save as binary" so you will get a ASCII msh-File (even though it might have the ending .cas) with polyhedral cells. This will work with fluent3DMeshToFoam. I guess you did not save it in ASCII format.

Regards Bastian

bigphil July 29, 2010 06:03

Quote:

Originally Posted by bastil (Post 269325)
Fluent3DMeshToFoam works with msh-Files saved in TGrid 5.0.6 - definitely.

Sorry, I didn't realise, thanks for correcting me.

Philip

vishal August 5, 2010 04:23

Thanks,

for your valuable inputs......!!!

@Bastil and Bigphil: - It worked as bastil told....!!!


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