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

Adding Drucker-Prager plasticity model #974

Merged
merged 104 commits into from
Feb 19, 2021

Conversation

joshua-white
Copy link
Contributor

Also a chance to revisit overall design of constitutive/solid

@joshua-white joshua-white requested a review from rrsettgast May 28, 2020 22:53
@joshua-white joshua-white marked this pull request as draft May 29, 2020 00:19
@joshua-white
Copy link
Contributor Author

@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];
}
}

Copy link
Contributor

@sytuannguyen sytuannguyen Feb 18, 2021

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];

Copy link
Contributor

@sytuannguyen sytuannguyen Feb 18, 2021

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;

Copy link
Contributor

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;

Copy link
Contributor

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);

Copy link
Contributor

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];
Copy link
Contributor

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 )
{
Copy link
Contributor

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

Copy link
Contributor

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

Copy link
Contributor

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.;

Copy link
Contributor

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;

Copy link
Contributor

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 ),
Copy link
Contributor

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" );

Copy link
Contributor

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" );

Copy link
Contributor

@sytuannguyen sytuannguyen Feb 18, 2021

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 )
}
Copy link
Contributor

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 )
Copy link
Contributor

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 )->
Copy link
Contributor

@sytuannguyen sytuannguyen Feb 18, 2021

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 )
}
Copy link
Contributor

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 )
Copy link
Contributor

Choose a reason for hiding this comment

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

rm std::

@sytuannguyen
Copy link
Contributor

@joshua-white I added some more detail comments in the DruckerPrager and DruckerPragerExtended classes. Hope it helps.

@joshua-white joshua-white added the ci: run CUDA builds Allows to triggers (costly) CUDA jobs label Feb 18, 2021
@joshua-white
Copy link
Contributor Author

@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 travis_wait, but that does not work well with docker run. The other suggestion I found online was to add the following to the .travis.yml script:

- while sleep 5m; do echo "... still building ..."; done & 

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.

Here are the results for this PR:
branch

Here are the results for the latest develop build:
dev

@corbett5
Copy link
Contributor

@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 &
Copy link
Contributor

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.

Copy link
Contributor Author

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.

@joshua-white joshua-white merged commit ec566dc into develop Feb 19, 2021
@joshua-white joshua-white deleted the white/feature/druckerPrager branch February 19, 2021 02:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci: run CUDA builds Allows to triggers (costly) CUDA jobs flag: requires rebaseline Requires rebaseline branch in integratedTests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants