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

Make WENO-Z default advection scheme #1212

Merged
merged 8 commits into from
Aug 28, 2024

Conversation

mbkuhn
Copy link
Contributor

@mbkuhn mbkuhn commented Aug 22, 2024

Please check the type of change introduced:

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe): new default to align with common practice

Checklist

The following is included:

  • new unit-test(s)
  • new regression test(s)
  • documentation for new capability

This PR was tested by running:

  • the unit tests
    • on GPU
    • on CPU
  • the regression tests
    • on GPU
    • on CPU

@mbkuhn
Copy link
Contributor Author

mbkuhn commented Aug 22, 2024

Haven't checked the tests yet; there may need to be some new input lines

@moprak-nrel
Copy link
Contributor

Should we change this too?

} else {
amrex::Print()
<< "For godunov_type select between plm, ppm, "
"ppm_nolim, bds, weno_js, and weno_z: it defaults to ppm"
<< std::endl;
godunov_scheme = godunov::scheme::PPM;
}

@marchdf
Copy link
Contributor

marchdf commented Aug 22, 2024

Not including Prakash's comment, here's a list of tests that failed and would probably need an updated input line in their input files. Or we permanently switch some of these to weno (though probably not all).

The following tests FAILED:
          2 - abl_godunov (Failed)
          4 - boussinesq_bubble_godunov (Failed)
          5 - freestream_godunov (Failed)
          6 - tgv_godunov (Failed)
          7 - abl_godunov_mpl (Failed)
          8 - abl_godunov_mpl_amr (Failed)
          9 - abl_godunov_cn (Failed)
         10 - abl_godunov_explicit (Failed)
         13 - abl_godunov_noncons (Failed)
         15 - abl_godunov_static_refinement (Failed)
         16 - abl_godunov_static_refinement_rr4 (Failed)
         17 - abl_godunov_scalar_velocity_solve (Failed)
         18 - abl_godunov_segregated_velocity_solve (Failed)
         19 - abl_godunov_timetable (Failed)
         20 - abl_godunov_geostrophic_timetable (Failed)
         21 - abl_ksgsm84_godunov (Failed)
         24 - abl_sampling (Failed)
         34 - act_fixed_wing (Failed)
         35 - act_fixed_wing_fllc (Failed)
         36 - act_moving_wing (Failed)
         37 - act_pitching_wing_2D (Failed)
         38 - act_flat_plate (Failed)
         44 - channel_kwsst (Failed)
         45 - channel_kwsst_sust (Failed)
         46 - channel_kwsstiddes (Failed)
         51 - ekman_spiral (Failed)
         52 - rayleigh_taylor_godunov (Failed)
         67 - abl_bndry_output_native (Failed)
         68 - abl_bndry_output_amr_native (Failed)
         80 - linear_godunov_amr (Failed)
         83 - vortex_dipole_wall_collision (Failed)
         85 - abl_godunov_rayleigh_damping (Failed)
         86 - rankine (Failed)
         87 - rankine-sym (Failed)
         88 - box_refinement (Failed)
         95 - abl_bndry_output (Failed)
         96 - abl_bndry_output_amr_inflow (Failed)
         97 - abl_virtual_lidar (Failed)
         98 - abl_meso_input_dpa (Failed)
         99 - abl_meso_input_ipa (Failed)
        101 - abl_sampling_netcdf (Failed)
        102 - mms_godunov (Failed)
        106 - abl_godunov_hypre (Failed)
        107 - channel_kwsst_hypre (Failed)
        115 - abl_bndry_input_native (Not Run)
        116 - abl_godunov_restart (Not Run)
        117 - abl_bndry_input_amr_native (Not Run)
        118 - abl_bndry_input_amr_native_mlbc (Not Run)
        119 - abl_godunov_forcetimetable (Not Run)
        120 - abl_bndry_input (Not Run)
        121 - abl_bndry_input_amr (Not Run)
        122 - abl_bndry_input_amr_inflow (Not Run)

@mbkuhn
Copy link
Contributor Author

mbkuhn commented Aug 28, 2024

On the reg tests, if the test is unrelated to ppm functionality and could be used as a generic example, I would prefer it to use the new default. Or if it's used for verification or validation. However, if it's testing something unrelated to the flow or is a more obscure case that is unlikely to get used, I think we can add the ppm line. E.g., more likely that someone would copy-past specific lines from that input file rather than reuse the whole thing.

Using this reasoning, here's a breakdown for the failed tests (not considering any additional ones from making weno-z default for scalars, too):

  • _ abl_godunov: _ use new default
  • (+) boussinesq_bubble_godunov: + add ppm line
  • (+) freestream_godunov: + add ppm line
  • _ tgv_godunov: _ use new default
  • (+) abl_godunov_mpl: + add ppm line
  • (+) abl_godunov_mpl_amr: + add ppm line
  • (+) abl_godunov_cn: + add ppm line
  • (+) abl_godunov_explicit: + add ppm line
  • (+) abl_godunov_noncons: + add ppm line
  • _ abl_godunov_static_refinement: _ use new default
  • _ abl_godunov_static_refinement_rr4: _ use new default
  • (+) abl_godunov_scalar_velocity_solve: + add ppm line
  • (+) abl_godunov_segregated_velocity_solve: + add ppm line
  • _ abl_godunov_timetable: _ use new default
  • _ abl_godunov_geostrophic_timetable: _ use new default
  • _ abl_ksgsm84_godunov: _ use new default
  • (+) abl_sampling: + add ppm line
  • _ act_fixed_wing: _ use new default
  • _ act_fixed_wing_fllc: _ use new default
  • _ act_moving_wing: _ use new default
  • _ act_pitching_wing_2D: _ use new default
  • _ act_flat_plate: _ use new default
  • _ channel_kwsst: _ use new default
  • _ channel_kwsst_sust: _ use new default
  • _ channel_kwsstiddes: _ use new default
  • _ ekman_spiral: _ use new default
  • _ rayleigh_taylor_godunov: _ use new default
  • _ abl_bndry_output_native: _ use new default
  • _ abl_bndry_output_amr_native: _ use new default
  • (+) linear_godunov_amr: + add ppm line
  • _ vortex_dipole_wall_collision: _ use new default
  • _ abl_godunov_rayleigh_damping: _ use new default
  • _ rankine: _ use new default
  • _ rankine-sym: _ use new default
  • (+) box_refinement: + add ppm line
  • _ abl_bndry_output: _ use new default
  • _ abl_bndry_output_amr_inflow: _ use new default
  • (+) abl_virtual_lidar: + add ppm line
  • (+) abl_meso_input_dpa: + add ppm line
  • (+) abl_meso_input_ipa: + add ppm line
  • (+) abl_sampling_netcdf: + add ppm line
  • _ mms_godunov: _ use new default
  • _ abl_godunov_hypre: _ use new default
  • _ channel_kwsst_hypre: _ use new default
  • _ abl_bndry_input_native: _ use new default
  • _ abl_godunov_restart: _ use new default
  • _ abl_bndry_input_amr_native: _ use new default
  • _ abl_bndry_input_amr_native_mlbc: _ use new default
  • _ abl_godunov_forcetimetable: _ use new default
  • _ abl_bndry_input: _ use new default
  • _ abl_bndry_input_amr: _ use new default
  • _ abl_bndry_input_amr_inflow: _ use new default

Any objections?

@marchdf
Copy link
Contributor

marchdf commented Aug 28, 2024

I like it

@moprak-nrel
Copy link
Contributor

I like the idea of reblessing the golds with the new default, and your reasoning. No objections from my end.

@mbkuhn
Copy link
Contributor Author

mbkuhn commented Aug 28, 2024

What do you think of making a new "abl_godunov_ppm" reg test and removing the "abl_godunov_wenoz" test, as it's effectively replaced by the "abl_godunov" test?

Right now we have abl_godunov, abl_godunov_plm, abl_godunov_nolim, abl_godunov_weno, and abl_godunov_wenoz to cover the fully godunov schemes.

@mbkuhn
Copy link
Contributor Author

mbkuhn commented Aug 28, 2024

@marchdf do you want to check which ones will change now that weno-z is default for scalars, or should we just leave those to the default anyway?

@marchdf
Copy link
Contributor

marchdf commented Aug 28, 2024

With your latest:

The following tests FAILED:
          2 - abl_godunov (Failed)
          6 - tgv_godunov (Failed)
         15 - abl_godunov_static_refinement (Failed)
         16 - abl_godunov_static_refinement_rr4 (Failed)
         19 - abl_godunov_timetable (Failed)
         20 - abl_godunov_geostrophic_timetable (Failed)
         21 - abl_ksgsm84_godunov (Failed)
         34 - act_fixed_wing (Failed)
         35 - act_fixed_wing_fllc (Failed)
         36 - act_moving_wing (Failed)
         37 - act_pitching_wing_2D (Failed)
         38 - act_flat_plate (Failed)
         44 - channel_kwsst (Failed)
         45 - channel_kwsst_sust (Failed)
         46 - channel_kwsstiddes (Failed)
         51 - ekman_spiral (Failed)
         52 - rayleigh_taylor_godunov (Failed)
         60 - abl_godunov_ppm (Failed)
         67 - abl_bndry_output_native (Failed)
         68 - abl_bndry_output_amr_native (Failed)
         83 - vortex_dipole_wall_collision (Failed)
         85 - abl_godunov_rayleigh_damping (Failed)
         86 - rankine (Failed)
         87 - rankine-sym (Failed)
         95 - abl_bndry_output (Failed)
         96 - abl_bndry_output_amr_inflow (Failed)
        102 - mms_godunov (Failed)
        106 - abl_godunov_hypre (Failed)
        107 - channel_kwsst_hypre (Failed)
        115 - abl_bndry_input_native (Not Run)
        116 - abl_godunov_restart (Not Run)
        117 - abl_bndry_input_amr_native (Not Run)
        118 - abl_bndry_input_amr_native_mlbc (Not Run)
        119 - abl_godunov_forcetimetable (Not Run)
        120 - abl_bndry_input (Not Run)
        121 - abl_bndry_input_amr (Not Run)
        122 - abl_bndry_input_amr_inflow (Not Run)

@mbkuhn
Copy link
Contributor Author

mbkuhn commented Aug 28, 2024

Cool. The failing tests match the ones in the proposed list using the new default, + abl_godunov_ppm. I think this PR is good to go.

@mbkuhn mbkuhn enabled auto-merge (squash) August 28, 2024 19:34
@mbkuhn mbkuhn merged commit 554c6bc into Exawind:main Aug 28, 2024
14 checks passed
moprak-nrel pushed a commit that referenced this pull request Sep 5, 2024
* changing the scheme warning -> default to an abort
* same changes to scalar/generic advection operator, also add warning to ppm_nolim in icns advection
* along the same lines as last commit; warning already in the code
* adding ppm spec to many reg tests
* replace abl_godunov_wenoz test with abl_godunov_ppm; change diffusion_type to recommended since diffs will change anyway; include comment
@mbkuhn mbkuhn deleted the wenoz_default_advection branch September 5, 2024 20:18
moprak-nrel pushed a commit to moprak-nrel/amr-wind that referenced this pull request Sep 6, 2024
* changing the scheme warning -> default to an abort
* same changes to scalar/generic advection operator, also add warning to ppm_nolim in icns advection
* along the same lines as last commit; warning already in the code
* adding ppm spec to many reg tests
* replace abl_godunov_wenoz test with abl_godunov_ppm; change diffusion_type to recommended since diffs will change anyway; include comment
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.

3 participants