CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   Open Source Meshers: Gmsh, Netgen, CGNS, ... (http://www.cfd-online.com/Forums/openfoam-meshing-open/)
-   -   GmshToFoam or gmsh2ToFoam amp gmsh sudden disappear (http://www.cfd-online.com/Forums/openfoam-meshing-open/61881-gmshtofoam-gmsh2tofoam-amp-gmsh-sudden-disappear.html)

zhoubinwx November 23, 2007 13:11

Hello, when I input: gmshToFoa
 
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 November 27, 2007 05:26

Today I install gmshFoam accor
 
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

7islands November 27, 2007 09:01

Hi zhoubin, Make sure you use
 
Hi zhoubin,
Make sure you used -p1, not -p0 (your input line uses -p1, whereas your actual pasted information uses -p0).

Takuya

zhoubinwx November 27, 2007 09:53

Hi,Takuya, I use -p1, then I
 
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 November 27, 2007 09:54

Hi,Takuya, I use -p1, then I
 
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

7islands November 28, 2007 03:04

Hi zhoubin, @patch problem: p
 
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

zhoubinwx December 14, 2007 02:56

Dear Takuya, Today, when I wa
 
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:http://www.cfd-online.com/OpenFOAM_D...part/proud.gifstream&) 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

7islands December 14, 2007 05:45

Hi zhoubin, My suggestion is
 
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

zhoubinwx December 14, 2007 12:32

Dear Takuya, I have revised
 
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:http://www.cfd-online.com/OpenFOAM_D...part/proud.gifstream&) 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 December 14, 2007 12:51

by the way, I would like to ha
 
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

7islands December 14, 2007 20:49

Hi zhoubin, 1. The .msh file
 
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

zhoubinwx December 15, 2007 04:18

Dear Takuya, 'The Method of
 
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.
http://www.cfd-online.com/OpenFOAM_D...hment_icon.gif 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 March 8, 2008 08:59

Dear all, I have solved the
 
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 April 14, 2008 15:28

Dear friends, My case is a
 
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

mattijs April 14, 2008 16:20

transformPoints will transf
 
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)'

zhoubinwx April 14, 2008 16:45

Dear Mattijs, thank you for yo
 
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

cosine April 23, 2009 07:12

new with gmshtoFoam
 
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

nomad August 6, 2009 15:38

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.

mattijs August 7, 2009 06:55

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.

nomad August 7, 2009 16:48

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?


All times are GMT -4. The time now is 14:01.