Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Terrain with Rayleigh damping #1399

Merged
merged 6 commits into from
Jan 25, 2024

Conversation

ewquon
Copy link
Contributor

@ewquon ewquon commented Jan 25, 2024

Add z_phys_cc to parameter list for erf_init_rayleigh; update default implementation to handle cases with and without terrain. Caveats:

  1. Previously, the damping strength was determined by the distance from the top of the domain; now the damping strength is determined by the distance from the top-most cell height. This simplifies the implementation with terrain and also ensures the maximum damping value is attained within the computational domain.
  2. Damping is still applied uniformly at each k-level, even with terrain. The implicitly assumes that where the damping is active, the grid is approximately uniformly spaced. Because the terrain heights at each k are not necessarily constant, the maximum value is taken to represent that level.

The Witch of Agnesi hill example has been updated to allow damping. Example results (hill height=1, zhi=2) without damping:
WoA_undamped
and with damping (zdamp=1, noting that the resulting damping will increase gradually from z=1 to z=2; dampcoef is chosen to have a time constant equal to the simulation length):
WoA_damped

Note: The Rayleigh damping implementation will differ slightly from
before in the case without terrain. Previously, ztop was set to the top
of the domain; now, ztop is set to max(z_phys_cc[:,:,khi]) -- where ztop
is the value at which the sine-squared damping factor is one. Therefore,
the top layer of cells will now have a factor of exactly one instead of
nearly one.
@ewquon ewquon enabled auto-merge (squash) January 25, 2024 16:10
@ewquon ewquon force-pushed the terrain_with_rayleigh branch from 193dbd9 to 3a6bfe1 Compare January 25, 2024 16:10
@ewquon ewquon force-pushed the terrain_with_rayleigh branch from 3a6bfe1 to e177c97 Compare January 25, 2024 16:13
@ewquon ewquon merged commit 71340f9 into erf-model:development Jan 25, 2024
11 checks passed
@ewquon ewquon deleted the terrain_with_rayleigh branch January 25, 2024 17:01
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