-
Notifications
You must be signed in to change notification settings - Fork 11
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
Log the Courant number #424
Conversation
The DG0 Courant number based on DG fluxes is a bit more useful for pinpointing exactly which cell things went bad in. |
Oh interesting, thanks Colin! How would we go about calculating that? |
Looks like your code is already set up to do it. You just set the output space to a DG0 |
gusto/io.py
Outdated
number of. Defaults to 'u'. | ||
expression (:class:`ufl.Expr`, optional): expression of velocity | ||
field to take Courant number of. Defaults to None, in which case | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unfinished comment...
state_fields (:class:`StateFields`): the model's field container. | ||
name (str, optional): the name of the field to log the Courant | ||
number of. Defaults to 'u'. | ||
message (str, optional): an extra message to be logged. Defaults to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the option to add a message!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good, and very useful - thanks! Just needs that comment finishing off...
On 24 Aug 2023, at 15:26, David A. Ham ***@***.***> wrote:
Looks like your code is already set up to do it. You just set the output space to a DG0 FunctionSpace.
Message ID: ***@***.***>
No, it’s different.
See: https://github.com/firedrakeproject/asQ/blob/master/utils/diagnostics.py<https://github.com/firedrakeproject/asQ/blob/master/utils/diagnostics.py>
|
This introduces a system to log the Courant number, which will be done by default.
Main points:
log_courant
option is passed to the output configurationCourantNumber
diagnostic is augmented so that it can be evaluated on an expression, and not just the field named "u" (this is used when the transporting velocity isn't exactly the wind field)SemiImplicitQuasiNewton
time stepper logs the Courant number every outer loop