Skip to content

Conversation

haakon-e
Copy link
Member

@haakon-e haakon-e commented Oct 14, 2025

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:

  • Added new configuration options smagorinsky_horizontal and smagorinsky_vertical (with help text and default values) to allow independent control of horizontal and vertical Smagorinsky closures, and updated the help text for the existing smagorinsky_lilly option.
  • Updated the AtmosTurbconv struct and its construction to store and use separate horizontal and vertical Smagorinsky model fields. [1] [2]

Precomputed Quantities and Data Structures:

  • Changed precomputed quantities to store only the necessary fields for each direction (e.g., ᶜL_h, ᶜL_v, ᶜS, ᶠS), and updated logic to initialize these fields based on the new model structure. [1] [2] [3]
  • Added new utility functions compute_strain_rate_center_full!, compute_strain_rate_face_full!, and face_density to support the new calculations.

Horizontal and Vertical Smagorinsky-Lilly Implementation:

  • Refactored the Smagorinsky-Lilly tendency functions to compute and apply horizontal and vertical tendencies separately, using the new precomputed quantities and model structure. [1] [2] [3] [4]
  • Updated the main tendency application routine to call the horizontal and vertical Smagorinsky routines independently.

Documentation and Code Cleanup:

  • Updated docstrings and comments to clarify the new structure and computations, and removed unused or outdated code. [1] [2] [3]

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.

@haakon-e haakon-e force-pushed the he/rft-split-h-v-smag branch from 3ab12ff to a9489f1 Compare October 14, 2025 16:56
@haakon-e haakon-e force-pushed the he/rft-split-h-v-smag branch from a9489f1 to e8efcff Compare October 16, 2025 01:12
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.

1 participant