Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Periodic BC: add dummy BCs. #2038

Closed
wants to merge 1 commit into from

Conversation

ShiheJia
Copy link
Contributor

Proposed Changes

Add periodic BCs with dummy points. With internal markers, we could probe data from any inner surfaces, and here, we choose to construct periodic boundaries using dummy points which is preset on the input domain just like the internal markers. Four layers in both side is needed for MUSCL: the inner two layers send and the outer layers recieve.
With this way, we can use a larger CFL number similar to the cases using symmetry BCs and avoid passing too many variables with mpi.

Related Work

#1467 or other works about periodic BCs

PR Checklist

Put an X by all that apply. You can fill this out after submitting the PR. If you have any questions, don't hesitate to ask! We want to help. These are a guide for you to know what the reviewers will be looking for in your contribution.

  • I am submitting my contribution to the develop branch.
  • My contribution generates no new compiler warnings (try with --warnlevel=3 when using meson).
  • My contribution is commented and consistent with SU2 style (https://su2code.github.io/docs_v7/Style-Guide/).
  • I have added a test case that demonstrates my contribution, if necessary.
  • I have updated appropriate documentation (Tutorials, Docs Page, config_template.cpp), if necessary.

Copy link
Member

@pcarruscag pcarruscag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you are mixing concepts from structured and unstructured world. In unstructured vertex based we have half of the dual volume on each side of the periodicity, its the same variables on each side but rotated, that's why we combine the residuals.
Our issue is that this is hard to represent in the Jacobian.
MUSCL in unstructured is done with gradients, if you use inconsistent treatment you lose the equivalence between the periodic case and one with repeated mesh sections.

@ShiheJia
Copy link
Contributor Author

Thank you for your comment. No need to create dummy points for periodic BC is really an ingenious design and when I run RANS/URANS cases, I get good results. But there are still some problems for me, the first is convergence when I run big 3D cases and the second is the periodic BC cannot cooperate with hybrid RANS/LES method.

So I thought a dummy layer is sometimes necessary just as in Blazek's book(Computational Fluid Dynamics: Principles and Applications, Second Edition, Page 293).
book

One dummy layer need to communicate solution, gradients or maybe Laplacian, sensors and so on. It's still complex so I choose two dummy layers to only communicate solution. As in the picture, the original use the send-recieve pair1 as periodic BCs and this feature need four pairs with a restriction that the outermost four layers should be structured grids. Three more repeated mesh sections are indeed added but it is acceptable in terms of robustness and reducing data communication.
pairs

The above diagram can be set with the following settings:
MARKER_PERIODIC= ( y0.48, y0.04, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, -0.44, 0.0, y0, y0.44, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.44, 0.0 )
PERIODIC_DUMMY= YES

This functionality also requires a pre-processing program for the grid to add the appropriate boundary conditions to the .su2 file. I am currently doing this using a fortran code and trying to replicate it using python scripts. But the changes to the c++ code section have been verified with various RANS/URANS/DES cases and a result of NACA0012 swept wings is listed below.
0012

@pcarruscag
Copy link
Member

The dummy layer is what we used before version 7 and moved away from it for simplicity.
Two layers doesn't sound possible for unstructured meshes.

@ShiheJia
Copy link
Contributor Author

Thanks for your comments, commonality does suffer.

@ShiheJia ShiheJia closed this May 23, 2023
@pcarruscag
Copy link
Member

Can you describe the issue you see for hybrid rans /LES? Maybe something is not implemented correctly

@ShiheJia
Copy link
Contributor Author

ShiheJia commented May 23, 2023

It takes some time to prepare.
It seems that in some case, periodic BCs run with hybrid rans /LES method well, such as a tandem cylinder case that I give similar settings and mesh with Edward Molina's paper. But when I run some case, such as the following A-Airfoil case, the hybrid rans /LES method cannot run well. The reduction of the CFL number from 100 to 5 does not help, and just change hybrid rans /LES to URANS get a very normal iteration with CFL=100.
Mesh:
2
3
1

Setting and output:
set.cfg.txt
cfl5.output.txt
cfl100.output.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants