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/)
-   -   [Netgen] Netgen now on Sourceforge (https://www.cfd-online.com/Forums/openfoam-meshing/61942-netgen-now-sourceforge.html)

crixman July 19, 2014 12:42

Netgen cmake installation problem
 
Hi all,
I am trying to install Netgen Cmake on CentOS6.4.
I unpacked the folder netgen-cmake-master, made a netgen folder and then tried the following:
cd netgen
cmake /home/chris/netgen-cmake-master

and I get the following:
[chris@localhost netgen]$ sudo cmake /home/chris/netgen-cmake-master
-- Netgen Version: 5.2.0-dev
-- Build type: 64bit
CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:97 (MESSAGE):
Could NOT find Togl1.7 (missing: TOGL1.7_LIBRARY TOGL1.7_INCLUDE_PATH)
Call Stack (most recent call first):
/usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:288 (_FPHSA_FAILURE_MESSAGE)
cmake/modules/FindTogl1.7.cmake:124 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
CMakeLists.txt:244 (FIND_PACKAGE)


How can I tell cmake where to find the libraries? I got Togl, Tk and Tcl from Netgen repositories and have them in a Tcl folder in the home directory!
Any help would be appreciated!

CFDUser_ August 8, 2014 01:12

1 Attachment(s)
Hi All,

Sorry if this post may be repeated but I didn't find the solution any ware I searched. I have created one simple STL cylinder file. I don't exactly what's wrong with STL but I believe there is something wrong that file only. The reason is snappy meshing complete geometry provided in blockMeshDict but my selected region is point inside the cylinder. I am unable to see any leak in STL. I taught to repair with netgen but STL doctor not showing any inconsistent triangles. Can somebody help me.

I want to see is there any defected triangles or volume is closed or not. How to do that.


PFA: STL file

Regards,
CFDUser_

philippose August 8, 2014 02:52

Hello there,
A good day to you.

I am not sure posting requests for help in unrelated threads will help you find a solution to your problem. Please reconsider in the future.

Anyway, I had a look at your STL file using an STL viewer, and found that half your triangles have the wrong orientation, hence resulting in snappyHexMesh meshing the entire domain instead of only the cylinder.

For a solid to be valid, all the triangles must have their normals facing out of the solid domain. In your case, the normals of all your triangles must face outwards with respect to the cylinder volume.

The STL "solids" - Inlet and Outlet are facing inwards, and so are all the triangles on the CylinderSurface connected to the Outlet. The triangles of CylinderSurface connected to the Inlet patch are facing the right way.

Hope this helps.

Have a nice day ahead!

Philippose

CFDUser_ August 8, 2014 03:33

Quote:

Originally Posted by philippose (Post 504967)
Hello there,
A good day to you.

I am not sure posting requests for help in unrelated threads will help you find a solution to your problem. Please reconsider in the future.

Anyway, I had a look at your STL file using an STL viewer, and found that half your triangles have the wrong orientation, hence resulting in snappyHexMesh meshing the entire domain instead of only the cylinder.

For a solid to be valid, all the triangles must have their normals facing out of the solid domain. In your case, the normals of all your triangles must face outwards with respect to the cylinder volume.

The STL "solids" - Inlet and Outlet are facing inwards, and so are all the triangles on the CylinderSurface connected to the Outlet. The triangles of CylinderSurface connected to the Inlet patch are facing the right way.

Hope this helps.

Have a nice day ahead!

Philippose

Thanks a lot Philippose. How can I find the orientation of all the triangles? Netgen or any other software or any library in OpenFOAM does that job?

By the way, I taught its the correct place to post my problem because I taught netgen may provide solution for this issue.

Thanks & Regards,
CFDUser_

CFDUser_ August 8, 2014 04:07

1 Attachment(s)
Still no success Philippose. I have attached the corrected stl file. Can you please have a look?


Regards
CFDUser_

philippose August 8, 2014 04:24

Hi,
I used some free STL viewer I found on the Internet to view the file since I dont have Netgen on the system I am working on currently.

However, if you open the STL file using Netgen, the colours of the surface should (if I remember right) give you an insight into the orientation. Usually, the "outside" of a geometry is coloured in bright green, and the "inside" in darker green.

Since "outside" and "inside" are determined by the Surface normals, you should see two different shades of green on the "outside" surfaces of your cylinder due to the wrongly oriented surface normals.

Then, there is an option in one of the Netgen menus to change the orientation of surface normals. You can click one triangle, and tell Netgen to change all other triangles to the same orientation as that of the one you selected.


Regards,
Philippose

philippose August 8, 2014 04:33

1 Attachment(s)
The new STL you posted is still exactly the same as the old one... still the wrongly oriented surfaces.

I have added an image to this post in which you can see the different orientations... The blue surfaces are oriented in the opposite direction compared to the surfaces in brown/gold.


Philippose

CFDUser_ August 8, 2014 16:04

Quote:

Originally Posted by philippose (Post 504993)
The new STL you posted is still exactly the same as the old one... still the wrongly oriented surfaces.

I have added an image to this post in which you can see the different orientations... The blue surfaces are oriented in the opposite direction compared to the surfaces in brown/gold.


Philippose

Can you tel me which software it is?

philippose August 8, 2014 16:33

Hi again,
The software I used can be downloaded from: http://www.freestlview.com/

How are you creating the STL file originally? Are you using something like Salome-Platform, or a CAD software? Or are you programmatically creating it using some custom code?

Have a great weekend!

Philippose

CFDUser_ August 8, 2014 16:52

Quote:

Originally Posted by philippose (Post 505112)
Hi again,
The software I used can be downloaded from: http://www.freestlview.com/

How are you creating the STL file originally? Are you using something like Salome-Platform, or a CAD software? Or are you programmatically creating it using some custom code?

Have a great weekend!

Philippose

Wow thanks for the info. Its custom code :).

Happy weekend too :)

Regards,
CFDUser_

philippose August 9, 2014 05:10

Hello,
I think the best idea idea would be to try to do the same geometry and export it to STL using one of the many free CAD / Geometry tools, and see if snappyHexMesh works as you expect it to with that geometry.

Once that works, you can compare the STL exported from that tool with the one you are writing using the custom code. That way, you will be able to figure out where the error in your code is hidden :-) It looks like a bug has sneaked into your code somewhere...

Enjoy!

Philippose

vaina74 November 13, 2014 07:44

Netgen 5.3.1 on Ubuntu 12.04 LTS (64 bit)
 
Hi all,
I know that Netgen 4.9.13 is included in Ubuntu packages but I'd like to test the last version. Togl-1.7 and Tix8.4.3 should be already set. If I try to configure, compile and install
Code:

./configure --with-tcl=/usr/lib/tcl8.5/ --with-tk=/usr/lib/tk8.5/ --with-togl=/usr/lib/Togl1.7 --enable-occ --with-occ=/usr/lib/
make
sudo make install

I obtain an error message:
Code:

make  all-recursive
make[1]: Entering directory `/home/user-a5/Downloads/netgen-5.3.1'
Making all in libsrc
make[2]: Entering directory `/home/user-a5/Downloads/netgen-5.3.1/libsrc'
Making all in general
make[3]: Entering directory `/home/user-a5/Downloads/netgen-5.3.1/libsrc/general'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/home/user-a5/Downloads/netgen-5.3.1/libsrc/general'
Making all in gprim
make[3]: Entering directory `/home/user-a5/Downloads/netgen-5.3.1/libsrc/gprim'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/home/user-a5/Downloads/netgen-5.3.1/libsrc/gprim'
Making all in linalg
make[3]: Entering directory `/home/user-a5/Downloads/netgen-5.3.1/libsrc/linalg'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/home/user-a5/Downloads/netgen-5.3.1/libsrc/linalg'
Making all in include
make[3]: Entering directory `/home/user-a5/Downloads/netgen-5.3.1/libsrc/include'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/home/user-a5/Downloads/netgen-5.3.1/libsrc/include'
Making all in meshing
make[3]: Entering directory `/home/user-a5/Downloads/netgen-5.3.1/libsrc/meshing'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/home/user-a5/Downloads/netgen-5.3.1/libsrc/meshing'
Making all in interface
make[3]: Entering directory `/home/user-a5/Downloads/netgen-5.3.1/libsrc/interface'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/home/user-a5/Downloads/netgen-5.3.1/libsrc/interface'
Making all in csg
make[3]: Entering directory `/home/user-a5/Downloads/netgen-5.3.1/libsrc/csg'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/home/user-a5/Downloads/netgen-5.3.1/libsrc/csg'
Making all in geom2d
make[3]: Entering directory `/home/user-a5/Downloads/netgen-5.3.1/libsrc/geom2d'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/home/user-a5/Downloads/netgen-5.3.1/libsrc/geom2d'
Making all in occ
make[3]: Entering directory `/home/user-a5/Downloads/netgen-5.3.1/libsrc/occ'
/bin/bash ../../libtool --tag=CXX  --mode=compile g++ -DHAVE_CONFIG_H -I. -I../..  -I../../libsrc/include  -DOCCGEOMETRY -I/usr/lib//inc -I/usr/include/opencascade -D_OCC64 -DHAVE_IOSTREAM -DHAVE_LIMITS -DHAVE_LIMITS_H -DHAVE_IOMANIP -I"/usr/include/tcl8.5"  -g -O2 -fopenmp -MT Partition_Inter2d.lo -MD -MP -MF .deps/Partition_Inter2d.Tpo -c -o Partition_Inter2d.lo Partition_Inter2d.cxx
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../.. -I../../libsrc/include -DOCCGEOMETRY -I/usr/lib//inc -I/usr/include/opencascade -D_OCC64 -DHAVE_IOSTREAM -DHAVE_LIMITS -DHAVE_LIMITS_H -DHAVE_IOMANIP -I/usr/include/tcl8.5 -g -O2 -fopenmp -MT Partition_Inter2d.lo -MD -MP -MF .deps/Partition_Inter2d.Tpo -c Partition_Inter2d.cxx  -fPIC -DPIC -o .libs/Partition_Inter2d.o
In file included from Partition_Inter2d.ixx:28:0,
                from Partition_Inter2d.cxx:33:
Partition_Inter2d.jxx:31:30: fatal error: BRepAlgo_AsDes.hxx: No such file or directory
compilation terminated.
make[3]: *** [Partition_Inter2d.lo] Error 1
make[3]: Leaving directory `/home/user-a5/Downloads/netgen-5.3.1/libsrc/occ'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/user-a5/Downloads/netgen-5.3.1/libsrc'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/user-a5/Downloads/netgen-5.3.1'
make: *** [all] Error 2

Can anyone help me to fix the installation procudure?
Thanks for your attention.


All times are GMT -4. The time now is 19:33.