MFC icon indicating copy to clipboard operation
MFC copied to clipboard

Riemann solver enthalpy calculation refactor

Open wilfonba opened this issue 1 year ago • 2 comments

Once #515 is merged, a new helper function s_compute_enthalpy can be used to reduce the number of lines in m_riemann_solvers by abstracting the enthalpy calculation at the left and right states.

wilfonba avatar Sep 06 '24 02:09 wilfonba

This can presumably also be used anywhere H is computed, which is in several other places (@okBrian this is useful for you as well)

  • https://github.com/MFlowCode/MFC/blob/2651071efb76d157aa552da1e7fafdc9b4d19fee/src/simulation/m_cbc.fpp#L769-L808
  • https://github.com/MFlowCode/MFC/blob/2651071efb76d157aa552da1e7fafdc9b4d19fee/src/simulation/m_data_output.fpp#L252-L276
  • https://github.com/MFlowCode/MFC/blob/2651071efb76d157aa552da1e7fafdc9b4d19fee/src/simulation/m_riemann_solvers.fpp#L1270-L1328
  • https://github.com/MFlowCode/MFC/blob/2651071efb76d157aa552da1e7fafdc9b4d19fee/src/simulation/m_riemann_solvers.fpp#L1519-L1636
  • https://github.com/MFlowCode/MFC/blob/2651071efb76d157aa552da1e7fafdc9b4d19fee/src/simulation/m_riemann_solvers.fpp#L361-L473
  • https://github.com/MFlowCode/MFC/blob/2651071efb76d157aa552da1e7fafdc9b4d19fee/src/simulation/m_riemann_solvers.fpp#L913-L1028

It's also in post-process here (sort of): https://github.com/MFlowCode/MFC/blob/2651071efb76d157aa552da1e7fafdc9b4d19fee/src/post_process/m_start_up.f90#L451-L452

sbryngelson avatar Sep 06 '24 13:09 sbryngelson

@ChrisZYJ @wilfonba looking at you guys 👀

sbryngelson avatar Nov 30 '25 02:11 sbryngelson