MFlowCode / MFC

Exascale simulation of multiphase/physics fluid dynamics
https://mflowcode.github.io
MIT License
132 stars 56 forks source link

Fix Benchmark & Add Monopole Checks & Add Monopole Tests #497

Closed ChrisZYJ closed 2 days ago

ChrisZYJ commented 3 days ago

Description

  1. Fixes issue #396 by adding missing parameter in viscous_weno5_sgb_mono case file.
  2. Add monopole checks and make some parameters compulsory
  3. New tests for monopole delay and all monopole supports (except for 6)

Explaination

The original benchmark viscous_weno5_sgb_mono did not specify the monopole support type, so it defaulted to 1. However, support = 1 is not valid for 3D simulations and triggered none of the if-statements in the f_delta function within the monopole module, resulting in f_delta being undefined. I'm not entirely sure why it only started failing on Frontier and Phoenix in my PR #495, but it's probably due to the floating-point numbers being checked differently.

The modified benchmark file should simulate what it intends to simulate, with the computational domain and parameters remaining the same. The only changes are adding Mono(1)%support' : 4 and a rotation of the domain to align the z-axis with the requirements of monopole support 4.

Now, I've made monopole support mandatory through checks (along with other monopole parameters) to prevent this from happening again. I've also added test cases for monopoles as requested (support 6 for cylindrical coordinates cannot be run, so no check is implemented).

Type of change

Scope

How Has This Been Tested?

Test Configuration:

Checklist

If your code changes any code source files (anything in src/simulation)

To make sure the code is performing as expected on GPU devices, I have:

Performance tests are not done as the changes are strictly in the parameter checking and initialization stages, and only involves assigning values to variables.

sbryngelson commented 3 days ago

Good catch!