Add curl momentum diagnostics - #625
Conversation
…n quantity codes (currently is mostly a copy of the momentum equation codes so not valid).
… This involved adding some dummy ones as blank tex is not allowed. The parser also doesn't seem to recognize commented out lines.
… viscous force into a curl.
|
Hi @Ayesha714 , Hope your trip back is going well. I've just pushed a first draft (completely untested) implementation of the derivatives of the viscous force and an example implementation of the curl components Any chance you could try them out when you get back to work? I'm expecting that they will crash and I will have to debug them a bit more so please just let me know what fails. You can also see the proposed updated documentation of the quantity codes here: Thank you! |
Hi Cian, I have some questions: Firstly, I am unsure about the correct formulation of the curl of the pressure term. The current implementation does not appear to be mathematically correct The most important question is how I can use this new module now. Previously, I was simply adding the little routines directly in the Custom diagnostics, but with this new module, I am not sure what the correct procedure is for enabling and using it in the code. Thanks, Ayesha
|
One more clarification: I have not uncommented the lines related to the curl terms yet because these routines are not currently implemented in |
|
Hi @Ayesha714 , The diagnostics we've added should be available using the quantity codes you implemented on this branch. So if you compile your branch of the code and run it you should be able to add, for example, a global average of 1327, which should be the r component of the curl of the viscous force term, to the main input file. Obviously, as you pointed out, those codes may yet change as we update the branch with the missing diagnostics. Hope you got back home safely eventually! |
Needed to add the quantity codes to the header file.
The logic was incorrect for when to evaluate the viscous forces as they now need to be evaluated when just the curl is requested. Also fixing the logic for outputting of other curl quantities that previously required both the value and the square to be included. The curl of the momentum terms was never called. Adding an input file that doesn't currently run a test but it is what I've been using to debug these things.
I have added curls of advection, buoyancy, magnetic, coriolis, and pressure forces and tested against my own cases.