Skip to content

Axisymmetric mesh warping capability #103

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

Draft
wants to merge 20 commits into
base: main
Choose a base branch
from
Draft

Conversation

lamkina
Copy link

@lamkina lamkina commented Mar 3, 2025

Purpose

This PR adds axisymmetric mesh warping capability for structured meshes to IDWarp. The process is detailed as follows:

First, the user specifies two CGNS mesh families that represent the two symmetry planes of the axisymmetric wedge. Other inputs are the rotation axis and rotation angle. One symmetry plane is selected to be the "mirror plane" for the warping operation. IDWarp computes the average normal vector of the mirror plane and stores the necessary topology information in the Fortran layer. To warp the mesh, the nodes are first duplicated across the mirror plane. Then, the mesh is warped as usual. At this stage, only the nodes along the mirror plane itself are valid because the weighting terms are only equal on both sides along that plane.

Once the warping is completed, the warped nodes are then rotated to the other symmetry plane about the axisymmetric axis. The derivatives of the node transformation are computed by hand in the Fortran layer.

This PR should remain a draft until the following items are addressed:

  • Refactor the python layer to remove duplication for multiple mesh types (USMesh, Axisymm, etc...)
  • Make the method invariant to axisymmetric mesh topology (currently requires a specific topology and orientation)
  • Add unit and regression testing for the axisymmetric setup, warping, and derivatives
  • Improve the option naming scheme and simplify the user inputs
  • Detailed documentation on axisymmetric mesh requirements and method setup

Expected time until merged

No set timeline, but most likely a few months.

Type of change

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (non-backwards-compatible fix or feature)
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no API changes)
  • Documentation update
  • Maintenance update
  • Other (please describe)

Testing

This PR can be tested with a simply axisymmetric wedge mesh with an external run script. No testing is implemented yet.

Checklist

  • I have run flake8 and black to make sure the Python code adheres to PEP-8 and is consistently formatted
  • I have formatted the Fortran code with fprettify or C/C++ code with clang-format as applicable
  • I have run unit and regression tests which pass locally with my changes
  • I have added new tests that prove my fix is effective or that my feature works
  • I have added necessary documentation

Copy link

codecov bot commented Mar 3, 2025

Codecov Report

Attention: Patch coverage is 16.96970% with 274 lines in your changes missing coverage. Please review.

Project coverage is 56.16%. Comparing base (647fd8f) to head (9f88c06).

Files with missing lines Patch % Lines
idwarp/AxisymmetricMesh.py 15.23% 267 Missing ⚠️
idwarp/AxisymmetricMesh_C.py 41.66% 7 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main     #103       +/-   ##
===========================================
- Coverage   73.31%   56.16%   -17.15%     
===========================================
  Files           6        8        +2     
  Lines         757     1086      +329     
===========================================
+ Hits          555      610       +55     
- Misses        202      476      +274     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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.

1 participant