vanroekel / MPAS-Model

Repository for MPAS models and shared framework releases.
Other
1 stars 4 forks source link

Some small bugs/questions about second-moment budgets #9

Open BrodiePearson opened 3 years ago

BrodiePearson commented 3 years ago

I've been going through the budget equations to match them with the Langmuir closure Overleaf document and had three of questions/comments:

BrodiePearson commented 3 years ago

@amrapallig @vanroekel @qingli411

vanroekel commented 3 years ago

@BrodiePearson thanks for continuing to dig through. I'll take a shot at your equation

1) you're right on that extra half, that shouldn't be there. Previously I had defined the KE (L498-499) without the 0.5 but when I put it in I missed making that correction

2) Again right on. The second derivative is wrong. We never use this but would be important to fix. It is something CLUBB developers have suggested a need for. Testing by @amrapallig suggests it doesn't run with this, likely because of the incorrect derivative.

3) beta5 and c2 are identical 0.5, only b/c as you say c2 = 1-beta5. It would be good to unify that, it's just poorly mixed notation.

qingli411 commented 3 years ago

Here is my branch of the code. I have changed the variable names so that the coefficients should be consistent with the Overleaf file. However, this branch was based on an earlier version of the code so a lot of the recent changes have not been merged in. So many of the issues we saw earlier haven't been fixed in this branch. But I just wanted to put it here for reference. It would be good to unify these branches as we move forward.

BrodiePearson commented 3 years ago

@qingli411 Thanks for the link to your code and for adding the new constant names, I also like the commenting that you have added for budget terms etc. I agree that unifying these branches would be a good idea, especially as it will only get harder the longer we wait. I hope that it is not too challenging to do so now.

@vanroekel Thanks for your responses, I'm glad the comments were sensible. It looks like Qing's code has actually fixed the bugs in points (1) and (3), although it looks like the viscous terms in (2) are removed in @qingli411's code - that's good to know as we merge the codes.