Skip to content

Fix LF volume-fraction flux and interface velocity - #1828

Closed
aliencaocao wants to merge 1 commit into
MFlowCode:masterfrom
aliencaocao:fix/lf-interface-velocity
Closed

Fix LF volume-fraction flux and interface velocity#1828
aliencaocao wants to merge 1 commit into
MFlowCode:masterfrom
aliencaocao:fix/lf-interface-velocity

Conversation

@aliencaocao

@aliencaocao aliencaocao commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Fixes #1818. For context and description of issue and fix, please refer to the issue thread.

Contribution Policy

We do not accept pull requests generated primarily by AI without genuine understanding or real-world usage context.

All contributions are expected to demonstrate:

  • A clear understanding of the codebase
  • Alignment with product direction
  • Thoughtful reasoning behind changes
  • Evidence of real-world usage or hands-on experience with the problem

If these expectations are not met, we would prefer to implement the changes ourselves rather than spend time reviewing low-effort submissions.


Acknowledgement

  • I confirm this PR meets the above expectations and reflects my own understanding and real-world context.

PR template credit: junegunn

Copilot AI lite review requested due to automatic review settings September 5, 2026 19:11
@aliencaocao
aliencaocao marked this pull request as draft September 5, 2026 19:12
@aliencaocao
aliencaocao marked this pull request as ready for review September 5, 2026 19:12
@sbryngelson

Copy link
Copy Markdown
Member

pr no checkmark

@sbryngelson sbryngelson closed this Sep 5, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Pull request overview

Fixes the Lax–Friedrichs/HLL-type volume-fraction flux computation by incorporating interface advection velocity in the flux and adjusts how the geometric source term is formed (per linked issue #1818).

Changes:

  • Update flux_rsx_vf to include left/right interface velocities in the volume-fraction flux.
  • Change flux_src_rsx_vf computation to a single “interface velocity” value.
  • Set void-fraction geometric source flux to zero (instead of copying the advection flux).

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines 313 to +314
end do
flux_src_rsx_vf(${SF('')}$, eqn_idx%adv%beg) = (s_M*vel_R(norm_dir) - s_P*vel_L(norm_dir))/(s_M - s_P)
Comment on lines +309 to +312
flux_rsx_vf(${SF('')}$, i) = (s_M*qR_prim_rsx_vf(${SF(' + 1')}$, &
& i)*vel_R(norm_dir) - s_P*qL_prim_rsx_vf(${SF('')}$, &
& i)*vel_L(norm_dir) + s_M*s_P*(qL_prim_rsx_vf(${SF('')}$, &
& i) - qR_prim_rsx_vf(${SF(' + 1')}$, i)))/(s_M - s_P)
@github-actions

github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown

Lines of Code

File Lines Diff
src/simulation/m_riemann_solver_lf.fpp 542 +1
Directory Lines Diff
simulation 28019 +1
total 45630 +1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Bug: LF exports volume fraction instead of interface velocity

3 participants