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

Apply Global Shift to Mesh Coordinates #62

Merged
merged 1 commit into from
Jul 12, 2024
Merged

Conversation

m-kurz
Copy link
Collaborator

@m-kurz m-kurz commented Jul 3, 2024

Implements a new feature that allows to shift the mesh coordinates using a global shifting vector MeshShift(3).

This feature is particularly useful in cases where the PostDeform functionality is used, which typically acts on a predescribed area of the mesh (i.e. the spherical deformation assuming the origin to be the center of the sphere). In the actual simulation or if other transformation steps are performed it might be beneficial to move that origin to another location after readin from external mesh generators or before writeout, since the simulation (initial/boundary conditions) might expect another location of the coordinate system's origin. The default behavior doesn't change, so it's completely backwards compatible.

One example where this functionality can be useful is a mesh similar to the 2D-2 case defined in: Benchmark Computations of Laminar Flow Around a Cylinder, Schäfer et al. 1996..
The parameter file to generate such a mesh (including shifting) is also added as tutorials/1-06-curved-postdeform/parameter_cylinderinchannel.ini, which also serves as a unit test for the functionality.

The actual shifting is performed in the routines already available for the MeshScale functionality. Scaling and shifting can be both applied independently either just after readin and before writing the mesh to disk. If both are applied in the same stage, scaling is always applied first before shifting the coordinates.

I hope that there is no identical functionality implemented yet that I overlooked...

…es of all mesh nodes) by a given 3D vector either during readin or writeout. This build on the MeshScale feature and provides similar functionality.
@m-kurz m-kurz added the enhancement New feature or request label Jul 3, 2024
@m-kurz m-kurz requested a review from kopperp July 3, 2024 11:14
@m-kurz m-kurz self-assigned this Jul 3, 2024
Copy link
Collaborator

@kopperp kopperp left a comment

Choose a reason for hiding this comment

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

Useful feature and clean code, ACK

@kopperp kopperp merged commit f7c6005 into master Jul 12, 2024
1 check passed
@kopperp kopperp deleted the feature.mesh.shift branch July 12, 2024 06:35
@kopperp kopperp added this to the 1.5.0 milestone Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants