geodynamics / Rayleigh

Rayleigh: Pseudo-spectral MHD
GNU General Public License v3.0
61 stars 48 forks source link

user can now set any two of Ra, Ra*, and Ek in Reference_Type 5 #494

Closed illorenzo7 closed 6 months ago

illorenzo7 commented 10 months ago

If we disregard Pr, only two of the parameters Ek, Ra, and Ra (or equivalently Ro_c = sqrt(Ra)) are independent in a rotating system. This pull request updates the logic so that if two of Ek, Ra, or Ra* are set, the third is automatically set according to

Ra* = Ra Ek^2/Pr

The logic does this by setting all these input parameters to -1 and checking if they are specified (which they will be if they are > 0).

aurnou commented 10 months ago

Just wondering, physically, why disregard Prandtl? On Dec 5, 2023, at 6:15 PM, Loren Matilsky @.**> wrote:If we disregard Pr, only two of the parameters Ek, Ra, and Ra (or equivalently Ro_c = sqrt(Ra)) are independent in a rotating system. This pull request updates the logic so that if two of Ek, Ra, or Ra are set, the third is automatically set according to Ra* = Ra Ek^2/Pr The logic does this by setting all these input parameters to -1 and checking if they are specified (which they will be if they are > 0).

You can view, comment on, or merge this pull request online at:   https://github.com/geodynamics/Rayleigh/pull/494

Commit Summary

73af754 user can now set any two of Ra, Ra*, and Ek in Reference_Type 5

File Changes (1 file)

M
src/Physics/PDE_Coefficients.F90
(68)

Patch Links:

https://github.com/geodynamics/Rayleigh/pull/494.patch https://github.com/geodynamics/Rayleigh/pull/494.diff

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.***>

illorenzo7 commented 10 months ago

@aurnou, Oh well we don't have to. But my sense is people typically want to set Prandtl to something specific and then play around with the other parameters. It seems unlikely people would want Ra, Ra*, and Ek to all be something specific (thus needing a weird Prandtl number).

I could be wrong of course!

My main thought here is that now the user can set

Pr, Ra, and Ro_c

and let the code calculate Ek.

aurnou commented 10 months ago

On Dec 5, 2023, at 6:23 PM, Loren Matilsky @.**> wrote: @aurnou, Oh well we don't have to. But my sense is people typically want to set Prandtl to something specific and then play around with the other parameters. It seems unlikely people would want Ra, Ra, and Ek to all be something specific (thus needing a weird Prandtl number). I could be wrong of course! My main thought here is that now the user can set Pr, Ra, and Ro_c and let the code calculate Ek.That makes sense to me. Maybe set the default Pr to 1. But it should be a variable, if at all possible.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

illorenzo7 commented 10 months ago

@aurnou the Prandtl_Number should still be variable. I believe its default is still 1. Note that the other defaults are

Rayleigh_Number = -1 Convective_Rossby_Number = -1

etc. We need them to be -1 so that Fortran knows if the user specified them or not.

aurnou commented 10 months ago

🙌On Dec 7, 2023, at 5:09 PM, Loren Matilsky @.***> wrote: @aurnou the Prandtl_Number should still be variable. I believe its default is still 1. Note that the other defaults are Rayleigh_Number = -1 Convective_Rossby_Number = -1 etc. We need them to be -1 so that Fortran knows if the user specified them or not.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>