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.

tlugaric December 23, 2015 08:57

Hi Ahmad!

Glad to hear you like our cfMesh mesher.
From your log I can see that it is complaining about missing "zlib.h" header file, so the "wmakeLnInclude" command does not do what it is supposed to.
You should install the zlib development package and try again. I don't know which Linux distro you are using, on Ubuntu you would type: "sudo apt-get install zlib1g-dev" for example.

As for the .run file, please tell me the name of the installer file, as well as which linux version you are using, so I can try to reproduce your problem.
If you asked the installer to install cfMesh source, it instals the OpenFOAM source as well, because cfMesh source relies on some parts of OpenFOAM.
After installing cfMesh, did you try to run it from your default terminal, or did you use the shortcuts placed on you deskop? If you try to launch it from your terminal, you need to source the installed cfMesh environment first (source [cfMesh_install_dir]/OpenFOAM-2.3.0/etc/bashrc) before you can use cfMesh.

Let me know if this helps

a_habib December 23, 2015 10:08

Hi Tomislav,
First of all, I'm using ubuntu 12 and I didn't take care to look at my desktop,
I tried the .run version and used the desktop shortcut and it worked.
Then I un-installed it and installed zlib.h as you suggested and then compiled the source version and it is working now.
Thanks a lot, and yes it is a great mesher. its easy and provides us several types of meshes. but I think tha the documentation still a little bit insufficient.
Keep up the good work.
P.S. my name is ahmad :)

tlugaric December 23, 2015 10:55

Hi Ahmad!

I am sorry for mistaking your name, I was reading an older post and got the names confused. I edited the post.

We have some more materials on our website cfmesh.com, and we will be providing some video tutorials in the near future. Feel free to check it out.

crixman June 11, 2016 04:12

Hi,
I installed foam-mesh for OF2.2.2. and foam-extend 3.1 and 3.2 without problems.
I am instead experiencing a problem with OF3.0.x - I got the following error - have to tested the installation for OF3.0.x or are you working now on that?

Code:

g++ -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=64 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -O3  -DNoRepository -ftemplate-depth-100 -DUSE_OMP -fopenmp -I/home/chris/OpenFOAM/OpenFOAM-3.0.x/src/triSurface/lnInclude -I/home/chris/OpenFOAM/OpenFOAM-3.0.x/src/edgeMesh/lnInclude -I/home/chris/OpenFOAM/OpenFOAM-3.0.x/src/meshTools/lnInclude -IlnInclude -I. -I/home/chris/OpenFOAM/OpenFOAM-3.0.x/src/OpenFOAM/lnInclude -I/home/chris/OpenFOAM/OpenFOAM-3.0.x/src/OSspecific/POSIX/lnInclude  -fPIC -c utilities/meshes/polyMeshGenModifier/polyMeshGenModifierAddBufferCells.C -o Make/linux64GccDPInt64Opt/utilities/meshes/polyMeshGenModifier/polyMeshGenModifierAddBufferCells.o
In file included from lnInclude/DynList.H:233:0,
                from lnInclude/VRWGraph.H:42,
                from lnInclude/meshSubset.H:40,
                from lnInclude/polyMeshGenPoints.H:42,
                from lnInclude/polyMeshGenFaces.H:40,
                from lnInclude/polyMeshGenCells.H:40,
                from lnInclude/polyMeshGen.H:39,
                from utilities/meshes/polyMeshGenModifier/polyMeshGenModifier.H:40,
                from utilities/meshes/polyMeshGenModifier/polyMeshGenModifierAddBufferCells.C:28:
lnInclude/DynListI.H: In instantiation of ‘Foam::DynList<T, staticSize>::DynList(const ListType&) [with ListType = int; T = long int; long int staticSize = 16l]’:
lnInclude/helperFunctionsTopologyManipulationI.H:491:34:  required from here
lnInclude/DynListI.H:136:21: error: request for member ‘size’ in ‘l’, which is of non-class type ‘const int’
    setSize(l.size());
                    ^
lnInclude/DynListI.H:138:32: error: subscripted value is neither array nor pointer
        this->operator[](i) = l[i];
                                ^
lnInclude/DynListI.H: In instantiation of ‘Foam::DynList<T, staticSize>::DynList(const ListType&) [with ListType = int; T = Foam::Vector2D<double>; long int staticSize = 6l]’:
lnInclude/helperFunctionsGeometryQueriesI.H:1059:37:  required from here
lnInclude/DynListI.H:136:21: error: request for member ‘size’ in ‘l’, which is of non-class type ‘const int’
    setSize(l.size());
                    ^
lnInclude/DynListI.H:138:32: error: subscripted value is neither array nor pointer
        this->operator[](i) = l[i];
                                ^
make: *** [Make/linux64GccDPInt64Opt/utilities/meshes/polyMeshGenModifier/polyMeshGenModifierAddBufferCells.o] Error 1
make[1]: Entering directory `/home/chris/cfMesh-v1.1.1/executables/cartesian2DMesh'
Making dependency list for source file cartesian2DMesh.C
make[1]: Leaving directory `/home/chris/cfMesh-v1.1.1/executables/cartesian2DMesh'
make[1]: Entering directory `/home/chris/cfMesh-v1.1.1/executables/cartesian2DMesh'
g++ -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=64 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -O3  -DNoRepository -ftemplate-depth-100 -I/home/chris/OpenFOAM/OpenFOAM-3.0.x/src/triSurface/lnInclude -I/home/chris/OpenFOAM/OpenFOAM-3.0.x/src/meshTools/lnInclude -I/home/chris/OpenFOAM/OpenFOAM-3.0.x/src/finiteVolume/lnInclude -I/home/chris/OpenFOAM/OpenFOAM-3.0.x/src/edgeMesh/lnInclude -I../../meshLibrary/lnInclude -IlnInclude -I. -I/home/chris/OpenFOAM/OpenFOAM-3.0.x/src/OpenFOAM/lnInclude -I/home/chris/OpenFOAM/OpenFOAM-3.0.x/src/OSspecific/POSIX/lnInclude  -fPIC -c cartesian2DMesh.C -o Make/linux64GccDPInt64Opt/cartesian2DMesh.o
g++ -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=64 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -O3  -DNoRepository -ftemplate-depth-100 -I/home/chris/OpenFOAM/OpenFOAM-3.0.x/src/triSurface/lnInclude -I/home/chris/OpenFOAM/OpenFOAM-3.0.x/src/meshTools/lnInclude -I/home/chris/OpenFOAM/OpenFOAM-3.0.x/src/finiteVolume/lnInclude -I/home/chris/OpenFOAM/OpenFOAM-3.0.x/src/edgeMesh/lnInclude -I../../meshLibrary/lnInclude -IlnInclude -I. -I/home/chris/OpenFOAM/OpenFOAM-3.0.x/src/OpenFOAM/lnInclude -I/home/chris/OpenFOAM/OpenFOAM-3.0.x/src/OSspecific/POSIX/lnInclude  -fPIC -Xlinker --add-needed -Xlinker --no-as-needed Make/linux64GccDPInt64Opt/cartesian2DMesh.o -L/home/chris/OpenFOAM/OpenFOAM-3.0.x/platforms/linux64GccDPInt64Opt/lib \
        -lmeshTools -ltriSurface -lfiniteVolume -ledgeMesh -L/home/chris/OpenFOAM/chris-3.0.x/platforms/linux64GccDPInt64Opt/lib -lmeshLibrary -lOpenFOAM -ldl  \
        -lm -o /home/chris/OpenFOAM/chris-3.0.x/platforms/linux64GccDPInt64Opt/bin/cartesian2DMesh
/usr/bin/ld: cannot find -lmeshLibrary
collect2: error: ld returned 1 exit status
make[1]: *** [/home/chris/OpenFOAM/chris-3.0.x/platforms/linux64GccDPInt64Opt/bin/cartesian2DMesh] Error 1
make[1]: Leaving directory `/home/chris/cfMesh-v1.1.1/executables/cartesian2DMesh'
make: *** [cartesian2DMesh] Error 2


tlugaric June 11, 2016 06:19

Hi crixman

Our cfMesh installer is tested with OpenFOAM 2.3.x, and is not guaranteed to work with OpenFOAM 3.0.x. We are working on an installer for OpenFOAM 3.0.x.

kittychunk July 22, 2016 02:58

Quote:

Originally Posted by tlugaric (Post 604387)
Hi crixman

Our cfMesh installer is tested with OpenFOAM 2.3.x, and is not guaranteed to work with OpenFOAM 3.0.x. We are working on an installer for OpenFOAM 3.0.x.

...and one for OpenFOAM 4.0 as well, I hope :)

franjo_j July 22, 2016 06:50

Hi kittychunk, we have updated the development branch in the repository at Sourceforge it now compiles with OpenFOAM 4.0 - you can give it a try and let us know if you notice any problems.

kittychunk July 22, 2016 08:11

Thank you very much Franjo - the development branch compiled fine with OpenFOAM 4.0.

ashim August 3, 2016 23:10

Hi Dr. Franjo Juretic,

I am trying to compile cfMesh (development brach ) for OpenFOAM -dev version in Ubuntu 14.10 and REHL 7.0. But I could not compile it yet. I am getting errors mostly related to the mesh library file DynListI.H. Would please have a look into it.

Thanks,

Ali

GDTech September 27, 2016 06:24

Dear Ali,

recent changes in dynamic list have been pushed to OpenFoam-dev.

The solution is to replace
Code:

this->UList<T>::operator=(
by
Code:

this->shallowCopy(
on lines 42, 55 and 67 in DynListI.H

Best regards

ashim September 27, 2016 22:28

Hi Laurent Fitschy,

Thank you very much for you time. The problem is fixed in other way. When I was cloning the code, somehow I was getting older version. But when I have downloaded it as a snapshots and compile it, it works perfectly.

Regards

Ali

elmo555 November 28, 2017 07:24

I'm trying to build the latest cfMesh (cfMesh-v1.1.2) with the latest OpenFOAM release (OpenFOAM-v1706), but some files seem to have changed, to the compilation fails:

Code:

In file included from ../../meshLibrary/lnInclude/triSurf.H:41:0,
                from checkSurfaceMesh.C:32:
../../meshLibrary/lnInclude/triSurfFacets.H:42:39: fatal error: geometricSurfacePatchList.H: No such file or directory
 #include "geometricSurfacePatchList.H"

What's the latest known version of cfMesh and OpenFOAM that compile? Any help is appreciated!


All times are GMT -4. The time now is 20:21.