CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Open Source Meshers: Gmsh, Netgen, CGNS, ...

GmshToFoam or gmsh2ToFoam amp gmsh sudden disappear

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

Reply
 
LinkBack Thread Tools Display Modes
Old   November 23, 2007, 13:11
Default Hello, when I input: gmshToFoa
  #1
Senior Member
 
ZHOU Bin
Join Date: Mar 2009
Location: Nanjing/Shanghai/Torino, Nanjing/Shanghai/Piemente, China/Italy
Posts: 164
Rep Power: 8
zhoubinwx is on a distinguished road
Send a message via ICQ to zhoubinwx Send a message via MSN to zhoubinwx Send a message via Skype™ to zhoubinwx
Hello, when I input: gmshToFoam: command not found, then I input gmsh2ToFoam, also:command not found. Could anyone tells me why?

Another problem is: yesterday evening I use XP to build my model, this morning I copy it to linux, gmsh can open it, but in the afternoon, I find when I want to open a case (including those in the tutorials), I get: DRM_I830_CMDBUFFER: -22

Does anybody know what is the problem.

Thank you.

Zhou Bin
(zhoubinwx@hotmail.com)
zhoubinwx is offline   Reply With Quote

Old   November 27, 2007, 05:26
Default Today I install gmshFoam accor
  #2
Senior Member
 
ZHOU Bin
Join Date: Mar 2009
Location: Nanjing/Shanghai/Torino, Nanjing/Shanghai/Piemente, China/Italy
Posts: 164
Rep Power: 8
zhoubinwx is on a distinguished road
Send a message via ICQ to zhoubinwx Send a message via MSN to zhoubinwx Send a message via Skype™ to zhoubinwx
Today I install gmshFoam according to Dear Takuya Oshima's suggestion, the website is http://openfoamwiki.net/index.php/Co...hFoam#Download

However, after I input:

patch -p1 < $WM_PROJECT_USER_DIR/applications/utilities/gmshFoam/gmsh-2.0.8-foam-20070905.di ff

I get the information:
--------------
zhou@wsfoam:~/OpenFOAM/linux/gmsh-2.0.8-src$ patch -p0 < /home/zhou/OpenFOAM/zhou-1.4.1/applications/utilities/gmshFoam/gmsh-2.0.8-foam-2 0070905.diff

can't find file to patch at input line 3

Perhaps you used the wrong -p or --strip option?

The text leading up to this was:

--------------------------

|--- gmsh-2.0.8/Common/CommandLine.cpp 2007-05-25 02:34:03.000000000 +0900

|+++ gmsh-2.0.8.new/Common/CommandLine.cpp 2007-08-20 13:01:16.000000000 +0900

--------------------------

File to patch: ./configure --prefix=$WM_PROJECT_INST_DIR/$WM_ARCH/gmsh-2.0.8 \

--with-foam-prefix=$WM_PROJECT_USER_DIR/applications/utilities/gmshFoam./configu re: No such file or directory

Skip this patch? [y]

------------------
Has anyone met the same problem ( I use Ubuntu)

Best regards,

zhou bin
zhoubinwx is offline   Reply With Quote

Old   November 27, 2007, 09:01
Default Hi zhoubin, Make sure you use
  #3
Super Moderator
 
Takuya OSHIMA
Join Date: Mar 2009
Location: Niigata City, Japan
Posts: 518
Blog Entries: 1
Rep Power: 11
7islands is on a distinguished road
Hi zhoubin,
Make sure you used -p1, not -p0 (your input line uses -p1, whereas your actual pasted information uses -p0).

Takuya
7islands is offline   Reply With Quote

Old   November 27, 2007, 09:53
Default Hi,Takuya, I use -p1, then I
  #4
Senior Member
 
ZHOU Bin
Join Date: Mar 2009
Location: Nanjing/Shanghai/Torino, Nanjing/Shanghai/Piemente, China/Italy
Posts: 164
Rep Power: 8
zhoubinwx is on a distinguished road
Send a message via ICQ to zhoubinwx Send a message via MSN to zhoubinwx Send a message via Skype™ to zhoubinwx
Hi,Takuya,
I use -p1, then I get the above problem, then I try -p0, the same result. How could I deal with this problem?

By the way, when I input:
./Allwmake
according to your link for gmshFoam installation, I get:

could not open file Map.hh for source file gmshMesh/gmshNodes.C

could not open file Map.hh for source file gmshMesh/gmshMesh.C

could not open file Map.hh for source file gmshMesh/gmshToPolyMesh.C
...

Is it because the following reason?

When I install OpenFOAM but failed, I just delete the directory named OpenFOAM.

Am I right to do so to uninstall OpenFOAM? I could not uninstall OpenFOAM when I use "sudo apt-get remover OpenFOAM".

Thank you for replying me so soon.

Best regards,

Zhou Bin
zhoubinwx is offline   Reply With Quote

Old   November 27, 2007, 09:54
Default Hi,Takuya, I use -p1, then I
  #5
Senior Member
 
ZHOU Bin
Join Date: Mar 2009
Location: Nanjing/Shanghai/Torino, Nanjing/Shanghai/Piemente, China/Italy
Posts: 164
Rep Power: 8
zhoubinwx is on a distinguished road
Send a message via ICQ to zhoubinwx Send a message via MSN to zhoubinwx Send a message via Skype™ to zhoubinwx
Hi,Takuya,
I use -p1, then I get the above problem, then I try -p0, the same result. How could I deal with this problem?

By the way, when I input:
./Allwmake
according to your link for gmshFoam installation, I get:

could not open file Map.hh for source file gmshMesh/gmshNodes.C

could not open file Map.hh for source file gmshMesh/gmshMesh.C

could not open file Map.hh for source file gmshMesh/gmshToPolyMesh.C
...

Is it because the following reason?

When I install OpenFOAM but failed, I just delete the directory named OpenFOAM.

Am I right to do so to uninstall OpenFOAM? I could not uninstall OpenFOAM when I use "sudo apt-get remove OpenFOAM".

Thank you for replying me so soon.

Best regards,

Zhou Bin
zhoubinwx is offline   Reply With Quote

Old   November 28, 2007, 03:04
Default Hi zhoubin, @patch problem: p
  #6
Super Moderator
 
Takuya OSHIMA
Join Date: Mar 2009
Location: Niigata City, Japan
Posts: 518
Blog Entries: 1
Rep Power: 11
7islands is on a distinguished road
Hi zhoubin,
@patch problem: probably you have unpacked the Gmsh source tarball to some wrong directory? Anyway solution should be obvious if you know how patch works.

@"could not open file Map.hh" errors: they are harmless, just ignore as long as Allwmake is running.

Takuya
7islands is offline   Reply With Quote

Old   December 14, 2007, 02:56
Default Dear Takuya, Today, when I wa
  #7
Senior Member
 
ZHOU Bin
Join Date: Mar 2009
Location: Nanjing/Shanghai/Torino, Nanjing/Shanghai/Piemente, China/Italy
Posts: 164
Rep Power: 8
zhoubinwx is on a distinguished road
Send a message via ICQ to zhoubinwx Send a message via MSN to zhoubinwx Send a message via Skype™ to zhoubinwx
Dear Takuya,
Today, when I want to use the gmshToFoam command, I get the following error:
----------------------------------
/*---------------------------------------------------------------------------*\
| ========= | |
| \ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \ / O peration | Version: 1.4.1 |
| \ / A nd | Web: http://www.openfoam.org |
| \/ M anipulation | |
\*---------------------------------------------------------------------------*/

Exec : gmshToFoam /home/zhou/OpenFOAM/zhou-1.4.1/run/fiber filter_flow fibrous_filter_12_12_07.msh
Date : Dec 12 2007
Time : 11:26:01
Host : wsfoam
PID : 6853
Root : /home/zhou/OpenFOAM/zhou-1.4.1/run/fiber
Case : filter_flow
Nprocs : 1
Create time

--> FOAM Warning :
From function boundBox::boundBox(const pointField& points)
in file meshes/boundBox/boundBox.C at line 52
cannot find bounding box for zero sized pointFieldreturning zero
#0 Foam::error::printStack(Foam:stream&) in "/home/zhou/OpenFOAM/OpenFOAM-1.4.1/lib/linuxGccDPOpt/libOpenFOAM.so"
#1 Foam::sigSegv::sigSegvHandler(int) in "/home/zhou/OpenFOAM/OpenFOAM-1.4.1/lib/linuxGccDPOpt/libOpenFOAM.so"
#2 Uninterpreted: [0xffffe420]
#3 main in "/home/zhou/OpenFOAM/OpenFOAM-1.4.1/applications/bin/linuxGccDPOpt/gmshToFoam"
#4 __libc_start_main in "/lib/tls/i686/cmov/libc.so.6"
#5 __gxx_personality_v0 in "/home/zhou/OpenFOAM/OpenFOAM-1.4.1/applications/bin/linuxGccDPOpt/gmshToFoam"
Segmentation fault (core dumped)
-----------------------------------------------------------------------

I use half an hour to fix this problem, but failed. So I surf the internet, and I decide to install gmshFoam according to Dear Takuya Oshima's suggestion, the website is http://openfoamwiki.net/index.php/Co...hFoam#Download

However, after I input:

patch -p1 < $WM_PROJECT_USER_DIR/applications/utilities/gmshFoam/gmsh-2.0.8-foam-20070905.di ff

I get the information:
--------------
zhou@wsfoam:~/OpenFOAM/linux/gmsh-2.0.8-src$ patch -p1 < /home/zhou/OpenFOAM/zhou-1.4.1/applications/utilities/gmshFoam/gmsh-2.0.8-foam-2 0070905.diff

can't find file to patch at input line 3

Perhaps you used the wrong -p or --strip option?

The text leading up to this was:

--------------------------

|--- gmsh-2.0.8/Common/CommandLine.cpp 2007-05-25 02:34:03.000000000 +0900

|+++ gmsh-2.0.8.new/Common/CommandLine.cpp 2007-08-20 13:01:16.000000000 +0900

--------------------------

File to patch: ./configure --prefix=$WM_PROJECT_INST_DIR/$WM_ARCH/gmsh-2.0.8 \

--with-foam-prefix=$WM_PROJECT_USER_DIR/applications/utilities/gmshFoam./configu re: No such file or directory

Skip this patch? [y]

------------------
This costs me another hour , since I could not output my msh file to openfoam format, I would like to bother you to see if you could give me any suggestions? Thank you.

If possible, I would like to send you my geo and msh file for test.

Best regards,

Zhou bin
zhoubinwx is offline   Reply With Quote

Old   December 14, 2007, 05:45
Default Hi zhoubin, My suggestion is
  #8
Super Moderator
 
Takuya OSHIMA
Join Date: Mar 2009
Location: Niigata City, Japan
Posts: 518
Blog Entries: 1
Rep Power: 11
7islands is on a distinguished road
Hi zhoubin,
My suggestion is that you can always learn from others' past works.
1. Revise my suggestion on the Gmsh mailing list.
2. "Diviser les difficultés," as a philosopher suggested 400 years ago. Obviously you are trying to do what you can't achieve at once with your ability (and me neither).

Takuya
7islands is offline   Reply With Quote

Old   December 14, 2007, 12:32
Default Dear Takuya, I have revised
  #9
Senior Member
 
ZHOU Bin
Join Date: Mar 2009
Location: Nanjing/Shanghai/Torino, Nanjing/Shanghai/Piemente, China/Italy
Posts: 164
Rep Power: 8
zhoubinwx is on a distinguished road
Send a message via ICQ to zhoubinwx Send a message via MSN to zhoubinwx Send a message via Skype™ to zhoubinwx
Dear Takuya,

I have revised my case according to Mr. Ruth's suggestion.

In order to fully understand the modeling procedure, I read the whole geo file in 'nishantAirfoil.tar.gz' . I could see that you divide all the domain into several parts, some of which use the spline as sub-domain's boundary.

In my case, it is different, I have a lot of circles, and I can only make a surface and then extrude them into 3-D.

I mesh your case into msh file, and then use gmshToFoam, but I get the same results, I would like to describe it here:
Exec : gmshToFoam /home/zhou/OpenFOAM/zhou-1.4.1/run/aerofoil_test/ nishantAirfoil aerofoil-quarter2-corrected.msh
Date : Dec 14 2007
Time : 17:20:10
Host : wsfoam
PID : 7691
Root : /home/zhou/OpenFOAM/zhou-1.4.1/run/aerofoil_test/
Case : nishantAirfoil
Nprocs : 1
Create time

--> FOAM Warning :
From function boundBox::boundBox(const pointField& points)
in file meshes/boundBox/boundBox.C at line 52
cannot find bounding box for zero sized pointFieldreturning zero
#0 Foam::error::printStack(Foam:stream&) in "/home/zhou/OpenFOAM/OpenFOAM-1.4.1/lib/linuxGccDPOpt/libOpenFOAM.so"
#1 Foam::sigSegv::sigSegvHandler(int) in "/home/zhou/OpenFOAM/OpenFOAM-1.4.1/lib/linuxGccDPOpt/libOpenFOAM.so"
#2 Uninterpreted: [0xffffe420]
#3 main in "/home/zhou/OpenFOAM/OpenFOAM-1.4.1/applications/bin/linuxGccDPOpt/gmshToFoam"
#4 __libc_start_main in "/lib/tls/i686/cmov/libc.so.6"
#5 __gxx_personality_v0 in "/home/zhou/OpenFOAM/OpenFOAM-1.4.1/applications/bin/linuxGccDPOpt/gmshToFoam"
Segmentation fault (core dumped)
-------------
I do not know what is the problem for my computer or the software.
zhoubinwx is offline   Reply With Quote

Old   December 14, 2007, 12:51
Default by the way, I would like to ha
  #10
Senior Member
 
ZHOU Bin
Join Date: Mar 2009
Location: Nanjing/Shanghai/Torino, Nanjing/Shanghai/Piemente, China/Italy
Posts: 164
Rep Power: 8
zhoubinwx is on a distinguished road
Send a message via ICQ to zhoubinwx Send a message via MSN to zhoubinwx Send a message via Skype™ to zhoubinwx
by the way, I would like to have a simple example:
Plane Surface(2)={2,4:98},which 2 represents the rectangle, here I use 'Line Loop(2) = {2,-10,6,9};', and 4:98 represents circles inside, here I use 'Line Loop(4) = {c1,c2,c3,c4};'.I do not know, according to the example in 'nishantAirfoil.tar.gz', how to set the left side of rectangle as inlet and the right one as outlet.

Dear Takuya, your work for OpenFOAM is great! Thank you.

Best regards,

Zhou Bin
zhoubinwx is offline   Reply With Quote

Old   December 14, 2007, 20:49
Default Hi zhoubin, 1. The .msh file
  #11
Super Moderator
 
Takuya OSHIMA
Join Date: Mar 2009
Location: Niigata City, Japan
Posts: 518
Blog Entries: 1
Rep Power: 11
7islands is on a distinguished road
Hi zhoubin,
1. The .msh file name must be given relative to the current directory (or absolutely), not to the case directory.
2. You can always read up every line of Nishant's thread until the very last post.
3. Start with some simplest case, like the domain bounding box of your case.
4. Create a hole to the domain bounding box.
5. Create another hole or two. Proceed little by little.
6. Repeat 5. until you get what you want.

That's precisely what Descartes suggested 400 years ago, isn't it?

Takuya
7islands is offline   Reply With Quote

Old   December 15, 2007, 04:18
Default Dear Takuya, 'The Method of
  #12
Senior Member
 
ZHOU Bin
Join Date: Mar 2009
Location: Nanjing/Shanghai/Torino, Nanjing/Shanghai/Piemente, China/Italy
Posts: 164
Rep Power: 8
zhoubinwx is on a distinguished road
Send a message via ICQ to zhoubinwx Send a message via MSN to zhoubinwx Send a message via Skype™ to zhoubinwx
Dear Takuya,

'The Method of Science' is really a fantastic guideline, and I will follow it for my thesis writing. I appreciate your guiding me to real science.

by the way, I have made my geo actually, and now I would like to share with you.
circles in rectangles_review.geo

Well, since I have the problem using gmshToFoam, I read all the Nishant's thread already, and I could see that you suggest him to define boundary face, for example:
Physical Surface ("inlet5") = {e2[15],e1[5],e1[2],e1[9],e1[16]};

According to your revising on Nishant's model, I guess I should also revise my above attached geo model:
Physical Surface ("inlet") = {e1[4]};

Physical Surface ("outlet") = {e2[ ]};

Physical Surface ("symmetry_up") = { };

Physical Surface ("symmetry_down") = { };


Physical Surface("fiber")={ }

As you could see, since I made the whole surface (I use boolean algorithm to make rectangle without inner circles) in 2-D first, and then extrude it into 3-D, I could not tell the faces such as symmetry_up. Because be careful, this extrude for this important domain is not built on four lines, but on the rectangle without circles.

Since this is the difference, I would like Mr. Takuya to have a look if possilbe.

Best regards,

Zhou Bin
zhoubinwx is offline   Reply With Quote

Old   March 8, 2008, 08:59
Default Dear all, I have solved the
  #13
Senior Member
 
ZHOU Bin
Join Date: Mar 2009
Location: Nanjing/Shanghai/Torino, Nanjing/Shanghai/Piemente, China/Italy
Posts: 164
Rep Power: 8
zhoubinwx is on a distinguished road
Send a message via ICQ to zhoubinwx Send a message via MSN to zhoubinwx Send a message via Skype™ to zhoubinwx
Dear all,

I have solved the problem for boundary setting. It works fine here (If anyone who has the same problem, please post it here, and I am glad to offer any help). However, I need to use OpenFOAM to test it.

I am thinking about how to deal with my conversion problem now. I will post my progress here and if I have any more problem, I will let you know.

Best regards,

Zhou Bin
zhoubinwx is offline   Reply With Quote

Old   April 14, 2008, 14:28
Default Dear friends, My case is a
  #14
Senior Member
 
ZHOU Bin
Join Date: Mar 2009
Location: Nanjing/Shanghai/Torino, Nanjing/Shanghai/Piemente, China/Italy
Posts: 164
Rep Power: 8
zhoubinwx is on a distinguished road
Send a message via ICQ to zhoubinwx Send a message via MSN to zhoubinwx Send a message via Skype™ to zhoubinwx
Dear friends,

My case is a rectangle with the size 430*75 micrometers, I built the geometry with Gmsh, but since Gmsh is a meshing tool instead of blockMesh, convertToMeters does not work any more.

Does someone knows how to specify the unit of "micrometer" in OpenFOAM after the geometry and mesh are loaded into OpenFOAM?

Thank you.

Best regards,

Zhou Bin
zhoubinwx is offline   Reply With Quote

Old   April 14, 2008, 15:20
Default transformPoints will transf
  #15
Super Moderator
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,416
Rep Power: 16
mattijs is on a distinguished road
transformPoints

will transform the points of the mesh.

E.g. to convert all three component of the points from meter to micrometer:

transformPoints <root> <case> -scale '(1E-6 1E-6 1E-6)'
mattijs is offline   Reply With Quote

Old   April 14, 2008, 15:45
Default Dear Mattijs, thank you for yo
  #16
Senior Member
 
ZHOU Bin
Join Date: Mar 2009
Location: Nanjing/Shanghai/Torino, Nanjing/Shanghai/Piemente, China/Italy
Posts: 164
Rep Power: 8
zhoubinwx is on a distinguished road
Send a message via ICQ to zhoubinwx Send a message via MSN to zhoubinwx Send a message via Skype™ to zhoubinwx
Dear Mattijs, thank you for your prompt answer, I am greatly influence by you and other good friends, I need to help others on this forum when I know something.

Best regards,

Zhou Bin
zhoubinwx is offline   Reply With Quote

Old   April 23, 2009, 06:12
Default new with gmshtoFoam
  #17
Member
 
Join Date: Apr 2009
Posts: 34
Rep Power: 8
cosine is on a distinguished road
Hi,
I am newer with gmsh and Openfoam.
I have a geometry and i make a mesh using Openfoam.
Can someone explain how can i converted to Openfoam format?
When i try everything i take an error of kind "wrong number of arguments..."
What are the necessary steps?
Thanks
cosine
cosine is offline   Reply With Quote

Old   August 6, 2009, 14:38
Default
  #18
Member
 
John
Join Date: Aug 2009
Posts: 93
Rep Power: 7
nomad is on a distinguished road
Hi,

What is the correct usage for gmshToFoam for converting .msh files to OpenFOAM?
Do I need additional files (e.g. system/controlDict) to make the command work and do I need to modify these files?
I'm trying to run a simple case with a solid block with a hole in it simulating a cylinder.
I get the 'segmentation fault' just like zhoubin posted earlier.

Thanks.
nomad is offline   Reply With Quote

Old   August 7, 2009, 05:55
Default
  #19
Super Moderator
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,416
Rep Power: 16
mattijs is on a distinguished road
Copy an existing case with the same physics from e.g. the tutorials.
Go into this directory and type

gmshToFoam myfile.msh

where myfile.msh is the name of your msh file. There is a sample CubeVer1.msh in the gmshToFoam source directory.
mattijs is offline   Reply With Quote

Old   August 7, 2009, 15:48
Default
  #20
Member
 
John
Join Date: Aug 2009
Posts: 93
Rep Power: 7
nomad is on a distinguished road
Hi,
Upon running icoFoam I get the following error:

"Essential entry 'value' missing"

After inspecting the file in question which is 0/U, 'value' does exist:

topellipse
{
type fixedValue
value uniform (0 0 0);
}

However, after repeating the variable value in the next line ...

topellipse
{
type fixedValue
value uniform (0 0 0);
value uniform (0 0 0);
}


...icoFoam runs fine.

Am I missing something or is this a bug?
nomad 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
Gmsh2toFoam sega Open Source Meshers: Gmsh, Netgen, CGNS, ... 16 April 27, 2009 08:23
Disappear zone in Fluent Vu, Ha-Hai FLUENT 1 November 17, 2008 06:18
BlockMesh versus gmsh2ToFoam bretttully OpenFOAM Running, Solving & CFD 1 March 6, 2008 10:36
Modified gmshToFoam to help import hexahedral and prism elements from Gmsh adorean Open Source Meshers: Gmsh, Netgen, CGNS, ... 1 April 18, 2005 08:19
disappear particles in GENTRA tomo Phoenics 1 December 13, 2002 23:05


All times are GMT -4. The time now is 13:22.