CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Community Contributions (https://www.cfd-online.com/Forums/openfoam-community-contributions/)
-   -   [Discretizer] Installing Discretizer (https://www.cfd-online.com/Forums/openfoam-community-contributions/85702-installing-discretizer.html)

umassche March 4, 2011 15:40

Installing Discretizer
 
Hi,
I'm trying to use Discretizer with OpenFOAM 1.7.x on a Macbook Air with OS 10.6.6. booted in 32bit mode. I followed the installation method they gave (unpacking the discretizer-32bit.tar.gz, going in to the unpacked directory, commanding ./discretizer_setup.sh) but the command returns the following error

Slave:discretizer Savindu$ ./discretizer_setup.sh
readlink: illegal option -- f
usage: readlink [-n] [file ...]
./discretizer_setup.sh: line 23: ./ruby/1.9.1-p243/bin/ruby: No such file or directory

Contrary to the error message, there IS such a file named "ruby" and when I run it by double clicking it, an error message says that it can't execute the binary file.

why is this??? Can anyone give a "for Dummies" kind of step-by-step method to install Discretizer?

THANK YOU!

elvis March 5, 2011 09:50

Hi,

are sure that discretizer runs on a mac out of the box?
From the download page http://www.discretizer.org/node/2 you will see existing binaries for Linux and Windows, but no Mac!

elvis

umassche March 6, 2011 11:53

Yes it works. Discretizer on Mac OS Snow Leopard
 
first u need to install FXRuby (many ways. Google it)
Download the discretizer-32bit.tar.gz for Linux etc and extract the files
Then probably install the OpenGL extensions (gem install ruby-opengl)
"cd" into discretizer/discretizer/svn/discretizersetup in the extracted directory
type "ruby discretizersetup.rb"

The beautiful GUI of Discretizer will appear!

Savindu Hewa

run_cfd May 24, 2011 02:45

Where to get Discretizer :: setup??
 
Hi,

Greetings!!!

Can any body tell me where to get Discretizer :: setup ? I installed discretizer on RHEL5 but there I couldnot found anything for import mesh and for Boundary conditions and OF case setup. I guess Discretizer :: setup could do it, but where is that actually???

Regards,

MLD

umassche May 24, 2011 15:57

Hey, my last post is a little wrong. you shouldn't cd into the directory where discretizersetup.rb is located. go into the directory where discretizer.rb is located and type "ruby discretizer.rb". In the GUI that opens, you'll be able to import stuff.

run_cfd May 25, 2011 06:05

yes you are right. Now I got the discretizer-setup. Is indeed very helpful in setting up a case in OF. Thanks for your help.

But when using that I was little confused on setting porous region. Infact when I selected the solver rhoPorousSimpleFoam, the porous Zones were activated, But I was not able to assign a porosity of 0.6 in all the internal cell zones. Also, The porouszones menu under the solver shows "NoPorous zones". Can you tell me how to set a porous zone on all the inernal cell zones.

I had gone through a document named "PorousMedia in OpenFoam", but I could not understaned the concept of local coordinate system e1, e2 and e3, how to use it to difine porous zone.

Thanks for your help on this in advance.

MLD

Airmax June 7, 2013 06:41

I can't install Discretizer on Ubuntu 12.10
 
PRE { direction: ltr; color: rgb(0, 0, 0); }PRE.western { }PRE.cjk { }PRE.ctl { }P { margin-bottom: 0.21cm; direction: ltr; color: rgb(0, 0, 0); }P.western { font-family: "Liberation Serif","Times New Roman",serif; font-size: 12pt; }P.cjk { font-family: "DejaVu Sans"; font-size: 12pt; }P.ctl { font-family: "Lohit Hindi"; font-size: 12pt; } Hello everybody !

I am a new user of Ubuntu 12.10, and I would like to use the software OpenFOAM to do some aerodynamics studies for my final engineering internship.

To do it well, I want to use the mesh software Discretizer, but I don't manage to install it...
Could someone help me and give me the real steps of installation for Ubuntu 12.10 ?

Here are the installation steps I found on DIscretizer website:
#!/bin/sh # install required libs sudo apt-get install g++ libxrandr-dev libgemplugin-ruby rubygems libopengl-ruby ruby1.8-dev libfox-1.6-0 libfox-1.6-dev libfox-1.6-doc libfxscintilla17 libfxscintilla-dev subversion subversion-tools # download FXRuby gem wget http://rubyforge.org/frs/download.ph...uby-1.6.16.gem # install FXRuby sudo gem install fxruby-1.6.16.gem # checkout discretizer from sourceforge svn svn co https://discretizer.svn.sourceforge....ot/discretizer discretizer # run discretizer cd discretizer/discretizer ruby discretizer.rb
But I meet a lot of error messages and I don't understand the meaning of them...

admin01@ubuntu:~$ sudo apt-get install g++ libxrandr-dev libgemplugin-ruby rubygems libopengl-ruby ruby1.8-dev libfox-1.6-0 libfox-1.6-dev libfox-1.6-doc libfxscintilla17 libfxscintilla-dev subversion subversion-tools
[sudo] password for admin01:
Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances
Lecture des informations d'état... Fait
E: Impossible de trouver le paquet libfxscintilla17

(….)

admin01@ubuntu:~$ sudo gem install fxruby-1.6.14.gem
Building native extensions. This could take a while...
ERROR: Error installing fxruby-1.6.14.gem:
ERROR: Failed to build gem native extension.

/usr/bin/ruby1.9.1 extconf.rb
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- ftools (LoadError)
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from extconf.rb:3:in `<main>'

Gem files will remain installed in /var/lib/gems/1.9.1/gems/fxruby-1.6.14 for inspection.
Results logged to /var/lib/gems/1.9.1/gems/fxruby-1.6.14/ext/fox16/gem_make.out

admin01@ubuntu:~$ svn co https://discretizer.svn.sourceforge....ot/discretizer discretizer
Révision 129 extraite.
admin01@ubuntu:~$ cd discretizer/discretizer
admin01@ubuntu:~/discretizer/discretizer$ ruby discretizer.rb
ruby: No such file or directory -- discretizer.rb (LoadError)
admin01@ubuntu:~/discretizer/discretizer$


I know that the last problem is due to a wrong localisation of the file "discretizer.rb" but I really don't know what I have to type to find it and to be able to use Discretizer.


You can't imagine how important it is for me to use it in order to validate this internship.
I am looking forward to reading your answers !


Airmax

wyldckat June 16, 2013 14:09

1 Attachment(s)
Greetings to all! @Airmax: Welcome to the forum!

I'm not sure if Discretizer will be the right tool for you, but here goes just the same.

The following instructions have been tested in Ubuntu 12.04 x86_64:
  1. Install the necessary packages, as you mentioned:
    Code:

    sudo apt-get install build-essential libxrandr-dev ruby-full libruby ruby-dev  rubygems libopengl-ruby libfox-1.6-0 libfox-1.6-dev libfox-1.6-doc libfxscintilla19 libfxscintilla-dev subversion subversion-tools libgl1-mesa-dri libglu1-mesa freeglut3  libgl1-mesa-dev libglu1-mesa-dev freeglut3-dev
  2. Need to fix a missing symbolic link for "libfxscintilla.so":
    Code:

    sudo ln -s /usr/lib/libfxscintilla.so.19 /usr/lib/libfxscintilla.so
  3. Go into a good working folder. For example, "$HOME/OpenFOAM":
    Code:

    cd "$HOME/OpenFOAM"
  4. Clone the SVN repository:
    Code:

    svn co https://svn.code.sf.net/p/discretizer/code/discretizer/
  5. Go into the "discretizer" folder:
    Code:

    cd discretizer
  6. Build/install fxruby (automatically downloaded and built by gem!):
    Code:

    sudo gem install fxruby
  7. Same for opengl for Ruby:
    Code:

    sudo gem install opengl -v 0.7.0
  8. Then for running Discretizer and Discretizer::Setup manually:
    • Discretizer:
      Code:

      cd lib
      ruby discretizer.rb

    • Discretizer::Setup:
      Code:

      cd discretizer200
      ruby discretizersetup.rb

  9. For running them manually, unpack the attached file "discretizer_scripts.tar.gz" into the folder "discretizer" and then simply run:
    • Discretizer:
      Code:

      ./discretizer.sh
    • Discretizer::Setup:
      Code:

      ./discretizersetup.sh

This was rather complicated to figure out... fortunately Ubuntu and Ruby have a lot of things that make it a lot easier...

Best regards,
Bruno

Airmax June 17, 2013 03:34

Hi Bruno,

First of all; thank you for your help.

I tried the different stpes you gave me but I stil have a problem with the 6th step (installation of fxruby...) and I can't finish well to install Discretizer...

Here are the error messages I have in the tereminal:

P { margin-bottom: 0.21cm; } admin01@ubuntu:~/OpenFOAM/discretizer$ sudo gem install fxruby
Fetching: fxruby-1.6.27.gem (100%)
Building native extensions. This could take a while...
ERROR: Error installing fxruby:
ERROR: Failed to build gem native extension.

/usr/bin/ruby1.9.1 extconf.rb
checking for sys/time.h... yes
checking for signal.h... yes
checking for deflate() in -lz... yes
checking for png_create_read_struct() in -lpng... yes
checking for jpeg_mem_init() in -ljpeg... yes
checking for TIFFSetErrorHandler() in -ltiff... yes
checking for XftInit() in -lXft... yes
checking for XShmQueryVersion() in -lXext... yes
checking for XFindContext() in -lX11... yes
checking for glXCreateContext() in -lGL... yes
checking for gluNewQuadric() in -lGLU... yes
creating Makefile

make
compiling librb.c
librb.c: In function ‘SWIG_Ruby_define_class’:
librb.c:487:11: attention : variable ‘klass’ set but not used [-Wunused-but-set-variable]
compiling menu_wrap.cpp
menu_wrap.cpp: In function ‘void SWIG_exception_(int, const char*)’:
menu_wrap.cpp:578:41: erreur: le format n'est pas une chaîne littérale et pas d'argument de format [-Werror=format-security]
menu_wrap.cpp:581:38: erreur: le format n'est pas une chaîne littérale et pas d'argument de format [-Werror=format-security]
menu_wrap.cpp:584:43: erreur: le format n'est pas une chaîne littérale et pas d'argument de format [-Werror=format-security]
menu_wrap.cpp:587:41: erreur: le format n'est pas une chaîne littérale et pas d'argument de format [-Werror=format-security]
menu_wrap.cpp:590:40: erreur: le format n'est pas une chaîne littérale et pas d'argument de format [-Werror=format-security]
menu_wrap.cpp:593:43: erreur: le format n'est pas une chaîne littérale et pas d'argument de format [-Werror=format-security]
menu_wrap.cpp:596:41: erreur: le format n'est pas une chaîne littérale et pas d'argument de format [-Werror=format-security]
menu_wrap.cpp:599:42: erreur: le format n'est pas une chaîne littérale et pas d'argument de format [-Werror=format-security]
menu_wrap.cpp:602:39: erreur: le format n'est pas une chaîne littérale et pas d'argument de format [-Werror=format-security]
menu_wrap.cpp:605:36: erreur: le format n'est pas une chaîne littérale et pas d'argument de format [-Werror=format-security]
menu_wrap.cpp:608:43: erreur: le format n'est pas une chaîne littérale et pas d'argument de format [-Werror=format-security]
menu_wrap.cpp: At global scope:
menu_wrap.cpp:553:13: attention : ‘void SWIG_AsVal(VALUE, int*)’ defined but not used [-Wunused-function]
In file included from ./include/FXRuby.h:878:0,
from ./include/FXRbCommon.h:99,
from menu_wrap.cpp:559:
./include/inlinestubs.h:20:1: attention : ‘void FXApp_init(FX::FXApp*, VALUE, bool)’ defined but not used [-Wunused-function]
menu_wrap.cpp:790:1: attention : ‘void free_FXMenuPane(FX::FXMenuPane*)’ defined but not used [-Wunused-function]
menu_wrap.cpp:1019:1: attention : ‘void free_FXScrollPane(FX::FXScrollPane*)’ defined but not used [-Wunused-function]
menu_wrap.cpp:1412:1: attention : ‘void free_FXMenuCaption(FX::FXMenuCaption*)’ defined but not used [-Wunused-function]
menu_wrap.cpp:1631:1: attention : ‘void free_FXMenuSeparator(FX::FXMenuSeparator*)’ defined but not used [-Wunused-function]
menu_wrap.cpp:1937:1: attention : ‘void free_FXMenuTitle(FX::FXMenuTitle*)’ defined but not used [-Wunused-function]
menu_wrap.cpp:2210:1: attention : ‘void free_FXMenuCascade(FX::FXMenuCascade*)’ defined but not used [-Wunused-function]
menu_wrap.cpp:2478:1: attention : ‘void free_FXMenuCommand(FX::FXMenuCommand*)’ defined but not used [-Wunused-function]
menu_wrap.cpp:2799:1: attention : ‘void free_FXMenuBar(FX::FXMenuBar*)’ defined but not used [-Wunused-function]
menu_wrap.cpp:3131:1: attention : ‘void free_FXMenuCheck(FX::FXMenuCheck*)’ defined but not used [-Wunused-function]
menu_wrap.cpp:3432:1: attention : ‘void free_FXMenuRadio(FX::FXMenuRadio*)’ defined but not used [-Wunused-function]
cc1plus: some warnings being treated as errors
make: *** [menu_wrap.o] Erreur 1


Gem files will remain installed in /usr/lib/ruby/gems/1.9.1/gems/fxruby-1.6.27 for inspection.
Results logged to /usr/lib/ruby/gems/1.9.1/gems/fxruby-1.6.27/ext/fox16_c/gem_make.out



And then, at the last step I have:

admin01@ubuntu:~/OpenFOAM/discretizer/lib$ ruby discretizer.rb
/usr/local/lib/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- fox16 (LoadError)
from /usr/local/lib/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from discretizer.rb:38:in `<main>'

What is it due to? Can someone help me to solve this problem?

Thank you in advance.
Best regards,

Maxence

wyldckat June 17, 2013 18:40

Hi Airmax,

I've tried the instructions on Ubuntu 12.10 x86_64 inside a virtual machine. I tried using both ruby 1.8 and 1.9 and I was not able to make it work :(
It's not possible to build fxruby due to some problem with the compiler or dependency on certain libraries, which I'm not able to figure out.

Right now, there are only a couple suggestions I'm able to do:
Best regards,
Bruno

mina.basta July 12, 2013 12:57

Quote:

Originally Posted by wyldckat (Post 434321)
Greetings to all! @Airmax: Welcome to the forum!

I'm not sure if Discretizer will be the right tool for you, but here goes just the same.

The following instructions have been tested in Ubuntu 12.04 x86_64:
  1. Install the necessary packages, as you mentioned:
    Code:

    sudo apt-get install build-essential libxrandr-dev ruby-full libruby ruby-dev  rubygems libopengl-ruby libfox-1.6-0 libfox-1.6-dev libfox-1.6-doc libfxscintilla19 libfxscintilla-dev subversion subversion-tools libgl1-mesa-dri libglu1-mesa freeglut3  libgl1-mesa-dev libglu1-mesa-dev freeglut3-dev
  2. Need to fix a missing symbolic link for "libfxscintilla.so":
    Code:

    sudo ln -s /usr/lib/libfxscintilla.so.19 /usr/lib/libfxscintilla.so
  3. Go into a good working folder. For example, "$HOME/OpenFOAM":
    Code:

    cd "$HOME/OpenFOAM"
  4. Clone the SVN repository:
    Code:

    svn co https://discretizer.svn.sourceforge.net/svnroot/discretizer/discretizer/
  5. Go into the "discretizer" folder:
    Code:

    cd discretizer
  6. Build/install fxruby (automatically downloaded and built by gem!):
    Code:

    sudo gem install fxruby
  7. Same for opengl for Ruby:
    Code:

    sudo gem install opengl -v 0.7.0
  8. Then for running Discretizer and Discretizer::Setup manually:
    • Discretizer:
      Code:

      cd lib
      ruby discretizer.rb

    • Discretizer::Setup:
      Code:

      cd discretizer200
      ruby discretizersetup.rb

  9. For running them manually, unpack the attached file "discretizer_scripts.tar.gz" into the folder "discretizer" and then simply run:
    • Discretizer:
      Code:

      ./discretizer.sh
    • Discretizer::Setup:
      Code:

      ./discretizersetup.sh

This was rather complicated to figure out... fortunately Ubuntu and Ruby have a lot of things that make it a lot easier...

Best regards,
Bruno

Dear wyldckat,

All is OK with your method but i have only one problem that after step 9 when i enter ./discretizer.sh the program start but when i type ./discretizersetup.sh the program doesn't start. DO You have any solution?

wyldckat July 12, 2013 17:37

Greetings mina.basta and welcome to the forum!

Sorry about that, I forgot to give executable permissions to the script "discretizersetup.sh" :(
I've corrected the attached file in the post #8.

You can also fix the problem by running the following command:
Code:

chmod +x discretizersetup.sh
Then you should be able to run:
Code:

./discretizersetup.sh
Best regards,
Bruno

mina.basta July 14, 2013 05:38

Thank you Wyldckat, it's a pleasure for me to join your forum and thanks for the quick response & for your help. It works very good

Annier September 13, 2013 10:08

Thank you Bruno for the guidance
 
dear Bruno,
you have been guiding the beginners like us in the context of OpenFOAM and related softwares.
the step by step method you have provided herein is very useful for people willing to use discretizer software.
in one of the pages, you have taught us to use alias command in bash file when using OpenFOAM (of different versions together) and SALOME software.
your way of explaining the things is very lucid and nice.
thank you
Yours
Annier

Ben Chapman October 26, 2013 18:20

4 Attachment(s)
Bruno

I am struggling with steps 8 and 9 of the installation.

Screen shots attached are a result of the 4 commands.

In addition to no images in the GUI, I am unable to import .stl files - discretizer shuts down when I attempt.

I appreciate your help with this problem.

Take care,
Ben

Quote:

Originally Posted by wyldckat (Post 434321)
Greetings to all! @Airmax: Welcome to the forum!

I'm not sure if Discretizer will be the right tool for you, but here goes just the same.

The following instructions have been tested in Ubuntu 12.04 x86_64:
  1. Install the necessary packages, as you mentioned:
    Code:

    sudo apt-get install build-essential libxrandr-dev ruby-full libruby ruby-dev  rubygems libopengl-ruby libfox-1.6-0 libfox-1.6-dev libfox-1.6-doc libfxscintilla19 libfxscintilla-dev subversion subversion-tools libgl1-mesa-dri libglu1-mesa freeglut3  libgl1-mesa-dev libglu1-mesa-dev freeglut3-dev
  2. Need to fix a missing symbolic link for "libfxscintilla.so":
    Code:

    sudo ln -s /usr/lib/libfxscintilla.so.19 /usr/lib/libfxscintilla.so
  3. Go into a good working folder. For example, "$HOME/OpenFOAM":
    Code:

    cd "$HOME/OpenFOAM"
  4. Clone the SVN repository:
    Code:

    svn co https://svn.code.sf.net/p/discretizer/code/discretizer/
  5. Go into the "discretizer" folder:
    Code:

    cd discretizer
  6. Build/install fxruby (automatically downloaded and built by gem!):
    Code:

    sudo gem install fxruby
  7. Same for opengl for Ruby:
    Code:

    sudo gem install opengl -v 0.7.0
  8. Then for running Discretizer and Discretizer::Setup manually:
    • Discretizer:
      Code:

      cd lib
      ruby discretizer.rb

    • Discretizer::Setup:
      Code:

      cd discretizer200
      ruby discretizersetup.rb

  9. For running them manually, unpack the attached file "discretizer_scripts.tar.gz" into the folder "discretizer" and then simply run:
    • Discretizer:
      Code:

      ./discretizer.sh
    • Discretizer::Setup:
      Code:

      ./discretizersetup.sh

This was rather complicated to figure out... fortunately Ubuntu and Ruby have a lot of things that make it a lot easier...

Best regards,
Bruno


wyldckat October 26, 2013 18:51

Hi Ben,

I think that there is something very strange is going on with your installation of OpenFOAM and which is affecting Discretizer. I say this because of all of those messages you are getting about "mpicc".

How exactly did you install OpenFOAM and did you install more than one version of OpenFOAM?
And are you certain that you are using Ubuntu 12.04?

Best regards,
Bruno

Ben Chapman October 26, 2013 18:58

Bruno,

I am sure that I have Ubuntu 12.04 -LTS http://www.ubuntu.com/download/desktop

If you are *pretty* sure that its an installation error I wouldnt be surprised - its been a learning experience with quite a few iterations - delete -> reinstall, ect.

Should I delete ubuntu partitions and start from scratch?

Thanks
Ben

wyldckat October 26, 2013 19:00

Hi Ben,

Quote:

Originally Posted by Ben Chapman (Post 459190)
Should I delete ubuntu partitions and start from scratch?

If you can, perhaps it's the best. Specially if you don't remember every step you've tried.

Best regards,
Bruno

Ben Chapman October 26, 2013 19:13

Bruno

Do you see any compatibility problems with these installation guides?

Ubuntu:
http://www.ubuntu.com/download/deskt...g-term-support

OpenFOAM (for Ubuntu 12.04 - 3rd entry)
http://openfoamwiki.net/index.php/In...M-2.1.1/Ubuntu

Thanks
Ben

wyldckat October 26, 2013 19:40

Hi Ben,

No, there isn't any incompatibility there.

All I can think of is that some packages might have been removed when they shouldn't have. You can try redoing step #1 from the instructions for building OpenFOAM 2.1.1 from source code: http://openfoamwiki.net/index.php/In...u#Ubuntu_12.04

Best regards,
Bruno


All times are GMT -4. The time now is 18:54.