Skip to content
Snippets Groups Projects
Commit 709c603d authored by Jonathan Youett's avatar Jonathan Youett
Browse files

Add method that returns a stress function corresponding to the material

The stress function maps a displacement gradient to the corresponding stress
and can be used within the VonMisesStressAssembler
parent 1cb24c8b
Branches
Tags
No related merge requests found
......@@ -37,6 +37,8 @@ private:
typedef GeomExactStVenantKirchhoffFunctionalAssembler<GridType,Lfe> GeomLinearization;
typedef GeomExactStVenantKirchhoffOperatorAssembler<GridType, Lfe, Lfe> GeomHessian;
typedef typename GridType::template Codim<0>::Geometry::LocalCoordinate LocalCoordinate;
using Derivative = typename GridFunction::DerivativeType;
using StressFunction = std::function<SymmetricTensor<dim, ReturnType>(Derivative)>;
public:
GeomExactStVenantMaterial() :
......@@ -129,6 +131,22 @@ public:
{
localHessian_->setConfiguration(displace);
return *localHessian_;
static StressFunction stressFunction(ReturnType E, ReturnType nu) {
ReturnType lambda{E * nu / (1.0+nu) / (1.0-2.0*nu)};
ReturnType twoMu{E / (1+nu)};
return [=](const Derivative& dispGrad) {
SymmetricTensor<dim,ReturnType> strain;
Dune::Elasticity::strain(dispGrad, strain);
SymmetricTensor<dim, ReturnType> stress = strain;
stress *= twoMu;
stress.addToDiag(lambda * strain.trace());
return stress;
};
}
private:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment