-
Notifications
You must be signed in to change notification settings - Fork 258
Make deviator() and second_invariant() consistent with plane strain assumption in 2D #6471
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
Open
YiminJin
wants to merge
12
commits into
geodynamics:main
Choose a base branch
from
YiminJin:plane-strain
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
79e2084
make deviator() and second_invariant() consistent with plane strain a…
YiminJin f6a9696
use plane strain consistent operators in Spiegelman et al. benchmark
YiminJin c64e01b
use full strain rate in Newton Stokes assembler
YiminJin 24a2169
adjust the format
YiminJin 69857a4
add header for aspect::Utilities::Tensors
YiminJin ff0c142
make the codes neater
YiminJin 0af008e
make the codes simpler
YiminJin 5001113
modify the changelog
YiminJin fc3c34d
fix problems in compressible Newton Stokes assembler
YiminJin 6a5ed77
Update the changelog
YiminJin 3ef7b3f
Fix inproper variable names
YiminJin ffe3dfb
Fix Newton derivatives in GMG solver for compressible models
YiminJin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| Changed: The deviator and second invariant of symmetric tensors are modified to | ||
| be consistent with the plane strain assumption in 2D. This fixes the | ||
| inconsistency between some material models and the Stokes assemblers when | ||
| computing the deviatoric strain rate. It also results in better nonlinear solver | ||
| convergence due to some fixes to the Newton solver. | ||
| <br> | ||
| (Yimin Jin, 2025/06/17) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1379,6 +1379,38 @@ namespace aspect | |
| // Declare the existence of a specialization: | ||
| template <> | ||
| const Tensor<3,3> &levi_civita<3>(); | ||
|
|
||
| /** | ||
| * Compute the deviator of a symmetric tensor. This function is equivalent to | ||
| * dealii::deviator in 3D, while in 2D it is consistent with the plane strain assumption. | ||
| * Specifically, the deviator of the stress tensor $\mathbf\tau$ in 2D is given by | ||
| * $\text{dev}(\mathbf\tau) = \mathbf\tau - \frac{1}{3}\text{trace}(\mathbf\tau)\mathbf 1$ | ||
| * under the plane strain assumption. | ||
| * | ||
| * It should be noted that the consistent deviator of a consistently deviatoric tensor is | ||
| * not itself in 2D, which implies that it is invalid to apply this function to a symmetric | ||
| * tensor more than once. | ||
| */ | ||
| template <int dim> | ||
| SymmetricTensor<2,dim> | ||
| consistent_deviator(const SymmetricTensor<2,dim> &input); | ||
|
|
||
| /** | ||
| * Compute the second invariant of a deviatoric tensor of rank 2. This function is | ||
| * equivalent to dealii::second_invariant in 3D, while in 2D it is consistent with the | ||
| * plane strain assumption. Specifically, the second invariant of the deviatoric | ||
| * stress tensor $\tau_{II}$ in 2D is given by $\tau_{II} = -\frac{1}{2}(\tau_{11}^2 + | ||
| * \tau_{22}^2 + \tau_{33}^2 + 2\tau_{12}^2) = -\frac{1}{2}[\tau_{11}^2 + \tau_{22}^2 + | ||
| * (\tau_{11} + \tau_{22})^2 + 2\tau_{12}^2]$ under the plane strain assumption. | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add one sentence that in 3D this function simply returns the usual second invariant. |
||
| * | ||
| * It should be noted that this function provides the correct result in 2D only when the | ||
| * input tensor is deviatoric in the sense of plane strain, which cannot be examined | ||
| * without extra information (the trace of a plane strain deviatoric tensor is not | ||
| * zero). Thus, extra care must be taken when using this function. | ||
| */ | ||
| template <int dim> | ||
| double | ||
| consistent_second_invariant_of_deviatoric_tensor(const SymmetricTensor<2,dim> &input); | ||
| } | ||
|
|
||
| } | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Add one sentence that in 3D this returns the usual definition of a deviatoric tensor.
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.
The comments for the two functions are revised accordingly.