Skip to content
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

Incorrect Y+ printout in complex mode #162

Open
marcomangano opened this issue Sep 3, 2021 · 3 comments
Open

Incorrect Y+ printout in complex mode #162

marcomangano opened this issue Sep 3, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@marcomangano
Copy link
Contributor

Description

When running ADflow in complex mode, the exponents in the Y+ printout are clearly wrong.

Steps to reproduce issue

Run a complex ADflow simulation and monitor the Y+

Current behavior

The Y+ printout will look like this:

-------------------------------------------------
|                    Y+_max                     |
-------------------------------------------------
0.2461515118008841-311 +0.2419075202248823E-311i

The exponent of the real part is too small, identical to the complex one, and missing the E character.
The complex exponent itself looks suspiciously small as well.

Expected behavior

Show the correct order of magnitude for the real (and complex) components of the Y+

Code versions

  • ADflow v2.5.2 (HEAD)
@joanibal
Copy link
Collaborator

joanibal commented Sep 24, 2021

What problem are you running?
I'd expect something like this to happen if you were using Euler.

@marcomangano
Copy link
Contributor Author

Nope, this happens on my RANS tests for rotating frames. I showed this to @anilyil and he recommended to open the issue

@ewu63 ewu63 added the bug Something isn't working label Oct 15, 2021
@sseraj
Copy link
Collaborator

sseraj commented Mar 3, 2023

This occurs with any of the "max" monitor variables:

adflow/src/solver/solvers.F90

Lines 1428 to 1438 in cd6ec63

case (cgnsHdiffMax)
monLoc(mm) = max(monLoc(mm), hdiffMax)
case (cgnsMachMax)
monLoc(mm) = max(monLoc(mm), MachMax)
case (cgnsYplusMax)
monLoc(mm) = max(monLoc(mm), yplusMax)
case (cgnsEddyMax)
monLoc(mm) = max(monLoc(mm), eddyvisMax)

The maximum value doesn't have a meaning for complex numbers, so I think the fix would just be to cast the value to real before taking the max.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants