Skip to content

Issue #9051: heat and species flux matching at mesh interfaces - #16743

Closed
ghaffari-eng wants to merge 10 commits into
firemodels:masterfrom
ghaffari-eng:fix-9051-interface-flux-matching
Closed

ghaffari-eng wants to merge 10 commits into
firemodels:masterfrom
ghaffari-eng:fix-9051-interface-flux-matching

Conversation

@ghaffari-eng

Copy link
Copy Markdown

Issue #9051: heat and species fluxes at mesh interfaces

The change from #9051 (comment), as a branch on current master.

  1. MATCH_HEAT_FLUX_AT_MESH_INTERFACE (divg.f90): on the coarse side of a refined boundary, k dT/dn is replaced by the area-weighted sum of the fine-side values, computed from the inputs the fine mesh uses, as for the species. Solid fine cells are left out.
  2. In BOUNDARY_LOOP (DNS and LES), INTERPOLATED ghost cells get their own k from the ghost-cell state, so both meshes use ½(k₁+k₂). MU_DNS is set in INTERPOLATED ghost cells (velo.f90).
  3. Where the cell widths normal to the boundary differ, both meshes use the distance between the two cell centres (CENTRE_DISTANCE_FACTOR), for heat and species, and the coarse side uses the same distance when it sums the fine faces.
  4. Species matching (wall.f90, COARSE_MESH_IF): PBAR_OTHER from the zone pressure (plus the ambient profile with STRATIFICATION=T), MU_DNS_G = MU_DNS(IIG,JJG,KKG) with MAX(0,·) on each side, solid fine cells left out.

Not applied with GEOM (items 1 and 3), with TENSOR_DIFFUSIVITY=T (items 1 and 3, heat), or on cylindrical meshes (item 1). Tech Guide (Mass chapter) updated.

Results: see #9051. With the second PR (mass at refined interfaces) as well, in 45 sealed boxes with UGLMAT the mass of each gas does not change in the 8 digits of the devc file (DNS and LES), and in the energy_budget refined layout the energy residual at 60 s is +0.175 % with UGLMAT and +0.185 % with FFT (one mesh: +0.245 % and +0.346 %).

Verification: as listed in #9051 (comment with the diff).

…ned mesh interfaces

The coarse-side k dT/dn at an INTERPOLATED boundary with mesh refinement is replaced by the
area-weighted sum of the fine-side values, as is already done for the species diffusive flux.
…ell in species flux matching

Without STRATIFICATION, I_RAMP_P0_Z is 0 and EVALUATE_RAMP returns 1, so the temperature of the
fine-mesh cell (and its diffusivity and viscosity) was evaluated at about 0 K. Use the ambient
profile plus the zone pressure rise, or the zone pressure when there is no stratification.
…n mesh-interface ghost cells

At INTERPOLATED boundaries the ghost cell holds the state of the neighbouring mesh, but its
conductivity was copied from the interior cell, so the two meshes used different face values of k
and the conductive heat flux did not match even without refinement. The ghost cell now gets its
own conductivity, and its molecular viscosity (MU_DNS was zero there, so the ghost cell's turbulent
diffusivity and conductivity included the molecular viscosity).
…ell width changes at a mesh boundary

With one cell on each side but different widths normal to the boundary (EWC%NIC=1), each mesh used
its own ghost spacing, so k dT/dn did not match. Both meshes now use the distance between the two
cell centres; the coarse side of a refined boundary uses the same distance for the fine faces.
Skip GEOM (cut-cell) cases and the cylindrical refined case, which need information the other mesh
does not have.
…ive fluxes at mesh boundaries

Same rule as for the conductive flux: where the cell widths normal to an INTERPOLATED boundary differ,
both meshes use the distance between the cell centres (CENTRE_DISTANCE_FACTOR), and the coarse side of a
refined boundary uses the same distance when it sums the fine-side species fluxes.
…e-side heat flux sum

A solid fine cell behind a coarse face carries no gas flux. Leave it out of the
sum instead of leaving the whole coarse face unmatched.
…cells and LES molecular viscosity

- Leave solid fine cells out of the coarse-side sum of the species diffusive flux.
- In LES, take the molecular viscosity of the coarse cell from MU_DNS (the value the fine
  mesh holds in its ghost cell) instead of evaluating it with the composition of another
  cell, and apply MAX(0,MU-MU_DNS) on each side as in DIVERGENCE_PART_1.
…g, atmospheric special topic

- Solid fine cells are left out of the sums; the ghost-cell conductivity applies in DNS and LES.
- With complex geometry the flux replacement and the center distance are not applied; with
  TENSOR_DIFFUSIVITY the conductive flux is not matched.
- Special topic on vertical coarsening: say the conductive flux is matched, instead of two
  statements that contradict each other.
@rmcdermo

rmcdermo commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Thanks @ghaffari-eng . We are in the middle of getting a maintenance release out. So, I will test this branch separately and we can try to merge once the release is out.

@rmcdermo

Copy link
Copy Markdown
Contributor

Closing this until I have time to analyze.

@rmcdermo rmcdermo closed this Nov 10, 2026
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.

2 participants