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] converting Fluent mesh to openfoam standard mesh (https://www.cfd-online.com/Forums/openfoam-meshing/97471-converting-fluent-mesh-openfoam-standard-mesh.html)

deepesh February 17, 2012 14:18

converting Fluent mesh to openfoam standard mesh
 
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 February 17, 2012 14:25

Do we ideally need to have controlDict to convert?

mturcios777 February 17, 2012 14:48

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.

m9819348 February 17, 2012 16:02

Indeed! Great advice.

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


I don't think gambitToFoam will do the trick.

riesotto February 18, 2012 02:26

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

m9819348 February 18, 2012 03:25

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.

riesotto February 18, 2012 04:06

Hi m9819348,

I will check this command as well.

We have the same name :rolleyes:

kind regards, Viele Grüße
Florian Ries

m9819348 February 18, 2012 04:14

Be it that Ries is your last name and mine is my first... :-)

deepesh February 18, 2012 06:15

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.

m9819348 February 19, 2012 13:22

So you got to solve the issue?

deepesh February 19, 2012 13:37

Indeed! thankyou

Zinedine March 13, 2012 05:38

Problem converting Fluent mesh generated by AnsysWorkbenchV14 to OpenFoam
 
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:nÏO¢?_
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.

Ivy Zhou October 23, 2013 09:17

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 :confused::confused:?
Thanks very much :)

Ivy

Bernhard October 23, 2013 09:32

Did you even read the topic?

Ivy Zhou October 23, 2013 09:36

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

Bernhard October 23, 2013 09:39

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

Ivy Zhou October 23, 2013 09:48

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

samiam1000 October 25, 2013 03:59

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.

Scram_1 May 23, 2016 11:50

Hey,
I have a question regarding the fluentMeshToFoam command. My geometry is in mm and I've created the mesh in ICEM. Now after doing fluentMeshToFoam pipe.msh I do checkMesh. Now, checkMesh gives the dimensions of the overall bounding box without the units. Are these units in mm since my geometry is in mm? or if I want to convert it into mm should I do transformPoints -scale '(0.001 0.001 0.00)'?

Thanks!!
Ram

Zinedine May 23, 2016 12:01

Hi Ram
What is the output of checkMesh?
Depending in this you might have to us the transformation
transformPoint - scale etc ...
Hope this helps.

Zinedine


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