CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

HOPR gmsh import errors

Register Blogs Community New Posts Updated Threads Search

Like Tree5Likes
  • 1 Post By Eifoehn4
  • 1 Post By Eifoehn4
  • 2 Post By Eifoehn4
  • 1 Post By Eifoehn4

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 14, 2021, 02:28
Default HOPR gmsh import errors
  #1
Member
 
Jnana Bhaskar Rao
Join Date: Mar 2020
Posts: 46
Rep Power: 6
jnanabrao is on a distinguished road
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.
jnanabrao is offline   Reply With Quote

Old   August 14, 2021, 02:32
Default
  #2
Member
 
Jnana Bhaskar Rao
Join Date: Mar 2020
Posts: 46
Rep Power: 6
jnanabrao is on a distinguished road
Apparently, the extensions are not accepted directly so I had to attach the zip files.
Attached Files
File Type: zip hopr_files.zip (1.9 KB, 3 views)

Last edited by jnanabrao; August 14, 2021 at 10:02.
jnanabrao is offline   Reply With Quote

Old   August 15, 2021, 07:11
Default
  #3
Senior Member
 
Eifoehn4's Avatar
 
-
Join Date: Jul 2012
Location: Germany
Posts: 184
Rep Power: 13
Eifoehn4 is on a distinguished road
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 \rightarrow Export \rightarrow *.msh \rightarrow Version 2 ASCII \rightarrow ...

The exported ASCII file should look like:

Code:
$MeshFormat
...
$EndMeshFormat
$PhysicalNames
...
$EndPhysicalNames
$Nodes
...
$EndNodes
$Elements
...
$EndElements
Moreover, you have to define physical entities for volumes and surfaces.

Note that:

Currently FLEXI is based on pure hexahedral meshes with Mortar interfaces.

Regards
flexi-project likes this.
__________________
Check out my side project:

A multiphysics discontinuous Galerkin framework: Youtube, Gitlab.

Last edited by Eifoehn4; August 15, 2021 at 11:11.
Eifoehn4 is offline   Reply With Quote

Old   August 15, 2021, 10:56
Default
  #4
Member
 
Jnana Bhaskar Rao
Join Date: Mar 2020
Posts: 46
Rep Power: 6
jnanabrao is on a distinguished road
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
Attached Files
File Type: zip gmsh_3D_lid_driven_cavity.zip (2.7 KB, 8 views)
jnanabrao is offline   Reply With Quote

Old   August 15, 2021, 11:24
Default
  #5
Senior Member
 
Eifoehn4's Avatar
 
-
Join Date: Jul 2012
Location: Germany
Posts: 184
Rep Power: 13
Eifoehn4 is on a distinguished road
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
flexi-project likes this.
__________________
Check out my side project:

A multiphysics discontinuous Galerkin framework: Youtube, Gitlab.

Last edited by Eifoehn4; August 15, 2021 at 13:32.
Eifoehn4 is offline   Reply With Quote

Old   August 15, 2021, 13:22
Default
  #6
Senior Member
 
Eifoehn4's Avatar
 
-
Join Date: Jul 2012
Location: Germany
Posts: 184
Rep Power: 13
Eifoehn4 is on a distinguished road
Two Remarks:
  • Your "parameterfile.ini" seems to be corrupted. Do not use any nasty text editor!
  • You are missing two normalvectors for the periodic BCs

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./)
Regards
jnanabrao and flexi-project like this.
__________________
Check out my side project:

A multiphysics discontinuous Galerkin framework: Youtube, Gitlab.
Eifoehn4 is offline   Reply With Quote

Old   August 15, 2021, 13:59
Default
  #7
Member
 
Jnana Bhaskar Rao
Join Date: Mar 2020
Posts: 46
Rep Power: 6
jnanabrao is on a distinguished road
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.
jnanabrao is offline   Reply With Quote

Old   August 17, 2021, 00:34
Default
  #8
Member
 
Jnana Bhaskar Rao
Join Date: Mar 2020
Posts: 46
Rep Power: 6
jnanabrao is on a distinguished road
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?
jnanabrao is offline   Reply With Quote

Old   August 17, 2021, 02:10
Default
  #9
Senior Member
 
Eifoehn4's Avatar
 
-
Join Date: Jul 2012
Location: Germany
Posts: 184
Rep Power: 13
Eifoehn4 is on a distinguished road
I generally use VI/VIM.
flexi-project likes this.
__________________
Check out my side project:

A multiphysics discontinuous Galerkin framework: Youtube, Gitlab.
Eifoehn4 is offline   Reply With Quote

Old   August 18, 2021, 02:09
Default
  #10
Member
 
Jnana Bhaskar Rao
Join Date: Mar 2020
Posts: 46
Rep Power: 6
jnanabrao is on a distinguished road
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.
jnanabrao is offline   Reply With Quote

Old   August 18, 2021, 02:11
Default
  #11
Member
 
Jnana Bhaskar Rao
Join Date: Mar 2020
Posts: 46
Rep Power: 6
jnanabrao is on a distinguished road
Forgot to click upload.
Attached Files
File Type: zip lid_driven_cavity_readin_cases_and_errors.zip (97.2 KB, 0 views)
jnanabrao is offline   Reply With Quote

Old   August 18, 2021, 05:44
Default
  #12
Member
 
Jnana Bhaskar Rao
Join Date: Mar 2020
Posts: 46
Rep Power: 6
jnanabrao is on a distinguished road
The mesh files are wrong here. Please ignore the last two posts.
jnanabrao is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 21:36.