mdolab / CMPLXFOIL

GNU General Public License v2.0
29 stars 20 forks source link

Added option to toggle convergence printout #30

Closed sseraj closed 1 month ago

sseraj commented 1 month ago

Purpose

27 uncommented the convergence history printout, which makes sense to have enabled by default. However, the output can be excessive when running large parameter sweeps. I added on option that can turn off the printout.

I also turned off the printout in the tests to make it easier to read the testflo output.

Expected time until merged

2-3 days

Type of change

Testing

I ran cases with the printConvergence option set to True and False.

Checklist

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 66.43%. Comparing base (3ea3b9b) to head (1f10e9a).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #30 +/- ## ========================================== + Coverage 66.31% 66.43% +0.11% ========================================== Files 4 4 Lines 567 569 +2 ========================================== + Hits 376 378 +2 Misses 191 191 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

sseraj commented 1 month ago

I added the complex convergence printout:

   6   rms: 1.2914E-06 -1.8613E-204i   max:  3.7569E-05 -5.7323E-203i    C at   80  2
       a =  2.00000 +1.0000E-200i   CL =  0.26478 +1.1292E-201i
      Cm = -0.01067 +4.0735E-205i   CD =  0.00521 +2.7093E-204i   =>   CDf =  0.00447 +7.9726E-205i   CDp =  0.00074 +1.9120E-204i

   7   rms: 7.5179E-09 -2.0075E-207i   max: -2.4694E-07 +6.6855E-206i    C at   80  2
       a =  2.00000 +1.0000E-200i   CL =  0.26478 +1.1292E-201i
      Cm = -0.01067 +4.0735E-205i   CD =  0.00521 +2.7093E-204i   =>   CDf =  0.00447 +7.9855E-205i   CDp =  0.00074 +1.9108E-204i

   8   rms: 8.7095E-12 -2.1738E-210i   max:  1.0561E-10 -1.4363E-208i    C at   80  2
       a =  2.00000 +1.0000E-200i   CL =  0.26478 +1.1292E-201i
      Cm = -0.01067 +4.0735E-205i   CD =  0.00521 +2.7093E-204i   =>   CDf =  0.00447 +7.9855E-205i   CDp =  0.00074 +1.9108E-204i

\ \ I also changed the real printout slightly.

Real convergence before:

   1   rms: 0.4412E-06   max: 0.1005E-04   C at   52  1
       a =  2.000      CL =  0.2648
      Cm = -0.0107     CD =  0.00521   =>   CDf =  0.00447    CDp =  0.00074

   2   rms: 0.4053E-08   max: -.1300E-06   C at   80  2
       a =  2.000      CL =  0.2648
      Cm = -0.0107     CD =  0.00521   =>   CDf =  0.00447    CDp =  0.00074

   3   rms: 0.1963E-10   max: 0.6209E-09   C at   80  2
       a =  2.000      CL =  0.2648
      Cm = -0.0107     CD =  0.00521   =>   CDf =  0.00447    CDp =  0.00074

\ Real convergence after:

   1   rms: 4.4117E-07   max:  1.0047E-05   C at   52  1
       a =  2.00000      CL =  0.26478
      Cm = -0.01067      CD =  0.00521   =>   CDf =  0.00447    CDp =  0.00074

   2   rms: 4.0530E-09   max: -1.3004E-07   C at   80  2
       a =  2.00000      CL =  0.26478
      Cm = -0.01067      CD =  0.00521   =>   CDf =  0.00447    CDp =  0.00074

   3   rms: 1.9628E-11   max:  6.2090E-10   C at   80  2
       a =  2.00000      CL =  0.26478
      Cm = -0.01067      CD =  0.00521   =>   CDf =  0.00447    CDp =  0.00074
eytanadler commented 1 month ago

Thank you! That printout is a work of art and you’re Vincent van Seraj. Is this ready for review?

sseraj commented 1 month ago

Thanks! And yes, it's ready for review