Per-face explicit-biharmonic CFL ceiling on the biharmonic
viscosity ν₄ (m⁴/s). Forward-Euler stability for −ν₄·∇⁴u
on a local cell of spacing (dx, dy) requires (established
project constant)
ν₄ · dt · ((π/dx)² + (π/dy)²)² ≤ 2,
so the per-face bound is
ν₄_max = bound_coef · 2 / (dt · ((π·idx)² + (π·idy)²)²)
where idx = 1/dx, idy = 1/dy are the metric inverses at the
face (idxCu/idyCu at u-faces, idxCv/idyCv at v-faces).
bound_coef (MOM6 HORVISC_BOUND_COEF, default 0.8) is the
CFL safety margin shared with the harmonic hvisc_clamp_A.
Returns a huge value (no clamp) when the metric inverses are
both zero (a fully-masked land face) so the caller’s min
leaves the coefficient untouched there.
!$acc routine seq — called from the biharmonic do concurrent.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(in) | :: | idx |
Metric inverses |
||
| real(kind=wp), | intent(in) | :: | idy |
Metric inverses |
||
| real(kind=wp), | intent(in) | :: | bound_coef |
CFL safety coefficient ( |
||
| real(kind=wp), | intent(in) | :: | idt |
Reciprocal time step |
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real(kind=wp), | private | :: | k2 |
pure function hvisc_nu4_cfl_bound(idx, idy, bound_coef, idt) result(nu4_max_cfl) !! Per-face explicit-biharmonic CFL ceiling on the biharmonic !! viscosity `ν₄` (m⁴/s). Forward-Euler stability for `−ν₄·∇⁴u` !! on a local cell of spacing `(dx, dy)` requires (established !! project constant) !! `ν₄ · dt · ((π/dx)² + (π/dy)²)² ≤ 2`, !! so the per-face bound is !! `ν₄_max = bound_coef · 2 / (dt · ((π·idx)² + (π·idy)²)²)` !! where `idx = 1/dx`, `idy = 1/dy` are the metric inverses at the !! face (`idxCu`/`idyCu` at u-faces, `idxCv`/`idyCv` at v-faces). !! `bound_coef` (MOM6 `HORVISC_BOUND_COEF`, default 0.8) is the !! CFL safety margin shared with the harmonic `hvisc_clamp_A`. !! Returns a huge value (no clamp) when the metric inverses are !! both zero (a fully-masked land face) so the caller's `min` !! leaves the coefficient untouched there. !! `!$acc routine seq` — called from the biharmonic `do concurrent`. real(wp), intent(in) :: idx, idy !! Metric inverses `1/dx`, `1/dy` at the face. real(wp), intent(in) :: bound_coef !! CFL safety coefficient (`this%bound_coef`). real(wp), intent(in) :: idt !! Reciprocal time step `1/dt`. real(wp) :: nu4_max_cfl real(wp) :: k2 !$acc routine seq k2 = (PI*idx)*(PI*idx) + (PI*idy)*(PI*idy) if (k2 > 0.0_wp) then nu4_max_cfl = bound_coef*2.0_wp*idt/(k2*k2) else nu4_max_cfl = huge(1.0_wp) end if end function hvisc_nu4_cfl_bound