www.mooseframework.org
ComputeDamageStress.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
10 #include "ComputeDamageStress.h"
11 #include "DamageBase.h"
12 
13 registerMooseObject("TensorMechanicsApp", ComputeDamageStress);
14 
15 template <>
16 InputParameters
18 {
19  InputParameters params = validParams<ComputeFiniteStrainElasticStress>();
20  params.addClassDescription(
21  "Compute stress for damaged elastic materials in conjunction with a damage model.");
22  params.addRequiredParam<MaterialName>("damage_model", "Name of the damage model");
23  return params;
24 }
25 
26 ComputeDamageStress::ComputeDamageStress(const InputParameters & parameters)
28  _matl_timestep_limit(declareProperty<Real>("matl_timestep_limit")),
29  _damage_model(nullptr)
30 {
31 }
32 
33 void
35 {
36  MaterialName damage_model_name = getParam<MaterialName>("damage_model");
37  DamageBase * dmb = dynamic_cast<DamageBase *>(&getMaterialByName(damage_model_name));
38  if (dmb)
39  _damage_model = dmb;
40  else
41  paramError("damage_model",
42  "Damage Model " + damage_model_name + " is not compatible with ComputeDamageStress");
43 }
44 
45 void
47 {
49 
50  _damage_model->setQp(_qp);
55 
57 }
MaterialProperty< RankFourTensor > & _Jacobian_mult
derivative of stress w.r.t. strain (_dstress_dstrain)
const MaterialProperty< RankTwoTensor > & _rotation_increment
Rotation increment material property.
InputParameters validParams< ComputeDamageStress >()
virtual void updateJacobianMultForDamage(RankFourTensor &jacobian_mult)=0
Update the material constitutive matrix.
virtual Real computeTimeStepLimit()
Compute the limiting value of the time step for this material.
Definition: DamageBase.C:50
MaterialProperty< RankTwoTensor > & _stress
Stress material property.
void initialSetup() override
void setQp(unsigned int qp)
Sets the value of the member variable _qp for use in inheriting classes.
Definition: DamageBase.C:39
DamageBase * _damage_model
Pointer to the damage model.
InputParameters validParams< ComputeFiniteStrainElasticStress >()
virtual void updateStressForDamage(RankTwoTensor &stress_new)=0
Update the current stress tensor for effects of damage.
ComputeFiniteStrainElasticStress computes the stress following elasticity theory for finite strains...
registerMooseObject("TensorMechanicsApp", ComputeDamageStress)
ComputeDamageStress(const InputParameters &parameters)
virtual void computeQpStress() override
Compute the stress and store it in the _stress material property for the current quadrature point...
virtual void computeQpStress() override
Compute the stress and store it in the _stress material property for the current quadrature point...
virtual void finiteStrainRotation(const RankTwoTensor &rotation_increment)
Perform any necessary rotation of internal variables for finite strain.
Definition: DamageBase.C:56
virtual void updateDamage()
Update the internal variable(s) that evolve the damage.
Definition: DamageBase.C:45
ComputeDamageStress computes the stress for a damaged elasticity material.
DamageBase is a base class for damage models, which modify the stress tensor computed by another mode...
Definition: DamageBase.h:28
MaterialProperty< Real > & _matl_timestep_limit
Property that stores the time step limit.