Repository navigation
Issue #9051: heat and species flux matching at mesh interfaces - #16743
Closed
ghaffari-eng wants to merge 10 commits into
Closed
ghaffari-eng wants to merge 10 commits into
ghaffari-eng wants to merge 10 commits into
Conversation
…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).
…at mesh boundaries
…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.
… flux matching equation
…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.
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. |
Contributor
|
Closing this until I have time to analyze. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue #9051: heat and species fluxes at mesh interfaces
The change from #9051 (comment), as a branch on current master.
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.BOUNDARY_LOOP(DNS and LES),INTERPOLATEDghost cells get their own k from the ghost-cell state, so both meshes use ½(k₁+k₂).MU_DNSis set inINTERPOLATEDghost cells (velo.f90).CENTRE_DISTANCE_FACTOR), for heat and species, and the coarse side uses the same distance when it sums the fine faces.COARSE_MESH_IF):PBAR_OTHERfrom the zone pressure (plus the ambient profile withSTRATIFICATION=T),MU_DNS_G = MU_DNS(IIG,JJG,KKG)withMAX(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).