-
Notifications
You must be signed in to change notification settings - Fork 91
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
Adding Drucker-Prager plasticity model #974
Conversation
src/coreComponents/constitutive/unitTests/testDruckerPrager.cpp
Outdated
Show resolved
Hide resolved
src/coreComponents/constitutive/unitTests/testDruckerPrager.cpp
Outdated
Show resolved
Hide resolved
…applied to it instead of a new clean instantiation
@rrsettgast I am going to get back to this later this week, and try to wrap it up with help from @juliatcamargo and @shabnamjs to add a few extra plasticity models. I'd like to add a material point driver (triaxial loading) for testing and calibration purposes. I recall you had some ideas for how we should structure this? |
+ c5 * deviator[i] * deviator[j]; | ||
} | ||
} | ||
|
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 tangent stiffness tensor has only five indenpendent parameters. Does it correspond to a transversely isotropic stiffness tensor? If YES, it will be better to consider the transversly isotropic Ops to compute element stiffness instead of considering the fully anisotropic Ops.
for( localIndex iter=0; iter<20; ++iter ) | ||
{ | ||
m_newState[k][q] = m_oldState[k][q] + solution[2]; | ||
|
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 cannot understand why we could not consider a temporal variable here inside the Newton loop inplace of the m_newState variable. Because after the Newton loop, m_newState will be set back to m_oldState for the next time step so I think it is just something temporal.
|
||
/// A reference to the ArrayView holding the dilation angle for each element. | ||
arrayView1d< real64 const > const m_dilation; | ||
|
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.
m_friction and m_dilation here are not angle
|
||
/// A reference to the ArrayView holding the new cohesion for each integration point | ||
arrayView2d< real64 > const m_newCohesion; | ||
|
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.
Why cohesion is set for each quadrature point when other parameters such as friction, dilation, hardening are for each element? What is the different in their nature?
} | ||
|
||
//printf("%ld %.2e\n",iter,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.
rm
real64 c1 = 2 * m_shearModulus[k] * solution[1] / trialQ; | ||
real64 c2 = jacobianInv[0][0] * m_bulkModulus[k] - c1 / 3; | ||
real64 c3 = sqrt( 2./3 ) * 3 * m_shearModulus[k] * jacobianInv[0][1]; | ||
real64 c4 = sqrt( 2./3 ) * m_bulkModulus[k] * jacobianInv[1][0]; |
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.
We may write the double values in a consistent way. Here we can find 2. 3 1.0 etc.
// begin newton loop | ||
|
||
for( localIndex iter=0; iter<20; ++iter ) | ||
{ |
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.
There are many constants in the code that should be moved to the input file
|
||
#ifndef GEOSX_CONSTITUTIVE_SOLID_DRUCKERPRAGER_HPP | ||
#define GEOSX_CONSTITUTIVE_SOLID_DRUCKERPRAGER_HPP | ||
|
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.
You should add a "_" at the end of this flag to make it consistent with that at the end of this file as well as the flag in other files.
ElasticIsotropicUpdates::smallStrainUpdate( k, q, strainIncrement, stress, stiffness ); | ||
|
||
// decompose into mean (P) and von mises (Q) stress invariants | ||
|
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.
von Mises
volStress += stress[i]; | ||
} | ||
volStress /= 3.; | ||
|
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 one line for this ^^ : volStress = ( stress[0] + stress[1] + stress[2] ) / 3.0
real64 ( & strain )[6] ) | ||
{ | ||
real64 const tmp = sqrt( 1.5 )*devStrain; | ||
|
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.
2.0 / 3.0 as everywhere
{ | ||
|
||
DruckerPrager::DruckerPrager( std::string const & name, Group * const parent ): | ||
ElasticIsotropic( name, parent ), |
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.
rm std::
setApplyDefaultValue( 0.0 )-> | ||
setInputFlag( InputFlags::OPTIONAL )-> | ||
setDescription( "Cohesion hardening/softening rate" ); | ||
|
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.
We may clarify that m>0 is for hardening, m<0 is for softning
setApplyDefaultValue( -1 )-> | ||
setPlotLevel( dataRepository::PlotLevel::LEVEL_3 )-> | ||
setDescription( "New cohesion state" ); | ||
|
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 tried to find this using VisIt, it's quire hard to find at level3 with so many stuffs
} | ||
|
||
REGISTER_CATALOG_ENTRY( ConstitutiveBase, DruckerPrager, std::string const &, Group * const ) | ||
} |
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.
/* namespace constitutive */
} ); | ||
} | ||
|
||
REGISTER_CATALOG_ENTRY( ConstitutiveBase, DruckerPrager, std::string const &, Group * const ) |
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.
rm std::
|
||
registerWrapper( viewKeyStruct::defaultHardeningString, &m_defaultHardening )-> | ||
setApplyDefaultValue( 1.0e6 )-> | ||
setInputFlag( InputFlags::OPTIONAL )-> |
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.
Could you verify this default value of 1e6 hardening parameter for the friction. I tested the model and I found some reasonable values in order of 1e-3 or 1e-8
} | ||
|
||
REGISTER_CATALOG_ENTRY( ConstitutiveBase, DruckerPragerExtended, std::string const &, Group * const ) | ||
} |
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.
/* namespace constitutive */
} ); | ||
} | ||
|
||
REGISTER_CATALOG_ENTRY( ConstitutiveBase, DruckerPragerExtended, std::string const &, Group * const ) |
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.
rm std::
@joshua-white I added some more detail comments in the DruckerPrager and DruckerPragerExtended classes. Hope it helps. |
@sytuannguyen I'll address your comments in my next push, as I'll have to do at least one or two more to catch up with any merges that go in before this, and for the integratedTests rebaseline. @rrsettgast, @corbett5, and @TotoGaz, I was finally able to pass the cuda-debug build. Travis times out whenever nothing is output to the log for 10 min. I tried using
which just prints a brief message every five minutes. In this case it builds with no problems. The cuda-debug build takes 9 min longer than develop (52 min vs 43 min) but all other builds are basically identical. For example, cuda-release is 1h23m on the branch vs 1h25m on develop. I've also compared on Lassen and the cuda debug build times are identical, so this is something specific to Travis. |
@joshua-white nice, seeing as that's still not the longest build that's a fine change by me. |
@@ -39,6 +39,7 @@ geosx_linux_build: &geosx_linux_build | |||
# but that would not have solved the problem for the TPLs (we would require extra action to copy them to the mount point). | |||
- CONTAINER_NAME=geosx_build | |||
# Now we can build GEOSX. | |||
- while sleep 5m; do echo "... still building ..."; done & |
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 means that any job really stuck would last to the build limit (3 hours if I'm correct).
I'd be in favour to making the timeout longer if we can.
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.
@TotoGaz Good point. I'd propose we merge this branch as a working patch, and then come back and revisit other options in a separate PR. Maybe we can get the travis_wait
option to work with more effort. @corbett5 Also suggested maybe migrating from make to ninja for the travis build script, and we could update things like this at the same time.
Also a chance to revisit overall design of
constitutive/solid