-
Notifications
You must be signed in to change notification settings - Fork 89
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
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.
Do we want full tensorial plastic strain, or eps?
src/coreComponents/physicsSolvers/solidMechanics/SolidMechanicsLagrangianFEM.cpp
Outdated
Show resolved
Hide resolved
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.
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, |
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.
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, |
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.
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]; |
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.
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 |
can someone check if new baselines are ok?
is it because plastic part is separate now? |
Which case are you referring to? Plastic strain is registered as a new field (root cause for the failure) and the total strain is not touched in this PR. |
I did touch the total strain in this pr. We decided to divide the shear by 2 following discussions about engineering vs tensor strain. Hence the new baselines. |
A large number of functions in the plasticity routine were written assuming engineering strains. I would definitely double check none of the physical results have changed before rebaselining anything. Would be very easy to make a mistake here. The error posted above has a factor of 2x in it, though, so that's encouraging. |
Yes, all the computations seem to be done in engineering strain. @CusiniM and I decided to convert to tensor strain just for output. |
That sounds good. Let me rerun the tutorial plastic example with strain hardening to confirm it. |
I can reproduce this tutorial example with the PR, which confirms that correct engineering strains are utilized by the Extended Drucker-Prager Model. |
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