-
Notifications
You must be signed in to change notification settings - Fork 125
Three new examples cases #1060
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
Three new examples cases #1060
Conversation
|
CodeAnt AI is reviewing your PR. |
|
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. WalkthroughAdds three 2D example cases (Kelvin–Helmholtz, Richtmyer–Meshkov, viscous shock tube): README fragments and Python scripts that emit JSON simulation configurations, extends 2D hardcoded initial-condition switch with two new cases (207, 208), and adds several test metadata artifacts. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant Dev as Developer / CLI
participant Py as example case.py
participant STDOUT as STDOUT (JSON)
participant Runner as Simulation Runner
participant Fortran as 2dHardcodedIC.fpp
Dev->>Py: run example case script
Py->>STDOUT: emit JSON config
Dev->>Runner: supply JSON config (file/stdin)
Runner->>Fortran: request initial conditions (case id)
Fortran-->>Runner: return initialized fields (case 207/208)
Runner->>Runner: advance timesteps using config
note right of Fortran `#DDEBF7`: New cases 207 and 208 added
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes
Suggested labels
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (3)
✅ Files skipped from review due to trivial changes (3)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
Comment |
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
Pull Request Feedback 🔍
|
|
CodeAnt AI finished reviewing your PR. |
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.
Actionable comments posted: 6
🧹 Nitpick comments (2)
src/common/include/2dHardcodedIC.fpp (2)
7-10: Improve variable documentation and naming clarity.The variable declarations follow the working precision guideline (
wp) but could be more maintainable:
- Use descriptive comments explaining the purpose of each variable group.
- Consider more descriptive names (e.g.,
ei→interface_width,d→distance,fsm→smoothing_factor).Apply this diff:
- ! # 207 + ! Case 207: Kelvin-Helmholtz instability real(wp) :: sigma, gauss1, gauss2 - ! # 208 + ! Case 208: Richtmyer-Meshkov instability real(wp) :: ei, d, fsm, alpha_air, alpha_sf6
145-161: Address variable shadowing and precision suffix.The Richtmyer-Meshkov interface smoothing implementation is generally correct, but has minor issues:
- Line 148: Local
epsshadows the outer declaration (line 12), which could cause confusion. Consider using a distinct name likeeps_localoralpha_eps.- Line 155: Missing
_wpprecision suffix on1.0.Apply this diff:
case (208) ! Richtmeyer Meshkov Instability lam = 1.0_wp - eps = 1.0e-6_wp + ! Note: using local epsilon for this case + eps = 1.0e-6_wp ei = 5.0_wp ! Smoothening function to smooth out sharp discontinuity in the interface if(x_cc(i) <= 0.7 * lam) then d = x_cc(i) - lam * (0.4_wp - 0.1_wp * sin(2.0_wp * pi * (y_cc(j) / lam + 0.25_wp))) fsm = 0.5_wp * (1.0_wp + erf(d / (ei * sqrt(dx * dy)))) alpha_air = eps + (1.0_wp - 2.0_wp * eps) * fsm - alpha_sf6 = 1.0 - alpha_air + alpha_sf6 = 1.0_wp - alpha_air
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (6)
examples/2D_kelvin_helmholtz/figure0.pngis excluded by!**/*.pngexamples/2D_kelvin_helmholtz/figure1.pngis excluded by!**/*.pngexamples/2D_richtmyer_meshkov/figure0.pngis excluded by!**/*.pngexamples/2D_richtmyer_meshkov/figure1.pngis excluded by!**/*.pngexamples/2D_viscous_shock_tube/figure0.pngis excluded by!**/*.pngexamples/2D_viscous_shock_tube/figure1.pngis excluded by!**/*.png
📒 Files selected for processing (7)
examples/2D_kelvin_helmholtz/README.md(1 hunks)examples/2D_kelvin_helmholtz/case.py(1 hunks)examples/2D_richtmyer_meshkov/README.md(1 hunks)examples/2D_richtmyer_meshkov/case.py(1 hunks)examples/2D_viscous_shock_tube/README.md(1 hunks)examples/2D_viscous_shock_tube/case.py(1 hunks)src/common/include/2dHardcodedIC.fpp(2 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{fpp,f90}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
**/*.{fpp,f90}: Use 2-space indentation; continuation lines align beneath &
Use lower-case keywords and intrinsics (do, end subroutine, etc.)
Name modules with m_ pattern (e.g., m_transport)
Name public subroutines with s_ pattern (e.g., s_compute_flux)
Name public functions with f_ pattern
Keep subroutine size ≤ 500 lines, helper subroutines ≤ 150 lines, functions ≤ 100 lines, files ≤ 1000 lines
Limit routine arguments to ≤ 6; use derived-type params struct if more are needed
Forbid goto statements (except in legacy code), COMMON blocks, and save globals
Every argument must have explicit intent; use dimension/allocatable/pointer as appropriate
Call s_mpi_abort() for errors, never use stop or error stop
**/*.{fpp,f90}: Indent 2 spaces; continuation lines align under&
Use lower-case keywords and intrinsics (do,end subroutine, etc.)
Name modules withm_<feature>prefix (e.g.,m_transport)
Name public subroutines ass_<verb>_<noun>(e.g.,s_compute_flux) and functions asf_<verb>_<noun>
Keep private helpers in the module; avoid nested procedures
Enforce size limits: subroutine ≤ 500 lines, helper ≤ 150, function ≤ 100, module/file ≤ 1000
Limit subroutines to ≤ 6 arguments; otherwise pass a derived-type 'params' struct
Avoidgotostatements (except unavoidable legacy); avoid global state (COMMON,save)
Every variable must haveintent(in|out|inout)specification and appropriatedimension/allocatable/pointer
Uses_mpi_abort(<msg>)for error termination instead ofstop
Use!>style documentation for header comments; follow Doxygen Fortran format with!! @paramand!! @returntags
Useimplicit nonestatement in all modules
Useprivatedeclaration followed by explicitpublicexports in modules
Use derived types with pointers for encapsulation (e.g.,pointer, dimension(:,:,:) => null())
Usepureandelementalattributes for side-effect-free functions; combine them for array ...
Files:
src/common/include/2dHardcodedIC.fpp
src/**/*.fpp
📄 CodeRabbit inference engine (.cursor/rules/mfc-agent-rules.mdc)
src/**/*.fpp: Use.fppfile extension for Fypp preprocessed files; CMake transpiles them to.f90
Start module files with Fypp include for macros:#:include 'macros.fpp'
Use the fyppASSERTmacro for validating conditions:@:ASSERT(predicate, message)
Use fypp macro@:ALLOCATE(var1, var2)for device-aware allocation instead of standard Fortranallocate
Use fypp macro@:DEALLOCATE(var1, var2)for device-aware deallocation instead of standard Fortrandeallocate
Files:
src/common/include/2dHardcodedIC.fpp
🧠 Learnings (1)
📚 Learning: 2025-11-24T21:50:16.684Z
Learnt from: CR
Repo: MFlowCode/MFC PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-24T21:50:16.684Z
Learning: Update in-code comments and documentation (README or docs site) when making significant changes
Applied to files:
examples/2D_kelvin_helmholtz/README.mdexamples/2D_richtmyer_meshkov/README.md
🪛 markdownlint-cli2 (0.18.1)
examples/2D_viscous_shock_tube/README.md
6-6: Heading levels should only increment by one level at a time
Expected: h2; Actual: h3
(MD001, heading-increment)
7-7: Images should have alternate text (alt text)
(MD045, no-alt-text)
10-10: Images should have alternate text (alt text)
(MD045, no-alt-text)
examples/2D_kelvin_helmholtz/README.md
6-6: Heading levels should only increment by one level at a time
Expected: h2; Actual: h3
(MD001, heading-increment)
7-7: Images should have alternate text (alt text)
(MD045, no-alt-text)
10-10: Images should have alternate text (alt text)
(MD045, no-alt-text)
examples/2D_richtmyer_meshkov/README.md
6-6: Heading levels should only increment by one level at a time
Expected: h2; Actual: h3
(MD001, heading-increment)
7-7: Images should have alternate text (alt text)
(MD045, no-alt-text)
10-10: Images should have alternate text (alt text)
(MD045, no-alt-text)
🪛 Ruff (0.14.5)
examples/2D_kelvin_helmholtz/case.py
1-1: Shebang is present but file is not executable
(EXE001)
examples/2D_richtmyer_meshkov/case.py
1-1: Shebang is present but file is not executable
(EXE001)
examples/2D_viscous_shock_tube/case.py
1-1: Shebang is present but file is not executable
(EXE001)
🔇 Additional comments (4)
examples/2D_viscous_shock_tube/case.py (1)
55-91: LGTM: Well-configured viscous shock tube setup.The patch definitions correctly tile the domain, with a 100:1 pressure ratio between left (120.0) and right (1.2) states. The species separation using epsilon, Reynolds number calculation, and fluid parameters are appropriate for the viscous shock tube case.
src/common/include/2dHardcodedIC.fpp (1)
136-144: LGTM: Kelvin-Helmholtz perturbation correctly implemented.The sinusoidal perturbation modulated by two Gaussian lobes (centered at y=0.25 and y=0.75) correctly initializes the instability. The hardcoded case works in conjunction with the patch-defined base flow velocities.
examples/2D_kelvin_helmholtz/case.py (1)
53-89: LGTM: Proper Kelvin-Helmholtz configuration with shear and density stratification.The two-patch setup correctly creates:
- Shear layer: outer regions (u=-0.5) vs. center strip (u=+0.5)
- Density stratification: outer regions (ρ=1) vs. center strip (ρ=2)
- Sinusoidal perturbation via hcid=207 at the shear interfaces
The configuration aligns well with the hardcoded case 207 implementation.
examples/2D_richtmyer_meshkov/case.py (1)
57-98: LGTM: Proper Richtmyer-Meshkov shock-interface configuration.The two-patch setup correctly implements:
- Pre-shock region (x ≤ 0.7λ) with perturbed SF6-air interface via hcid=208
- Post-shock region with Rankine-Hugoniot jump conditions
- Appropriate fluid properties (SF6 γ=1.093, air γ=1.4) and Reynolds number for viscous effects
The configuration aligns well with the hardcoded case 208 implementation.
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.
No issues found across 13 files
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.
Actionable comments posted: 1
♻️ Duplicate comments (3)
examples/2D_viscous_shock_tube/case.py (1)
1-4: Unused import and shebang issue already flagged.examples/2D_kelvin_helmholtz/case.py (1)
1-4: Unused import and shebang issue already flagged.examples/2D_richtmyer_meshkov/case.py (1)
1-4: Unused import and shebang issue already flagged.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
examples/2D_kelvin_helmholtz/case.py(1 hunks)examples/2D_richtmyer_meshkov/case.py(1 hunks)examples/2D_viscous_shock_tube/case.py(1 hunks)src/common/include/2dHardcodedIC.fpp(2 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{fpp,f90}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
**/*.{fpp,f90}: Use 2-space indentation; continuation lines align beneath &
Use lower-case keywords and intrinsics (do, end subroutine, etc.)
Name modules with m_ pattern (e.g., m_transport)
Name public subroutines with s_ pattern (e.g., s_compute_flux)
Name public functions with f_ pattern
Keep subroutine size ≤ 500 lines, helper subroutines ≤ 150 lines, functions ≤ 100 lines, files ≤ 1000 lines
Limit routine arguments to ≤ 6; use derived-type params struct if more are needed
Forbid goto statements (except in legacy code), COMMON blocks, and save globals
Every argument must have explicit intent; use dimension/allocatable/pointer as appropriate
Call s_mpi_abort() for errors, never use stop or error stop
**/*.{fpp,f90}: Indent 2 spaces; continuation lines align under&
Use lower-case keywords and intrinsics (do,end subroutine, etc.)
Name modules withm_<feature>prefix (e.g.,m_transport)
Name public subroutines ass_<verb>_<noun>(e.g.,s_compute_flux) and functions asf_<verb>_<noun>
Keep private helpers in the module; avoid nested procedures
Enforce size limits: subroutine ≤ 500 lines, helper ≤ 150, function ≤ 100, module/file ≤ 1000
Limit subroutines to ≤ 6 arguments; otherwise pass a derived-type 'params' struct
Avoidgotostatements (except unavoidable legacy); avoid global state (COMMON,save)
Every variable must haveintent(in|out|inout)specification and appropriatedimension/allocatable/pointer
Uses_mpi_abort(<msg>)for error termination instead ofstop
Use!>style documentation for header comments; follow Doxygen Fortran format with!! @paramand!! @returntags
Useimplicit nonestatement in all modules
Useprivatedeclaration followed by explicitpublicexports in modules
Use derived types with pointers for encapsulation (e.g.,pointer, dimension(:,:,:) => null())
Usepureandelementalattributes for side-effect-free functions; combine them for array ...
Files:
src/common/include/2dHardcodedIC.fpp
src/**/*.fpp
📄 CodeRabbit inference engine (.cursor/rules/mfc-agent-rules.mdc)
src/**/*.fpp: Use.fppfile extension for Fypp preprocessed files; CMake transpiles them to.f90
Start module files with Fypp include for macros:#:include 'macros.fpp'
Use the fyppASSERTmacro for validating conditions:@:ASSERT(predicate, message)
Use fypp macro@:ALLOCATE(var1, var2)for device-aware allocation instead of standard Fortranallocate
Use fypp macro@:DEALLOCATE(var1, var2)for device-aware deallocation instead of standard Fortrandeallocate
Files:
src/common/include/2dHardcodedIC.fpp
🪛 Ruff (0.14.5)
examples/2D_kelvin_helmholtz/case.py
1-1: Shebang is present but file is not executable
(EXE001)
examples/2D_richtmyer_meshkov/case.py
1-1: Shebang is present but file is not executable
(EXE001)
examples/2D_viscous_shock_tube/case.py
1-1: Shebang is present but file is not executable
(EXE001)
🔇 Additional comments (4)
src/common/include/2dHardcodedIC.fpp (1)
136-141: LGTM!The Kelvin-Helmholtz perturbation implementation correctly applies a sinusoidal y-velocity perturbation modulated by two Gaussian lobes centered at
y = 0.25andy = 0.75. The precision literals are consistent with_wp.examples/2D_viscous_shock_tube/case.py (1)
12-91: LGTM!The viscous shock tube configuration is well-structured with appropriate density and pressure ratios (100:1), viscous parameters enabled, and proper boundary conditions. The two-fluid formulation with
epsseparation follows the project's conventions.examples/2D_kelvin_helmholtz/case.py (1)
53-86: LGTM!The Kelvin-Helmholtz configuration correctly establishes:
- Velocity shear of 1.0 across the interface (±0.5)
- Density ratio 2:1 between the center strip and background
- Uniform pressure with periodic boundaries
- Reference to
hcid: 207for the sinusoidal y-velocity perturbationexamples/2D_richtmyer_meshkov/case.py (1)
57-95: LGTM!The Richtmyer-Meshkov configuration is well-structured with:
- Appropriate pre/post-shock conditions matching shock jump relations
- SF6 (γ ≈ 1.093) and air (γ = 1.4) fluid properties
- Reference to
hcid: 208for the smoothed interface with sinusoidal perturbation- Long domain (16λ) suitable for observing vortex development
| case (208) ! Richtmeyer Meshkov Instability | ||
| lam = 1.0_wp | ||
| eps = 1.0e-6_wp | ||
| ei = 5.0_wp | ||
| ! Smoothening function to smooth out sharp discontinuity in the interface | ||
| if(x_cc(i) <= 0.7 * lam) then | ||
| d = x_cc(i) - lam * (0.4_wp - 0.1_wp * sin(2.0_wp * pi * (y_cc(j) / lam + 0.25_wp))) | ||
| fsm = 0.5_wp * (1.0_wp + erf(d / (ei * sqrt(dx * dy)))) | ||
| alpha_air = eps + (1.0_wp - 2.0_wp * eps) * fsm | ||
| alpha_sf6 = 1.0 - alpha_air | ||
| q_prim_vf(contxb)%sf(i, j, 0) = alpha_sf6 * 5.04 | ||
| q_prim_vf(contxe)%sf(i, j, 0) = alpha_air * 1.0 | ||
| q_prim_vf(advxb)%sf(i, j, 0) = alpha_sf6 | ||
| q_prim_vf(advxe)%sf(i, j, 0) = alpha_air | ||
| end if |
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.
Case 208 overwrites the shared eps variable and uses inconsistent precision literals.
-
Line 145 reassigns
eps = 1.0e-6_wp, which shadows the module-levelepsinitialized at Line 12. If another case runs after case 208 in the same execution context, the modifiedepsvalue could cause unexpected behavior. -
Several literals lack the
_wpsuffix for working precision:1.0on lines 152, 154;5.04on line 153. Per coding guidelines, usewpfor consistent precision.
Apply this diff to fix precision consistency:
case (208) ! Richtmeyer Meshkov Instability
lam = 1.0_wp
- eps = 1.0e-6_wp
ei = 5.0_wp
! Smoothening function to smooth out sharp discontinuity in the interface
- if(x_cc(i) <= 0.7 * lam) then
+ if(x_cc(i) <= 0.7_wp * lam) then
d = x_cc(i) - lam * (0.4_wp - 0.1_wp * sin(2.0_wp * pi * (y_cc(j) / lam + 0.25_wp)))
fsm = 0.5_wp * (1.0_wp + erf(d / (ei * sqrt(dx * dy))))
alpha_air = eps + (1.0_wp - 2.0_wp * eps) * fsm
- alpha_sf6 = 1.0 - alpha_air
- q_prim_vf(contxb)%sf(i, j, 0) = alpha_sf6 * 5.04
- q_prim_vf(contxe)%sf(i, j, 0) = alpha_air * 1.0
+ alpha_sf6 = 1.0_wp - alpha_air
+ q_prim_vf(contxb)%sf(i, j, 0) = alpha_sf6 * 5.04_wp
+ q_prim_vf(contxe)%sf(i, j, 0) = alpha_air * 1.0_wp
q_prim_vf(advxb)%sf(i, j, 0) = alpha_sf6
q_prim_vf(advxe)%sf(i, j, 0) = alpha_air
end ifNote: If you need a local epsilon distinct from the module-level eps, consider using a differently named variable (e.g., eps_local) to avoid shadowing.
Committable suggestion skipped: line range outside the PR's diff.
🤖 Prompt for AI Agents
In src/common/include/2dHardcodedIC.fpp around lines 143-157, avoid shadowing
the module-level eps by introducing a locally named variable (e.g., eps_local)
instead of reassigning eps; set eps_local = 1.0e-6_wp and replace uses of eps in
this case with eps_local. Also make all numeric literals use working precision
suffix _wp (change 1.0 -> 1.0_wp and 5.04 -> 5.04_wp and any other plain
literals in these lines), and ensure any derived computations (erf argument,
alpha assignments, q_prim_vf values) use the new eps_local and _wp-suffixed
literals for consistent precision.
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.
@Cowsreal The comments about missing _wp are worth fixing here. The others aren't important.
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.
Seems like the humans are having a chat. I'll hop back into my burrow for now. If you need me again, just tag @coderabbitai in a new comment, and I'll come hopping out!
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.
Code Implementation 🛠️
Implementation: In case (208), remove the reassignment of eps and ensure all numeric literals use the working precision suffix. Replace plain literals with _wp variants and adjust the comparison constant 0.7 to 0.7_wp. Keep using the existing eps variable without modifying its value.
| case (208) ! Richtmeyer Meshkov Instability | |
| lam = 1.0_wp | |
| eps = 1.0e-6_wp | |
| ei = 5.0_wp | |
| ! Smoothening function to smooth out sharp discontinuity in the interface | |
| if(x_cc(i) <= 0.7 * lam) then | |
| d = x_cc(i) - lam * (0.4_wp - 0.1_wp * sin(2.0_wp * pi * (y_cc(j) / lam + 0.25_wp))) | |
| fsm = 0.5_wp * (1.0_wp + erf(d / (ei * sqrt(dx * dy)))) | |
| alpha_air = eps + (1.0_wp - 2.0_wp * eps) * fsm | |
| alpha_sf6 = 1.0 - alpha_air | |
| q_prim_vf(contxb)%sf(i, j, 0) = alpha_sf6 * 5.04 | |
| q_prim_vf(contxe)%sf(i, j, 0) = alpha_air * 1.0 | |
| q_prim_vf(advxb)%sf(i, j, 0) = alpha_sf6 | |
| q_prim_vf(advxe)%sf(i, j, 0) = alpha_air | |
| end if | |
| case (208) ! Richtmeyer Meshkov Instability | |
| lam = 1.0_wp | |
| ei = 5.0_wp | |
| ! Smoothening function to smooth out sharp discontinuity in the interface | |
| if (x_cc(i) <= 0.7_wp * lam) then | |
| d = x_cc(i) - lam * (0.4_wp - 0.1_wp * sin(2.0_wp * pi * (y_cc(j) / lam + 0.25_wp))) | |
| fsm = 0.5_wp * (1.0_wp + erf(d / (ei * sqrt(dx * dy)))) | |
| alpha_air = eps + (1.0_wp - 2.0_wp * eps) * fsm | |
| alpha_sf6 = 1.0_wp - alpha_air | |
| q_prim_vf(contxb)%sf(i, j, 0) = alpha_sf6 * 5.04_wp | |
| q_prim_vf(contxe)%sf(i, j, 0) = alpha_air * 1.0_wp | |
| q_prim_vf(advxb)%sf(i, j, 0) = alpha_sf6 | |
| q_prim_vf(advxe)%sf(i, j, 0) = alpha_air | |
| end if |
See review comment here
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.
2 issues found across 13 files
Prompt for AI agents (all 2 issues)
Check if these issues are valid — if so, understand the root cause of each and fix them.
<file name="examples/2D_viscous_shock_tube/case.py">
<violation number="1" location="examples/2D_viscous_shock_tube/case.py:66">
Fluid 2’s density in the left patch is set to 120 instead of 1.2, so the supposedly light species becomes 100× heavier in that region and the initial state is incorrect.</violation>
<violation number="2" location="examples/2D_viscous_shock_tube/case.py:77">
Fluid 1’s density on the right patch uses 1.2 rather than 120, so the heavy species becomes 100× lighter in the transition zone and the initial condition is wrong.</violation>
</file>
Since this is your first cubic review, here's how it works:
- cubic automatically reviews your code and comments on bugs and improvements
- Teach cubic by replying to its comments. cubic learns from your replies and gets better over time
- Ask questions if you need clarification on any suggestion
Reply to cubic to teach it or ask questions. Re-run a review with @cubic-dev-ai review this PR
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.
No issues found across 13 files
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.
No issues found across 13 files
|
@Cowsreal You need to add golden files for the new example cases by runing |
|
CodeAnt AI is running Incremental review |
|
CodeAnt AI Incremental review completed. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1060 +/- ##
=======================================
Coverage 44.35% 44.36%
=======================================
Files 71 71
Lines 20587 20587
Branches 1993 1993
=======================================
+ Hits 9132 9134 +2
+ Misses 10310 10307 -3
- Partials 1145 1146 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
User description
User description
Description
This PR adds a total of 3 2D examples cases: Kelvin-Helmholtz Instability, Richtmyer-Meshkov Instability, and Viscous Shock Tube.
Type of change
Please delete options that are not relevant.
Scope
If you cannot check the above box, please split your PR into multiple PRs that each have a common goal.
How Has This Been Tested?
See below images of result. These were visually compared to the result diagrams from the paper. (https://arxiv.org/abs/2106.01738)
2D_kelvin_helmholtz:
2D_richtmyer_meshkov:
2D_viscous_shock_tube:
Re = 500:
Re = 1000:
Test Configuration:
Checklist
docs/)examples/that demonstrate my new feature performing as expected.They run to completion and demonstrate "interesting physics"
./mfc.sh formatbefore committing my codePR Type
Enhancement
Description
Add three new 2D example cases for multiphase flow simulations
Implement hardcoded initial conditions (hcid 207, 208) in Fortran preprocessor
Include complete case configurations with Python setup scripts
Add README documentation for each example with references
Diagram Walkthrough
File Walkthrough
2dHardcodedIC.fpp
Add hardcoded initial conditions for two instability casessrc/common/include/2dHardcodedIC.fpp
gauss2)
alpha_air, alpha_sf6)
K-H instability
initialization for R-M instability
case.py
Kelvin-Helmholtz instability case configurationexamples/2D_kelvin_helmholtz/case.py
adaptive CFL
case.py
Richtmyer-Meshkov instability case configurationexamples/2D_richtmyer_meshkov/case.py
interaction
case.py
Viscous shock tube case configurationexamples/2D_viscous_shock_tube/case.py
(100:1)
solver
README.md
Kelvin-Helmholtz example documentationexamples/2D_kelvin_helmholtz/README.md
README.md
Richtmyer-Meshkov example documentationexamples/2D_richtmyer_meshkov/README.md
README.md
Viscous shock tube example documentationexamples/2D_viscous_shock_tube/README.md
CodeAnt-AI Description
Add Kelvin-Helmholtz, Richtmyer-Meshkov, and viscous shock tube 2D demos
What Changed
Impact
✅ Ready-to-run Kelvin-Helmholtz demo✅ Richtmyer-Meshkov validation available✅ Viscous shock tube benchmark documented💡 Usage Guide
Checking Your Pull Request
Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.
Talking to CodeAnt AI
Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:
This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.
Example
Preserve Org Learnings with CodeAnt
You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:
This helps CodeAnt AI learn and adapt to your team's coding style and standards.
Example
Retrigger review
Ask CodeAnt AI to review the PR again, by typing:
Check Your Repository Health
To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.
Summary by CodeRabbit
New Features
Documentation
Tests
✏️ Tip: You can customize this high-level summary in your review settings.