CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > SU2

Periodic Boundary Condition Tutorial

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree3Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 18, 2013, 22:55
Default Periodic Boundary Condition Tutorial
  #1
New Member
 
Steve Arnold
Join Date: Mar 2013
Posts: 1
Rep Power: 0
88turbo is on a distinguished road
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!
88turbo is offline   Reply With Quote

Old   March 19, 2013, 20:30
Default
  #2
Senior Member
 
Cean
Join Date: Feb 2010
Posts: 128
Rep Power: 16
shirazbj is on a distinguished road
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
Attached Images
File Type: jpg h.jpg (68.8 KB, 259 views)

Last edited by shirazbj; March 19, 2013 at 22:40.
shirazbj is offline   Reply With Quote

Old   March 21, 2013, 22:55
Default
  #3
Senior Member
 
Cean
Join Date: Feb 2010
Posts: 128
Rep Power: 16
shirazbj is on a distinguished road
this is the result with new 2.0.2 su2_pbc.

still looks wired.
Attached Images
File Type: jpg two.jpg (70.9 KB, 262 views)
shirazbj is offline   Reply With Quote

Old   March 23, 2013, 14:37
Default
  #4
Super Moderator
 
Francisco Palacios
Join Date: Jan 2013
Location: Long Beach, CA
Posts: 404
Rep Power: 15
fpalacios is on a distinguished road
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
fpalacios is offline   Reply With Quote

Old   March 24, 2013, 20:54
Default
  #5
Senior Member
 
Cean
Join Date: Feb 2010
Posts: 128
Rep Power: 16
shirazbj is on a distinguished road
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.
shirazbj is offline   Reply With Quote

Old   May 2, 2013, 13:52
Default
  #6
New Member
 
Amrita Lonkar
Join Date: Nov 2012
Posts: 14
Rep Power: 14
Amrita Lonkar is on a distinguished road
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
koray likes this.
Amrita Lonkar is offline   Reply With Quote

Old   May 2, 2013, 21:34
Default
  #7
Senior Member
 
Cean
Join Date: Feb 2010
Posts: 128
Rep Power: 16
shirazbj is on a distinguished road
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
shirazbj is offline   Reply With Quote

Old   May 9, 2013, 14:00
Default
  #8
Member
 
Sean R. Copeland
Join Date: Jan 2013
Posts: 40
Rep Power: 13
copeland is on a distinguished road
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
copeland is offline   Reply With Quote

Old   May 20, 2013, 06:59
Default Error in the cfg of this case
  #9
Member
 
Anonymous
Join Date: Jul 2009
Posts: 44
Rep Power: 17
gerritgroot is on a distinguished road
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:
MARKER_PERIODIC= ( periodic_1, periodic_2, 0.0, 0.0, 0.0, -45, 0.0, 0.0, 0.0, 0.0, 0.0, periodic_2, periodic_1, 0.0, 0.0, 0.0, +45.0, 0.0, 0.0, 0.0, 0.0, 0.0 )
Shouldn't it?
gerritgroot is offline   Reply With Quote

Old   May 20, 2013, 08:45
Default
  #10
Senior Member
 
Cean
Join Date: Feb 2010
Posts: 128
Rep Power: 16
shirazbj is on a distinguished road
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
shirazbj is offline   Reply With Quote

Old   May 20, 2013, 09:24
Default
  #11
Member
 
Anonymous
Join Date: Jul 2009
Posts: 44
Rep Power: 17
gerritgroot is on a distinguished road
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.
Attached Images
File Type: jpg WhatPBCdid.jpg (83.7 KB, 149 views)
gerritgroot is offline   Reply With Quote

Old   May 20, 2013, 09:27
Default
  #12
Senior Member
 
Cean
Join Date: Feb 2010
Posts: 128
Rep Power: 16
shirazbj is on a distinguished road
Quote:
Originally Posted by gerritgroot View Post
I think the best thing would be that the developers release the original file they started with.
Yes, I am thinking su2 team has a demo case for su2_pbc.
shirazbj is offline   Reply With Quote

Old   May 21, 2013, 06:13
Default
  #13
Super Moderator
 
Thomas D. Economon
Join Date: Jan 2013
Location: Stanford, CA
Posts: 271
Rep Power: 14
economon is on a distinguished road
Quote:
Originally Posted by shirazbj View Post
Yes, I am thinking su2 team has a demo case for su2_pbc.
Dear shirazbj & gerritgroot,

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
koray likes this.
economon is offline   Reply With Quote

Old   May 21, 2013, 08:41
Default
  #14
Senior Member
 
Cean
Join Date: Feb 2010
Posts: 128
Rep Power: 16
shirazbj is on a distinguished road
Quote:
Originally Posted by economon View Post
Dear shirazbj & gerritgroot,

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.

Tom
Great!

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
Attached Files
File Type: zip bjt3.zip (53.8 KB, 65 views)
shirazbj is offline   Reply With Quote

Old   May 21, 2013, 18:13
Default
  #15
Member
 
Anonymous
Join Date: Jul 2009
Posts: 44
Rep Power: 17
gerritgroot is on a distinguished road
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?
Attached Files
File Type: zip this_runs.zip (58.5 KB, 91 views)
gerritgroot is offline   Reply With Quote

Old   May 21, 2013, 20:29
Default
  #16
Super Moderator
 
Thomas D. Economon
Join Date: Jan 2013
Location: Stanford, CA
Posts: 271
Rep Power: 14
economon is on a distinguished road
Quote:
Originally Posted by shirazbj View Post
Are the two periodic surfaces must meshed the same?
SU2_PBC will look for a one-to-one match for each node on the two periodic faces, so it is best to create identical copies of the edges/domains that are translated or rotated to the periodic position.

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
economon is offline   Reply With Quote

Old   May 21, 2013, 23:50
Default
  #17
Senior Member
 
Cean
Join Date: Feb 2010
Posts: 128
Rep Power: 16
shirazbj is on a distinguished road
Quote:
Originally Posted by gerritgroot View Post
May I ask to both of you, which grid generator you are using?
Thanks gerritgroot.

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.
shirazbj is offline   Reply With Quote

Old   May 22, 2013, 04:32
Default
  #18
Member
 
Anonymous
Join Date: Jul 2009
Posts: 44
Rep Power: 17
gerritgroot is on a distinguished road
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.
gerritgroot is offline   Reply With Quote

Old   May 23, 2013, 07:46
Default
  #19
Senior Member
 
Cean
Join Date: Feb 2010
Posts: 128
Rep Power: 16
shirazbj is on a distinguished road
Quote:
Originally Posted by gerritgroot View Post
That worked!
Why only one side has the hole? Not both sides like the rotor case?
Attached Images
File Type: png one.PNG (17.1 KB, 77 views)
shirazbj is offline   Reply With Quote

Old   May 23, 2013, 11:52
Default
  #20
Member
 
Anonymous
Join Date: Jul 2009
Posts: 44
Rep Power: 17
gerritgroot is on a distinguished road
What do you mean?

Periodic halo cells have been added on the outside of the periodic walls, there is no hole in your domain.
gerritgroot is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
periodic boundary condition (translational) fluent 6.3 haihek FLUENT 3 January 22, 2014 05:10
Calculation of pressure gradient in periodic boundary condition ksaat FLUENT 7 May 16, 2011 04:59
problem about periodic boundary condition in Fluent winnawinna FLUENT 0 December 29, 2010 00:32
translational periodic boundary condition Rola Afify FLUENT 2 September 12, 2006 09:39


All times are GMT -4. The time now is 01:10.