77std::unique_ptr<MaterialStatus>
95 GaussPoint *rChGP = status->giveSlaveGaussPointVisco();
122 double sigmaResidMinus = -sigmaResidPlus;
128 bool plusFlag =
false;
129 bool minusFlag =
false;
131 int iterBisection = 10;
134 if ( itercount > 100 ) {
137 printf(
"Algorithm not converging, giving up\n");
138 printf(
"Unable to reach equilibrium between viscoelastic and CDPM materials, Element %d\n", gp->
giveElement()->
giveNumber() );
139 printf(
"tolerance = %e > %e!, stress error = %e, itercount = %d\n",
tolerance, tol, sigmaResid, itercount);
142 printf(
"inelastPlus = ");
143 for (
auto &val : inelastPlus ) {
144 printf(
" %.10e", val);
146 printf(
" sigmaResidPlus = %e \n", sigmaResidPlus);
150 printf(
"inelastMinus = ");
151 for (
auto &val : inelastMinus ) {
152 printf(
" %.10e", val);
154 printf(
" sigmaResidMinus = %e \n", sigmaResidMinus);
160 reducedStrainForViscoMat = totalStrain;
166 if ( itercount < iterBisection || ( !plusFlag || !minusFlag ) ) {
167 inelasticTrialStrain = status->giveTempPlasticLatticeStrain() +
FloatArrayF< 6 >( status->giveTempDamageLatticeStrain() );
170 reducedStrainForViscoMat -= inelasticTrialStrain;
175 for (
int i = 1; i <= 6; i++ ) {
176 quasiReducedStrain.
at(i) = viscoStress.
at(i) / elasticStiffnessMatrix.at(i, i) + inelasticTrialStrain.
at(i);
181 double tempDamage = status->giveTempDamage();
182 plastDamStress *= ( 1. - tempDamage );
184 inelasticTrialStrain = status->giveTempPlasticLatticeStrain();
185 inelasticTrialStrain +=
FloatArrayF< 6 >(status->giveTempDamageLatticeStrain() );
190 sigmaResid = viscoStress [ 0 ] - plastDamStress [ 0 ];
192 if ( sigmaResid > 0. ) {
193 if ( sigmaResid < sigmaResidPlus ) {
195 sigmaResidPlus = sigmaResid;
196 inelastPlus = inelasticTrialStrain;
199 if ( sigmaResid > sigmaResidMinus ) {
201 sigmaResidMinus = sigmaResid;
202 inelastMinus = inelasticTrialStrain;
206 if ( itercount >= iterBisection && plusFlag && minusFlag ) {
207 inelasticTrialStrain = ( sigmaResidPlus * inelastMinus - sigmaResidMinus * inelastPlus ) / ( sigmaResidPlus - sigmaResidMinus );
213 status->letTempLatticeStrainBe(totalStrain);
214 status->letTempLatticeStressBe(viscoStress);
215 status->letTempReducedLatticeStrainBe(quasiReducedStrain);
247 }
else if ( fcm <= 20. ) {
286 if ( rmode == ElasticStiffness ) {
288 }
else if ( ( rmode == SecantStiffness ) || ( rmode == TangentStiffness ) ) {
290 return answer * ( 1. - omega );
302 if ( ( type == IST_DryingShrinkageTensor ) ||
303 ( type == IST_AutogenousShrinkageTensor ) ||
304 ( type == IST_TotalShrinkageTensor ) ||
305 ( type == IST_CreepStrainTensor ) ||
306 ( type == IST_DryingShrinkageTensor ) ||
307 ( type == IST_ThermalStrainTensor ) ) {
323 OOFEM_ERROR(
"a1 must be set to the same value in both master and viscoelastic slave materials");
327 OOFEM_ERROR(
"a2 must be set to the same value in both master and viscoelastic slave materials");
332 OOFEM_ERROR(
"tAlpha must be set to 0. in slave viscoelastic material");
371 fprintf(file,
"\nViscoelastic material:");
#define REGISTER_Material(class)
Domain * domain
Link to domain object, useful for communicating with other FEM components.
virtual int checkConsistency()
double & at(std::size_t i)
Index giveSize() const
Returns the size of receiver.
IntegrationPointStatus * giveMaterialStatus(IntegrationPointStatusIDType key=IPSID_Default)
Element * giveElement()
Returns corresponding element to receiver.
virtual void printOutputAt(FILE *file, TimeStep *tStep) const
Print receiver's output to given stream.
virtual void restoreContext(DataStream &stream, ContextMode mode)
GaussPoint * gp
Associated integration point.
virtual void saveContext(DataStream &stream, ContextMode mode)
virtual void updateYourself(TimeStep *)
double eNormalMean
Normal modulus.
MaterialStatus * giveStatus(GaussPoint *gp) const override
FloatMatrixF< 6, 6 > give3dLatticeStiffnessMatrix(MatResponseMode rMode, GaussPoint *gp, TimeStep *tStep) const override
void updateYourself(TimeStep *) override
LatticePlasticityDamageStatus(int n, Domain *d, GaussPoint *g)
Constructor.
void initTempStatus() override
double giveTempDamage() const
void printOutputAt(FILE *file, TimeStep *tStep) const override
Print receiver's output to given stream.
void restoreContext(DataStream &stream, ContextMode mode) override
void saveContext(DataStream &stream, ContextMode mode) override
void restoreContext(DataStream &stream, ContextMode mode) override
LatticePlasticityDamageViscoelasticStatus(int n, Domain *d, GaussPoint *g)
Constructor.
void updateYourself(TimeStep *) override
void printOutputAt(FILE *file, TimeStep *tStep) const override
Prints the receiver state to given stream.
GaussPoint * giveSlaveGaussPointVisco() const
void saveContext(DataStream &stream, ContextMode mode) override
void initTempStatus() override
std::unique_ptr< GaussPoint > slaveGpVisco
FloatMatrixF< 6, 6 > give3dLatticeStiffnessMatrix(MatResponseMode rMode, GaussPoint *gp, TimeStep *tStep) const override
int checkConsistency(void) override
LatticePlasticityDamageViscoelastic(int n, Domain *d)
Constructor.
FloatArrayF< 6 > giveLatticeStress3d(const FloatArrayF< 6 > &totalStrain, GaussPoint *gp, TimeStep *tStep) override
void initializeFrom(InputRecord &ir) override
std::unique_ptr< MaterialStatus > CreateStatus(GaussPoint *gp) const override
int viscoMat
'slave' (= viscoelastic) material model number.
int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *atTime) override
virtual double giveEquivalentTime(GaussPoint *gp, TimeStep *tStep) const
returns equivalent time (used to compute time-dependent ft and gf)
double giveCompressiveStrength(GaussPoint *gp, TimeStep *tStep) const override
double giveTensileStrength(GaussPoint *gp, TimeStep *tStep) const override
int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *atTime) override
virtual double giveTensileStrength(GaussPoint *gp, TimeStep *tStep) const
virtual double giveCompressiveStrength(GaussPoint *gp, TimeStep *tStep) const
FloatArrayF< 6 > performPlasticityReturn(GaussPoint *gp, const FloatArrayF< 6 > &reducedStrain, TimeStep *tStep) const
LatticePlasticityDamage(int n, Domain *d)
Constructor.
void initializeFrom(InputRecord &ir) override
void performDamageEvaluation(GaussPoint *gp, FloatArrayF< 6 > &reducedStrain, TimeStep *tStep) const
virtual void initTempStatus()
virtual MaterialStatus * giveStatus(GaussPoint *gp) const
virtual double give(int aProperty, GaussPoint *gp) const
void initTempStatus() override
virtual double giveEModulus(GaussPoint *gp, TimeStep *tStep) const =0
Evaluation of the incremental modulus.
virtual double giveEquivalentTime(GaussPoint *gp, TimeStep *tStep) const
By default returns equivalent time in the middle of the time step.
double giveAlphaTwo() const
void giveRealStressVector(FloatArray &answer, GaussPoint *gp, const FloatArray &reducedStrain, TimeStep *tStep) const override
virtual double computeCreepFunction(double t, double t_prime, GaussPoint *gp, TimeStep *tStep) const =0
Evaluation of the creep compliance function at time t when loading is acting from time t_prime.
double giveAlphaOne() const
int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep) override
virtual FloatArray computeStressIndependentStrainVector(GaussPoint *gp, TimeStep *tStep, ValueModeType mode) const
#define OOFEM_WARNING(...)
#define _IFT_LatticePlasticityDamageViscoelastic_stiffnessFactor
#define _IFT_LatticePlasticityDamageViscoelastic_fib_s
#define _IFT_LatticePlasticityDamageViscoelastic_timedepfracturing
#define _IFT_LatticePlasticityDamageViscoelastic_fcm28
#define _IFT_LatticePlasticityDamageViscoelastic_timeFactor
#define _IFT_LatticePlasticityDamageViscoelastic_viscoMat
double norm(const FloatArray &x)
FloatArrayF< N > min(const FloatArrayF< N > &a, const FloatArrayF< N > &b)