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

Correction of symmetry plane implementation #2194

Merged
merged 221 commits into from
Aug 4, 2024
Merged

Conversation

bigfooted
Copy link
Contributor

@bigfooted bigfooted commented Jan 3, 2024

Proposed Changes

The implementation of the symmetry plane is incomplete. We follow here the book of Blazek, Computational Fluid Dynamics: Principles and Applications . According to Blazek, (chapter 8.6) 4 conditions have to be met on a symmetry plane:

  1. No flux across the boundary
  2. $\overline n \cdot \nabla \phi = 0$ (gradient of scalars are zero)
  3. $\overline n \cdot \nabla (\overline U \cdot \overline t) = 0$ (gradient of tangential velocity normal to boundary)
  4. $\overline t \cdot \nabla (\overline U \cdot \overline n) = 0$ (gradient of normal velocity along the boundary)

Points 2-4 all deal with gradients and can be dealt with in the gradient computation, i.e. Green-Gauss or Least Squares. According to Blazek, 2 approaches can be followed. "One possibility is to construct the missing half of the control volume by mirroring the grid on the boundary. The fluxes and gradients are then evaluated like in the interior using reflected flow variables." This approach can be implemented in an easy way when computing the Green-Gauss gradients. In SU2, routines are already in place that deal with GG gradients on boundaries. Here, we just have to identify the symmetry planes and mirror the flux through the faces.
Blazek continues: "The second methodology computes the fluxes for the halved control volume (but not accross the boundary). The components of the residual normal to the symmetry plane are then zeroed out. It is also necessary to correct normal vectors of those faces of the control volume, which touch the boundary. The modification consists of removing all components of the face vector, which are normal to the symmetry plane. The gradients also have to be corrected according to Eq. (8.40) [points 2,3,4 above]"

  1. Modify Green-Gauss and Least-Squares gradient computation for symmetry planes
    -> This seems to work fine
  2. Fix normal components of edges connected to symmetry plane
    -> This seems to work fine
  3. Fix residual components of velocity on the symmetry plane
    -> This seems to work fine
  4. Multiple symmetry planes, including Euler walls
    -> This seems to work fine
  5. multigrid
    -> Works fine now that we use the agglomeration as in the paper of Diskin.
  6. grid movement
  7. -> Works fine with the new fix to the residuals (energy update)

Related Work

#1168

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 used the pre-commit hook to prevent dirty commits and used pre-commit run --all to format old commits.
  • 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.

@bigfooted bigfooted marked this pull request as draft January 3, 2024 23:34
Common/src/geometry/CPhysicalGeometry.cpp Fixed Show fixed Hide fixed
Common/src/geometry/CPhysicalGeometry.cpp Fixed Show fixed Hide fixed
Common/src/geometry/CPhysicalGeometry.cpp Fixed Show fixed Hide fixed
Common/src/geometry/CPhysicalGeometry.cpp Fixed Show fixed Hide fixed
Common/src/geometry/CPhysicalGeometry.cpp Fixed Show fixed Hide fixed
Common/include/CConfig.hpp Outdated Show resolved Hide resolved
@bigfooted
Copy link
Contributor Author

TO DO: add testcase with 2 symmetry planes (laminar flow around sphere, slice)

UnitTests/SU2_CFD/gradients.cpp Outdated Show resolved Hide resolved
UnitTests/SU2_CFD/gradients.cpp Outdated Show resolved Hide resolved
@bigfooted bigfooted merged commit 77fed34 into develop Aug 4, 2024
34 of 35 checks passed
@bigfooted bigfooted deleted the feature_symmetry branch August 4, 2024 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants