rft: split Smagorinsky diffusive model to horizontal and vertical components #4054
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.
This pull request refactors and enhances the Smagorinsky-Lilly subgrid-scale turbulence model by separating its horizontal and vertical components, improving configurability and clarity. It updates configuration options, data structures, and computational routines to support independent activation and calculation of horizontal and vertical Smagorinsky closures. The implementation is modernized for greater modularity, and the code is cleaned up to focus on the most relevant quantities for each direction.
Configuration and Model Selection Updates:
smagorinsky_horizontal
andsmagorinsky_vertical
(with help text and default values) to allow independent control of horizontal and vertical Smagorinsky closures, and updated the help text for the existingsmagorinsky_lilly
option.AtmosTurbconv
struct and its construction to store and use separate horizontal and vertical Smagorinsky model fields. [1] [2]Precomputed Quantities and Data Structures:
ᶜL_h
,ᶜL_v
,ᶜS
,ᶠS
), and updated logic to initialize these fields based on the new model structure. [1] [2] [3]compute_strain_rate_center_full!
,compute_strain_rate_face_full!
, andface_density
to support the new calculations.Horizontal and Vertical Smagorinsky-Lilly Implementation:
Documentation and Code Cleanup:
These changes collectively provide more flexible and explicit control over Smagorinsky-Lilly turbulence modeling in both the horizontal and vertical directions, and improve the maintainability and clarity of the codebase.