CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   fluentMeshToFoam give an error, please help me! (https://www.cfd-online.com/Forums/openfoam/103154-fluentmeshtofoam-give-error-please-help-me.html)

Bombolati June 12, 2012 11:03

fluentMeshToFoam give an error, please help me!
 
Hi, I'm trying to convert a .msh file into an O.F. file. I read the user manual and I saw that O.F. has an utility named fluentMeshToFoam. To launch this utility is quite simple, from the shell I write the command <<util>> after <<fluentMeshToFoam -case allThePathInWhichMyFileIs MyFile.msh>>. If I write the command in this way (with this spaces between the words) I occur this error message:



Create time



--> FOAM FATAL IO ERROR:
cannot find file

file: home/francesco/OpenFOAM/francesco-2.1.0/run/tutorials/combustion/chemFoam/h2/system/controlDict at line 0.

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

FOAM exiting



Please help me! I'm using O.F. 2.1.0, on ubuntu 11.10, the file .msh is regulary in ASCII format, I put the file in the tutorial directory <<home/.../h2>> so O.F. can find the file controlDict, I give it the command -case to tell that the directory isn't the default one but it give me always the same error and I don't know what else I can do.

Best regards.

nimasam June 12, 2012 15:33

put the file.msh in your case directory
then use this command line:

for 2D case:
fluentMeshToFoam file.msh

for 3D case:
fluent3DMeshToFoam file.msh

Bombolati June 14, 2012 04:38

I already put my file .msh in my case directory. Its position is at the level of the system or constant folder (I tried to use a tutorial case). There isn't the command fluentToMesh, I've checked it whit the command ls in the utilities folder.
This is the point, I need to convert a file .msh in a OF format. To do this, I think to use one between the OF utilities. This utilities don't work without a controlDict file. Why? Which is the importance of the correct controDict file in the conversion? How can I create the correct controlDict file for my conversion?
All my trouble are basic because I'm a new user in this software.

Thanks a lot

nimasam June 14, 2012 04:46

sorry it was typo :D, check with these two commands it should work, and it does not related to control Dict as i know, but as i told before you should set your file in case directory

Bombolati June 14, 2012 05:36

Thaks for the answer. Unfortunately the utility doesn't work yet. To be sure that the file is in my case directory I create a new folder on the desktop named <<Example>>. I put in the file .msh. Now I tried to convert it with fluent3DMeshToFoam but the error is the same. I've tried to launch the utility from its path folder (opt/openfoam210/applications/utilities/mesh/conversion) and from the <<Example>> path folder (Scrivania/Example).
What I'm wrong?

Thanks

nimasam June 14, 2012 06:41

simple approach :P
1) copy cavity folder in your Desktop
2) put your file in cavity folder beside 0, constant and system folder
3) then use above command

if it yet dose not work! post the error!

Bombolati June 14, 2012 07:35

Some progress! I'm sure that this file is in 3D, but with fluent3DMeshToFoam gives error so I tried fluentMeshToFoam. In the second case it gives always an error but a different one, I never see it before. In the first case the error is:

/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / 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 : fluent3DMeshToFoam FornaceP.msh
Date : Jun 14 2012
Time : 13:15:36
Host : "Aspire-1825PTZ"
PID : 24892
Case : /home/francesco/Scrivania/cavity
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: 1
on line 1

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

FOAM exiting


In the second case the error is:

/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / 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 : fluentMeshToFoam FornaceP.msh
Date : Jun 14 2012
Time : 13:17:06
Host : "Aspire-1825PTZ"
PID : 24897
Case : /home/francesco/Scrivania/cavity
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.
#0 Foam::error:: printStack(Foam::Ostream&) in "/opt/openfoam210/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#1 Foam::sigSegv::sigHandler(int) in "/opt/openfoam210/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#2 in "/lib/x86_64-linux-gnu/libc.so.6"
#3 Foam:: polyTopoChange::getFaceOrder(int, Foam::List<int> const&, Foam::List<int> const&, Foam::List<int>&, Foam::List<int>&, Foam::List<int>&) const in "/opt/openfoam210/platforms/linux64GccDPOpt/lib/libdynamicMesh.so"
#4 Foam:: polyTopoChange::compact(bool, bool, int&, Foam::List<int>&, Foam::List<int>&) in "/opt/openfoam210/platforms/linux64GccDPOpt/lib/libdynamicMesh.so"
#5 Foam:: polyTopoChange::compactAndReorder(Foam:: polyMesh const&, bool, bool, bool, int&, Foam::Field<Foam::Vector<double> >&, Foam::List<int>&, Foam::List<int>&, Foam::List<Foam:: objectMap>&, Foam::List<Foam:: objectMap>&, Foam::List<Foam:: objectMap>&, Foam::List<Foam:: objectMap>&, Foam::List<Foam:: objectMap>&, Foam::List<Foam:: objectMap>&, Foam::List<Foam:: objectMap>&, Foam::List<Foam:: objectMap>&, Foam::List<Foam::Map<int> >&, Foam::List<int>&, Foam::List<int>&, Foam::List<Foam::Map<int> >&) in "/opt/openfoam210/platforms/linux64GccDPOpt/lib/libdynamicMesh.so"
#6 Foam:: polyTopoChange::changeMesh(Foam:: polyMesh&, bool, bool, bool, bool) in "/opt/openfoam210/platforms/linux64GccDPOpt/lib/libdynamicMesh.so"
#7 Foam::repatchPolyTopoChanger::repatch() in "/opt/openfoam210/platforms/linux64GccDPOpt/lib/libdynamicMesh.so"
#8
in "/opt/openfoam210/platforms/linux64GccDPOpt/bin/fluentMeshToFoam"
#9 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#10
in "/opt/openfoam210/platforms/linux64GccDPOpt/bin/fluentMeshToFoam"
Errore di segmentazione


The translation of <<Errore di segmentazione>> is <<Segmentation Error>> I guess.
Thanks a lot for your help!!

nimasam June 14, 2012 08:09

try elbow tutorial in icoFoam folder, to see whether the command works or not, if it works then something is wrong with your mesh, because the error says:
"dimension of grid: 0"
it should be 2 or 3

Bombolati June 14, 2012 08:50

I tried with the elbow tutorial and all is ok. So the trouble is in my mesh. Thanks a lot nimasam. I've create this mesh in GAMBIT and I saved it in ASCII format but something goes wrong. I don't know what, I'll check it.

Thanks a lot

samiam1000 June 14, 2012 09:42

Make sure that it is in ASCII and not binary ;)..

Good luck!

Bombolati June 15, 2012 05:14

Hi, it is since yesterday that I'm trying to understand what I have wrong in the file conversion. I write you what I do to obtain my mesh in ASCII format so if someone find any mistake could give me a hand. From Fluent 6.2.16 I go in the menu <<file>>, <<Read>>, <<Case>> and I select my mesh named fornace.msh. Now, always under the menu <<file>>, I select <<export>> and here I can choice the ASCII format, next I select all the surface. Under the menu <<Functions>> I can't select anything because if I do it give me an error at the end of export phase. In the <<location>> menu I select Node and the <<Delimeter>> is comma. Next I export the mesh but there are 2 trouble: the file exported doesn't have .msh extension, OF doesn't make the conversion because the number of the <<dimension of grid>> that it reads is 0.

If someone could help me, I'll be very grateful with him/her.
Thanks a lot.

samiam1000 June 15, 2012 05:18

Could you open the file with a text editor?

Also, create a small and light file and share it!

Bombolati June 15, 2012 08:38

Ok, thanks for the advice. The file is this:

1200 0 5 0
13 Gambit 2.2.30 14 ACIS 12.0.6 NT 24 Mon Jun 11 16:58:22 2012
1 9.9999999999999995e-007 1e-010

Bombolati June 15, 2012 08:40

...<< from the late post:

-164 coedge $-1 -1 -1 $-1 $164 $164 $118 $165 reversed $115 $-1 #
-165 edge $207 -1 -1 $-1 $208 0 $208 6.2831853071795862 $164 $209 forward @7 unknown T -0.012999999999999999 -0.012999999999999999 0 0.012999999999999999 I guess that symbols like $ and # are present because the file is in ASCII format.


If you want the binary one I can try to post it.

samiam1000 June 15, 2012 09:01

Which is the format of this file? Please, send me the file via email

samuele.zampini@gmail.com

:)


All times are GMT -4. The time now is 07:03.