CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM (
-   -   Best free tool for Geometry creation (

mmkr825 October 4, 2012 06:03

Best free tool for Geometry creation
Hi Foamers,
I am using OF 2.1.1 version and i wish to create very complex geometry. By using polyMesh (BlockMeshDict) utility it is taking too much time.
Please suggest me the best free tool for geometry creation and how get that tool.


julien.decharentenay October 4, 2012 08:13

Hi Mallikarjuna,

There are a number of free tools that you could use. Most are likely to rely on snappyHexMesh to automate the mesh creation. SnappyHexMesh essentially takes a STL representation of the geometry you are trying to mesh.

The following tools have some level of integration with openFoam (i.e they are likely to export openfoam cases):
- Discretizer;
- EnGrid;
- Salome.


mmkr825 October 4, 2012 08:23

Hi Julien de Charentenay,
Thanks very much for super fast reply. Among Discretizer: EnGrid; Salome, Which one is more accurate and easy (user friendly)for the fresher. Please suggest me which version need to be installed for the good accuracy.


julien.decharentenay October 4, 2012 19:00

Hi Mallikarjuna,

My knowledge only extends to their existence. I have used them a little with various degrees of success, but not sufficiently to provide advice on how accurate/easy they are.

I forgot to mention gmsh - it would generate a tetrahedral mesh - in a similar fashion to Salome.


mmkr825 October 5, 2012 00:47

Hi Julien
Thanks a lot for your reply. I'll go according to your suggestion. Is there any tutorial which gives the step by step procedure for the installation of salome ?. If it exists, please send me the link.


kalle October 5, 2012 02:16

If you want to stick with blockMesh you might consider this tool:


Sorry for the commercial

SirWombat October 5, 2012 03:37

for complex geometries i normally use a rectangular background mesh created by blockmesh and snappyHexMesh with that complex geometry as STL file. Whether this mesh is inside or outside of the geometry can be selected within snappyHexMesh.

The advantage ist that the geometry can be created by your favorite 3D-CAD program as long as it can export to STL or OBJ files.

Have a look at this:

mmkr825 October 5, 2012 04:58

Hi Sirwombat,
Thanks for your information. I'll go through your suggestion.


latvietis October 7, 2012 05:58

It actually depends from what you want to model. Firstly, I tried blockMesh, but the problem was that it simply doesn't allow to create internal physical boundaries that is really needed for some problems.

I found snappy too hard for beginner, but it seems worth to try. I prefer Gmsh.


elvis October 7, 2012 13:21

there is in overview of
Openfoam GUIs
Calculix has also the Option to Export to OF

mmkr825 October 8, 2012 01:20

Hi Elvis,
Thanks for the quick reply. Among open sources which one is easy for freshers. I am dealing with pipe, channel flows.


elvis October 8, 2012 02:25

my answer is subjective, because the way I work might not be the right one for you.

For pipes/channel I think discretizer (to model directly in that tool) or engrid (models made with blender) could be useful tools.

mmkr825 October 8, 2012 02:53

Hi Elvis,
Thanks for reply. I'll go through according to your suggestion.

I have one more doubt not related to this thread.

i developed my own solver for predicting velocity profile(U) and particle concentration profile(T) for suspension flow (fluid+particles). And in my momentum equation, the viscosity is not constant, it is function of particle volume fraction(T).
And i written the momentum equation as follows:

tmp<fvVectorMatrix> UEqn
fvm::div(phi, U)
- fvm::laplacian(nu*pow(1-T/0.68,-1.82), U)


solve(UEqn() == -fvc::grad(p));

where T is the particle volume fraction (dimensionless scalar field).

For predicting particle volume fraction(T), the governing equation written as:

fvm::div(phi, T)
- fvm::laplacian(0.62*1.82*pow(a,2)*g*pow(T,2)*pow(0 .68-T,-1), T)
- fvm::laplacian(0.41*pow(a,2)*g*T, T)
fvc::laplacian(0.41*pow(a,2)*T*T, g)

Where g = local shear rate
= sqrt(2*E:E)
= 1.4142*sqrt(magSqr(symm(fvc::grad(U))))

when i run my case (simple channel flow) by using my solver, at initial conditions it is giving the following error.

error message:-

Create time

Create mesh for time = 0

Reading transportProperties

Reading field p

Reading field U

Reading field T

Reading/calculating face flux field phi

No field sources present

SIMPLE: convergence criteria
field p tolerance 0.01
field U tolerance 0.001
field T tolerance 1e-05

Starting time loop

Time = 1

DILUPBiCG: Solving for Ux, Initial residual = 1, Final residual = 4.00548e-06, No Iterations 4
DILUPBiCG: Solving for Uy, Initial residual = 0, Final residual = 0, No Iterations 0
#0 Foam::errorprintStack(Foam::Ostream&) in "/opt/openfoam211/platforms/linuxGccDPOpt/lib/"
#1 Foam::sigFpe::sigHandler(int) in "/opt/openfoam211/platforms/linuxGccDPOpt/lib/"
#2 Uninterpreted:
#3 FoamDILUPreconditioner::calcReciprocalD(Foam::Fi eld<double>&, Foam::lduMatrix const&) in "/opt/openfoam211/platforms/linuxGccDPOpt/lib/"
#4 FoamDILUPreconditionerDILUPreconditioner(Foam: :lduMatrix::solver const&, Foam::dictionary const&) in "/opt/openfoam211/platforms/linuxGccDPOpt/lib/"
#5 Foam::lduMatrixpreconditioner::addasymMatrixCons tructorToTable<FoamDILUPreconditioner>::New(Foam ::lduMatrix::solver const&, Foam::dictionary const&) in "/opt/openfoam211/platforms/linuxGccDPOpt/lib/"
#6 Foam::lduMatrixpreconditioner::New(Foam::lduMatr ix::solver const&, Foam::dictionary const&) in "/opt/openfoam211/platforms/linuxGccDPOpt/lib/"
#7 FoamPBiCG::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const in "/opt/openfoam211/platforms/linuxGccDPOpt/lib/"
#8 Foam::fvMatrix<double>::solve(Foam::dictionary const&) in "/opt/openfoam211/platforms/linuxGccDPOpt/lib/"
#9 Foam::fvMatrix<double>::solve() in "/home/malli_reddy/OpenFOAM/malli_reddy-2.1.1/platforms/linuxGccDPOpt/bin/myDiffusiveFoam"
in "/home/malli_reddy/OpenFOAM/malli_reddy-2.1.1/platforms/linuxGccDPOpt/bin/myDiffusiveFoam"
#11 __libc_start_main in "/lib/i386-linux-gnu/"
in "/home/malli_reddy/OpenFOAM/malli_reddy-2.1.1/platforms/linuxGccDPOpt/bin/myDiffusiveFoam"
Floating point exception

But when i give good initial guess (by running the same case by using another solver in which coefficients are constants), then the case is running and giving good results.
By the same i extended to complicated geometries (like Y-shaped channels.), even i am giving the good initial guess, the case giving the same above error.

And i used SIMPLE scheme for pressure velocity coupling.

could you please suggest me what is the error and how to rectify it.
thank you.


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