[Nek5000-users] How to give NEK5000 boundary conditions to exodus mesh file

nek5000-users at lists.mcs.anl.gov nek5000-users at lists.mcs.anl.gov
Thu May 31 08:54:04 CDT 2018


It probably means that the boundary conditions are not correctly set in usrdat(). Can you add a write statement in each line of the do loop to check wether boundary conditions are properly set when running?

Also add ‘call exist’ after setting the boundary conditions that way Nek5000 will automatically exit.

Marco

On May 31, 2018, at 9:51 AM, nek5000-users at lists.mcs.anl.gov<mailto:nek5000-users at lists.mcs.anl.gov> wrote:

Yes. I see the problem now.

it shows there is 1000 elements but all the co ordinates are  zero. In fact there is nothing and all the boundary conditions are E.

Could you please tell me where i am probably wrong?  It was showing correct number of elemnts and the range of domain. Even when i was using exo2nek it was showing the correct numbers. And genmap worked as well.

Regards
Sijo


________________________________
De: "nek5000-users" <nek5000-users at lists.mcs.anl.gov<mailto:nek5000-users at lists.mcs.anl.gov>>
À: "nek5000-users" <nek5000-users at lists.mcs.anl.gov<mailto:nek5000-users at lists.mcs.anl.gov>>
Envoyé: Jeudi 31 Mai 2018 15:43:20
Objet: Re: [Nek5000-users] How to give NEK5000 boundary conditions to exodus mesh file

Can you add ‘call gen_rea(0)’ after setting the boundary conditions in usrdat()? It will generate a *.rea file with all boundary conditions.

Marco

On May 31, 2018, at 9:37 AM, nek5000-users at lists.mcs.anl.gov<mailto:nek5000-users at lists.mcs.anl.gov> wrote:


I generated again it didnt work.
I will explain what I did so far.

I made a cube fluid mesh in ICEM.

Then I gave B.Cs to the cube as follows : outlet = Sideset no : 1,   inlet = Sideset no : 5 , Wall_up = Sideset no:4  ,Wall_down = Sideset no:3 , P_Wall_Right =Side_set 6, P_wall_left = Sideset no: 2
After that I exported the mesh from ICEM to exodus.exo format file.

Then using exo2nek tool from NEK5000, I converted the above file to exodus.re2 file. (Then I tried to convert into rea file but thrown some errors).
Then I mapped the file into exodus.ma2 file.

Then from example Turbulent channel I took a .par file to give parameters.

Now I also given the B.Cs through the .usr file.
 as follows:

c-----------------------------------------------------------------------
      subroutine usrdat
      include 'SIZE'
      include 'TOTAL'


      do i=1,nelt
        do j=1,2*ndim
          if(bc(5,j,i,1).eq.1) then
            cbc(j,i,1)='O  '
          elseif(bc(5,j,i,1).eq.2) then
            cbc(j,i,1)='W  '
          elseif(bc(5,j,i,1).eq.3) then
            cbc(j,i,1)='W  '
          elseif(bc(5,j,i,1).eq.4) then
            cbc(j,i,1)='W  '
          elseif(bc(5,j,i,1).eq.5) then
            cbc(j,i,1)='V  '
          elseif(bc(5,j,i,1).eq.6) then
            cbc(j,i,1)='W  '
          else
            cbc(j,i,1)='E  '
          endif
        enddo
      enddo


      return
      end
c-----------------------------------------------------------------------


Then in my folder I have .ma2,.re2,.par,.usr files to run this case and when i run the case I get an error shown before.

Could you please tell me, if therer is anything wrong?

Thank you
________________________________
De: "nek5000-users" <nek5000-users at lists.mcs.anl.gov<mailto:nek5000-users at lists.mcs.anl.gov>>
À: "nek5000-users" <nek5000-users at lists.mcs.anl.gov<mailto:nek5000-users at lists.mcs.anl.gov>>
Envoyé: Jeudi 31 Mai 2018 15:22:49
Objet: Re: [Nek5000-users] How to give NEK5000 boundary conditions to exodus mesh file


Did you generate a new map file after changing the BCs?

This matters when switching periodic bcs on or off...

Paul

________________________________
From: Nek5000-users <nek5000-users-bounces at lists.mcs.anl.gov<mailto:nek5000-users-bounces at lists.mcs.anl.gov>> on behalf of nek5000-users at lists.mcs.anl.gov<mailto:nek5000-users at lists.mcs.anl.gov> <nek5000-users at lists.mcs.anl.gov<mailto:nek5000-users at lists.mcs.anl.gov>>
Sent: Thursday, May 31, 2018 8:12:55 AM
To: nek5000-users at lists.mcs.anl.gov<mailto:nek5000-users at lists.mcs.anl.gov>
Subject: Re: [Nek5000-users] How to give NEK5000 boundary conditions to exodus mesh file

I do not think this method supports periodic boundary conditions. You will have to replace the periodic boundary conditions with wall boundary conditions and see it is runs.

Marco

On May 31, 2018, at 9:11 AM, nek5000-users at lists.mcs.anl.gov<mailto:nek5000-users at lists.mcs.anl.gov> wrote:


Hi Marco,

I tried and it compiled . But before starting the time step it failed.
Its a very simple case, the water flowing throgh a cube. So I have inlet, outlet, walls on upside and bottom and periodic conditions on side walls.
I get this error:

Matrix:   0 aa         6       6       6
  0 aa     8.33333E+01  -4.87842E+01   0.00000E+00   0.00000E+00   0.00000E+00   0.00000E+00
  0 aa    -4.87842E+01   8.66667E+01  -4.87842E+01   7.11752E+00  -1.66667E+00   0.00000E+00
  0 aa     0.00000E+00  -4.87842E+01   8.33333E+01  -4.16667E+01   7.11752E+00   0.00000E+00
  0 aa     0.00000E+00   7.11752E+00  -4.16667E+01   8.33333E+01  -4.87842E+01   0.00000E+00
  0 aa     0.00000E+00  -1.66667E+00   7.11752E+00  -4.87842E+01      Infinity     -Infinity
  0 aa     0.00000E+00   0.00000E+00   0.00000E+00   0.00000E+00     -Infinity      Infinity

Matrix:   0 bb         6       6       6
  0 bb     4.16667E-02   0.00000E+00   0.00000E+00   0.00000E+00   0.00000E+00   0.00000E+00
  0 bb     0.00000E+00   1.66667E-02   0.00000E+00   0.00000E+00   0.00000E+00   0.00000E+00
  0 bb     0.00000E+00   0.00000E+00   4.16667E-02   0.00000E+00   0.00000E+00   0.00000E+00
  0 bb     0.00000E+00   0.00000E+00   0.00000E+00   4.16667E-02   0.00000E+00   0.00000E+00
  0 bb     0.00000E+00   0.00000E+00   0.00000E+00   0.00000E+00   8.33333E-03   0.00000E+00
  0 bb     0.00000E+00   0.00000E+00   0.00000E+00   0.00000E+00   0.00000E+00   0.00000E+00

Matrix:   0 Aeig       6       6       6
  0 Aeig   8.33333E+01  -4.87842E+01   0.00000E+00   0.00000E+00   0.00000E+00   0.00000E+00
  0 Aeig  -4.87842E+01   8.66667E+01  -4.87842E+01   7.11752E+00  -1.66667E+00   0.00000E+00
  0 Aeig   0.00000E+00  -4.87842E+01   8.33333E+01  -4.16667E+01   7.11752E+00   0.00000E+00
  0 Aeig   0.00000E+00   7.11752E+00  -4.16667E+01   8.33333E+01  -4.87842E+01   0.00000E+00
  0 Aeig   0.00000E+00  -1.66667E+00   7.11752E+00  -4.87842E+01      Infinity     -Infinity
  0 Aeig   0.00000E+00   0.00000E+00   0.00000E+00   0.00000E+00     -Infinity      Infinity

Matrix:   0 Deig       1       6       6
  0 Deig   0.00000E+00   0.00000E+00   0.00000E+00   0.00000E+00   0.00000E+00   0.00000E+00
 Error in generalev, info=          12           6          -6

an error occured: dying ...



Could you please tell me why?

Thank you

Sijo GEORGE
________________________________
De: "nek5000-users" <nek5000-users at lists.mcs.anl.gov<mailto:nek5000-users at lists.mcs.anl.gov>>
À: "nek5000-users" <nek5000-users at lists.mcs.anl.gov<mailto:nek5000-users at lists.mcs.anl.gov>>
Envoyé: Jeudi 31 Mai 2018 14:52:40
Objet: Re: [Nek5000-users] How to give NEK5000 boundary conditions to exodus mesh file

I specify the boundary conditions in the usrdat subroutine using the following piece of code

      do i=1,nelt
        do j=1,2*ndim
          if(bc(5,j,i,1).eq.1) then
            cbc(j,i,1)='mv  '
          elseif(bc(5,j,i,1).eq.2) then
            cbc(j,i,1)='W  '
          elseif(bc(5,j,i,1).eq.3) then
            cbc(j,i,1)='W  '
          elseif(bc(5,j,i,1).eq.4) then
            cbc(j,i,1)='W  '
          else
            cbc(j,i,1)='E  '
          endif
        enddo
      enddo

Marco

On May 31, 2018, at 8:50 AM, nek5000-users at lists.mcs.anl.gov<mailto:nek5000-users at lists.mcs.anl.gov> wrote:

Hi Neks,

I did the conversion of a mesh from ICEM to exodus file then to re2 file.

But I am bit confused on the boundary conditions. Because from ICEM before I export to exodus I give the B.Cs as side set numbers and after the conversion to re2 I wont be able to put the boundary conditions in NEK format.

So could you please tell me how you put the BC in NEK5000 format to a mesh file with exodus format.

Thank you
_______________________________________________
Nek5000-users mailing list
Nek5000-users at lists.mcs.anl.gov<mailto:Nek5000-users at lists.mcs.anl.gov>
https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users


_______________________________________________
Nek5000-users mailing list
Nek5000-users at lists.mcs.anl.gov<mailto:Nek5000-users at lists.mcs.anl.gov>
https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users
_______________________________________________
Nek5000-users mailing list
Nek5000-users at lists.mcs.anl.gov<mailto:Nek5000-users at lists.mcs.anl.gov>
https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users


_______________________________________________
Nek5000-users mailing list
Nek5000-users at lists.mcs.anl.gov<mailto:Nek5000-users at lists.mcs.anl.gov>
https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users
_______________________________________________
Nek5000-users mailing list
Nek5000-users at lists.mcs.anl.gov<mailto:Nek5000-users at lists.mcs.anl.gov>
https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users


_______________________________________________
Nek5000-users mailing list
Nek5000-users at lists.mcs.anl.gov<mailto:Nek5000-users at lists.mcs.anl.gov>
https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users
_______________________________________________
Nek5000-users mailing list
Nek5000-users at lists.mcs.anl.gov<mailto:Nek5000-users at lists.mcs.anl.gov>
https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/nek5000-users/attachments/20180531/d9367971/attachment-0001.html>


More information about the Nek5000-users mailing list