-
Notifications
You must be signed in to change notification settings - Fork 66
Dg shock capture #1595
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
Dg shock capture #1595
Conversation
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.
No comments. Just looking forward to trying that out. Nice finding :)
@@ -35,6 +35,10 @@ subsection physical properties | |||
end | |||
end | |||
|
|||
subsection stabilization |
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.
Update copyright date (?)
applications_tests/lethe-fluid/dg_tracer_advection_tanh_bdf2.prm
Outdated
Show resolved
Hide resolved
// We define the cutoff function from the Moe paper using a lambda function. | ||
// It's a bit weird this cutoff function, but YOLO I guess. Why do we divide y | ||
// by 1.1? I do not know, I believe it to be one of the mysteries of life. |
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.
lol
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.
Only typos and questions :)
"scalar limiter", | ||
"none", | ||
Patterns::Selection("none|moe"), | ||
"Type of scalar limiter. The limiters are only appropriate with the DG versions of the solvers and should only be used for advection-dominated problem."); |
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 don't know if we need to say that it's only available for the tracer here.
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'll implement it soon for the VOF equation, so I don't think it's required :)
// 3. Calculate the value of the theta limiting using the max, min and | ||
// mean values as well as the bounds. | ||
const double max_value = | ||
max_value_per_cells.at(cell->global_active_cell_index()); | ||
const double min_value = | ||
min_value_per_cells.at(cell->global_active_cell_index()); | ||
const double mean_value = | ||
mean_value_per_cells.at(cell->global_active_cell_index()); | ||
double y_max = | ||
(upper_bound - mean_value) / ((max_value - mean_value) + 1e-16); | ||
double y_min = | ||
(lower_bound - mean_value) / ((min_value - mean_value) + 1e-16); |
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.
So upper/lower bounds are from the neighbor values and min/max are from the cell values?
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.
Yes exactly. The max/min/avec are in the cell and the upper and lower bounds are from the neighbours
Co-authored-by: Victor Oliveira Ferreira <[email protected]>
Co-authored-by: hepap <[email protected]>
Co-authored-by: hepap <[email protected]>
Co-authored-by: hepap <[email protected]>
Co-authored-by: hepap <[email protected]>
Co-authored-by: hepap <[email protected]>
Co-authored-by: hepap <[email protected]>
Co-authored-by: hepap <[email protected]>
Co-authored-by: hepap <[email protected]>
Co-authored-by: hepap <[email protected]>
Co-authored-by: hepap <[email protected]>
Co-authored-by: hepap <[email protected]>
Co-authored-by: hepap <[email protected]>
Co-authored-by: hepap <[email protected]>
Co-authored-by: hepap <[email protected]>
Description The DG implementation of the tracer was not very adequate for pure advection if the DG order was larger than 0 (so DG Q1 and above). This is because we did not have any sort of limiter in place. This PR adds a Moe limiter (see documentation for reference) which is an a posteriori limiter that works quite well for scalar equations. It is not very invasive and not very expensive and I have managed to get very adequate results with it. Testing The DG advection test has been changed to use the limiter and I have added a new test with BDF2 which really requires the limiter to get adequate results. Documentation Since the limiter is generic for all scalar equations, I have documented it in the stabilization section where I believe it adequately belong. Co-authored-by: Victor Oliveira Ferreira <[email protected]> Co-authored-by: hepap <[email protected]>
Description
The DG implementation of the tracer was not very adequate for pure advection if the DG order was larger than 0 (so DG Q1 and above). This is because we did not have any sort of limiter in place. This PR adds a Moe limiter (see documentation for reference) which is an a posteriori limiter that works quite well for scalar equations. It is not very invasive and not very expensive and I have managed to get very adequate results with it.
Testing
The DG advection test has been changed to use the limiter and I have added a new test with BDF2 which really requires the limiter to get adequate results.
Documentation
Since the limiter is generic for all scalar equations, I have documented it in the stabilization section where I believe it adequately belong.
Miscellaneous (will be removed when merged)
Checklist (will be removed when merged)
See this page for more information about the pull request process.
Code related list:
Pull request related list: