Periodic Boundary Condition Tutorial
I tried to find a tutorials or test case on using the periodic boundary condition module (SU2_PBC), but didn't have a lot of luck. I saw the periodic markers in the open rotor test case, but I couldn't get it to run. The case I'm running creates a 'mesh_out.su2' file, but I don't know if I need to run that back through the SU2_CFD or not. Any help is appreciated! Thanks!
|
1 Attachment(s)
Hi,
I tried this case a while ago, see: http://www.cfd-online.com/Forums/su2...-flow-vtk.html I tried with su2_cfd, but not su2_pbc. Under win7@32. The mesh_openrotor_79k.su2 already has periodic conditions in it. I tried to remove all parts after MARKER_TAG= SEND_RECEIVE in the mesh file and then run su2_pdc.exe, It generate a new mesh file and added the removed parts. Also there is a periodic_halo.vtk, but it looks wired in Paraview. See attached pic. The new Rev1206 source code can outputs nearly correct mesh in ascii tecplot format whih ghost points removed. The original 2.0 version can't. still expecting the new version of new output. Regards Cean |
1 Attachment(s)
this is the result with new 2.0.2 su2_pbc.
still looks wired. |
The picture doesn't make sense for me... as far I see the periodic_original.plt already has a halo cells created by the PBC?
Maybe you are running PBC twice, or maybe the original grid already has the periodic structure. Best, Francisco |
I see. With the mesh file provided for that case, i also need to remove some points and elements before runing su2_pbc.exe. Not just the send_receive tag parts.
if su2_pbc is combined into su2_cfd, maybe it's easier to output the result. |
Hi Steve and Cean,
The procedure to include PBC boundary conditions in your simulation are: 1) Create a regular mesh in .su2 or .cgns format. 2) Use a configuration file which has the option for the periodic marker. For example, MARKER_PERIODIC= ( SideWall1, SideWall2, 0,1.0, 0, -60, 0, 0, 0, 0,0, SideWall2, SideWall1, 0,1.0,0, 60, 0,0, 0,0,0 ) where the format of the above quantities is: % Format: ( periodic marker, donor marker, rotation_center_x, rotation_center_y, % rotation_center_z, rotation_angle_x-axis, rotation_angle_y-axis, % rotation_angle_z-axis, translation_x, translation_y, translation_z, ... ). Use this mesh file and configuration file to run SU2_PBC as: SU2_PBC configuration.cfg This will output a new mesh (by default named mesh_out.su2) with a set of halo cells. Use this mesh file to run a flow simulation. This can be done by just renaming the input mesh file in the configuration file as: MESH_FILENAME = mesh_out.su2 This should work, let us know if this doesn't. We will soon add a test case to demonstrate this capability. Thanks for highlighting this issue. Amrita |
Hi Amrita,
I realised the compilcation of the mesh file: it may be a normal file or a file generated by su2_PBC. If su2_CFD can hide the su2_PBC detail, it would be more easy to use. Regards, Cean |
Hi Cean,
Just to follow up, you can always tell if a mesh file has been generated using SU2_PBC by opening the .su2 mesh file and searching for "MARKER_TAG= SEND_RECEIVE". If this send/receive tag is in the file, it has been generated using the periodic module. Thanks for your suggestion on incorporating PBC into the main CFD module, we are always looking for ways to improve the usability of the code. We'll keep it in mind for future releases. -Sean |
Error in the cfg of this case
Hi,
I tried the same as Shirazbj and after some effort cleaning up the mesh "mesh_openrotor_79k.su2" having taken away what SU2_PBC supposedly added to the original mesh, I ran SU2_PBC and got the same wired result. The error seems to be in the cfg file that's given with the example, I think it should be: Quote:
|
Is it possible to release the file which is used to generated the mesh_openrotor_79k.su2 with su2_pbc?
Just as a demo to show how su2_pbc works. Thx |
1 Attachment(s)
I think the best thing would be that the developers release the original file they started with.
I tried to attach my handmade back engineered mesh file that came from the original mesh file that already had the pbc in it, but the filesize is larger than what's allowed here (much larger.) I added a picture though. The trick to get the clean file back without PBC was not only taking away the extra nodes as you posted, but also the extra elements on all the external boundary faces. |
Quote:
|
Quote:
A tutorial for using the periodic boundary conditions in SU2 is a great idea, and we will try to get an official tutorial up in the documentation as soon as we can. In the meantime, I am providing a simple test case to demo the process. Please find the translation_NACA0012.cfg config file and corresponding initial mesh, mesh_NACA0012_translation_prepbc.su2, that can be downloaded here. This is a translational periodicity case (rotational periodicity requires only a different marker specification). To run this case using periodic boundary conditions, please perform the following steps: 1. Execute SU2_PBC at the command line using '$ SU2_PBC translation_NACA0012.cfg' 2. SU2_PBC will read in the original mesh, mesh_NACA0012_translation_prepbc.su2, and create the new halo cells needed for the periodic boundary condition. A new mesh file will be generated with these cells, and it will be named mesh_out.su2 (as specified in the config). Two mesh files in Tecplot format will also be written so that the original and new meshes can be visualized. Please check these two files, periodic_original.plt & periodic_halo.plt. 3. Open the config file and change the specified mesh file to the newly generated file with the periodic conditions built in by setting MESH_FILENAME= mesh_out.su2. 4. Execute SU2_CFD at the command line using '$ SU2_CFD translation_NACA0012.cfg'. This Euler case should converge relatively quickly, and you can check the solution files afterwards. I hope that being able to inspect the config file options and visualize the meshes generated by SU2_PBC helps to shed some light on the periodic boundary conditions. Please let me know if anything is unclear. All the best, Tom |
1 Attachment(s)
Quote:
Finally I am getting there. I made a 3d 90 degree elbow. PBC is working, just I got bad match. Don't know how to improve. Are the two periodic surfaces must meshed the same? I attached my cfg and su2 mesh. Thanks for help. Cean |
1 Attachment(s)
Thanks economon, that runs fine.
@shirazbj It seems you messed the BC names up. Rename your boundary conditions as follows. Farfield -> Periodic_1 Hub -> Outlet Periodic_2 -> Hub Periodic_1 -> Farfield Outlet -> Periodic_2 Inlet = OK In the cgf file rename FarField -> Farfield That worked! :) See the attached file and run: SU2_PBC bjt3.cfg SU2_CFD bjt3_pbc.cfg May I ask to both of you, which grid generator you are using? :confused: |
Quote:
Here in our lab, I have access to the Pointwise meshing package and take advantage of our Pointwise->Native SU2 mesh exporter (this plugin is now built into the current version of Pointwise). T |
Quote:
I use free GMSH and convert its msh file into su2 file with my free code gmsh2su2.f90. I have to figure out where I messed up the surface names. |
Looking at your grid, I expected that, thanks for confirming that. I'm looking for an example of a serious mesh script of an IGES/STEP geometry with a separate prismatic boundary layer grid.
All I find in the gmsh tutorials are geometries that are generated in gmsh itself. Do you know if something like that is available? Writing something like gmsh2su2.f90 is something I would do (in fortran as well), but once I get the hang of gmsh.:cool: |
1 Attachment(s)
Quote:
|
What do you mean?
Periodic halo cells have been added on the outside of the periodic walls, there is no hole in your domain. |
SU2 now adds halo cells to only one side of the mesh. We do not require two sets of halo cells, and the information is exchanged between the set of halo cells, and a set of interior points on the other side of the mesh.
|
Quote:
Is the added halo cells a copy of the set of interior points on the other side? |
Problems with periodic boundary condition
2 Attachment(s)
*bump*
It has been a while since the last post in this thread, but for me it seemed suitable to post it here since this thread is the only one I could find on the SU2 part of this forum considering periodic boundary conditions. I'm trying to do a relatively simple flow analysis of a Caradonna & Tung rotor for compressible, inviscid rotating flow at 2500 rpm. Hence, this case is almost similar to the case provided in the Test Cases, I'm just using my own mesh instead of the one provided in the Test Cases. The main difference is that I try to run this case using a periodic boundary condition, which should be possible given that the situation is axisymmetric. Unfortunately, I'm experiencing some issues with this. First of all, the SU2_PBC module seems to have disappeared from the 3.2 version, is this correct? I couldn't find it on the Github page. Luckily my supervisor still has the 3.1 version installed next to the newest one, this version still includes SU2_PBC. I have adapted the mesh using the SU2_PBC executable from his V3.1 and then I used my own V3.2 to run the CFD simulation. For the first ~30 iterations everything seems to go well and it seems to converge nicely, but afterwards the residuals start to increase and the simulation diverges. I have already had to add a shaft at the rotation axis to prevent mismatches in the mesh after running SU2_PBC, such that my mesh looks similar to the case presented here: http://www.task.gda.pl/files/quart/T...4/tq312j-e.pdf. Also see the screenshot that I've attached (from Pointwise) So, does anybody know what I can try to do in order to solve this? I've tried copying this mesh and rotating it 180 degrees about the x-axis to obtain the "full" grid in order to check if this might yield some new information, but the CFD simulation using this mesh converges normally. I've also attached a view from the periodic_halo.plt file that SU2_PBC gives as output. It only shows halo cells on one of the periodic boundaries, is this correct? In the configuration file I have defined the MARKER_PERIODIC both ways so this shouldn't be the problem: MARKER_PERIODIC= ( periodic1, periodic2, 0.0, 0.0, 0.0, -180.0, 0.0, 0.0, 0.0, 0.0, 0.0, periodic2, periodic1, 0.0, 0.0, 0.0, +180.0, 0.0, 0.0, 0.0, 0.0, 0.0 ) Running the simulation without adapting the mesh doesn't help either; the simulation starts but it already has non-physical points from the beginning and the calculation quickly diverges. Thanks in advance for your help! :) |
Hi Tom,
I am looking for tutorial cases with periodic boundary condition. I tried to download the files from the link provided but it seems that the link does not exist. Could you please provide the files. It will be of great help. |
segmentation fault
1 Attachment(s)
Hi,
I have a problem with periodic boundary conditions. I am generating the mesh with Pointwise which should ensure the periodic matching but I am getting "segmentation fault" error message: Code:
------------------------------------------------------------------------- Kind Regards, Zeno |
Can you use version 7? This step through SU2_MSH is no longer required.
|
works
Quote:
|
All times are GMT -4. The time now is 04:30. |