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/)
-   -   [cfMesh] cfMesh-v1.1.1 (https://www.cfd-online.com/Forums/openfoam-community-contributions/160757-cfmesh-v1-1-1-a.html)

alinuman15 October 13, 2015 02:53

cfMesh-v1.1.1
 
Dear All:
I am trying to install cfMesh-v1.1.1, so I extracted its file on :
/opt/cfMesh-v1.1.1$
Then I typed:
sudo apt-get install cfMesh-v1.1.1
I got :
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package cfMesh-v1.1.1
E: Couldn't find any package by regex 'cfMesh-v1.1.1'
ali@ali:/opt/cfMesh-v1.1.1$ cd utilities/
ali@ali:/opt/cfMesh-v1.1.1/utilities$ sudo apt-get install cfMesh-v1.1.1
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package cfMesh-v1.1.1
E: Couldn't find any package by regex 'cfMesh-v1.1.1'


So do you have any suggestion ?
Thank you in advance

alexeym October 13, 2015 03:36

Hi,

I would suggest you to read documentation on apt-get to learn when and how to use it.

Then you can proceed with cfMesh installation. You have got two choices:

1. Install prebuilt version using cfMesh-1.1.1-linux.run (see http://sourceforge.net/projects/cfmesh/files/v1.1.1/, text below file list).

2. Build it from source. See README file in cfMesh-v1.1.1 folder for instructions.

alinuman15 October 13, 2015 03:41

Thank you alexeym for replying!
I tried to build it from source and I got the following :
ali@ali:/opt/openfoam240/cfMesh-v1.1.1$ ./Allwmake
./Allwmake: 3: ./Allwmake: wmake: not found
./Allwmake: 6: ./Allwmake: wmake: not found
./Allwmake: 9: ./Allwmake: wmake: not found
ali@ali:/opt/openfoam240/cfMesh-v1.1.1$

alexeym October 13, 2015 03:56

The error is self-explanatory.

Allwmake script can not find wmake executable, in general this means you did not set up environment variables for OpenFOAM (see https://www.google.com/search?q=open...ironment+setup, choose any link you would like).

Since you are trying to use apt-get and install cfMesh into /opt, I guess, you are using Ubuntu and you have installed OpenFOAM from binary packages, so before cfMesh compilation you have to issue command 'source /opt/openfoam240/etc/bashrc'.

tlugaric October 13, 2015 03:56

Hi Ali!

Thank you for your interest in cfMesh.
Unfortunately, cfMesh does not have a package that can be used with apt-get (yet), you you cannot install it using apt-get.
From your post, I can not understand if you are trying to use the prebuilt version (cf_Mesh-1.1.1-linux.run) or the source package (cfMesh-1.1.1.tgz).
If you are trying to use the prebuilt version, before running it, please check that it has the execute permission set correctly. Unfortunately, uploading the installer online always clears the execute permission.

If you are building from source, use this procedure:
0) Export WM_NCOMPPROCS=[number of cores on your CPU]
1) Extract the tgz file to the folder of your choice
2) Source your OpenFOAM or foam-extend environment (source [foam_install_folder]/etc/bashrc
3) make sure you have the gcc compiler set up properly. We compile using gcc 4.8.2 or newer.
4) Make sure you have lnInclude directories generated in OpenFoam source directories for triSurface, meshTools, foam/openFOAM, pstream/mpi, OSSPecific/Posix and edgeMEsh libraries. If you dont have them, generate them like this:
to generate lnInclude:
go to src/trisurface, wmake libso, wait untill it starts to build (or fails)
go to src/meshTools, wmake libso, wait untill it starts to build (or fails)
go to src/foam or src/openFoam, wmake libso, wait untill it starts to build (or fails)
go to src/pstream/mpi, wmake libso, wait untill it starts to build (or fails)
go to src/edgeMesh, wmake libso, wait untill it starts to build (or fails)
go to src/OSspecific/MsWindows or POSIX, wmake libo, wait untill it starts to build (or fails)
5. You can now use ./Allwmake script in cfMesh source folder to compile cfMesh

Please feel free to contact me if you have any questions

alinuman15 October 13, 2015 04:20

Thank you so much. I installed it. For general benefit I list what I did.
I followed your steps and did the following:-

ali@ali:/opt/openfoam240/cfMesh-v1.1.1$ export WM_NCOMPPROCS=[8]
ali@ali:/opt/openfoam240/cfMesh-v1.1.1$ source opt/openfoam240/etc/bashrc
ali@ali:/opt/openfoam240/cfMesh-v1.1.1$ ./Allwmake


My best regards

alinuman15 October 13, 2015 05:15

Dear Tomislav:
Do you know if there is any tutorial or guide for learning CfMesh? Can I use it without buying CF Suite ?
Thank you again

tlugaric October 13, 2015 05:41

Dear Ali!

There are some tutorials included in the .tgz file under the tutorials directory. You can examine the provided dictionaries ad generate meshes using Allrun scripts. There is also a user guide that explains various dictionaries and how they are used in the userGuide dictionary.

We also have this user guide, and other materials at our website www.c-fields.com, feel free to check it out. We are also preparing a new website cfmesh.com which will include more tutorials and use-cases. You can sin up at this website to be notified when it is ready.

As for cfSuite and cfMesh usage, you can use cfMesh without cfSuite.
cfMesh is a console application, it is open source and free, and you can set it up using your favourite text editor to set up the meshing case.
cfSuite is a closed source commercial GUI frontend for cfMesh and OpenFOAM that allows you to set up meshing through a simpler interface, as well as to better utilise vrious options (such as creation of refinement zones, control of boundary layers, etc), and to inspect the generated mesh. It also supports a subset of OpenFOAM solvers, so you can set up and run simulation cases as well.

alinuman15 October 13, 2015 07:08

Dear Tomislav:
1) I tried to run these tutorials but the three two files (0 and constant) for all of them are empty ! so when I run ./allrun, I got:
ali@ali:/opt/openfoam240/cfMesh-v1.1.1/tutorials/cartesian2DMesh/hatOctree$ chmod u+x ./Allrun
ali@ali:/opt/openfoam240/cfMesh-v1.1.1/tutorials/cartesian2DMesh/hatOctree$ ./Allrun
./Allrun: 3: .: Can't open /bin/tools/RunFunctions
ali@ali:/opt/openfoam240/cfMesh-v1.1.1/tutorials/cartesian2DMesh/hatOctree$ chmod u+x ./Allclean
ali@ali:/opt/openfoam240/cfMesh-v1.1.1/tutorials/cartesian2DMesh/hatOctree$ ./Allclean
./Allclean: line 9: /bin/tools/CleanFunctions: No such file or directory
./Allclean: line 11: cleanCase: command not found
rm: cannot remove ‘constant/polyMesh’: No such file or directory
2) There is no sign up in the website www.c-fields.com ( there is just sign in).
3) Is the Cfmesh job is just to create mesh or it can create geometry as well ?in case it can create geometry, are there GUI for it? How can I interact with the mesh which I have created ?

Sorry for long lists on questions.

tlugaric October 13, 2015 07:25

Dear Ali!

1) It looks to me like there is an issue with your OpenFOAM installation. The missing RunFunctions and CleanFunctions should be a part of your openFOAM, and located in $WM_PROJECT_DIR/bin/tools/
2) The sign up is on www.cfmesh.com site, not www.c-fields.com
3) cfMesh is a mesher, and it only creates volume meshes. There are tools provided for importing geometries created by CAD software that come with cfMesh. Interaction and setup of geometries and volume meshes can be done througg cfSuite. You can also load view meshes in any third party tool that can read openFOAM volumeMEshes (e.g. paraview)

alexeym October 13, 2015 08:54

Hi,

Concerning 1. You again did not set up environment (source opt/openfoam240/etc/bashrc). You have to do it every time you start new terminal window/tab. It is CLEARLY stated in "User Configuration" section on http://openfoam.org/download/ubuntu.php.

tim.M October 19, 2015 09:08

I am having a similar problem installing cfMesh.

In my .bashrc I have a line "source /opt/openfoam240/etc/bashrc".

For the installation of cfMesh I downloaded "cfMesh-v1.1.1.tgz", moved it to my /opt directory and extracted it here.

Then I ran "source /opt/openfoam240/etc/bashrc" followed by "sudo ./Allwmake". Unfortunately, I always get the following message:

./Allwmake: 3: ./Allwmake: wmake: not found
./Allwmake: 6: ./Allwmake: wmake: not found
./Allwmake: 9: ./Allwmake: wmake: not found

I am running this commands with my username on Ubuntu-15.04. I searched for answers in many forums but have not found a solution yet. Does anybody know what I am doing wrong?

tlugaric October 19, 2015 10:24

Hi Tim, and thank you for your interest in cfMesh.

From your post, it seems to me you did everything correctly.
After your run source /opt/openfoam240/etc/bashrc, can you please post the output of "which wmake"?

tim.M October 19, 2015 10:29

Hi tlugaric,

thank you very much for your quick reply.
The output of "which wmake" is: /opt/openfoam240/wmake/wmake

tlugaric October 19, 2015 10:53

Hi Tim!

I have managed to reproduce your problem, the problem is in the sudo command.
Let me explain what is going on:
First, when you do "source /opt/openfoam240/etc/bashrc, you set up the foam environment in your user shell. When you type sudo ./Allwmake, sudo effectively creates another shell (superuser shell) which does not have the environment set up, therefore, under sudo, ./Allwmake does not see wmake.

If you wish to compile cfMesh from the tgz file, I suggest you unzip it into some folder where you don't need sudo privileges, and run ./Allwmake there. This will build cfMesh libraries&binaries in FOAM_USER_APPBIN and FOAM_USER_LIBBIN.

Alternatively, you can enter a sudo shell by executing sudo -s, then source /opt/openfoam240/etc/bashrc, then ./Allwmake

tim.M October 19, 2015 11:41

Thank's a lot for your advice. I installed cfMesh with your second option with
1) sudo -s
2) source /opt/openfoam240/etc/bashrc
3) ./Allwmake

The installation went fine.
I then copied the cfMesh tutorials to my openfoam/run/tutorials directory. The problem is that I can only run the cfMesh tutorials as root after running sudo -s.
As "normal" user the cfMesh commands can not be found.

tlugaric October 19, 2015 12:13

In that case, i suggest you use the ither suggestion from my previous post and untar the source in a different directory so you can build without sudo. Alternatively, you can install the .run file from sourceforge and build the source in that package.

a_habib December 23, 2015 04:48

Hello Foamers.
I'm using a pre-compiled OpenFOAM from RheologicRemix and I have gcc-5 and every thing is working, but when I'm trying to compile it from source it fails every time (I can provide the compiling log), I also tried to use the .run version but I wasn't able to use it in the terminal (the system didn't recognize the commands), It's working on windows But I prefer to use it on LINUX in order to use my computer in a better way.
If any one can help me I would be very thankful.
P.S: I compiled additional libraries to OF and i t worked well.
Thanks in advance.

tlugaric December 23, 2015 05:01

Hello Ahmad!

Could you please provide me with a compiling log, so we can look into the issue?
Also, can you please explain the issue with using the .run version?

a_habib December 23, 2015 08:17

1 Attachment(s)
Thanks for your concern. I have to admit it, Great Utility
This is the log.
About the .run version:
I used the command : chmode u+x and installed it but I didn't ask the installer to include the OpenFOAM 2.3 source, yet it included it.
After that I tried to use some commands like pMesh but it didn't work.
I navigated into the cfMesh folder and used the scripts ./Allwclean and then ./Allwmake and I had the same compiling error.
At this point I downloaded the source and tried to compile it, and I had the very same compiling error.
What I should do? What I did wrong?
Thanks in advance.


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