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

Hybrid CG DG #23986

Merged
merged 7 commits into from
Oct 6, 2023
Merged

Hybrid CG DG #23986

merged 7 commits into from
Oct 6, 2023

Conversation

lindsayad
Copy link
Member

@lindsayad lindsayad commented Apr 5, 2023

@joe61vette I was so intrigued by what you're working on that I had to test it myself.

If we ever want to go with a scheme that doesn’t require Rhie-Chow nor petrov-galerkin stabilization, and allows discontinuous boundary conditions on velocity, the hybrid CG-DG approach appears pretty damn cool. I spun up some kernels today and see second and first order L2 errors for velocity and pressure respectively when using first monomial and first Lagrange for velocity and pressure respectively. And third and second order L2 errors for velocity and pressure if I bump the velocity order to SECOND (keeping pressure at FIRST).

Lid driven result for Re=100 (just using averaging of face values for the advection scheme):

Screen Shot 2023-04-05 at 1 51 03 PM

Closes #24055

@lindsayad lindsayad self-assigned this Apr 5, 2023
@joe61vette
Copy link

@lindsayad Thanks, I’ll see how it works with what I was testing tomorrow. I agree it looks promising, especially for my two-phase app where I need to make sure face values are bounded by the cell-centered values when interfacial drag dominates the eqs.

@lindsayad
Copy link
Member Author

The preliminary work I did here was only for pressure and velocity and I haven't even added any coefficients yet. So if you think you might want to use/extend what is here, let me know

@lindsayad
Copy link
Member Author

lindsayad commented Apr 7, 2023

@joe61vette in c74e815 I added a hybrid scheme test for the same skewed mesh that we test our finite volume skew correction methodology on. The hybrid scheme maintains the same orders of accuracy for skewed meshes as for non-skewed meshes, e.g.

velocity polynomial order pressure polynomial order velocity L2 error order pressure L2 error order
1 1 2 1
2 1 3 2

@lindsayad lindsayad changed the title [WIP] Hybrid CG DG Hybrid CG DG Apr 7, 2023
lindsayad added a commit to lindsayad/moose that referenced this pull request Apr 12, 2023
@lindsayad lindsayad force-pushed the hybrid-cg-dg branch 2 times, most recently from 8658f37 to 8cbfabb Compare April 12, 2023 23:38
@moosebuild
Copy link
Contributor

moosebuild commented Apr 13, 2023

Job Documentation on 360f0d3 wanted to post the following:

View the site here

This comment will be updated on new commits.

@moosebuild
Copy link
Contributor

moosebuild commented Apr 13, 2023

Job Coverage on 360f0d3 wanted to post the following:

Framework coverage

750e5c #23986 360f0d
Total Total +/- New
Rate 85.69% 85.69% +0.00% -
Hits 91792 91796 +4 0
Misses 15335 15331 -4 0

Diff coverage report

Full coverage report

Modules coverage

Navier stokes

750e5c #23986 360f0d
Total Total +/- New
Rate 84.18% 84.31% +0.13% 100.00%
Hits 11220 11254 +34 22
Misses 2109 2095 -14 0

Diff coverage report

Full coverage report

Full coverage reports

Reports

This comment will be updated on new commits.

@lindsayad lindsayad force-pushed the hybrid-cg-dg branch 2 times, most recently from fcc37f2 to 4d02831 Compare April 13, 2023 15:07
@lindsayad lindsayad changed the title Hybrid CG DG [WIP] Hybrid CG DG Aug 1, 2023
@lindsayad lindsayad changed the title [WIP] Hybrid CG DG Hybrid CG DG Aug 1, 2023
@lindsayad lindsayad force-pushed the hybrid-cg-dg branch 2 times, most recently from 62c7c8d to b56c8a1 Compare August 1, 2023 22:40
@lindsayad lindsayad changed the title Hybrid CG DG [WIP] Hybrid CG DG Aug 1, 2023
@lindsayad lindsayad changed the title [WIP] Hybrid CG DG Hybrid CG DG Aug 22, 2023
@moosebuild
Copy link
Contributor

Job Precheck on 5e6bd52 wanted to post the following:

Your code requires style changes.

A patch was auto generated and copied here
You can directly apply the patch by running, in the top level of your repository:

curl -s https://mooseframework.inl.gov/docs/PRs/23986/clang_format/style.patch | git apply -v

Alternatively, with your repository up to date and in the top level of your repository:

git clang-format a5148ca182abf18168fb36041600b93321b869f8

@lindsayad lindsayad force-pushed the hybrid-cg-dg branch 2 times, most recently from fe15732 to c6f1ef9 Compare August 24, 2023 20:35
@moosebuild
Copy link
Contributor

Job Conda build (ARM Mac) on 0e53445 : invalidated by @lindsayad

@moosebuild
Copy link
Contributor

Job Framework 1 on 0e53445 : invalidated by @lindsayad

@lindsayad lindsayad force-pushed the hybrid-cg-dg branch 2 times, most recently from ff74c37 to 225f949 Compare August 25, 2023 22:58
Copy link
Contributor

@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 pretty thrilled with the code, and astonished that I'd never seen someone using this formulation before ... but could we get some navier_stokes/doc/content/source/kernels/ entries for the new kernels?

@lindsayad
Copy link
Member Author

but could we get some navier_stokes/doc/content/source/kernels/ entries for the new kernels?

Pretty much all the kernels added in this PR are test objects. The objects used for "production" are very general from the framework. I will make a markdown file though that runs through one of the "production" inputs in detail

roystgnr
roystgnr previously approved these changes Oct 3, 2023
Copy link
Contributor

@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.

hcgdgfe.md looks good enough for me. Why'd you have to force push, though?

@lindsayad
Copy link
Member Author

Why'd you have to force push, though?

I rebased as I was trying to figure out what turned out to be unrelated local failures

- Fix typos
- Add links to more documentation pages

Co-authored-by: Guillaume Giudicelli <guillaume.giudicelli@gmail.com>
@moosebuild
Copy link
Contributor

Job Conda (Intel Mac) on 360f0d3 : invalidated by @lindsayad

Copy link
Contributor

@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 but give Guillaume a chance to chime in before merging.

@lindsayad
Copy link
Member Author

I will probably merge this by the end of the day if I don't hear anything

@GiudGiud
Copy link
Contributor

GiudGiud commented Oct 5, 2023

Apologies. I will review this again tomorrow. Maybe tonight.

Copy link
Contributor

@GiudGiud GiudGiud left a comment

Choose a reason for hiding this comment

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

looks good

if this approach keeps being successful (robustness especially), it makes a ton of sense to do "coarse mesh" thermal hydraulics with higher order FE (instead of flat FV requiring us to resolve quite a bit) so it could be another Pgh change of direction :)

@lindsayad lindsayad merged commit 625f4ea into idaholab:next Oct 6, 2023
44 checks passed
@lindsayad lindsayad deleted the hybrid-cg-dg branch October 6, 2023 23:58
@lindsayad
Copy link
Member Author

Thanks for the reviews. I did test this with a porosity jump and similar to a naive finite volume implementation, it struggles, so no easy silver bullet for that problem :-)

oanaoana pushed a commit to oanaoana/moose that referenced this pull request Oct 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

Add example of hybrid CG-DG discretization for solving NS
6 participants