Frequently Asked Questions
Question: I have a surface file in vtk generated extracting some cells from an initial mesh. Therefore, the surface is not smooth at all. I’d like just to rebuild an internal hexahedral mesh, but keeping the original surface points of the vtk exactly where they are. Is it possible with cfMesh?
Answer: It can be done by creating a new case and generating the mesh there and then merge it with the existing mesh. However, the conformity of meshes at the surface is not guaranteed.
We also provide a professional version of cfMesh in an aggregate called cfMeshPRO. cfMeshPRO is an aggregate based on an advanced version of cfMesh that is more robust and faster that the version available at Sourceforge + GUI that reduces the time needed to set up a meshing job. Furthermore, it includes 10 hours of e-mail/telephone support.
cfMeshPRO aggregate includes cfMesh with some additional features:
- Automatic cell sizing
- Boundary layer topology at inlet/outlets and symmetry planes
In the future we will also include:
- Multi-material meshing
- Control of boundary layer thickness
cfMesh is designed as a library of algorithms that perform meshing tasks and allow for customisation and implementation of various meshing features:
- It can generate various types of meshes: Cartesian (hex-dominant) in both 3D and 2D, polyhedral and tetrahedral.
- It requires much less manual effort than snappyHexMesh, and is 4-5 faster than snappyHexMesh. It allows for 100% boundary layer coverage.
- It also capable of generating meshes with 20+ layers when the layer optimisation is switched on.
Question: I use cfMesh vx.x.x under the GPL License. With cfMeshPRO your company offers newer versions. Are you also going to publish newer versions of cfMesh under GPL License?
Answer: cfMesh is a GPL licensed code, and we have made versions up to 1.1.1 available free of charge. We plan to update the free version in the future and the policy for that is:
1. All features developed by external contributors.
2. Features developed via paid contracts, where the customers do not mind that the development is made freely to the general public.
3. Critical bug fixes and improvements.
4. New features when we find it appropriate.
5. Features available in the free version will always remain available free of charge.
Our customers who buy cfMeshPRO aggregate can also receive the cfMesh source code, as the mesher still remains licensed under GPL. Those customers also get support and priority in requesting new features, bug fixes, etc.
In case you receive any licensing errors during the application start up, please send the error code, along with cmDust File to this email.
To create the cmDust file, please follow the instructions below:
- Open CmDust using the “Start | All Programs | CodeMeter | Tools” menu item.
The output of the executed program is written to the text file CmDust-Result.log and saved to the user directory which automatically opens when starting CmDust.
Alternatively, you are able to use the commandline application cmu to create a log file.
For the operating systems Linux, you create the CmDust file using the cmu commandline program. Calling cmu is stored in the search path.
- Open cmu commandline
- Type in the following command cmu –cmdust –file ~/home/cmDust.log.
Question: Does cfmesh work with MRF problem?
Answer: cfMesh does not generate cell zones, required to set up MRF, within a meshing process. You can generate them after by using setSet and setsToZones.
Question: I’m not able to run salomeTriSurf.py. In effect, I can start the tool, but I don’t know how to create the output file. I read the source code, but, because I’m not so good to program, I didn’t understand how to input the fileName. Can you give me some information?
Answer: The scripts for Salome are the valuable and appreciated contributions from Ivor Clifford. In order to export the surface from Salome it is usual to do the following:
1. Generate a triangulation in Salome, within the Mesh module.
2. Import the salomeToSurf.py script. The Load Script option exists inside the File menu.
3. Select the surface you want to export, by highlighting it in the project tree, and write: triSurf().writeFms(“surfaceName.fms”) in the python console.
This executes the script with the selected mesh as its argument, and writes the fms file with the given name into the directory where Salome is installed. You can also provide an absolute path to get the fms file written to the desired location.
Question 1: I am Using Ubuntu 14.04.2 and have some Problems with cfMesh.
1. During Installation: Could not write Desktop Entry at /home/dom/Desktop/cfMesh_uninstall.desktop
2. also:QSslSocket: cannot resolve SSLv2_client_method QSslSocket: cannot resolve SSLv2_client_method
Answer: The first message simply indicates that the installer was not able to create an uninstaller icon on the desktop. This does not affect your ability to run cfMesh, it will only mean you need to go to the installation directory to run the uninstaller. This is usually caused by permission issues in Linux. Perhaps the installer did not have sufficient permissions to create the file. The second message can safely be disregarded. Since we provide only the offline installer, and we do not have an online repository, this will not cause any issues with your installation.
Question 2: What’s the best way to uninstall an earlier version of cfMesh?
Answer: There is an uninstaller binary in the installation diectory od cfMesh (tipically ~/CreativeFields/cfMesh/cfMeshUninstall). Alternatively, there should also be a launcher in your desktop (on Ubuntu it is in unity launcher, on CentOS/RHEL it is in the applications entry in the menu on top of the screen).
Question 3: I can’t uninstall the program. When I start the uninstallation wizard, the process simply doesn’t do anything.
Answer: We have noticed the uninstaler sometimes has getting superurer privileges on some Linux distros. To remedy this, please run the uninstaller with sudo privileges (e.g. sudo ~/CreativeFields/cfMesh/cfMeshUninstall).
Question: I’m trying to mesh a geometry (STL surface) that contains coplanar patches that are located within other surrounding patches. Due to very promising previous meshing results I’m trying to use cartesianMesh (part of cfMesh). I’m therefore using the tool surfaceFeatureEdges to convert the STL file and write the surface along with its feature edges to a *.fms file. This works basically fine, however some of the features are missing. The *.fms file contains the features of the 3d surface only, the features induced by the patch topology are missing. The following meshing process therefore creates some problems at the corners of the inner patches. Can you please provide some hints on how to also extract the edges of the inner patches?
Answer: cfMesh is designed to capture corners attached to three or more feature edges. This is not the case here, and the vertices you wish to be corners are handled as ordinary feature edges.
The problem with the corners can be resolved by creating a grid of feature edges in the geometry, such that there exist at least three feature edges at each corner. For best results, please try to align the additional edges with the edges in the mesh.
Question: In preparation for a bigger task, I started some tests with cfMesh (cartesianMesh) and its edgeMeshRefinement feature. I set up a rather simple geometry and tried to refine the mesh along 8 lines going from the corners of a quad to its center.The strange result of my experiment was, that the mesh was refined only along a single of the 8 lines. Doing some additional tests with different coordinates, it seems that the start and end points of the lines used for refinement must have a positive delta x, y and z. Is this a bug or are my dictionaries faulty?
Answer: The problem that the edges must be oriented in the positive direction was indeed a bug, and the solution for the problem is already available in the development branch of the git repository together with some additional fixes. Regarding the crash, please submit a ticket at the Sourceforge site together with an example such that we can reproduce it.
Question: Is it possible to run an AMI simulation using cfMesh? How would you go into that? I’m not sure if I have to make two geometries for inner and stator, mesh them separately and combine them, or if I just need a single stl file with all patches. How would I make the rotating cellZone then?
Answer: Create the meshes separately and then merge meshes, no stitching required.
Question: Is it possible to add explicitly stl file other than the standard primitive shapes like cone, box etc. to define an additional cell zone with or without baffles/boundary. That can be used later on for MRF/moving mesh simulations with AMI interfaces.
Answer: Yes, we support mesh refinement via additional surface meshes. However, multi-region support based on additional surface meshes is planned for the next major release.
Question: Support for multi-region meshes would be very nice. Creating such meshes is very tedious in OpenFOAM right now.
Answer: Multi-material is high on the list of priorities.
Suggestions: perhaps it might be worth adding something to meshDict to determine how many iterations of boundary layer treatment each patch will receive? One can imagine some algorithm to vary boundary layer thicknesses on patches by doing different intervals and iterations of these functions with perhaps a way to control the .5 cell initial height in generateBoundaryLayers. For example- generateBoundaryLayers()
Question: If you’re going to upgrade it, can you please add following features?
1- possibility to set first layer height (absolute) as mandatory on BL creation
2- possibility to define a sort of volume of influence for small gaps
Request 2 is when you have to add layers in small gaps, sometimes it happens that cells are merged, so by defining a volume of influence ( sphere, torus, ecc..) layers have to squash instead of collapsing one into another.
Answer: You can use custom boundary layer parameters for each patch using the boundary dictionary within meshDict. There is also a variable keepIntersetcingCells that may help your other feature.
Question: For possible future improvements, I have some ideas: Adding a manual control for the total thickness of boundary layers. I couldn’t figure out how to control the size of the boundary layers properly. Also, I was unable to get layers with an even thickness over the whole patch, as the nodes were relaxed to improve the quality of the cells next to the layers. I’m not sure if there is a good solution to this issue, but I think there were some updates on layer generation in snappyHexMesh in the previous versions.
Answer: Total thickness of a boundary layer in cfMesh is roughly equal to the cell size at the given location. There are also plans to improve quality and the control over boundary layer thickness.
Question: I was able to compile cfMesh on Ubuntu, but when running ./Allwmake on CentOS 6.4, I get:
./Allwmake: line 3: wmake: command not found
./Allwmake: line 6: wmake: command not found
./Allwmake: line 9: wmake: command not found
did it happen to someone else as well? Just found out that $WM_OPTION environment variable is not set – anyone can help me setting it?
Answer: Which version of gcc do you use? If your gcc is older than 4.2.4 you will not be able to use multi-threading. You can get and use a newer version of gcc by installing the devtoolset-2. The instructions can be found here: http://linux.web.cern.ch/linux/devtoolset
It seems that the OpenFOAM on your system is not set up correctly. cfMesh requires a working OpenFOAM in order to compile and run. What happens if you type: which icoFoam in a shell you use for compiling cfMesh?
$WM_OPTIONS is set up automatically when you source bashrc/cshrc. Can you please check whether foamInstall is correct in your bashrc/cshrc?
Question: I reinstalled OF; things seem to work, which icoFoam
but I have the same problem – $WM_OPTIONS not set
in bashrc I have:
where cd $HOME/$WM_PROJECTS opens the OpenFOAM folder.
foamCompiler is set to system – but I can’t find $WM_OPTIONS anywhere – should I set it manually? any other suggestions?
Answer: WM_OPTIONS variable is set in etc/config/settings.sh or settings. csh, depending on the shell you use. What is the reason that you use Gcc45? By default, it is set to Gcc. Do you have Gcc 4.5 installed on your machine? What do you get when you type gcc -v?
In addition, you have had the WM_OPTIONS defined because you have the path to the executables. Therefore, WM_OPTIONS=linux64Gcc45DPOpt was defined at some point. Can you please download a fresh source of OpenFOAM-2.2.0 and compare the content of the etc directory with yours.