changing parameters and BC's from 2d to 3d

340 views
Skip to first unread message

Hussein Kokash

unread,
Apr 15, 2021, 10:44:37 PM4/15/21
to Nek5000



Dear Nek's

I am running a flow over cylinder case using a .msh file imported to Nek5000, using gmsh2nek, then genmap, case compile and executed flawlessly.

However, when converted to 2d using n2to3 or importing already three dimensional .msh file, the case would compile successfully through makenek, but always returns with an error with parallel (Nekmpi) or serial (nek) jobs.

This is the error that shows using nekmpi command:

gs_setup: 10977 unique labels shared
   pairwise times (avg, min, max): 1.291e-05 1.24464e-05 1.31878e-05
   crystal router                : 4.08285e-05 3.93386e-05 4.17995e-05
   all reduce                    : 0.000107034 0.000106627 0.000107426
   used all_to_all method: pairwise
   handle bytes (avg, min, max): 779617 759028 809668
   buffer bytes (avg, min, max): 60112 43168 84272
   setupds time 5.8035E-02 seconds   2  4      159854        7328
  0  4     914  1  E    get_fast_bc_error
  0  2     914  1  E    get_fast_bc_error
  0  1     914  1  E    get_fast_bc_error
  0  3     914  1  E    get_fast_bc_error
  0  5     914  1  E    get_fast_bc_error
 -1  6     914  1  0    get_fast_bc_error
  0  4     920  1  E    get_fast_bc_error
  0  2     920  1  E    get_fast_bc_error
  0  1     920  1  E    get_fast_bc_error
  0  3     920  1  E    get_fast_bc_error
  0  5     920  1  E    get_fast_bc_error
 -1  6     920  1  0    get_fast_bc_error
  0  4     914  1  E    get_fast_bc_error
  0  2     914  1  E    get_fast_bc_error
  1  1     914  1  O    get_fast_bc_error
  0  3     914  1  E    get_fast_bc_error
  0  4     916  1  E    get_fast_bc_error
  0  2     916  1  E    get_fast_bc_error
  0  1     916  1  E    get_fast_bc_error
  0  3     916  1  E    get_fast_bc_error
  0  4     919  1  E    get_fast_bc_error
  0  2     919  1  E    get_fast_bc_error
  0  1     919  1  E    get_fast_bc_error
  0  3     919  1  E    get_fast_bc_error
  0  5     919  1  E    get_fast_bc_error
 -1  6     919  1  0    get_fast_bc_error
  0  4     919  1  E    get_fast_bc_error
  0  2     919  1  E    get_fast_bc_error
  0  1     919  1  E    get_fast_bc_error
  0  3     919  1  E    get_fast_bc_error
  0  5     919  1  E    get_fast_bc_error
 -1  6     919  1  0    get_fast_bc_error
  0  5     914  1  E    get_fast_bc_error
 -1  6     914  1  0    get_fast_bc_error
  0  5     916  1  E    get_fast_bc_error
 -1  6     916  1  0    get_fast_bc_error
EXIT: Error A get_fast_bc        916
 
an error occured: dying ...
 
-------------------------------------------------------
Primary job  terminated normally, but 1 process returned
a non-zero exit code.. Per user-direction, the job has been aborted.
-------------------------------------------------------
--------------------------------------------------------------------------
mpiexec detected that one or more processes exited with non-zero status, thus causing
the job to be terminated. The first process to do so was:

  Process name: [[47755,1],3]
  Exit code:    1
--------------------------------------------------------------------------

Can someone please guide me on how to setup a proper 3d case and where exactly is the error comes from (parameter or user file)?

I have attached the files to help better assisting on this one.

Appreciate your non-stop support!

Hussein Kokash

unread,
Apr 15, 2021, 10:50:08 PM4/15/21
to Nek5000

YuHsiang Lan

unread,
Apr 20, 2021, 11:01:33 AM4/20/21
to Nek5000
Hi,

This usually indicates your BC is not setting correctly.
From the error message you post, it looks like there are some "0  " mixing in your outflow boundary consitions "O  "

Hope this helps,
Yu-Hsiang
--

Emmanuel Gillyns

unread,
Apr 21, 2021, 9:51:38 AM4/21/21
to Nek5000
Hi,

I'm not sure if this is what you expect, but you could generate a 3D mesh directly from GMSH (and avoid usage of n2to3), it will give you more freedom on your mesh design. Don't forget to add a physical group of surfaces (for each different boundary conditions) and volume (one volume of all the fluid domain).

Let us know if this works for you,

Emmanuel

Hussein Kokash

unread,
Apr 21, 2021, 5:11:02 PM4/21/21
to Nek5000
I appreciate your responses guys,

I have done so, got my test case in .rea file, I compile with "makenek" it goes good, but when trying to perform "Nekmpi" it always come back with a "EXIT: Error A get_fast_bc" error.

Now my case has only three files ... .rea / .usr / SIZE

I can't tell where is the problema exactly

Here is a google drive link of the case if anyone can look into it. THANKS!

YuHsiang Lan

unread,
Apr 21, 2021, 7:07:24 PM4/21/21
to Nek5000
Hi,

You still mistakenly use "zero" instead of "big O" as your outflow BC.
Just search " 0  " (space zero space space) in your rea file, and you will find those locations.

Given that your 2D case runs ok. It's probably coming from an typo when you feeding the Z(6) BC.

Yu-Hsiang
--

Hussein Kokash

unread,
Apr 21, 2021, 10:30:07 PM4/21/21
to Nek5000
Yu-Hsiang,

your inputs are highly appreciated, I have changed all " 0  " to " O  "

I ran the model but got this:

 Number of processors:           4
 REAL    wdsize      :           8
 INTEGER wdsize      :           4
 Timer accuracy      :  3.40E-08
 
 Reading /home/hf9098/Nek5000/run/test3d/test3d.rea                                                                                          
 partioning elements to MPI ranks
 Reading /home/hf9098/Nek5000/run/test3d/test3d.map                                                                                          
 Max neighbors: 4 | Min neighbors: 3 | Avg neighbors: 3.500000
 Max elements: 1832 | Min elements: 1832 | Balance: 1.000000
 
 done :: partioning   0.23552E-01 sec

  ERROR READING HISTORY DATA
  ABORTING IN ROUTINE RDHIST.

 
an error occured: dying ...

Anything else you suspect??


Thanks

Byron Guerrero

unread,
Apr 21, 2021, 11:07:42 PM4/21/21
to Hussein Kokash, Nek5000
Hi Hussein,

You mentioned above that you have the *.rea, *.usr and the SIZE file. However, most of the times you might need a partitioning file which is a *.map or *.ma2 file. To get that file you need to run the genmap tool. I suggest checking the following documentation:


Hope this helps.

Cheers,
Byron

--
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/9f120f03-00e5-4ebb-9250-a85296d03df1n%40googlegroups.com.

Hussein Kokash

unread,
Apr 21, 2021, 11:14:22 PM4/21/21
to Nek5000
Yu-Hsiang, THANK YOU!

It turned out that I have replaced a couple of "0" values with "O" but other than that, you was absolutely right! It worked

Got a quick question, is there any way at all that I can convert .msh file directly to .rea file, you know gmsh2nek converts it to .re2 and it doesn't do any good since "n2to3" only works with .rea format?


Appreciate it!

Hussein Kokash

unread,
Apr 21, 2021, 11:16:04 PM4/21/21
to Nek5000
Hey there Byron,

Ya I am aware of the mapping process, but the main issue was an error in "extruding" 2d mesh into 3d.

Thanks again :)

YuHsiang Lan

unread,
Apr 22, 2021, 12:40:25 AM4/22/21
to Nek5000
Hi Hussein,

I'm grad it works!

In my opinion...

gmsh can potentially generate a very big mesh. That's why gmsh2nek use binary format by default.
If you want an ascii rea format, then user will have to carry an dummy rea file for the parameters, which is not a good workflow.
The re2 + par file is the trend for the future and rea (or re2+rea) is considered as a legacy format.

The n2to3 is relative old. It's robust and fast enough (supporting 200M+ elements, in my knowledge) that people don't bother to upgrade it.
It actually needs some parameters in the rea file for the cyclic or axis-symmetric meshes. I think that's why it reads ascii format by default.
As long as the converting tools re2torea and reatore2 work, n2to3 is doing fine under ascii input.

Of course, it would be convenient for users to have n2to3 supporting re2 or gmsh supporting rea.
However, in practical, they are not the necessary features and there are some minor format issues for those changes.


Hope this explains the usage of the tools.
And, maybe people have better solutions to make them easier to use.

Thanks,
Yu-Hsiang
--
Reply all
Reply to author
Forward
0 new messages