IBSEB wall function: Louis (1979) stability factors on roofs (erf.ibseb.stability_scheme) - #429
Merged
Merged
Conversation
erf.ibseb.stability_scheme = iterative (default) | louis selects how the roofs are corrected when erf.ibseb.stability_correction is true. louis applies the Louis (1979) factors on the bulk Richardson number between the skin and the cell centre (b = 9.4, C* = 7.4 for momentum and 5.3 for heat, 1/(1 + 4.7 Ri)^2 when stable) to the neutral coefficients, without iteration or a seed; the neutral limit keeps both log laws (z0_wall, z0h_wall), so Louis' heat-to-momentum ratio R is not applied. Walls stay on the log law. The scheme without the correction, an unknown scheme, and obukhov_seed or obukhov_relax with louis abort at start-up. Tests: gtest IBSEBLouis (neutral, stable and unstable closed forms, monotone and continuous through neutral; each fails on a mutated coefficient); WallFunction inputs_louis with a formula check to 1e-6 that fails on the iterated scheme's dumps, three decks that must abort. The other WallFunction variants are unchanged. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
# Conflicts: # Source/ImmersedBoundarySEB/ERF_IBSEB.cpp
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.
Summary
Based on ERF-Fire after the development sync (#428). The Obukhov seed reads the ground surface layer through upstream's per-face vector (
m_SurfaceLayer[zlo], from erf-model#4025), and is now fetched only for the iterative scheme, since the Louis factors need no seed.Adds the Louis (1979) stability factors as a second way to correct the building wall function on roofs, next to the iterated similarity functions.
erf.ibseb.stability_scheme = iterative | louis. It is a sub-option of the existingerf.ibseb.stability_correctionand is read only when that switch is on. The default staysiterative, so every existing deck is unchanged.stability_schemeset without the correction;obukhov_seedorobukhov_relaxtogether withlouis.The factors
The bulk Richardson number is taken between the skin and the fluid cell centre (half a cell,
delta), with the effective wind that includes the convective velocity scale.F = 1 - b Ri_b / (1 + C* a^2 b sqrt(|Ri_b| delta / z0))withb = 9.4,C* = 7.4(momentum) and5.3(heat).F_m = F_h = 1 / (1 + 4.7 Ri_b)^2.The factors multiply the neutral coefficients:
u* = kappa U sqrt(F_m) / ln(delta/z0)andu* theta* = kappa^2 U dtheta F_h / (ln(delta/z0) ln(delta/z0h)).erf.ibseb.z0h_wallalready sets.How it compares
Offline roof flux at delta = 5 m, z0 = 0.01 m, z0h = 0.001 m, theta_air = 300 K (H in W/m2):
In the WallFunction case (hot roof in calm air, convective scale on), the roof flux is 465 W/m2 with Louis and 436 W/m2 with the iterated functions.
Test plan
IBSEBLouissuite (neutral, stable and unstable closed forms, monotone and continuous through neutral).Exec/CanonicalTests/SEB/WallFunction: ALL PASS, including the new checks:inputs_louis: roof u*, L and H follow the factors to about 1e-11 (tolerance 1e-6), and walls stay on the log law.resid_maxincluded: the neutral, deardorff, stability and bulkri variants and the restart. The README reference block now adds the Louis lines and the abort decks.ERF_IBFaceSet.cpp,ERF_IBSEB.cppand the new test: clean.git diff --check, GPU lint (no hits) and the MSVC scan are clean.🤖 Generated with Claude Code