CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Other Meshers: ICEM, Star, Ansys, Pointwise, GridPro, Ansa, ...

converting Fluent mesh to openfoam standard mesh

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

Like Tree2Likes
  • 1 Post By riesotto
  • 1 Post By riesotto

Reply
 
LinkBack Thread Tools Display Modes
Old   February 17, 2012, 15:18
Default converting Fluent mesh to openfoam standard mesh
  #1
New Member
 
deepesh
Join Date: Oct 2010
Location: Derby UK
Posts: 4
Rep Power: 6
deepesh is on a distinguished road
Dear All

I tried to convert the Fluent and Gambit mesh to the openfoam mesh using the standard command

gambitToFoam mesh.msh
fluentMeshToFoam mesh.msh

in both the cases, I got the following error

.................................................. ............
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / 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 : gambitToFoam car.msh
Date : Feb 17 2012
Time : 19:08:08
Host : "ubuntu"
PID : 16704
Case : /root/OpenFOAM/FOAM_RUN/Derby_calc/car_calc/constant/polymesh
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



--> FOAM FATAL IO ERROR:
cannot find file

file: /root/OpenFOAM/FOAM_RUN/Derby_calc/car_calc/constant/polymesh/system/controlDict at line 0.

From function regIOobject::readStream()
in file db/regIOobject/regIOobjectRead.C at line 73.

FOAM exiting
.................................................. ......


Any idea please?

Thanks in advance

-Deepesh
deepesh is offline   Reply With Quote

Old   February 17, 2012, 15:25
Default
  #2
New Member
 
deepesh
Join Date: Oct 2010
Location: Derby UK
Posts: 4
Rep Power: 6
deepesh is on a distinguished road
Do we ideally need to have controlDict to convert?
deepesh is offline   Reply With Quote

Old   February 17, 2012, 15:48
Default
  #3
Senior Member
 
mturcios777's Avatar
 
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 725
Rep Power: 18
mturcios777 will become famous soon enough
You should run the command from the case root, i.e., the folder where the constant, and system directories are. You'll still need to specify the filenames of your source meshes. You may run into other problems later, but the error you are experiencing is related to where the command should be executed. In general, all OF commands are run from the root of the case directory.

Its always a good idea to run a command with --help if you are having trouble figuring out all the options and arguments.
mturcios777 is offline   Reply With Quote

Old   February 17, 2012, 17:02
Default
  #4
New Member
 
m9819348's Avatar
 
Ries Bouwman
Join Date: Mar 2009
Location: Graz, Austria
Posts: 28
Rep Power: 8
m9819348 is on a distinguished road
Send a message via Skype™ to m9819348
Indeed! Great advice.

Also, when converting .msh files I have good experiences with fluent3DMeshToFoam.


I don't think gambitToFoam will do the trick.
m9819348 is offline   Reply With Quote

Old   February 18, 2012, 03:26
Default
  #5
New Member
 
Florian
Join Date: Jan 2011
Location: Mannheim, Germany
Posts: 24
Rep Power: 6
riesotto is on a distinguished road
hi deepesh,
like mturcios777 wrote, you have to run the command in the case folder. For example for a grid "pipe.msh" go to the folder "/Pipe" and give the commands:

fluentMeshToFoam pipe.msh -writeSets -writeZones
// this command convert the msh-file into OF

transformPoints "(0.001 0.001 0.001)"
//with this command you convert your mesh from meter into mm

then you have to adapt the boundarys to the new mesh. For example if you signify the inlet boundary in Gambit with the name inflow1. Then you have to change all the files in the folder /0 (U,p ...).

for example for U:
...
boundaryField
{
wall
{
type fixedValue;
value uniform (0 0 0);
}
inflow1
{
type fixedValue;
value uniform (1 0 0);
}
outlet
{
type zeroGradient;
}

Then it should work.

kind regards
Florian
Ivy Zhou likes this.
riesotto is offline   Reply With Quote

Old   February 18, 2012, 04:25
Default
  #6
New Member
 
m9819348's Avatar
 
Ries Bouwman
Join Date: Mar 2009
Location: Graz, Austria
Posts: 28
Rep Power: 8
m9819348 is on a distinguished road
Send a message via Skype™ to m9819348
Again some great advice!

One last comment: if the scaling from m to mm is uniform in all directions, you can also add:
"- scale 0.001" to the fluentMeshToFoam command.
__________________
Dr. Ries Bouwman
Business Development
ESI Group

004369917171525
@riesbouwman
m9819348 is offline   Reply With Quote

Old   February 18, 2012, 05:06
Default
  #7
New Member
 
Florian
Join Date: Jan 2011
Location: Mannheim, Germany
Posts: 24
Rep Power: 6
riesotto is on a distinguished road
Hi m9819348,

I will check this command as well.

We have the same name

kind regards, Viele Gre
Florian Ries
m9819348 likes this.
riesotto is offline   Reply With Quote

Old   February 18, 2012, 05:14
Default
  #8
New Member
 
m9819348's Avatar
 
Ries Bouwman
Join Date: Mar 2009
Location: Graz, Austria
Posts: 28
Rep Power: 8
m9819348 is on a distinguished road
Send a message via Skype™ to m9819348
Be it that Ries is your last name and mine is my first... :-)
m9819348 is offline   Reply With Quote

Old   February 18, 2012, 07:15
Default
  #9
New Member
 
deepesh
Join Date: Oct 2010
Location: Derby UK
Posts: 4
Rep Power: 6
deepesh is on a distinguished road
Dear all,


Thanks a lot for your help. Valuable suggestions indeed..

the presence of the file 'controlDict' is inevitable to have the mesh conversion command worked and as you pointed out, it does matter where u run the command from.
The -help option while executing a command is really worthwhile.
deepesh is offline   Reply With Quote

Old   February 19, 2012, 14:22
Default
  #10
New Member
 
m9819348's Avatar
 
Ries Bouwman
Join Date: Mar 2009
Location: Graz, Austria
Posts: 28
Rep Power: 8
m9819348 is on a distinguished road
Send a message via Skype™ to m9819348
So you got to solve the issue?
__________________
Dr. Ries Bouwman
Business Development
ESI Group

004369917171525
@riesbouwman
m9819348 is offline   Reply With Quote

Old   February 19, 2012, 14:37
Default
  #11
New Member
 
deepesh
Join Date: Oct 2010
Location: Derby UK
Posts: 4
Rep Power: 6
deepesh is on a distinguished road
Indeed! thankyou
deepesh is offline   Reply With Quote

Old   March 13, 2012, 06:38
Question Problem converting Fluent mesh generated by AnsysWorkbenchV14 to OpenFoam
  #12
New Member
 
Zinedine
Join Date: Sep 2010
Posts: 11
Rep Power: 6
Zinedine is on a distinguished road
Hi,

I have been reading with great interest the various issues regarding converting Fuent mesh to OpenFoam.
It seems that I am encountering a problem while attempting converting a mesh generated by Anasys Workbench V14 to OpenFoam.
I have been trying the various tools with no success.

Here is an output from:
Code:
fluentMeshToFoam Pipe.msh -writeSets -writeZones -scale 0.001
 
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.7.1 |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
Build : 1.7.1-03e7e056c215
Exec : fluentMeshToFoam Pipe.msh -writeSets -writeZones -scale 0.001
Date : Mar 12 2012
Time : 11:02:09
Host : abax2.leeds.ac.uk
PID : 28809
Case : /home/abax2_a/menzk/OpenFOAM/menzk-1.7.1/run/GT_valve
nProcs : 1
SigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time
Found unknown block4
Embedded blocks in comment or unknown: (
Found end of section in 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
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
Found end of section in unknown
Embedded blocks in comment or unknown: (
Embedded blocks in comment or unknown
Found end of section in 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
Found end of section in unknown
Dimension of grid: 3
Number of points: 521922
number of faces: 5820580
Number of cells: 2867149
Found unknown block3010
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:?
Found end of section in unknown:?
Embedded blocks in comment or unknown:
Found end of section in 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:
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:
Embedded blocks in comment or 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:nO?_
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:?
Found end of section in unknown:?
Embedded blocks in comment or unknown:
Found end of section in unknown:빲?J_
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:
Found end of section in unknown:!
Embedded blocks in comment or unknown:
,Found end of section in 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:
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:)
Found end of section in unknown:)
Found end of section in 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:
Found end of section in 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:
Found end of section in 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:X
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:)
Found end of section in 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:
Embedded blocks in comment or unknown:
Embedded blocks in comment or unknown:
Embedded blocks in comment or unknown:
Found end of section in unknown:
Found end of section in unknown:
Embedded blocks in comment or unknown:
Found end of section in unknown:%
Found end of section in unknown:
Found end of section in unknown:
Embedded blocks in comment or unknown:
Found end of section in unknown:?
Found end of section in unknown:?
|Found end of section in unknown:=
۷&Embedded blocks in comment or unknown:
Found end of section in unknown:
G* ?
imension of grid: 2
Embedded blocks in comment or unknown:
{Embedded blocks in comment or unknown:
Embedded blocks in comment or unknown:
Embedded blocks in comment or unknown:

Embedded blocks in comment or 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:?
\`Found end of section in 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:@
Embedded blocks in comment or unknown:
Found end of section in unknown:?
+Found end of section in unknown:<
'Embedded blocks in comment or unknown:|
Found end of section in unknown:?
{{`Found end of section in unknown:n?:_
Found end of section in unknown:>
Found end of section in unknown:#
Found end of section in unknown:?
Found end of section in unknown:
TP
Embedded blocks in comment or 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:?
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:|
Embedded blocks in comment or unknown:
Embedded blocks in comment or unknown:
Found end of section in unknown:
Found end of section in unknown:?
Found end of section in 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:s?
Embedded blocks in comment or unknown:,
Found end of section in 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:@
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:/
Found end of section in 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:
Found end of section in unknown:*
Embedded blocks in comment or unknown:
Embedded blocks in comment or unknown:
Found end of section in 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:?
Found end of section in unknown:?
Found end of section in unknown:?
;Embedded blocks in comment or unknown:
Found end of section in unknown:?
=w*Embedded blocks in comment or unknown:'
Embedded blocks in comment or unknown:[
Found end of section in unknown:
 
--> FOAM FATAL IO ERROR:
wrong token type - expected int found on line 0 the word ''
file: IStringStream.sourceFile at line 0.
From function operator>>(Istream&, int&)
in file primitives/ints/int/intIO.C at line 68.
FOAM exiting
I really dont understand the reasons why?

Regards

Z.

Last edited by wyldckat; August 16, 2013 at 11:45. Reason: Added [CODE][/CODE]
Zinedine is offline   Reply With Quote

Old   October 23, 2013, 09:17
Default
  #13
New Member
 
Ivy
Join Date: Sep 2013
Location: Singapore
Posts: 16
Rep Power: 3
Ivy Zhou is on a distinguished road
Hi, I used "fluentMeshToFoam" to convert .msh file to OpenFoam on Mac System. I ran the .msh file and the command under the root directory, where system and constant exit. I created my own constant, system, 0, polyMesh,controlDict, fvSchemes, fvSolution too.

However, I still get this Error

/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.2.1 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
Build : 2.2.1-57f3c3617a2d
Exec : fluentMeshToFoam Test11a.msh
Date : Oct 23 2013
Time : 21:15:25
Host : "Precision-T7600"
PID : 30325
Case : /home/yinghan/case/constant/polyMesh
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



--> FOAM FATAL IO ERROR:
cannot find file

file: /home/yinghan/case/constant/polyMesh/system/controlDict at line 0.

From function regIOobject::readStream()
in file db/regIOobject/regIOobjectRead.C at line 73.

FOAM exiting



Can anyone help me ?
Thanks very much

Ivy
Ivy Zhou is offline   Reply With Quote

Old   October 23, 2013, 09:32
Default
  #14
Senior Member
 
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 12
Bernhard is on a distinguished road
Did you even read the topic?
Bernhard is offline   Reply With Quote

Old   October 23, 2013, 09:36
Default
  #15
New Member
 
Ivy
Join Date: Sep 2013
Location: Singapore
Posts: 16
Rep Power: 3
Ivy Zhou is on a distinguished road
Hi,

Hmmm I read about how to convert fluent msh to openfoam. Or I still didn't get what it is really about? U have any recommended reading?
Thanks.

Ivy
Ivy Zhou is offline   Reply With Quote

Old   October 23, 2013, 09:39
Default
  #16
Senior Member
 
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 12
Bernhard is on a distinguished road
I would advise you to read this topic

You have literally the very same error message as in the first post above. Please, read carefully the post by mturcios777
Bernhard is offline   Reply With Quote

Old   October 23, 2013, 09:48
Default
  #17
New Member
 
Ivy
Join Date: Sep 2013
Location: Singapore
Posts: 16
Rep Power: 3
Ivy Zhou is on a distinguished road
Hi, I did read the post by mturcios777. I typed the command "fluentMeshToFoam" under the root of case directory as I stated ealier That's why I got confused why I still get this error

I followed instruction from this here:
http://openfoamwiki.net/index.php/Fluent3DMeshToFoam


ivy@Precision-T7600:~/Beispiel$ ls
0 Allclean Allrun case0.cas constant system
ivy@Precision-T7600:~/Beispiel$ fluentMeshToFoam case0.msh

/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.2.1 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
Build : 2.2.1-57f3c3617a2d
Exec : fluentMeshToFoam case0.msh
Date : Oct 23 2013
Time : 21:42:56
Host : "Precision-T7600"
PID : 31729
Case : /home/yinghan/Beispiel
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

--> FOAM Warning :
From function IOobject::readHeader(Istream&)
in file db/IOobject/IOobjectReadHeader.C at line 89
Reading "/home/yinghan/Beispiel/system/controlDict" at line 1
First token could not be read or is not the keyword 'FoamFile'

Check header is of the form:

/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.2.1 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //



--> FOAM FATAL IO ERROR:
problem while reading header for object controlDict

file: /home/yinghan/Beispiel/system/controlDict at line 1.

From function regIOobject::readStream()
in file db/regIOobject/regIOobjectRead.C at line 95.

FOAM exiting

Regards,
Ivy
Ivy Zhou is offline   Reply With Quote

Old   October 25, 2013, 03:59
Default
  #18
Senior Member
 
Samuele Z
Join Date: Oct 2009
Location: Mozzate - Co - Italy
Posts: 490
Rep Power: 9
samiam1000 is on a distinguished road
Dear All,

pardon the interruption, but I have a question for you.

I have a 2D Ansys mesh (.msh). And it is an axi-symmetric geometry. What I wanna do is to convert it in OpenFOAM.

As soon as I did this, I get a 2D mesh (in the sense of OpenFOAM, which means a slice with a single cell in 3rd direction). How can I tell OpenFOAM that it is an axi-symmetric case? Any idea?

Thanks a lot,
Samuele.
samiam1000 is offline   Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Fluent converting 'wall' to 'interior' BC for hybrid mesh DarrenC FLUENT 6 November 6, 2014 06:00
vtk mesh or Abaqus mesh to OpenFOAM bigphil Open Source Meshers: Gmsh, Netgen, CGNS, ... 19 August 16, 2011 04:14
[Other] OpenFoam Mesh to Fluent Mesh, 2D lordvon ANSYS Meshing & Geometry 0 November 8, 2010 14:48
problem in converting mesh from fluent kiran OpenFOAM Other Meshers: ICEM, Star, Ansys, Pointwise, GridPro, Ansa, ... 1 November 2, 2010 17:25
problem in converting mesh from fluent kiran OpenFOAM 1 October 31, 2010 22:35


All times are GMT -4. The time now is 06:09.