Created
May 15, 2013 21:15
-
-
Save sherbondy/5587460 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// From ElementADPK2: | |
virtual void computeSecondPiolaKirchhoff(Vec3DiffMatrix3x3 &matS, const Vec3DiffMatrix3x3 &matF, const MaterialParams &matParams) const { | |
//*****************ASSIGNMENT 4 START HERE *********************** | |
//Compute Strain | |
// Vec3DiffMatrix3x3 matE = | |
//Compute Second Piola Kirchoff Stress (S) | |
// matS = | |
// matF is the deformation matrix | |
Vec3DiffMatrix3x3 matE = 0.5 * matF.transposed() * matF - Vec3DiffMatrix3x3::id(); | |
//Vec3DiffMatrix3x3 matE = 0.5 * (matF.transposed() + matF) - Vec3DiffMatrix3x3::id(); | |
matS = matParams.getLambda() * matE.trace() * Vec3DiffMatrix3x3::id() + 2 * matParams.getMu() * matE; | |
//*****************ASSIGNMENT 4 END HERE ************************** | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment