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

Correct the shear production in diagnostic edmf #2072

Merged
merged 1 commit into from
Sep 8, 2023
Merged

Conversation

szy21
Copy link
Member

@szy21 szy21 commented Sep 7, 2023

Purpose

Closes #1880

To-do

Content


  • I have read and checked the items on the review checklist.

ᶜgradᵥ_ᶠuvw⁰ = p.ᶜtemp_UVWxUVW
ᶜgradᵥ_ᶠuvw⁰ =
Geometry.project.(Ref(Geometry.UVWAxis()), ᶜgradᵥ.(UVW.(ᶠu⁰)))
@. ᶜshear² = norm_sqr((ᶜgradᵥ_ᶠuvw⁰ + adjoint(ᶜgradᵥ_ᶠuvw⁰)) / 2)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It may be better to first define the strain rate (ᶜgradᵥ_ᶠuvw⁰ + adjoint(ᶜgradᵥ_ᶠuvw⁰)) / 2, since we need that for momentum diffusion, and then compute the norm of that. Instead of shear^2, a better name might be strain_norm or something like it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I isolated the strain rate calculation in the function compute_strain_rate! (It currently computes the strain rate at the center, we can add the one that computes it at the face when we need it.) I also renamed shear^2 to strain_rate_norm.

@szy21 szy21 force-pushed the zs/diagedmf_shear branch from 42c54b5 to 7b96ed3 Compare September 8, 2023 06:46
@szy21 szy21 force-pushed the zs/diagedmf_shear branch from 7b96ed3 to 088ab13 Compare September 8, 2023 06:48
@szy21
Copy link
Member Author

szy21 commented Sep 8, 2023

bors r+

@bors
Copy link
Contributor

bors bot commented Sep 8, 2023

Build succeeded!

The publicly hosted instance of bors-ng is deprecated and will go away soon.

If you want to self-host your own instance, instructions are here.
For more help, visit the forum.

If you want to switch to GitHub's built-in merge queue, visit their help page.

@bors bors bot merged commit 7768031 into main Sep 8, 2023
8 checks passed
@bors bors bot deleted the zs/diagedmf_shear branch September 8, 2023 07:49
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.

Add shear to precomputed quantities
2 participants