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

deepesh February 17, 2012 15: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 15:25

Do we ideally need to have controlDict to convert?

mturcios777 February 17, 2012 15: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 17: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 03: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 04: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 05:06

Hi m9819348,

I will check this command as well.

We have the same name :rolleyes:

kind regards, Viele Gre
Florian Ries

m9819348 February 18, 2012 05:14

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

deepesh February 18, 2012 07: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 14:22

So you got to solve the issue?

deepesh February 19, 2012 14:37

Indeed! thankyou

Zinedine March 13, 2012 06: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: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.

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.


All times are GMT -4. The time now is 18:40.