Skip to content

Conversation

@ayush4874
Copy link

Fixes #2435.

If REF_AREA is set to 0.0 (auto-calculation) but the geometry projection fails (e.g. flat plate aligned with projection plane), the area remains 0.0. This causes immediate divergence/NaNs later in the solver.

Added a check in SetPositive_ZArea to catch this case and error out cleanly via SU2_MPI::Error instead of crashing.

Verified using the NACA0012 testcase:

  • Validated that a standard run with REF_AREA=0.0 still works correctly (calculates ~1.0), ensuring no regression for valid cases.

@ayush4874 ayush4874 force-pushed the fix/ref-area-zero-check branch from 6869964 to 0a7fc93 Compare January 8, 2026 17:36
@pcarruscag
Copy link
Member

Reference area is not necessary for all physics in SU2

@ayush4874
Copy link
Author

ayush4874 commented Jan 8, 2026

Should I change this to a SU2_MPI::Warning, or should I move the check to where the coefficients are actually calculated?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants