[Nek5000-users] GAMBIT to NEKTON matlab code
nek5000-users at lists.mcs.anl.gov
nek5000-users at lists.mcs.anl.gov
Thu Jun 3 20:43:23 CDT 2010
All,
First, since this is not a question to the developers but rather a supplementary topic/useful tool for
importing complex geometries, please reply to my personal email rather than clogging up the user list with questions.
If a developer replies that it is not a problem to respond directly then go ahead, but I feel it may be intrusive to some users
searching for real questions. email: cmeador at tamu.edu
( for questions , I will try to get to them when I can)
Attached is the matlab m-files necessary to convert a neutral file to a Nekton REA file.
Note that it only creates the heart of the REA and you must paste it into a template REA of your choice.
The main file to use is called " rea_write.m ". Here you specify the inputs at the top. You can read through the comments
and get an idea of what functions do what. I am sure that much of the program can be improved to run faster, but at
the moment I don't have time for that and it is working for what I needed it to.
To get started with Gambit, assuming you imported/created your geometry in gambit, follow these 3 basic steps:
1. Set Solver type to GENERIC
2. When Meshing, make sure the edge node count is 3 (for midpoints). This should make the face count 8 and the volume count 20 nodes.
This setting is necessary to take advantage of Nektons mid side node support.
3. Use the zones to label faces as Boundary conditions. Select multiple faces if you like. Since the solver is set to generic, just call the BC
anything you like, "Inlet" for example. The Matlab code will ask you "What did you mean by Inlet", where you would input 'v' for a fortran
velocity input. If it is a thermal problem (TBC = 1 in the inputs in rea_write), it will ask for the momentum and thermal BC. In gambit, any
face that is not labeled with a BC type is assumed to be a Wall.
NOTE: The Mesh must be HEX & Edge node count 3!... ONLY works for 3D cases!
I also included a few sample NEU files that you can try as examples, and to help check if your gambit mesh is set up correctly. Also, the code
is written assuming Gambit calls the z-axis "y" and the y-axis "z". I found this was the case with the Gambit we were using, so the code will switch the coordinates.
When we imported from Solidworks we noticed that it was doing this.
Hope this is enough to get started and good luck with it!!
- Michael M.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/nek5000-users/attachments/20100603/51c3bfe4/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: GAMBIT TO NEK.zip
Type: application/zip
Size: 126725 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/nek5000-users/attachments/20100603/51c3bfe4/attachment.zip>
More information about the Nek5000-users
mailing list