[Nek5000-users] Nek5000-users Digest, Vol 88, Issue 8

nek5000-users at lists.mcs.anl.gov nek5000-users at lists.mcs.anl.gov
Thu Jun 9 09:15:37 CDT 2016


Hi Wei,

>1. to impose the periodic boundary conditons: in the script, it strongly
>recommend to impose "P" through the script, then how to setup it in
>mshconvert.py? the way
>convert('mesh.msh', bcs={1:'W',2:'v',3:'O',4:'P', 5:'P'})
> can generate the rea field but failed in the step of genmap. so how to
> treat boundary 4 and 5 as periodic BCs?

Probably you should have to do likes 

convert('mesh.msh', periodic_dx={(4,5) : [0, 0, 2]}, bcs={1:'W',2:'v',3:'O'})

Where the "periodic_dx" is to specify which pair-zone is periodic and what is the orientation of zones. in the example, zones 4,5 are the periodic boundaries and on the z-direction with distance of 2.

>2. about the curved wall. there is no problem to  define a circle by
>"Circle" command, but if I want to using "m" to define a spline curve, how
t>o seed middle points? I know in Gambit I can mesh the line using 3 node, I
>defined 3 node mode to mesh a circle, and using "m" instead of "circle",
>however,  it failed to generate the rea file. the circle merged into a
>point, then what should I do to active the spline curve?

Yes, it seems to be bugs in the python script  with "m" method. In the python script, the midpoints is (somehow) defined by 
 ...
 x_m = (x_1+x_2)/2;
 y_m = (y_1+y_2)/2;     
...
However, in the nek5000 (tools/prenek/zipper2.f) it read the values of (x_q, y_q) instead of (x_m,y_m) !?
....
!   subroutine xyzquad(xl,yl,zl,nxl,nyl,nzl,e)
...
     do k=1,nedge
         if (ccurve(k,e).eq.'m') then
            j = eindx(k)
            xq(j) = curve(1,k,e)
            yq(j) = curve(2,k,e)
            zq(j) = curve(3,k,e)
         endif
      enddo
...
This should be confirmed by nek5000 developers.

Thanks.

/Jing 

________________________________________
From: nek5000-users-bounces at lists.mcs.anl.gov <nek5000-users-bounces at lists.mcs.anl.gov> on behalf of nek5000-users-request at lists.mcs.anl.gov <nek5000-users-request at lists.mcs.anl.gov>
Sent: Wednesday, June 8, 2016 18:18
To: nek5000-users at lists.mcs.anl.gov
Subject: Nek5000-users Digest, Vol 88, Issue 8

Send Nek5000-users mailing list submissions to
        nek5000-users at lists.mcs.anl.gov

To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users
or, via email, send a message with subject or body 'help' to
        nek5000-users-request at lists.mcs.anl.gov

You can reach the person managing the list at
        nek5000-users-owner at lists.mcs.anl.gov

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Nek5000-users digest..."


Today's Topics:

   1. Re: Nek5000-users Digest, Vol 88, Issue 5
      (nek5000-users at lists.mcs.anl.gov)


----------------------------------------------------------------------

Message: 1
Date: Wed, 8 Jun 2016 18:15:42 +0200
From: nek5000-users at lists.mcs.anl.gov
To: nek5000-users at lists.mcs.anl.gov
Subject: Re: [Nek5000-users] Nek5000-users Digest, Vol 88, Issue 5
Message-ID:
        <mailman.23474.1465402725.24727.nek5000-users at lists.mcs.anl.gov>
Content-Type: text/plain; charset="utf-8"

Hello Jing,

Recently I am also working on converting fluent mesh to nek5000. I have
generated the *msh from gambit, then using the mshconvert.py tool to
convert a simple mesh with a circular cylinder inside a square.

simply, I can get the *rea file with circle of the "W", "v" and "O". but I
have met two problems;

1. to impose the periodic boundary conditons: in the script, it strongly
recommend to impose "P" through the script, then how to setup it in
mshconvert.py? the way

convert('mesh.msh', bcs={1:'W',2:'v',3:'O',4:'P', 5:'P'})

can generate the rea field but failed in the step of genmap. so how to
treat boundary 4 and 5 as periodic BCs?

2. about the curved wall. there is no problem to  define a circle by
"Circle" command, but if I want to using "m" to define a spline curve, how
to seed middle points? I know in Gambit I can mesh the line using 3 node, I
defined 3 node mode to mesh a circle, and using "m" instead of "circle",
however,  it failed to generate the rea file. the circle merged into a
point, then what should I do to active the spline curve?

Thanks!

Wei

2016-06-08 15:46 GMT+02:00 <nek5000-users at lists.mcs.anl.gov>:

> Hi Mansi,
>
> You can find the updated "mshconvert.py" in the attachment.  You can run
> the script for your case likes
>
> ###
> $ ipython
>
> In [1]: from mshconvert import *
> Converting from ANSYS Fluent format (.msh) to Nek5000, semtex or FEniCS
> format
>
> In [2]: convert('mesh_hexa_final.msh', bcs={10:'W',11:'v',12:'v',13:'O'})
> ...
> ###
>
> Here I assume that BC "W" is on zone 10, "v" is on zones 11 and 12, and
> 'O' on zone 13.
>
> The snapshot for the Nek5000 mesh using visit is also attached in the
> email.
>
> /Jing
>
>


More information about the Nek5000-users mailing list