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

prescribed compression [WIP] #3119

Open
wants to merge 16 commits into
base: main
Choose a base branch
from

Conversation

tjhei
Copy link
Member

@tjhei tjhei commented May 31, 2019

No description provided.

@tjhei
Copy link
Member Author

tjhei commented May 31, 2019

@bangerth can you please take a look if you can find any mistakes in this new assembly? You can ignore the changes in benchmarks/ (this is using it in the burstedde material model as an example).

Copy link
Contributor

@bangerth bangerth left a comment

Choose a reason for hiding this comment

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

Nothing stands out as wrong. The code could be simplified, but that's not the question you asked me.

if (prescribed_compression != nullptr)
{
const double pi=numbers::PI;
prescribed_compression->prescribed_compression[i]=3;
Copy link
Contributor

Choose a reason for hiding this comment

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

I know it's just a test, but you don't actually use pi :-)

@@ -495,6 +495,7 @@ namespace aspect
*/
bool include_melt_transport;
bool enable_additional_stokes_rhs;
bool enable_prescribed_compression;
Copy link
Contributor

Choose a reason for hiding this comment

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

why have a flag? can't you just test whether the material model attached the appropriate additional output?

*prescribed_compression =
(this->get_parameters().enable_prescribed_compression)
? scratch.material_model_outputs.template get_additional_output<MaterialModel::PrescribedCompressionOutputs<dim> >()
: nullptr;
Copy link
Contributor

Choose a reason for hiding this comment

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

Just don't use a parameter and instead test whether get_additional_output() returns anything that's non-null to determine whether or not to assemble anything.

Copy link
Member Author

Choose a reason for hiding this comment

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

This makes the logic below (const bool update_strain_rate = ...) complicated as I would need to create a fake material model.

data.local_rhs(i) += (
// RHS of - (div u,p) = - (R,p)
- pressure_scaling
* prescribed_compression->prescribed_compression[q]
Copy link
Contributor

Choose a reason for hiding this comment

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

had to do a double-take here :-)

@tjhei
Copy link
Member Author

tjhei commented Jun 1, 2019

@naliboff I added the logic to automatically switch between the explicit and implicit version (you can toggle this from is_compressible in the material model).

Can you let me know if this PR works for you as is or if I need to push the changes to the 2nd invariant of the strain tensor?

only assemble momentum term if we are incompressible
@tjhei
Copy link
Member Author

tjhei commented Jun 1, 2019

explicit:
image

disabled:
image

convergence:
image

@naliboff
Copy link
Contributor

naliboff commented Jun 4, 2019

@tjhei - Thanks for doing all these updates! Are the results you posted above with the normal method we use for calculating the second invariant? I'm about to run the tests locally to make sure I get the same results.

@tjhei
Copy link
Member Author

tjhei commented Jun 4, 2019

Are the results you posted above with the normal method we use for calculating the second invariant?

No, this was run with the changes to the computation of the second invariant. Do you want me to push those? I don't know if they are needed or not.

@naliboff
Copy link
Contributor

New results using the explicit formulation and the second invariant (standard deal.II definition) of the deviatoric strain rate (rather than full strain rate).

Not as clean as the results above, but we are still getting roughly the right angle at low resolutions. Still, probably warrants a full comparison between the two definitions of the strain rate invariant to start.

explicity_second_invariant_deviatoric_strain_rate

@naliboff
Copy link
Contributor

@tjhei, @cedrict - I did a few tests with different assumptions regarding the strain rate invariant and it appears we do need to use the full strain rate (e.g., the method we used at the Hackathon).

Oddly, using the deal.II second_invariant function causes all sorts of convergence problems when using the full strain rate in place of the deviatoric strain rate. Perhaps we need to take an absolute value somewhere?

The figures below show the extension results for global refinement 3 or 5 and four difference scenarios for calculating the strain rate invariant:

  1. top panel: deal.II second_invariant and deviatoric strain rate
  2. second panel: second_moment_invariant and deviatoric strain rate
  3. third panel: deal.II second invariant and full strain rate
  4. bottom panel: second_moment_invariant and full strain rate

The bottom panel is the same method we used at the Hackathon and appears to give a slightly better fit to the correct angle (60 degrees, white line) for the high resolution case. Fortunately, we are still obtaining roughly the right angle at coarse resolutions.

Thoughts on how to proceed?

My vote would be to update the PR with the different options for calculating the strain rate invariant (I'll do this) and then re-run these results with the Spiegelman 2016 brick experiment (e.g., setup that was used in the Newton paper). I can write some scripts to automatically measure the shear band angle and width from these experiments.

Global refinement 3 (16 vertical elements):
global_refinement_3

Global refinement 5 (64 vertical elements):
global_refinement_5

@tjhei
Copy link
Member Author

tjhei commented Jun 2, 2024

@naliboff can we close this or do you want to grab anything else from here?

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