fix: five critical and moderate bugs in wall model, radiation solver, file parsing, and security by shbhmexe · Pull Request #2636 · su2code/SU2
and others added 2 commits
December 4, 2025 16:13…clauses fix: Replace bare except clauses with specific exception types in Python utilities Signed-off-by: shbhmexe <shubhushukla586@gmail.com>
Fixed three critical division by zero bugs, two moderate bugs, and resolved code formatting issues: 1. Wall model convergence - zero-check before division 2. Wall model Gamma - epsilon check for exp(1/Gamma) 3. Radiation emissivity - clamp to [0,1] range 4. Restart metadata - correct ITER= offset 95 5. Filename buffer - replace strcpy with strncpy Formatting Fixes: - CSolver.cpp: Removed space before parentheses - CRadP1Solver.cpp: Converted single-line ifs to block style - wall_model.cpp & CPhysicalGeometry.cpp: Verified indentation Improves solver stability, correctness, security, and code style. Signed-off-by: shbhmexe <shubhushukla586@gmail.com>
Wall model (wall_model.cpp): - Use fmax(x, 1e-16) in denominator for convergence check - Use fmin(Gamma, -1e-16) in exp denominator (Gamma is always negative) Reverted changes per reviewer request: - CPhysicalGeometry.cpp: Revert to original strcpy (don't complicate) - CSolver.cpp: Revert ITER offset to 9 (original author had reason) - CRadP1Solver.cpp: Remove emissivity validation (should be in CConfig) Signed-off-by: shbhmexe <shubhushukla586@gmail.com>
Shubham shukla and others added 4 commits
December 9, 2025 12:51shbhmexe added 2 commits
December 17, 2025 18:04This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters