-
Notifications
You must be signed in to change notification settings - Fork 1
Multi-body #1
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
Multi-body #1
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds support for multiple in-domain bodies (obstacles) to the CFD simulation framework. The implementation enables simulating flow around multiple obstacles simultaneously within a single domain.
Key changes:
- Adds a new 'multi' geometry type with configurable obstacle arrays
- Implements comprehensive multi-obstacle mesh generation and boundary classification
- Enhances visualization to display multiple velocity and vorticity fields
Reviewed Changes
Copilot reviewed 11 out of 12 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| visualize_multi.m | Empty placeholder file for multi-obstacle specific visualization |
| tests/TestMultiGeometry.m | Comprehensive test suite for multi-obstacle geometry validation and structure verification |
| tests/TestGoldenMulti.m | Golden reference test class for multi-obstacle regression testing |
| test_vorticity.m | Empty test file |
| test_plot.m | Empty test file |
| src/visualize_final.m | Enhanced visualization with separate plots for u-velocity, v-velocity, vorticity, and velocity magnitude |
| src/setup_environment.m | Minor comment update for CI/test environment handling |
| src/geometry/make_multi_geometry.m | Core multi-obstacle geometry implementation with union SDF, boundary classification, and normal computation |
| src/build_geometry.m | Updated geometry dispatcher to support 'multi' geometry type |
| simulate.m | Enhanced mesh visualization and multi-obstacle characteristic length calculation |
| config.m | Updated configuration to include multi-obstacle support with default geometry change |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
src/visualize_final.m
Outdated
| % W is structured as W(:, time_step) where each column is a time step | ||
| % The velocity vector is [U; V] stacked vertically | ||
| n_nodes = length(xy1); | ||
| U_final = W(1:n_nodes, end); % Final u-velocity (last time step) | ||
| V_final = W(n_nodes + 1:end, end); % Final v-velocity (last time step) |
Copilot
AI
Sep 10, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment describes W as having columns for time steps, but the original code used (j - 1) * 1 + 1 indexing which suggests a different data structure. Please verify that W actually uses column-based time indexing and update the comment if the data layout differs.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 17 out of 49 changed files in this pull request and generated 4 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Add support for multiple in-domain bodies