Skip to content

Add heterogeneous reacting surface boundary conditions - #1821

Open
rocfire11 wants to merge 3 commits into
MFlowCode:masterfrom
rocfire11:carbon-surface-v1
Open

Add heterogeneous reacting surface boundary conditions#1821
rocfire11 wants to merge 3 commits into
MFlowCode:masterfrom
rocfire11:carbon-surface-v1

Conversation

@rocfire11

Copy link
Copy Markdown

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

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

PR template credit: junegunn

Summary

This PR adds heterogeneous reacting surface boundary conditions for immersed
boundaries. The implementation was developed for reacting carbon-particle
simulations in which heterogeneous surface chemistry is coupled to the
compressible gas-phase species equations.

The surface treatment supports:

  • zero-normal-gradient temperature (thermal_bc = 0)
  • prescribed surface temperature (thermal_bc = 1)
  • coupled reacting-surface energy balance (thermal_bc = 2)
  • heterogeneous species-flux boundary conditions
  • Cantera-based heterogeneous surface mechanisms through
    surface_cantera_file and surface_phase

For a reacting surface, the species boundary condition balances diffusive
transport, Stefan mass flux, and heterogeneous surface production. One species
equation is replaced by the mass-fraction closure. When thermal_bc = 2, the
surface temperature is included as an additional Newton unknown and the
conductive and heterogeneous reaction heat fluxes are balanced.

Motivation

The immediate application is heterogeneous oxidation/gasification of carbon
particles using an immersed-boundary representation. The implementation is
intended to remain general with respect to the number of gas species and the
Cantera surface mechanism rather than hard-coding a particular carbon
mechanism.

Testing

I have tested the implementation with the Kestel/Libby-Blake three-reaction
carbon surface mechanism using:

  • prescribed surface temperature
  • coupled surface species/energy solution
  • the original reduced gas-phase carbon mechanism
  • an 11-species reduced GRI-based gas mechanism
  • MPI CPU simulations on HiPerGator

Both prescribed-temperature and coupled-energy carbon cases run successfully
and produce the expected surface reaction products, oxygen consumption,
thermal field, and reacting wake.

The branch was rebased from current MFC master before the surface changes were
introduced, and ./mfc.sh precheck and the simulation build pass.

@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown

Lines of Code

File Lines Diff
src/simulation/m_ibm.fpp 1536 +285
src/simulation/m_checker.fpp 83 +13
src/common/m_derived_types.fpp 443 +3
src/pre_process/m_global_parameters.fpp 432 +3
src/simulation/m_global_parameters.fpp 751 +3
src/simulation/m_particle_cloud.fpp 414 +3
src/pre_process/m_mpi_proxy.fpp 132 +2
src/simulation/m_mpi_proxy.fpp 525 +2
Directory Lines Diff
common 9949 +3
pre_process 4502 +5
simulation 27974 +306
total 45752 +314

@codecov

codecov Bot commented Sep 5, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 11.28205% with 173 lines in your changes missing coverage. Please review.
✅ Project coverage is 61.79%. Comparing base (cc20c94) to head (26769f1).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
src/simulation/m_ibm.fpp 3.50% 165 Missing ⚠️
src/simulation/m_checker.fpp 27.27% 5 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1821      +/-   ##
==========================================
- Coverage   62.26%   61.79%   -0.47%     
==========================================
  Files          84       84              
  Lines       21558    21745     +187     
  Branches     3195     3214      +19     
==========================================
+ Hits        13423    13438      +15     
- Misses       5937     6106     +169     
- Partials     2198     2201       +3     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

2 participants