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

Heat flux sign incorrect in mixing and convection example #2959

Closed
jagoosw opened this issue Mar 6, 2023 · 7 comments · Fixed by #2962
Closed

Heat flux sign incorrect in mixing and convection example #2959

jagoosw opened this issue Mar 6, 2023 · 7 comments · Fixed by #2962
Labels
documentation 📜 The sacred scrolls

Comments

@jagoosw
Copy link
Collaborator

jagoosw commented Mar 6, 2023

I've been running a model that I based on the ocean wind mixing and convection example and noticed that when I run it for much longer than the example it cools. I think the sign on the heat flux should be negative here:

# ## Boundary conditions
#
# We calculate the surface temperature flux associated with surface heating of
# 200 W m⁻², reference density `ρₒ`, and heat capacity `cᴾ`,
= 200.0 # W m⁻², surface _heat_ flux
ρₒ = 1026.0 # kg m⁻³, average density at the surface of the world ocean
cᴾ = 3991.0 # J K⁻¹ kg⁻¹, typical heat capacity for seawater
Qᵀ =/ (ρₒ * cᴾ) # K m s⁻¹, surface _temperature_ flux

As it should be an inward flux right? I might be missing something but running my code again now with the sign flipped to check.

@jagoosw jagoosw changed the title Heat flux sign incorrect in Heat flux sign incorrect in mixing and convection example Mar 6, 2023
@jagoosw jagoosw added the documentation 📜 The sacred scrolls label Mar 6, 2023
@glwagner
Copy link
Member

glwagner commented Mar 6, 2023

Positive flux means cooling (positive means that heat is fluxed upwards, out of the ocean).

We may change the sign convention in the future.

@glwagner
Copy link
Member

glwagner commented Mar 6, 2023

Maybe we should put another note in the example similar to what's in the docs.

@jagoosw
Copy link
Collaborator Author

jagoosw commented Mar 6, 2023

In this example isn't it meant to be heating not cooling to keep it stratified?

@glwagner
Copy link
Member

glwagner commented Mar 6, 2023

It's intended to cool to cause convection (the name of the example is "wind mixing and convection") but that's just a choice we made.

Heating would be fine too and the pedagogical value of the example would be similar. The heat flux would have to be changed in that case to make it realistic. For an idealized experiment we can remove heat at the top, but typically in realistic conditions a significant component of heating is realized by solar insolation which penetrates into the interior. Heating with winds is more challenging numerically (to simulate this problem well you'd need high resolution) which I think was the original motivation to use convection.

@jagoosw
Copy link
Collaborator Author

jagoosw commented Mar 6, 2023

Ah I see, perhaps we should change the comment "surface heating of 200 W m⁻²" to "surface cooling ..." or something similar to clarify then?

@glwagner
Copy link
Member

glwagner commented Mar 6, 2023

Ha yes! I don't know how that comment got in there... it's definitely surface cooling

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation 📜 The sacred scrolls
Projects
None yet
3 participants