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

feat: plastic strain output #3384

Open
wants to merge 55 commits into
base: develop
Choose a base branch
from

Conversation

ryar9534
Copy link
Contributor

@ryar9534 ryar9534 commented Oct 3, 2024

Introducing a plasticStrain output field in addition to the current total strain. This is done by subtracting the elastic strain (obtained via the getElasticStrain method of the constitutive laws) from the total strain and averaging over quadrature points.

Rebaselining will be required because of the new field.

Ideally, plastic strain would only be output when a plasticity model is being used, but Im not sure how exactly we will do that...

I will run the Drucker-Prager and Modified Cam Clay wellbore problem to test

@ryar9534 ryar9534 self-assigned this Oct 3, 2024
@ryar9534 ryar9534 marked this pull request as ready for review October 3, 2024 11:46
@ryar9534 ryar9534 linked an issue Oct 3, 2024 that may be closed by this pull request
@ryar9534 ryar9534 added the ci: run CUDA builds Allows to triggers (costly) CUDA jobs label Oct 3, 2024
Copy link
Member

@rrsettgast rrsettgast left a comment

Choose a reason for hiding this comment

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

Do we want full tensorial plastic strain, or eps?

@ryar9534 ryar9534 added the flag: requires rebaseline Requires rebaseline branch in integratedTests label Dec 11, 2024
@FredericgB
Copy link

FredericgB commented Dec 12, 2024 via email

elasticStrainInc[1] = (-nu*(m_newStress[k][q][0] - m_oldStress[k][q][0]) + (m_newStress[k][q][1] - m_oldStress[k][q][1]) - nu*(m_newStress[k][q][2] - m_oldStress[k][q][2]))/E;
elasticStrainInc[2] = (-nu*(m_newStress[k][q][0] - m_oldStress[k][q][0]) - nu*(m_newStress[k][q][1] - m_oldStress[k][q][1]) + (m_newStress[k][q][2] - m_oldStress[k][q][2]))/E;

elasticStrainInc[3] = (m_newStress[k][q][3] - m_oldStress[k][q][3]) / m_shearModulus[k];
Copy link
Contributor

Choose a reason for hiding this comment

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

This is the formula for engineering shear strain, which should be twice as that of tensorial shear strain.

Copy link
Collaborator

Choose a reason for hiding this comment

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

yes, but I think that's what it should be because we are subtracting it from the totalStrain which is in engineering notation. What we may want to do is divide the shear components of the plasticStrian by 2 so that it is the actual strain. I don't know if Paraview expects it in engineering notation though.

Copy link
Member

Choose a reason for hiding this comment

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

was this question resolved? ChatGPT says paraview expects tensorial strain...but I think it came to that conclusion because it calculates tensorial strain.

elasticStrainInc[2] = (-nu*(m_newStress[k][q][0] - m_oldStress[k][q][0]) - nu*(m_newStress[k][q][1] - m_oldStress[k][q][1]) + (m_newStress[k][q][2] - m_oldStress[k][q][2]))/E;

elasticStrainInc[3] = (m_newStress[k][q][3] - m_oldStress[k][q][3]) / m_shearModulus[k];
elasticStrainInc[4] = (m_newStress[k][q][4] - m_oldStress[k][q][4]) / m_shearModulus[k];
Copy link
Contributor

Choose a reason for hiding this comment

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

see above


elasticStrainInc[3] = (m_newStress[k][q][3] - m_oldStress[k][q][3]) / m_shearModulus[k];
elasticStrainInc[4] = (m_newStress[k][q][4] - m_oldStress[k][q][4]) / m_shearModulus[k];
elasticStrainInc[5] = (m_newStress[k][q][5] - m_oldStress[k][q][5]) / m_shearModulus[k];
Copy link
Contributor

Choose a reason for hiding this comment

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

see above

Copy link
Member

@rrsettgast rrsettgast left a comment

Choose a reason for hiding this comment

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

Just thinking that the total and incremental calculations are the same except for the stress inputs. These could be put into a private function so that the calculation is only done in one place.

@@ -135,6 +135,11 @@ class ElasticIsotropicUpdates : public SolidBaseUpdates
localIndex const q,
real64 ( &elasticStrain )[6] ) const override final;

GEOS_HOST_DEVICE
virtual void getElasticStrainInc( localIndex const k,
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
virtual void getElasticStrainInc( localIndex const k,
virtual void calculateElasticStrainInc( localIndex const k,

Since this isn't really a "getter"

@@ -228,6 +233,23 @@ void ElasticIsotropicUpdates::getElasticStrain( localIndex const k,
elasticStrain[5] = m_newStress[k][q][5] / m_shearModulus[k];
}

GEOS_HOST_DEVICE
inline
void ElasticIsotropicUpdates::getElasticStrainInc( localIndex const k,
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
void ElasticIsotropicUpdates::getElasticStrainInc( localIndex const k,
void ElasticIsotropicUpdates::calculateElasticStrainInc( localIndex const k,

elasticStrainInc[1] = (-nu*(m_newStress[k][q][0] - m_oldStress[k][q][0]) + (m_newStress[k][q][1] - m_oldStress[k][q][1]) - nu*(m_newStress[k][q][2] - m_oldStress[k][q][2]))/E;
elasticStrainInc[2] = (-nu*(m_newStress[k][q][0] - m_oldStress[k][q][0]) - nu*(m_newStress[k][q][1] - m_oldStress[k][q][1]) + (m_newStress[k][q][2] - m_oldStress[k][q][2]))/E;

elasticStrainInc[3] = (m_newStress[k][q][3] - m_oldStress[k][q][3]) / m_shearModulus[k];
Copy link
Member

Choose a reason for hiding this comment

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

was this question resolved? ChatGPT says paraview expects tensorial strain...but I think it came to that conclusion because it calculates tensorial strain.

@ryar9534
Copy link
Contributor Author

was this question resolved? ChatGPT says paraview expects tensorial strain...but I think it came to that conclusion because it calculates tensorial strain.

To me, it seems like it would be weird if paraview did operations to a tensor field, as IDK how it would know to do it for strain and not everything else. Thoughts @CusiniM ? I thought we were just gonna merge it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci: run code coverage enables running of the code coverage CI jobs ci: run CUDA builds Allows to triggers (costly) CUDA jobs ci: run integrated tests Allows to run the integrated tests in GEOS CI flag: ready for review flag: requires rebaseline Requires rebaseline branch in integratedTests type: feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Elastic/Plastic strain outputs in GEOS
7 participants