Guidelines for exporting exodus meshes from ICEM CFD

732 views
Skip to first unread message

Chinthaka Jacob

unread,
May 18, 2022, 6:07:03 AM5/18/22
to Nek5000

Dear Nek community, 

  I am curious to know if there is any set of guidelines/tutorials on exporting exodus meshes from ICEM CFD to Nek5000 as explained in Yuan et al. "Spectral element applications in complex nuclear reactor geometries: Tet-to-hex meshing." Nuclear Engineering and Design 357 (2020): 110422. 

  I understand that there is a Nek5000 preferred format in the conversion and I found the below-mentioned source which is a bit obsolete: https://fdocuments.in/document/nek5000-icem-cfd-mesh-tutorial.html?page=1 

  I shall be most appreciative if anyone is willing to share some updated information about this conversion.  

Chinthaka. 

hy...@anl.gov

unread,
May 19, 2022, 3:16:54 PM5/19/22
to Nek5000
There is no need to go through CUBIT anymore, you can direct export to exodus mesh, but make sure your mesh is either pure hex20 or hybrid linear mesh (tet4+wedege6+hex8). the mesh converter exo2nek will take care of the conversion. 

Chinthaka Ravinatha

unread,
May 21, 2022, 5:37:58 AM5/21/22
to hy...@anl.gov, Nek5000
Dear Haomin,

  Thanks for the clarification! I created a Tetra/Mixed mesh using the quick Delaunay method in ICEM CFD. Then I hit this error at the exo2nek conversion. Any recommendations to overcome this?

Chinthaka.
.
.
 please input number of fluid exo files:
1
 please input exo file:
exodus

exodus.exo                       is an EXODUSII file; version 0.00
I/O word size 8

database parameters:

title         =  Created by ICEMCFD - EXODUS II Interface

num_dim       =        3
num_nodes     =     6373
num_elem      =    15864
num_elem_blk  =        3
num_side_sets =        5

element block id   =        1
element type       =    TETRA
num_elem_in_block  =     6888
num_nodes_per_elem =        4

 TETRA4 is valid element in a 3D mesh.
 assume linear hybrid mesh (tetra-hex-wedge)
 one TETRA4 divide into 4 Nek hex elements
element block id   =        2
element type       =    PYRAMID
num_elem_in_block  =       27
num_nodes_per_elem =        5

 ERROR: invalid element in a 3D mesh!
Note: The following floating-point exceptions are signalling: IEEE_DENORMAL

--
You received this message because you are subscribed to a topic in the Google Groups "Nek5000" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/nek5000/vsjcga82umw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to nek5000+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nek5000/a728abbc-f4bb-47b2-8f8a-d0a99c19461an%40googlegroups.com.

hy...@anl.gov

unread,
May 22, 2022, 12:53:40 AM5/22/22
to Nek5000
Pyramid is not allowed in tet-to-hex conversion, at it cannot be converted to hexes isotopically. 

You need to tune your mesh settings, and make sure there is no pyramid elements in your mesh. 

Chinthaka Jacob

unread,
May 24, 2022, 9:37:49 AM5/24/22
to Nek5000
Dear Haomin,

  Thanks for the precise information that helped me to rectify the error! Then, I was able to successfully convert the Exodus mesh into a .re2 file and generate the genap (.ma2 file). However, I am now facing another error at the start of the simulation:

 Error: Nek has been compiled
         for spatial dimension equal to 3.
         The mesh file has dimension 0.

  I have indeed verified the mesh to be three-dimensional and the exo2nek conversion tool identifies the three-dimensional mesh as well. Below is the output of exo2nek conversion tool:

  please input number of fluid exo files:
1
 please input exo file:
prj2

prj2.exo                         is an EXODUSII file; version 0.00

I/O word size 8

database parameters:

title         =  Created by ICEMCFD - EXODUS II Interface                                        

num_dim       =        3
num_nodes     =     1040
num_elem      =     2897
num_elem_blk  =        1

num_side_sets =        5

element block id   =        1
element type       =    TETRA  
num_elem_in_block  =     2897

num_nodes_per_elem =        4

 TETRA4 is valid element in a 3D mesh.
 assume linear hybrid mesh (tetra-hex-wedge)
 one TETRA4 divide into 4 Nek hex elements

  Is this error caused by some switch/handle that has been set up incorrectly somewhere or possibly by some inappropriate parameter in the .param file? I am not familiar with using .re2 file and haven't seen such an error before.

Chinthaka.

hy...@anl.gov

unread,
May 24, 2022, 11:44:02 AM5/24/22
to Nek5000
Well, i never see this error.
Did you compile exo2nek and genmap using the same compiler ? 

Chinthaka Jacob

unread,
May 24, 2022, 2:11:59 PM5/24/22
to Nek5000
Dear Haomin,

  I just compiled all the tools again and ran a case loading the same set of modules for consistency. The problem persists, however. A zip file containing relevant case files is attached in case it was helpful.

Chinthaka.
subglake.zip

hy...@anl.gov

unread,
May 24, 2022, 5:07:56 PM5/24/22
to Nek5000
I can load your mesh in nek5000 no problem, but i have to grab a new SIZE file from nek5000 source code

general = [(null)]
general:numsteps = [10000]
general:dt = [5e-03]
general:writeinterval = [1000]
general:userparam01 = [0.25]
general:userparam02 = [0.50]
problemtype = [(null)]
problemtype:equation = [incompNS]
problemtype:variableproperties = [yes]
pressure = [(null)]
pressure:residualtol = [1e-06]
pressure:residualproj = [no]
velocity = [(null)]
velocity:residualtol = [1e-08]
velocity:density = [1]
velocity:viscosity = [0.5]
temperature = [(null)]
temperature:conjugateheattransfer = [yes]
temperature:rhocp = [1.0]
temperature:conductivity = [0.5]
temperature:residualtol = [1e-08]
gs_setup: 772879 unique labels shared
   pairwise times (avg, min, max): 2.30208e-05 1.13133e-05 3.13859e-05
   crystal router                : 9.95681e-05 9.75994e-05 0.000101986
   used all_to_all method: pairwise
   handle bytes (avg, min, max): 61053 37588 80148
   buffer bytes (avg, min, max): 29312.2 7344 50016
gs_setup: 772879 unique labels shared
   pairwise times (avg, min, max): 2.24847e-05 1.06139e-05 2.93685e-05
   crystal router                : 8.73793e-05 8.53483e-05 9.09073e-05
   used all_to_all method: pairwise
   handle bytes (avg, min, max): 113353 79156 147508
   buffer bytes (avg, min, max): 29312.2 7344 50016
/----------------------------------------------------------\\
|      _   __ ______ __ __  ______  ____   ____   ____     |
|     / | / // ____// //_/ / ____/ / __ \\/ __ \\/ __ \\   |
|    /  |/ // __/  / ,<   /___ \\ / / / // / / // / / /    |
|   / /|  // /___ / /| | ____/ / / /_/ // /_/ // /_/ /     |
|  /_/ |_//_____//_/ |_|/_____/  \\___/ \\___/ \\___/      |
|                                                          |
|----------------------------------------------------------|
|                                                          |
| COPYRIGHT (c) 2008-2020 UCHICAGO ARGONNE, LLC            |
| Version:  20.0-dev                                       |
| Web:      https://nek5000.mcs.anl.gov                    |
|                                                          |
\\----------------------------------------------------------/

 Number of MPI ranks :        1024
 
 Reading /home/yuanhaom/scr/subglake/subglake.par                                                                                            
 Reading /home/yuanhaom/scr/subglake/subglake.re2                                                                                            
 Enable stress formulation to support PN/PN and IFUSERVP=T
 nelgt/nelgv/lelt:       23176       11588          25
 lx1/lx2/lx3/lxd:            8           8           8          12

 partioning elements to MPI ranks
 reading mesh
 reading bc for ifld           1
 reading bc for ifld           2
 done :: read .re2 file    0.16     sec

 Reading /home/yuanhaom/scr/subglake/subglake.ma2                                                                                            
 
 done :: partioning   0.27854     sec

 reading mesh
 reading bc for ifld           1
 reading bc for ifld           2
 done :: read .re2 file    0.10     sec

 setup mesh topology
   Right-handed check complete for       23176 elements. OK.
   setvert3d:   8         1612363         6618379         1612363         1612363
   setupds time 3.2316E-02 seconds   0  8     1612363       11588
   setvert3d:   8         1612363         6618379         1612363         1612363
   setupds time 2.6124E-02 seconds   1  8     1612363       23176
 max multiplicity           34
 done :: setup mesh topology
 
 call usrdat

Message has been deleted

Chinthaka Jacob

unread,
May 25, 2022, 9:07:27 AM5/25/22
to Nek5000
Dear Haomin,

  Many thanks for taking the extra effort in detecting this error for me and sorry for the repetitive back and forth messages! Everything seems to be good now.

  One last question: I have specified the boundary conditions in usrdat subroutine using the below piece of code (according to the sideset data I assigned in the Exodus mesh) and when I added a call to gen_rea(0) at the end of usrdat, should it reflect new boundary conditions such as E, W, I, t, etc.? Is there anything that I am missing in this piece of code?

Chinthaka.

     do i=1,nelt
         do j=1,2*ndim
             if(bc(5,j,i,1).eq.1) then
               cbc(j,i,1)='E '
               cbc(j,i,2)='E '

            if(bc(5,j,i,1).eq.2) then
               cbc(j,i,1)='W '
               cbc(j,i,2)='t '
            elseif(bc(5,j,i,1).eq.3) then
               cbc(j,i,1)='W '
               cbc(j,i,2)='f '
            elseif(bc(5,j,i,1).eq.4) then
               cbc(j,i,1)='W '
               cbc(j,i,2)='I '
            elseif(bc(5,j,i,1).eq.5) then
               cbc(j,i,1)='W '
               cbc(j,i,2)='I '
            else
               write(*,*) bc(5,j,i,1) 
            endif
         enddo
      enddo

Yuan, Haomin

unread,
May 25, 2022, 11:02:14 PM5/25/22
to Chinthaka Jacob, Nek5000
I think your code looks correct. 

But you do not need a new rea file to run your case.....

From: nek...@googlegroups.com <nek...@googlegroups.com> on behalf of Chinthaka Jacob <chinthaka...@gmail.com>
Sent: Wednesday, May 25, 2022 8:07 AM
To: Nek5000 <nek...@googlegroups.com>
Subject: Re: [nek5000] Re: Guidelines for exporting exodus meshes from ICEM CFD
 
You received this message because you are subscribed to the Google Groups "Nek5000" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nek5000+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nek5000/54bc59ec-a89b-447a-86c6-71514092b787n%40googlegroups.com.

Chinthaka Jacob

unread,
May 25, 2022, 11:55:46 PM5/25/22
to Nek5000
I see! Thanks, Haomin for all the support and precise information as always!!
Reply all
Reply to author
Forward
0 new messages