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>

bigfooted

bigfooted

bigfooted

pcarruscag

@shbhmexe

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>

pcarruscag

Shubham shukla and others added 4 commits

December 9, 2025 12:51
Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com>

bigfooted

shbhmexe added 2 commits

December 17, 2025 18:04
Common: use EPS when clamping Gamma in wall model

Signed-off-by: shbhmexe <shubhushukla586@gmail.com>

pcarruscag

@pcarruscag

Signed-off-by: shbhmexe <shubhushukla586@gmail.com>

@shbhmexe

pcarruscag

@pcarruscag