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] Fluent Mesh into OpenFoam (https://www.cfd-online.com/Forums/openfoam-meshing/128315-fluent-mesh-into-openfoam.html)

itsme_kit January 8, 2014 19:37

Fluent Mesh into OpenFoam
 
Hi

I followed this link:http://openfoamwiki.net/index.php/Fluent3DMeshToFoam to convert the fluent mesh file into openfoam

Once I ran this command: fluent3DMeshToFoam fluent.msh

There is nothing in the polymesh file

I wonder which step I did wrong or what I missed

Thanks for your help

Regards

Ke

Lieven January 9, 2014 04:39

Hi Ke,

Can you post the output of fluent3DMeshToFoam?

Cheers,

L

itsme_kit January 9, 2014 08:19

Quote:

Originally Posted by Lieven (Post 469237)
Hi Ke,

Can you post the output of fluent3DMeshToFoam?

Cheers,

L

Hi Lieven

Here is the outcome

/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.2.2 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
Build : 2.2.2-9739c53ec43f
Exec : fluent3DMeshToFoam cavity1
Date : Jan 09 2014
Time : 13:17:53
Host : "ke-wu"
PID : 536
Case : /Volumes/OpenFOAM-v2.1/OpenFOAM-2.2.2/run/Elbowpipe
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 ERROR:
Do not understand characters: n
on line 1

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

FOAM exiting

Lieven January 9, 2014 08:50

Have a look at this post:
http://www.cfd-online.com/Forums/ope...eshtofoam.html
My guess is that you didn't save the .msh-file in ascii format...

Cheers,

L

itsme_kit January 9, 2014 08:57

Quote:

Originally Posted by Lieven (Post 469270)
Have a look at this post:
http://www.cfd-online.com/Forums/ope...eshtofoam.html
My guess is that you didn't save the .msh-file in ascii format...

Cheers,

L

Hi Lieven

I did actually

First of all, I write the .msh file into Fluent and then save it in ascii format via following procedure File -> export -> solution data

Once the mesh file is saved in ascii format, the file extension disappeared

So I put command in fluent3dmeshtofoam cavity1 rather than fluent3dmeshtofoam cavity1.msh

Any mistake in my steps?

Kaskade January 9, 2014 09:02

Open the file using nano and make sure it is actually ascii.

Give fluentMeshToFoam (without 3D) a try. It converts 2D and 3D meshes.

Lieven January 9, 2014 09:08

Hi Ke,

To export the mesh in ascii format you should go to (assuming you use workbench):
Tools -> Options -> Meshing -> Export
and set the export format to ASCII

then your .msh file should automatically be in ascii-format. Let me know if this did the trick...

Lieven

itsme_kit January 9, 2014 09:12

Quote:

Originally Posted by Kaskade (Post 469275)
Open the file using nano and make sure it is actually ascii.

Give fluentMeshToFoam (without 3D) a try. It converts 2D and 3D meshes.

I will try this one later and let you know what happens

Thanks Kaskade

itsme_kit January 9, 2014 09:13

1 Attachment(s)
Quote:

Originally Posted by Lieven (Post 469276)
Hi Ke,

To export the mesh in ascii format you should go to (assuming you use workbench):
Tools -> Options -> Meshing -> Export
and set the export format to ASCII

then your .msh file should automatically be in ascii-format. Let me know if this did the trick...

Lieven

Hi Lieven

See the pic I attached

No option for export

itsme_kit January 9, 2014 17:16

Quote:

Originally Posted by Kaskade (Post 469275)
Open the file using nano and make sure it is actually ascii.

Give fluentMeshToFoam (without 3D) a try. It converts 2D and 3D meshes.

Hi Kaskade

What you mean "open the file using nano" and what nano is

I convert msh file into ascii file via fluent

Once it was saved, the file extension disappeared, I'm not sure it's in ascii format

And I tried the new command without 3D

It seems better than what I have done pervasively, but still got error.

This is what I got:

/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.2.2 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
Build : 2.2.2-9739c53ec43f
Exec : fluentMeshToFoam cavity1
Date : Jan 09 2014
Time : 22:03:27
Host : "ke-wu"
PID : 1094
Case : /Volumes/OpenFOAM-v2.1/OpenFOAM-2.2.2/run/Elbowpipe
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



FINISHED LEXING


dimension of grid: 0
Creating shapes for 3-D cells
Building patch-less mesh...done.

Building boundary and internal patches.

Writing mesh... to "constant/polyMesh" done.


End

When I type checkMesh, I got these:

/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.2.2 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
Build : 2.2.2-9739c53ec43f
Exec : checkMesh
Date : Jan 09 2014
Time : 22:06:56
Host : "ke-wu"
PID : 1144
Case : /Volumes/OpenFOAM-v2.1/OpenFOAM-2.2.2/run/Elbowpipe
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

Create polyMesh for time = 0

--> FOAM Warning :
From function polyMesh(const IOobject&)
in file meshes/polyMesh/polyMesh.C at line 306
no points in mesh
--> FOAM Warning :
From function polyMesh(const IOobject&)
in file meshes/polyMesh/polyMesh.C at line 311
no cells in mesh
Time = 0

Mesh stats
points: 0
internal points: 0
faces: 0
internal faces: 0
cells: 0
faces per cell: 0
boundary patches: 0
point zones: 0
face zones: 0
cell zones: 0

Overall number of cells of each type:
hexahedra: 0
prisms: 0
wedges: 0
pyramids: 0
tet wedges: 0
tetrahedra: 0
polyhedra: 0

Checking topology...
Boundary definition OK.
Cell to face addressing OK.
Point usage OK.
Upper triangular ordering OK.
Face vertices OK.
Number of regions: 0 (OK).

Checking patch topology for multiply connected surfaces...
Patch Faces Points Surface topology

Checking geometry...
Overall domain bounding box (0 0 0) (0 0 0)
Mesh (non-empty, non-wedge) directions (1 1 1)
Mesh (non-empty) directions (1 1 1)
Boundary openness (0 0 0) OK.
Max cell openness = -1e+300 OK.
Max aspect ratio = -1e+300 OK.
Minimum face area = 1e+15. Maximum face area = -1e+15. Face area magnitudes OK.
Min volume = 1e+15. Max volume = -1e+15. Total volume = 0. Cell volumes OK.
Non-orthogonality check OK.
Face pyramids OK.
Max skewness = -1e+300 OK.
Coupled point location match (average 0) OK.

Mesh OK.

End

When I try to view the mesh in paraview, I got this message:

Warning: In /Users/kitware/Dashboards/MyTests/NightlyMaster/ParaViewSuperbuild-Release/paraview/src/paraview/VTK/IO/Geometry/vtkOpenFOAMReader.cxx, line 4749
vtkOpenFOAMReaderPrivate (0x115654190): The mesh contains no cells

Can you help me further

Thanks

Kaskade January 10, 2014 01:57

nano is a text editor that can take on large files. Just enter "nano *meshfilename*". Ctrl+x to exit the editor.

I am suprised fluentMeshToFoam didn't prompt some error message. Obviously something is wrong with the mesh.

sangram January 29, 2014 06:51

fluentMeshToFoam
 
Hello,

I just joined this forum....feeling excited to learn new things....:):):)

I am trying to import fluent mesh file (.msh) in openFOAM. I am not getting any error msg till i go in the paraview......but once I click on apply to see mesh in paraview.....it is showing me following msg....can any body please help me solve this issue......

-->FOAM FATAL IO ERROR:
Cannot find patchField entry for velocity-inlet-5

file: /home/sandeep/OpenFOAM/sandeep-2.2.2/run/tutorials/zfluent/bubble/0/U.boundaryField from line 26 to line 40.

From function GeometricField<Type, PatchField, GeoMesh>::GeometricBoundaryField::readField(const DimensionedField<Type, GeoMesh>&, const dictionary&)
in file /home/opencfd/OpenFOAM/OpenFOAM-2.2.2/src/OpenFOAM/lnInclude/GeometricBoundaryField.C at line 206.

FOAM exiting

Kaskade January 29, 2014 13:22

Try renaming 0/ to 0.org. You probably forgot to set your boundary conditions.

sangram January 29, 2014 23:55

Thanks Kaskade for the immediate reply...:):):)

sangram January 30, 2014 00:14

fluentMeshToFoam
 
Hello,

Quote:

Originally Posted by sangram (Post 472318)
Hello,

I just joined this forum....feeling excited to learn new things....:):):)

I am trying to import fluent mesh file (.msh) in openFOAM. I am not getting any error msg till i go in the paraview......but once I click on apply to see mesh in paraview.....it is showing me following msg....can any body please help me solve this issue......

-->FOAM FATAL IO ERROR:
Cannot find patchField entry for velocity-inlet-5

file: /home/sandeep/OpenFOAM/sandeep-2.2.2/run/tutorials/zfluent/bubble/0/U.boundaryField from line 26 to line 40.

From function GeometricField<Type, PatchField, GeoMesh>::GeometricBoundaryField::readField(const DimensionedField<Type, GeoMesh>&, const dictionary&)
in file /home/opencfd/OpenFOAM/OpenFOAM-2.2.2/src/OpenFOAM/lnInclude/GeometricBoundaryField.C at line 206.

FOAM exiting


Then I tried renaming 0 with 0.org......Now I am getting following error message...


--> FOAM FATAL IO ERROR:
cannot find file

file: /home/sandeep/system/controlDict at line 0.

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

FOAM exiting

I am just 3 weeks older in CFD and OF......Guys please help me to learn.....

Kaskade January 30, 2014 01:20

Have you done any of the tutorials? Maybe you should start with that, in order to learn about the OpenFOAM case structure and the required files.

sangram January 30, 2014 01:49

Quote:

Originally Posted by Kaskade (Post 472472)
Have you done any of the tutorials? Maybe you should start with that, in order to learn about the OpenFOAM case structure and the required files.

Thanks Kaskade.....
Actually I have read basics of openFOAM and done Cavity tutorial....now I am trying to import fluent (.msh) file.....I think I have problem with selection of solver....can you please guide me on solver selection.....

Kaskade January 30, 2014 02:05

What are you trying to simulate?

sangram January 30, 2014 04:19

Quote:

Originally Posted by Kaskade (Post 472481)
What are you trying to simulate?

I am trying to import fluent (dam break) tutorials .msh file in openFOAM and trying to solve it using interfoam solver.......
When I am typing InterFoam in terminal window it is showing following error....


--> FOAM FATAL IO ERROR:
cannot find file

file: /home/sandeep/OpenFOAM/sandeep-2.2.2/run/tutorials/zfluent/Multiphase/dambreak/0/p_rgh at line 0.

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

FOAM exiting

Kaskade January 30, 2014 04:45

1. copy the OpenFOAM dam break tutorial to your run directory
2. rename 0 to 0.org
3. rename constant/polyMesh/boundary to constant/polyMesh/boundary.org
4. delete the other files in constant/polyMesh
5. move the .msh-file to the case directory
6. convert it (-scale 0.001 if it's in mm instead of m)
7. run paraFoam and check the mesh
8. run checkMesh -constant
9. if everything checks out, rename 0.org back to 0
10. set your boundary conditions
a. open constant/polyMesh/boundary, to see what boundaries need to be set
b. open each file under 0 and edit it, so that the correct boundary names and conditions are set


All times are GMT -4. The time now is 17:27.