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

Thermohaline hackathon: FRG24 model with safety=3 fails due to ill-conditioned matrix #738

Open
afraser3 opened this issue Oct 7, 2024 · 0 comments
Assignees

Comments

@afraser3
Copy link

afraser3 commented Oct 7, 2024

The FRG24 model as currently implemented in the thermohaline_hackathon and thermohaline_keep_on_hacking feature branches appears to work great with safety=0, but crashes in pesky edge cases with safety=3 (which implements the full model without the approximations used by safety=0 to speed up the model---see #633). The problem arises when evaluating the model in regions that are very weakly unstable, with density ratio R_0 approaching the diffusivity ratio 1/tau. There, the flow speed w_f is comparable to machine precision, and the resulting matrix whose eigenvalues are sought becomes extremely ill-conditioned, so that the eigenvalues it spits out are unreliable, and the routine doesn't know how to proceed. Fortunately, the model seems to work fine with safety=0, so the FRG24 model can still be used. Still, it would be nice to be able to run calculations with safety=3 in case users want to test the validity of the approximations employed when running with safety=0.

Opening this up as an issue so that @rhdtownsend, @JarRosenberg, and I can keep track of progress while we try to get to the bottom of this. Current leading candidates for addressing this problem involve (1) changing the nondimensionalization employed when writing out the matrix whose eigenvalues are needed, and (2) trying to employ matrix perturbation theory to get the eigenvalues in this problematic regime perturbatively rather than calculating them via brute force. We should also probably test other choices of safety to see if they run into similar problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

2 participants