Using GiD mesh in OpenFOAM
Moderator: GiD Team
Using GiD mesh in OpenFOAM
Hello,
I have a GiD mesh (.msh) file that I can import with GiD. From your experience, which export option will make it possible to use the same mesh in OpenFOAM? (preferably without another intermediate CAD or meshing package).
Thanks,
Hosam
I have a GiD mesh (.msh) file that I can import with GiD. From your experience, which export option will make it possible to use the same mesh in OpenFOAM? (preferably without another intermediate CAD or meshing package).
Thanks,
Hosam
Re: Using GiD mesh in OpenFOAM
There is a GiD-OpenFOAM problemtype available (it is a very basical interface only)
To use it go to GiD menu
Data->Problemtype->OpenFOAM
(the first time it offer to download this problemtype from our repository)
Then a few 'conditions' are defined in order to apply the information to each part.
Data->Zones definition->3D
Then you can export the mesh and boundary conditions in OpenFOAM format with
Calculate->Calculate
(the solver OpenFOAM itself won't be started, to do it the .bat file of the problemtype must be modified)
or
Files->Export->Calculation file
Note: the normal way to work with GiD is create or import the geometry, apply on it the boundary conditions, generate the mesh and calculate. if in your case do you have only the mesh but not the geometry you must apply the boundary conditions directly to mesh entities
To use it go to GiD menu
Data->Problemtype->OpenFOAM
(the first time it offer to download this problemtype from our repository)
Then a few 'conditions' are defined in order to apply the information to each part.
Data->Zones definition->3D
Then you can export the mesh and boundary conditions in OpenFOAM format with
Calculate->Calculate
(the solver OpenFOAM itself won't be started, to do it the .bat file of the problemtype must be modified)
or
Files->Export->Calculation file
Note: the normal way to work with GiD is create or import the geometry, apply on it the boundary conditions, generate the mesh and calculate. if in your case do you have only the mesh but not the geometry you must apply the boundary conditions directly to mesh entities
Re: Using GiD mesh in OpenFOAM
Thank you very much for the quick reply!
will give it a try.
Hosam
will give it a try.
Hosam
Re: Using GiD mesh in OpenFOAM
Hi,
I received now the ".gid" file (geometry and mesh are already created).
After assigning the boundary conditions, I tried using "calculate" without remeshing, I got this error message:
https://dl.dropboxusercontent.com/u/32336583/Error.png
So I performed mesh generation (CTRL+g), after meshing I repeated "calculate" and got the same error message.
I thought that I need maybe to modify element-type assignment, but I do not want to change the meshing settings already set in the model (the target is get the exact mesh in OpenFOAM).
Will appreciate your advice,
Hosam
PS:
- I am using GiDx64 11.1.0d
- I've tried a simple test case to create a domain, mesh it, and convert the mesh from GiD to OF, and it works (using my version of the problemType).
I received now the ".gid" file (geometry and mesh are already created).
After assigning the boundary conditions, I tried using "calculate" without remeshing, I got this error message:
https://dl.dropboxusercontent.com/u/32336583/Error.png
So I performed mesh generation (CTRL+g), after meshing I repeated "calculate" and got the same error message.
I thought that I need maybe to modify element-type assignment, but I do not want to change the meshing settings already set in the model (the target is get the exact mesh in OpenFOAM).
Will appreciate your advice,
Hosam
PS:
- I am using GiDx64 11.1.0d
- I've tried a simple test case to create a domain, mesh it, and convert the mesh from GiD to OF, and it works (using my version of the problemType).
Re: Using GiD mesh in OpenFOAM
The image is complaining about the existence of triangle elements.
The problemtype GiD-OpenFOAM is only made for 3D cases, and only volume elements must exists (e.g. tetrahedra)
Probably do you have some isolated surface (not belonging to any volume boundary) and it is creating triangles.
In this case you must delete the surface and re-mesh
Of maybe you have set the meshing criteria to mesh the surfaces of the volumes, then reset this mesh criteria to the default.
(or in preferences -> Meshing - Other -Mesh always by default: Uncheck the surfaces)
The problemtype GiD-OpenFOAM is only made for 3D cases, and only volume elements must exists (e.g. tetrahedra)
Probably do you have some isolated surface (not belonging to any volume boundary) and it is creating triangles.
In this case you must delete the surface and re-mesh
Of maybe you have set the meshing criteria to mesh the surfaces of the volumes, then reset this mesh criteria to the default.
(or in preferences -> Meshing - Other -Mesh always by default: Uncheck the surfaces)
Re: Using GiD mesh in OpenFOAM
I used Mesh -> No mesh -> Surface, and selected all the 49 surfaces to skip meshing them.
It worked!
Thanks!
Hosam
It worked!
Thanks!
Hosam
Re: Using GiD mesh in OpenFOAM
Hi,
I am posting again in this thread to ask about a new issue regarding using GiD mesh in OpenFOAM.
I used the exact previously-working approach using the exact same GiD version. Namely I used Mesh -> No mesh -> Surface to skip meshing surfaces.
After clicking on calculate, It execute for a while showing this:
https://dl.dropboxusercontent.com/u/323 ... rors/1.png
Then an error message appears "Error in computing face numbers. Please correct this":
https://dl.dropboxusercontent.com/u/323 ... rors/2.png
And the conversion stops:
https://dl.dropboxusercontent.com/u/323 ... rors/3.png
The "calculate" command resulted in writing out "points" and "faces" data files which are not enough to use as OpenFOAM mesh. The rest of the files: "owner", "boundary", and "neighbor" are not written. Any explanation or guidance would be appreciated.
Best,
Hosam
I am posting again in this thread to ask about a new issue regarding using GiD mesh in OpenFOAM.
I used the exact previously-working approach using the exact same GiD version. Namely I used Mesh -> No mesh -> Surface to skip meshing surfaces.
After clicking on calculate, It execute for a while showing this:
https://dl.dropboxusercontent.com/u/323 ... rors/1.png
Then an error message appears "Error in computing face numbers. Please correct this":
https://dl.dropboxusercontent.com/u/323 ... rors/2.png
And the conversion stops:
https://dl.dropboxusercontent.com/u/323 ... rors/3.png
The "calculate" command resulted in writing out "points" and "faces" data files which are not enough to use as OpenFOAM mesh. The rest of the files: "owner", "boundary", and "neighbor" are not written. Any explanation or guidance would be appreciated.
Best,
Hosam
Re: Using GiD mesh in OpenFOAM
Sorry, did not notice that I did not reassign the BC from Data->Zones definition->3D
Problem solved!
Problem solved!
Re: Using GiD mesh in OpenFOAM
Dear all,
I'm trying to export a multi-domain GiD mesh for OpenFoam. I'm starting from a multi solid geometry, I'm defining continuum type for all solids, and then I assign boundary type for each surface. I'm meshing just the volumes, ending up with just thetraedrals elements. When I export it, it throws out the usual error: "Error in computing face numbers".
I have just one surface shared by two connected solids, do I have to duplicete them? What is the problem?
thanks in advance
PS: a more detailed error traceback system can help us a lot!
I'm trying to export a multi-domain GiD mesh for OpenFoam. I'm starting from a multi solid geometry, I'm defining continuum type for all solids, and then I assign boundary type for each surface. I'm meshing just the volumes, ending up with just thetraedrals elements. When I export it, it throws out the usual error: "Error in computing face numbers".
I have just one surface shared by two connected solids, do I have to duplicete them? What is the problem?
thanks in advance
PS: a more detailed error traceback system can help us a lot!
Re: Using GiD mesh in OpenFOAM
The GiD-OpenFoam is a relativelly simple problemtype, implemented with Tcl scripting.
Attach a zip with the GiD example (as small as possible) to try to fix the bug of this problemtype
Attach a zip with the GiD example (as small as possible) to try to fix the bug of this problemtype