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

fluids: Shakib tau for advection #1473

Merged
merged 4 commits into from
Mar 12, 2024
Merged

fluids: Shakib tau for advection #1473

merged 4 commits into from
Mar 12, 2024

Conversation

jrwrigh
Copy link
Collaborator

@jrwrigh jrwrigh commented Feb 14, 2024

Add in the Shakib definition of tau to the advection example:

$$\tau = \left [ \left(\frac{2 C_t}{\Delta t}\right)^2 + \frac{\mathbf{ u} \cdot (\mathbf u \cdot \mathbf g)}{C_a} + \frac{\kappa^2 \Vert \mathbf g \Vert_F ^2}{C_d} \right]^{-1/2}$$

for $\mathbf g$ the metric tensor. This is very similar in form to the Shakib $\tau$ formulation for the Navier-Stokes equations.
Note that diffusion isn't yet implemented in advection, but I've left the documentation there as I will get to that soon.

$C_a = P^2$ by default to roughly account for the order of the element (whether or not that works well is apart of my research, but it seems like a sane default).

Depends on #1447

@jrwrigh jrwrigh self-assigned this Feb 14, 2024
Base automatically changed from jrwrigh/unify_advection to main February 14, 2024 22:13
@jrwrigh jrwrigh added 0-WIP and removed 1-In Review labels Feb 27, 2024
@jrwrigh
Copy link
Collaborator Author

jrwrigh commented Mar 7, 2024

Tests pass moving to -ksp_type gmres and a more physically realistic -Ctau_a.

Copy link
Member

@jedbrown jedbrown left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good at a high level. What do we have in the way of test problems to assess which is better when?

@jrwrigh
Copy link
Collaborator Author

jrwrigh commented Mar 12, 2024

Periodic sine wave advection is probably the best most precise way. I currently have a separate branch for that right now.

@jrwrigh jrwrigh merged commit 74bf24e into main Mar 12, 2024
28 checks passed
@jrwrigh jrwrigh deleted the jrwrigh/tau_choices branch March 12, 2024 21:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants