CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Meshing & Mesh Conversion (https://www.cfd-online.com/Forums/openfoam-meshing/)
-   -   [Commercial meshers] How to convert a .msh file to open Foam? (https://www.cfd-online.com/Forums/openfoam-meshing/92915-how-convert-msh-file-open-foam.html)

-mAx- October 25, 2011 00:47

check if you have a surface called "wall". Gambit puts all surfaces without BC in a "wall" set, and those surfaces are defined as wall.
Then display the surface "wall" and check if they match the location where the flow seems to stop.
If yes, then in Gambit your probably have non connected surface at this location.

Danath October 25, 2011 07:01

i connect the faces of the volumes which are in touch

after that i create the mesh and after i merge the volumes

all is ok

when i try to to pass the mesh to the foam i see


Create time

Dimension of grid: 3
Number of points: 58874
PointGroup: 1 start: 0 end: 58873. Reading points...done.
Number of faces: 58922
FaceGroup: 2 start: 0 end: 44. Reading mixed faces...done.
FaceGroup: 3 start: 45 end: 84. Reading mixed faces...done.
FaceGroup: 4 start: 85 end: 58921. Reading mixed faces...done.
Number of cells: 0
Zone: 2 name: Vin type: velocity-inlet. Reading zone data...done.
Zone: 3 name: Outlet type: outflow. Reading zone data...done.
Zone: 4 name: walls type: wall. Reading zone data...done.
Zone: 6 name: default-interior type: interior. Reading zone data...done.

FINISHED LEXING

Creating patch 0 for zone: 2 name: Vin type: velocity-inlet
Creating patch 1 for zone: 3 name: Outlet type: outflow
Creating patch 2 for zone: 4 name: walls type: wall
patch 0 from Fluent indices: 0 to: 44 type: velocity-inlet
patch 1 from Fluent indices: 45 to: 84 type: outflow
patch 2 from Fluent indices: 85 to: 58921 type: wall


--> FOAM FATAL ERROR:
Illegal cell label -1 in neighbour addressing for face 0

From function polyMesh::initMesh()
in file meshes/polyMesh/polyMeshInitMesh.C at line 65.

FOAM exiting



what is going wrong;

-mAx- October 25, 2011 07:06

Quote:

Originally Posted by Danath (Post 329339)
i connect the faces of the volumes which are in touch

after that i create the mesh and after i merge the volumes

After merging the volumes, you need to remesh the new volume.
Then you can use the filter of any volume operation, and select Unmeshed. And finally select all. If any volume goes right, then this volume is unmeshed.

Danath October 25, 2011 07:34

i umeshed my volume (now i have one volume)

i try to remesh but i have problems because the mesh in not 3d and not in the whole drew

i try to use all the sources (so i take alla the faces as sources )

but my volume cannot meshed with all face used as sources faces!

what do you recommend ?

-mAx- October 25, 2011 07:36

post pictures

Danath October 25, 2011 11:14

2 Attachment(s)
i think i have serious problem!

Should i redrew it from the beggining with edges?

-mAx- October 26, 2011 04:27

3 Attachment(s)
From your pictures it sounds you only have one volume.
Better do some splits to make hexa meshing easier:
*do some splits like I did (you can see where are surfaces neede for splits >> pink edges).
*Then no problem for meshing volumes
Attachment 9735Attachment 9736Attachment 9737

Danath October 31, 2011 06:05

1 Attachment(s)
thanks a lot! -mAx-

without your help ι would be forced to fail!

Danath November 16, 2011 10:57

hello again
i write in terminal transformPoints -scale "(0.01 0.01 0.01)" in order to scale my domain in cm

now i want to scale my domain in m so i suppose that i must write in terminal transformPoints -scale (100 100 100)

am i right?

-mAx- November 19, 2011 03:08

yes but you forgot "..."
transformPoints -scale "(100 100 100)"

Danath November 21, 2011 06:52

2 Attachment(s)
hello again!

i have set U= 1m/s and i change Re (<2000) after every measurment (P,U)
deltaT 0.05

i set endtime = 2

is it enough? for my case ?

-mAx- November 21, 2011 12:55

check CFL conditions in theory

Danath December 22, 2011 09:02

hello!

If i want to calculate residence time what can i do?

-mAx- January 4, 2012 01:32

no idea this time

kingjewel1 March 25, 2012 18:50

Quote:

Originally Posted by Danath (Post 336742)
hello!

If i want to calculate residence time what can i do?

Many thanks to @Max indeed!

Residence time you can calculate from releasing a scalar in the domain. Diffusion=1e-16 (0 causes things to crash). Turn off momentum, pressure, turbulence. Just solve scalar.

Danath March 27, 2012 12:45

thanks a lot both of you!

Danath August 29, 2012 07:31

hello !

i want to create and mesh a geometry via ansys workbench.

I will use openFoam to solve

My question is the geometry pass from workbench to openFoam or i must use I Deas NX to create and mesh the geometry ?

http://www.openfoam.com/features/mesh-conversion.php

i am a little bit confused!

-mAx- August 29, 2012 08:00

no only the mesh is passed to OF.
If you are able to export your mesh as .msh file for instance, then you may be able to convert the mesh file into OF using fluent3DMeshToFoam

dark lancer October 22, 2012 19:02

hi
I am beginner in the openfoam and decide to solve a problem with dsmc code.
I create my body in catia and then import it to ansys and I use workbench to create my mesh file(.msh) and then I create a newfolder and create (0,constant and polyMesh,system) and copy the controlDict,decomposeParDict and the other folder from supersonic corner to my newfolder and then I put my (.msh)file into my polyMesh then run fluentmeshtofoam and I see this error:
[hadi@hadi polyMesh]$ fluentMeshToFoam hemishpherical.msh
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.1.1 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
Build : 2.1.1-221db2718bbb
Exec : fluentMeshToFoam hemishpherical.msh
Date : Oct 21 2012
Time : 21:46:05
Host : "hadi.msi"
PID : 3346
Case : /home/hadi/OpenFOAM/OpenFOAM-2.1.1/tutorials/discreteMethods/dsmcFoam/bluntbodyathypersonic/constant/polyMesh
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Disallowing user-supplied system call operations
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

--> FOAM FATAL IO ERROR:
cannot find file
file: /home/hadi/OpenFOAM/OpenFOAM-2.1.1/tutorials/discreteMethods/dsmcFoam/bluntbodyathypersonic/constant/polyMesh/system/controlDict at line 0.
From function regIOobject::readStream()
in file db/regIOobject/regIOobjectRead.C at line 73.
FOAM exiting
[hadi@hadi polyMesh]$

-mAx- October 23, 2012 01:21

you are calling fluentMeshToFoam from your_case_directory/constant/polyMesh instead of your_case_directory.
Move also your *.msh file into your_case_directory (not in /polyMesh)


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