|
[Sponsors] |
August 14, 2021, 02:28 |
HOPR gmsh import errors
|
#1 |
Member
Jnana Bhaskar Rao
Join Date: Mar 2020
Posts: 46
Rep Power: 6 |
Dear all,
I'm trying to start on this higher order opensource solver called "Flexi" that requires mesh to be prepared in hdf5 format by the HOPR (Higher Order Preprocessor) software. I executed a basic tutorial on importing a cylinder from a gmsh file and outputting a hdf5 mesh with HOPR which worked without issues. I tried the same steps with a much simpler gmsh lid driven cavity 2D mesh when I got an error that confused me. On trying to read in a basic gmsh file, I get the error "Keyword $Nodes not found in file." This makes no sense to me as my .msh file clearly has "$Nodes" in it. Can someone help me out with this? The mesh and parameter.ini files are attached. I'm using HOPR V2.1 and gmsh 4.4 for Linux. |
|
August 14, 2021, 02:32 |
|
#2 |
Member
Jnana Bhaskar Rao
Join Date: Mar 2020
Posts: 46
Rep Power: 6 |
Apparently, the extensions are not accepted directly so I had to attach the zip files.
Last edited by jnanabrao; August 14, 2021 at 10:02. |
|
August 15, 2021, 07:11 |
|
#3 |
Senior Member
-
Join Date: Jul 2012
Location: Germany
Posts: 184
Rep Power: 13 |
Dear jnanabrao,
i think you are using the wrong Gmsh export option. HOPR currently supports "Version 2 ASCII". In Gmsh choose (skip all other options): File Export *.msh Version 2 ASCII ... The exported ASCII file should look like: Code:
$MeshFormat ... $EndMeshFormat $PhysicalNames ... $EndPhysicalNames $Nodes ... $EndNodes $Elements ... $EndElements Note that: Currently FLEXI is based on pure hexahedral meshes with Mortar interfaces. Regards
__________________
Check out my side project: A multiphysics discontinuous Galerkin framework: Youtube, Gitlab. Last edited by Eifoehn4; August 15, 2021 at 11:11. |
|
August 15, 2021, 10:56 |
|
#4 |
Member
Jnana Bhaskar Rao
Join Date: Mar 2020
Posts: 46
Rep Power: 6 |
Hi Eifoehn4,
I did realize that the error was caused by the .msh version. I am new to gmsh and did not have any idea about the option of the exporting to ASCII 2 version. I instead installed the gmsh 2.16 version and am now facing a different problem. One of my defined boundaries is not being recognized by HOPR while 3 others are. This mesh is the lid-driven cavity in 3D in a sense. The files are attached and I hope you can take a look. Can you elaborate what you mean by HOPR works only with hex. Because I believe it would be pretty difficult to generate purely hex mesh in gmsh to begin with.I am going through the documentation available for HOPR and it says it is designed to generate unstructured 3D meshes, if I am not wrong. In my understanding, that indicates it should be able to handle tet elements as it would be difficult to have purely hex meshes for all sorts of geometries (especially those with highly curved edges). Is that a misunderstanding? JBR |
|
August 15, 2021, 11:24 |
|
#5 |
Senior Member
-
Join Date: Jul 2012
Location: Germany
Posts: 184
Rep Power: 13 |
This was a bit misleading.
Sure you can convert Tet-meshes with HOPR. However, currently FLEXI is not able to use them. Note that: The spelling unstructured meshes has nothing to do with the supported element types. Moreover, Gmsh is able to generate pure unstructured Hex-meshes. Regards
__________________
Check out my side project: A multiphysics discontinuous Galerkin framework: Youtube, Gitlab. Last edited by Eifoehn4; August 15, 2021 at 13:32. |
|
August 15, 2021, 13:22 |
|
#6 |
Senior Member
-
Join Date: Jul 2012
Location: Germany
Posts: 184
Rep Power: 13 |
Two Remarks:
Use this one: Code:
!=============================================================================== ! ! OUTPUT !=============================================================================== ! projectname = LID_DRIVEN_CAVITY Debugvisu = T outputFormat = 0 DebugVisuLevel = 1 checkElemJacobians = T !=============================================================================== ! ! MESH !=============================================================================== ! Mode = 5 Ngeo = 1 nZones = 1 filename = lid_driven_cavity_2.msh !=============================================================================== ! ! CURVED !=============================================================================== ! useCurveds = F !=============================================================================== ! ! BOUNDARY CONDITIONS !=============================================================================== ! BoundaryName = periodic_back BoundaryType = (/1,0,0,1/) BoundaryName = periodic_front BoundaryType = (/1,0,0,-1/) BoundaryName = walls BoundaryType = (/4,1,0,0/) BoundaryName = lid BoundaryType = (/4,1,0,0/) vv = (/0,,0,,1./) vv = (/0,,0,,-1./) |
|
August 15, 2021, 13:59 |
|
#7 |
Member
Jnana Bhaskar Rao
Join Date: Mar 2020
Posts: 46
Rep Power: 6 |
Thanks a ton! That parameter.ini file worked. I haven't yet understood the boundary conditions in HOPR as I have only begun the documentation file. I was misled by the error message in to looking at the mesh file.
I have generated a pure hex mesh in gmsh as I do intend to run the mesh in flexi. However, I am not yet well versed with gmsh's refinement techniques to obtain the necessary quality, which I am working on right now. I have recently switched from openFOAM where I was exclusively using blockMesh and snappyHexMesh. In that block structured environment refining a mesh is quite different to what it is in gmsh. Thanks again for all your help. P.S. I checked your Youtube channel out and it was quite impressive. |
|
August 17, 2021, 00:34 |
|
#8 |
Member
Jnana Bhaskar Rao
Join Date: Mar 2020
Posts: 46
Rep Power: 6 |
Code:
Your "parameterfile.ini" seems to be corrupted. Do not use any nasty text editor! I'm using gedit but I think it is creating problems. Could you suggest how I write the parameter files? |
|
August 18, 2021, 02:09 |
|
#10 |
Member
Jnana Bhaskar Rao
Join Date: Mar 2020
Posts: 46
Rep Power: 6 |
Hi Eifoehn4,
Sorry to bother you again. But while your parameter file worked, I haven't had any success with writing my own. So I created a uniform hex mesh in gmesh and tried to read that in with a different set of BC names and definitions. But I don't understand the readin procedure used by HOPR. In cases 2 and 3 after reading in all the boundaries, the program says a side with undefined boundary condition is detected but doesn't specify which side or where it is. In case 4 it ignores two boundaries and then says later that they were not defined. The error file it asks me to check is written but is always blank. What am I missing? PS: The meshes and boundary conditions in the cases with suffix 2,3,4 are practically the same. |
|
August 18, 2021, 02:11 |
|
#11 |
Member
Jnana Bhaskar Rao
Join Date: Mar 2020
Posts: 46
Rep Power: 6 |
Forgot to click upload.
|
|
August 18, 2021, 05:44 |
|
#12 |
Member
Jnana Bhaskar Rao
Join Date: Mar 2020
Posts: 46
Rep Power: 6 |
The mesh files are wrong here. Please ignore the last two posts.
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Gmsh] How to resolve gmsh 3D mesh generation errors | Mugen996 | OpenFOAM Meshing & Mesh Conversion | 0 | March 16, 2020 08:01 |
[Gmsh] gmsh errors on openfoam checkmesh | mariloo | OpenFOAM Meshing & Mesh Conversion | 16 | February 10, 2020 17:15 |
InterFoam negative alpha | karasa03 | OpenFOAM | 7 | December 12, 2013 03:41 |
Micro Scale Pore, icoFoam | gooya_kabir | OpenFOAM Running, Solving & CFD | 2 | November 2, 2013 13:58 |
[Gmsh] Import problem | ARC | OpenFOAM Meshing & Mesh Conversion | 0 | February 27, 2010 10:56 |