-
Notifications
You must be signed in to change notification settings - Fork 60
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
Added DCDD from previous gradient #1293
Conversation
source/solvers/tracer_assemblers.cc
Outdated
// We use the previous concentration for the shock capture | ||
const Tensor<1, dim> previous_tracer_gradient = | ||
scratch_data.previous_tracer_gradients[q]; | ||
|
||
const double tracer_gradient_norm = previous_tracer_gradient.norm(); |
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.
This should only be done when the simulation is transient
source/solvers/tracer_assemblers.cc
Outdated
const double vdcdd = (0.5 * h) * (velocity.norm() * velocity.norm()) * | ||
pow(tracer_gradient.norm() * h, order); | ||
pow(tracer_gradient_norm * h, order); | ||
|
||
const double tolerance = 1e-12; | ||
Tensor<1, dim> s = velocity / (velocity.norm() + tolerance); | ||
Tensor<1, dim> r = tracer_gradient / (tracer_gradient.norm() + tolerance); | ||
Tensor<1, dim> r = | ||
previous_tracer_gradient / (tracer_gradient_norm + tolerance); |
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.
Again should only be done for transient simulations
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 have anything more to say for this PR :)
A more general comment for DCDD: we have it for VOF, HT and tracer, but the implementation is a bit different in each of them. Maybe in the future we can make it uniform :)
b9084a4
to
4089083
Compare
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.
Great, that should be fine now.
Description Previously, the tracer physics used the current time tracer gradient to compute the DCDD stabilization. Using the previous time gradient instead allows to reduce the number of non-linear iterations while still converging to proper solutions. Testing All tests still pass. Documentation Not applicable. Former-commit-id: c2c8cfd
Description Previously, the tracer physics used the current time tracer gradient to compute the DCDD stabilization. Using the previous time gradient instead allows to reduce the number of non-linear iterations while still converging to proper solutions. Testing All tests still pass. Documentation Not applicable. Former-commit-id: c2c8cfd
Description
Previously, the tracer physics used the current time tracer gradient to compute the DCDD stabilization. Using the previous time gradient instead allows to reduce the number of non-linear iterations while still converging to proper solutions.
Testing
All tests still pass.
Documentation
Not applicable.
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: