[Nek5000-users] A meshing generation problem for complex geometric structure

nek5000-users at lists.mcs.anl.gov nek5000-users at lists.mcs.anl.gov
Fri Dec 8 07:03:42 CST 2017


Dear Horan,

the best approach I know to import a mesh in Nek5000, is to export your mesh in a exodus format with HEX27 elements (Cubit has this capabilities) and use the exo2nek script to create a binary file .re2. The exo2nek script can be found in the tools directory and has to be installed. Please read the associated README file for installation instruction.

Once it is installed, I suggest you start with a simple geometry (cube or pipe) to run the script, and make sure you have all of the steps right. Note that boundary conditions will have to be set in usrdat2 subroutine of the .usr file:

do iel=1,nelt
   do ifc=1,2*ndim
     idss = bc(5,ifc,iel,1)
     if (idss.eq.1) cbc(ifc,iel,1)='v ‘
     if (idss.eq.2) cbc(ifc,iel,1)=‘O ‘
     if (idss.eq.3) cbc(ifc,iel,1)=‘W '
  enddo
enddo

assuming that you have side set ids 1, 2 and 3 in your mesh. exo2nek stores the side set id in the variable ‘bc(5,inc,iel,1)’ for the velocity field.

If you really need the rea file, a rea file can be generated with the function call gen_rea(2) in usrdat2() but after setting the boundary conditions.

Hope this help,

Marco


On Dec 7, 2017, at 9:28 PM, nek5000-users at lists.mcs.anl.gov<mailto:nek5000-users at lists.mcs.anl.gov> wrote:

Dear experts in Nek5000 :
        Thank you for reading my email. I am a freshman in using Nek5000 and I am willing to simulate unsteady flow phenomenon in bottom head of PWR with LES method through parallel processes. And Nek5000 is the best solver for resolving my problem and I hope to reach my goal with the outstanding SEM-CFD tools. But it is really a matter for me to generate a mesh file for that structure. So could you please show me a proper way to reach the .rea mesh file for the bottom head for the geometry there is really complex and I am afraid I can not achieve the goal with editing .rea file directly.
        Thank you for your supporting me and I am waiting for your earlier reply eagerly.

Best regards

                                                                                                                                                                                                                                                                                                    Haoran JU








_______________________________________________
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/20171208/ed39d523/attachment-0001.html>


More information about the Nek5000-users mailing list