56TrabBoneEmbed :: give3dMaterialStiffnessMatrix(MatResponseMode mode,
GaussPoint *gp,
TimeStep *tStep)
const
61 auto elasticity =
inv(compliance);
73 status->setTempAlpha(0.);
78TrabBoneEmbed :: computeDamageParam(
double alpha,
GaussPoint *gp)
const
105 auto elasticity =
inv(compliance);
114 auto stress =
dot(elasticity, strain);
116 double tempTSED = 0.5 *
dot(strain, stress);
118 status->setTempDam(tempDam);
119 status->letTempStrainVectorBe(strain);
120 status->letTempStressVectorBe(stress);
121 status->setTempTSED(tempTSED);
127TrabBoneEmbed :: constructIsoComplTensor(
double eps0,
double nu0)
129 double mu0 =
eps0 / ( 2 * ( 1 +
nu0 ) );
132 c.
at(1, 1) = c.
at(2, 2) = c.
at(3, 3) = 1 /
eps0;
135 c.
at(4, 4) = c.
at(5, 5) = c.
at(6, 6) = 1 / mu0;
143 StructuralMaterial :: initializeFrom(ir);
154 if ( type == IST_DamageScalar ) {
159 }
else if ( type == IST_PlasticStrainTensor ) {
160 answer = status->givePlasDef();
161 OOFEM_WARNING(
"Unsure what components are stored in the plastic strain tensor");
163 }
else if ( type == IST_MaxEquivalentStrainLevel ) {
167 }
else if ( type == IST_BoneVolumeFraction ) {
171 }
else if ( type == IST_PlasStrainEnerDens ) {
175 }
else if ( type == IST_ElasStrainEnerDens ) {
177 answer.
at(1) = status->giveTempTSED();
179 }
else if ( type == IST_TotalStrainEnerDens ) {
181 answer.
at(1) = status->giveTempTSED();
184 return StructuralMaterial :: giveIPValue(answer, gp, type, tStep);
199TrabBoneEmbedStatus :: printOutputAt(FILE *file,
TimeStep *tStep)
const
201 StructuralMaterialStatus :: printOutputAt(file, tStep);
202 fprintf(file,
"status { ");
203 fprintf( file,
"plastrains: %f %f %f %f %f %f", this->
tempPlasDef.at(1), this->tempPlasDef.at(2), this->tempPlasDef.at(3), this->tempPlasDef.at(4), this->tempPlasDef.at(5), this->tempPlasDef.at(6) );
204 fprintf(file,
" , alpha 0. , dam 0. , esed %f , psed 0. , tsed %f ", this->
tempTSED, this->
tempTSED);
205 fprintf(file,
"}\n");
210TrabBoneEmbedStatus :: initTempStatus()
212 StructuralMaterialStatus :: initTempStatus();
221TrabBoneEmbedStatus :: updateYourself(
TimeStep *tStep)
223 StructuralMaterialStatus :: updateYourself(tStep);
235 StructuralMaterialStatus :: saveContext(stream, mode);
247 StructuralMaterialStatus :: restoreContext(stream, mode);
255std::unique_ptr<MaterialStatus> TrabBoneEmbed :: CreateStatus(
GaussPoint *gp)
const
257 return std::make_unique<TrabBoneEmbedStatus>(gp);
#define REGISTER_Material(class)
double at(std::size_t i, std::size_t j) const
virtual MaterialStatus * giveStatus(GaussPoint *gp) const
virtual void initTempStatus(GaussPoint *gp) const
StructuralMaterialStatus(GaussPoint *g)
Constructor. Creates new StructuralMaterialStatus with IntegrationPoint g.
StructuralMaterial(int n, Domain *d)
FloatArrayF< 6 > tempPlasDef
void setTempPlasDef(const FloatArrayF< 6 > &epsip)
double computeDamageParam(double alpha, GaussPoint *gp) const
double computeDamage(GaussPoint *gp, TimeStep *tStep) const
static FloatMatrixF< 6, 6 > constructIsoComplTensor(double eps0, double nu0)
Constructs the anisotropic compliance tensor.
void performPlasticityReturn(GaussPoint *gp, const FloatArrayF< 6 > &totalStrain) const
virtual double computeCumPlastStrain(GaussPoint *gp, TimeStep *tStep) const
#define OOFEM_WARNING(...)
double dot(const FloatArray &x, const FloatArray &y)
FloatMatrixF< N, N > inv(const FloatMatrixF< N, N > &mat, double zeropiv=1e-24)
Computes the inverse.
FloatArrayF< N > zeros()
For more readable code.
#define _IFT_TrabBoneEmbed_nu0
#define _IFT_TrabBoneEmbed_eps0