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

HDG Navier Stokes #3732

Merged
merged 37 commits into from
Dec 7, 2023
Merged

HDG Navier Stokes #3732

merged 37 commits into from
Dec 7, 2023

Conversation

lindsayad
Copy link
Member

@lindsayad lindsayad commented Nov 28, 2023

Based on work by Nguyen and Cockburn. I've implemented MMS tests for both lid and channel flow type boundary value problems.

Cavity MMS results

grid_size=2
L2 error for u is: 1.543638e-01
L2 error for v is: 1.543638e-01
L2 error for pressure is: 2.879229e-01
grid_size=4
L2 error for u is: 4.007067e-02
L2 error for v is: 4.007067e-02
L2 error for pressure is: 5.268862e-02
grid_size=8
L2 error for u is: 1.012986e-02
L2 error for v is: 1.012986e-02
L2 error for pressure is: 1.111670e-02
grid_size=16
L2 error for u is: 2.543457e-03
L2 error for v is: 2.543457e-03
L2 error for pressure is: 2.581651e-03

Channel MMS results

grid_size=2
L2 error for u is: 2.318716e-01
L2 error for v is: 3.545995e-01
L2 error for pressure is: 6.271178e-01
grid_size=4
L2 error for u is: 6.192154e-02
L2 error for v is: 9.922736e-02
L2 error for pressure is: 1.775775e-01
grid_size=8
L2 error for u is: 1.577982e-02
L2 error for v is: 2.597410e-02
L2 error for pressure is: 4.410009e-02
grid_size=16
L2 error for u is: 3.977834e-03
L2 error for v is: 6.505690e-03
L2 error for pressure is: 1.091284e-02

@lindsayad lindsayad marked this pull request as draft November 28, 2023 19:12
@lindsayad lindsayad force-pushed the hdg-ns branch 2 times, most recently from 4522b49 to acd9220 Compare November 29, 2023 01:55
@lindsayad lindsayad changed the title [WIP] HDG Navier Stokes HDG Navier Stokes Dec 1, 2023
lindsayad and others added 12 commits December 5, 2023 11:49
I'm just not sure how to do this with the "two-step" vector increment
This ensures that the aux system variables are up-to-date when
we perform the residual evaluation which considers both the "aux"
and nonlinear solution values. This also ensures that the Jacobian
matches the residual for all nonlinear iterations >= 1
There is a fundamental problem with this. The problem is that the
computed increment for the mixed system is nonzero even if the
increment is zero for the LM system. So basically I think trying
to increment the mixed solution outside of a global incrementing is
just not gonna work
Precheck only implemented for PETSc
@lindsayad lindsayad marked this pull request as ready for review December 6, 2023 01:41
@lindsayad
Copy link
Member Author

Marking this as ready for review. These current failures seem unrelated?

@moosebuild
Copy link

Job Coverage on da16a3e wanted to post the following:

Coverage

fab4f3 #3732 da16a3
Total Total +/- New
Rate 62.50% 62.51% +0.01% 86.49%
Hits 68158 68191 +33 32
Misses 40902 40900 -2 5

Diff coverage report

Full coverage report

Warnings

  • New new line coverage rate 86.49% is less than the suggested 90.0%

This comment will be updated on new commits.

@roystgnr roystgnr mentioned this pull request Dec 6, 2023
@roystgnr
Copy link
Member

roystgnr commented Dec 6, 2023

Definitely unrelated. Logan's looking atone; I have a hypothesis about and an attempted fix for the other.

Copy link
Member

@roystgnr roystgnr left a comment

Choose a reason for hiding this comment

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

I'm happy with this as-is. Feels like we could shave off a hundred lines of code with an FEMContext, though.

@lindsayad
Copy link
Member Author

I've opened #3742 as an acknowledgment that I should try using FEMContext

@lindsayad lindsayad merged commit 295b7f8 into libMesh:devel Dec 7, 2023
@lindsayad lindsayad deleted the hdg-ns branch December 7, 2023 20:31
@lindsayad
Copy link
Member Author

I was curious what a profile for this would look like so I made one for the 64x64 lid driven cavity case. I'm pleased that the dominant cost is the global solve as opposed to local inverses during assembly. This means there will be a lot to gain from using field split preconditioning

hdg

@roystgnr
Copy link
Member

roystgnr commented Jan 2, 2024

What was your ksp/pc type for that profile?

But regardless, 64x64 is pretty small; if the assembly was already negligible there then I wouldn't worry about it in general.

The only exception I can think of is really high polynomial degree. We already do an O(Np^2d) assembly (p^d bases, p^d quadrature point values for each on each of N elements), even on tensor product elements where there are asymptotically cheaper tricks ... but these local inverses look like O(Np^3d), don't they? You've got m=p^d entries in those matrices and then you're doing O(m^3) inverses on each element?

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

Successfully merging this pull request may close these issues.

3 participants