Multi-body#1
Conversation
There was a problem hiding this comment.
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.
| % 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) |
There was a problem hiding this comment.
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.
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