Commit 12f04b84 authored by Antoine Jacquey's avatar Antoine Jacquey

Damage rheology working and tested.

parent 817cdaaf
...@@ -40,4 +40,4 @@ protected: ...@@ -40,4 +40,4 @@ protected:
std::vector<bool> _has_save_in_vars; std::vector<bool> _has_save_in_vars;
}; };
#endif // LYNXPRESSUREACTION_H #endif // LYNXPRESSUREACTION_H
\ No newline at end of file
/******************************************************************************/
/* LYNX, a MOOSE-based application */
/* */
/* Copyright (C) 2017 by Antoine B. Jacquey and Mauro Cacace */
/* GFZ Potsdam, German Research Centre for Geosciences */
/* */
/* This program is free software: you can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation, either version 3 of the License, or */
/* (at your option) any later version. */
/* */
/* This program is distributed in the hope that it will be useful, */
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
/* GNU General Public License for more details. */
/* */
/* You should have received a copy of the GNU General Public License */
/* along with this program. If not, see <http://www.gnu.org/licenses/> */
/******************************************************************************/
#ifndef LYNXDAMAGEAUX_H
#define LYNXDAMAGEAUX_H
#include "AuxKernel.h"
#include "DerivativeMaterialInterface.h"
class LynxDamageAux;
template <>
InputParameters validParams<LynxDamageAux>();
class LynxDamageAux : public DerivativeMaterialInterface<AuxKernel>
{
public:
LynxDamageAux(const InputParameters & parameters);
protected:
virtual Real computeValue() override;
const MaterialProperty<Real> & _damage_rate;
};
#endif // LYNXDAMAGEAUX_H
\ No newline at end of file
...@@ -37,4 +37,4 @@ protected: ...@@ -37,4 +37,4 @@ protected:
virtual Real computeValue() override; virtual Real computeValue() override;
}; };
#endif // LYNXEFFECTIVEPRESSUREAUX_H #endif // LYNXEFFECTIVEPRESSUREAUX_H
\ No newline at end of file
...@@ -37,4 +37,4 @@ protected: ...@@ -37,4 +37,4 @@ protected:
virtual Real computeValue() override; virtual Real computeValue() override;
}; };
#endif // LYNXEQVSTRAINAUX_H #endif // LYNXEQVSTRAINAUX_H
\ No newline at end of file
...@@ -37,4 +37,4 @@ protected: ...@@ -37,4 +37,4 @@ protected:
virtual Real computeValue() override; virtual Real computeValue() override;
}; };
#endif // LYNXEQVSTRAINRATEAUX_H #endif // LYNXEQVSTRAINRATEAUX_H
\ No newline at end of file
...@@ -44,4 +44,4 @@ protected: ...@@ -44,4 +44,4 @@ protected:
Real _cond_bulk; Real _cond_bulk;
}; };
#endif // LynxHeatFluxAux_H #endif // LynxHeatFluxAux_H
\ No newline at end of file
...@@ -49,4 +49,4 @@ protected: ...@@ -49,4 +49,4 @@ protected:
const MaterialProperty<RankTwoTensor> & _inelastic_strain_old; const MaterialProperty<RankTwoTensor> & _inelastic_strain_old;
}; };
#endif // LYNXPOROSITYAUX_H #endif // LYNXPOROSITYAUX_H
\ No newline at end of file
...@@ -41,4 +41,4 @@ private: ...@@ -41,4 +41,4 @@ private:
const unsigned int _j; const unsigned int _j;
}; };
#endif // LYNXSTRAINAUX_H #endif // LYNXSTRAINAUX_H
\ No newline at end of file
...@@ -42,4 +42,4 @@ protected: ...@@ -42,4 +42,4 @@ protected:
const MaterialProperty<RankTwoTensor> * _strain_incr; const MaterialProperty<RankTwoTensor> * _strain_incr;
}; };
#endif // LYNXSTRAINAUXBASE_H #endif // LYNXSTRAINAUXBASE_H
\ No newline at end of file
...@@ -41,4 +41,4 @@ private: ...@@ -41,4 +41,4 @@ private:
const unsigned int _j; const unsigned int _j;
}; };
#endif // LYNXSTRAINRATEAUX_H #endif // LYNXSTRAINRATEAUX_H
\ No newline at end of file
...@@ -43,4 +43,4 @@ private: ...@@ -43,4 +43,4 @@ private:
const unsigned int _j; const unsigned int _j;
}; };
#endif // LYNXSTRESSAUX_H #endif // LYNXSTRESSAUX_H
\ No newline at end of file
...@@ -39,4 +39,4 @@ protected: ...@@ -39,4 +39,4 @@ protected:
const MaterialProperty<RankTwoTensor> & _stress; const MaterialProperty<RankTwoTensor> & _stress;
}; };
#endif // LYNXSTRESSAUXBASE_H #endif // LYNXSTRESSAUXBASE_H
\ No newline at end of file
...@@ -43,4 +43,4 @@ protected: ...@@ -43,4 +43,4 @@ protected:
bool _relative; bool _relative;
}; };
#endif // LYNXVARIABLERATEAUX_H #endif // LYNXVARIABLERATEAUX_H
\ No newline at end of file
...@@ -40,4 +40,4 @@ protected: ...@@ -40,4 +40,4 @@ protected:
const VariableValue & _disp_old; const VariableValue & _disp_old;
}; };
#endif // LYNXVELOCITYAUX_H #endif // LYNXVELOCITYAUX_H
\ No newline at end of file
...@@ -40,4 +40,4 @@ protected: ...@@ -40,4 +40,4 @@ protected:
std::vector<const VariableValue *> _vel; std::vector<const VariableValue *> _vel;
}; };
#endif // LYNXVELOCITYNORMAUX_H #endif // LYNXVELOCITYNORMAUX_H
\ No newline at end of file
...@@ -37,4 +37,4 @@ protected: ...@@ -37,4 +37,4 @@ protected:
virtual Real computeValue() override; virtual Real computeValue() override;
}; };
#endif // LYNXVOLSTRAINAUX_H #endif // LYNXVOLSTRAINAUX_H
\ No newline at end of file
...@@ -37,4 +37,4 @@ protected: ...@@ -37,4 +37,4 @@ protected:
virtual Real computeValue() override; virtual Real computeValue() override;
}; };
#endif // LYNXVOLSTRAINRATEAUX_H #endif // LYNXVOLSTRAINRATEAUX_H
\ No newline at end of file
...@@ -37,4 +37,4 @@ protected: ...@@ -37,4 +37,4 @@ protected:
virtual Real computeValue() override; virtual Real computeValue() override;
}; };
#endif // LYNXVONMISESSTRESSAUX_H #endif // LYNXVONMISESSTRESSAUX_H
\ No newline at end of file
...@@ -44,4 +44,4 @@ protected: ...@@ -44,4 +44,4 @@ protected:
const MaterialProperty<Real> & _rhoC_b; const MaterialProperty<Real> & _rhoC_b;
}; };
#endif // LYNXHEATFLUXBC_H #endif // LYNXHEATFLUXBC_H
\ No newline at end of file
...@@ -42,4 +42,4 @@ protected: ...@@ -42,4 +42,4 @@ protected:
Function * const _function; Function * const _function;
}; };
#endif // LYNXPRESSUREBC_H #endif // LYNXPRESSUREBC_H
\ No newline at end of file
...@@ -42,4 +42,4 @@ protected: ...@@ -42,4 +42,4 @@ protected:
Function * const _function; Function * const _function;
}; };
#endif // LYNXVELOCITYBC_H #endif // LYNXVELOCITYBC_H
\ No newline at end of file
...@@ -48,4 +48,4 @@ protected: ...@@ -48,4 +48,4 @@ protected:
const MaterialProperty<Real> & _rho_b; const MaterialProperty<Real> & _rho_b;
}; };
#endif // LYNXWINKLERBC_H #endif // LYNXWINKLERBC_H
\ No newline at end of file
...@@ -43,4 +43,4 @@ protected: ...@@ -43,4 +43,4 @@ protected:
Real _rand_per; Real _rand_per;
}; };
#endif // LYNXFUNCTIONNOISEIC_H #endif // LYNXFUNCTIONNOISEIC_H
\ No newline at end of file
...@@ -22,13 +22,14 @@ ...@@ -22,13 +22,14 @@
#define LYNXDAMAGERATE_H #define LYNXDAMAGERATE_H
#include "Kernel.h" #include "Kernel.h"
#include "DerivativeMaterialInterface.h"
class LynxDamageRate; class LynxDamageRate;
template <> template <>
InputParameters validParams<LynxDamageRate>(); InputParameters validParams<LynxDamageRate>();
class LynxDamageRate : public Kernel class LynxDamageRate : public DerivativeMaterialInterface<Kernel>
{ {
public: public:
LynxDamageRate(const InputParameters & parameters); LynxDamageRate(const InputParameters & parameters);
...@@ -40,7 +41,12 @@ protected: ...@@ -40,7 +41,12 @@ protected:
const VariableValue & _u_old; const VariableValue & _u_old;
bool _coupled_dam; bool _coupled_dam;
bool _coupled_disp;
unsigned int _ndisp;
std::vector<unsigned> _disp_var;
const VariableValue & _damage_rate; const VariableValue & _damage_rate;
const MaterialProperty<Real> & _damage_rate_mat;
const MaterialProperty<RankTwoTensor> & _ddamage_rate_dstrain;
}; };
#endif // LYNXDAMAGERATE_H #endif // LYNXDAMAGERATE_H
...@@ -44,4 +44,4 @@ protected: ...@@ -44,4 +44,4 @@ protected:
const MaterialProperty<Real> & _rho_f; const MaterialProperty<Real> & _rho_f;
}; };
#endif // LYNXHYDRODARCY_H #endif // LYNXHYDRODARCY_H
\ No newline at end of file
...@@ -45,4 +45,4 @@ protected: ...@@ -45,4 +45,4 @@ protected:
std::vector<unsigned int> _disp_var; std::vector<unsigned int> _disp_var;
}; };
#endif // LYNXHYDROPOROMECH_H #endif // LYNXHYDROPOROMECH_H
\ No newline at end of file
...@@ -54,4 +54,4 @@ protected: ...@@ -54,4 +54,4 @@ protected:
const MaterialProperty<RankTwoTensor> & _strain_increment; const MaterialProperty<RankTwoTensor> & _strain_increment;
}; };
#endif // LYNXMASS_H #endif // LYNXMASS_H
\ No newline at end of file
...@@ -42,4 +42,4 @@ protected: ...@@ -42,4 +42,4 @@ protected:
const MaterialProperty<RealVectorValue> & _gravity; const MaterialProperty<RealVectorValue> & _gravity;
}; };
#endif // LYNXPRESSURELOAD_H #endif // LYNXPRESSURELOAD_H
\ No newline at end of file
...@@ -58,6 +58,7 @@ protected: ...@@ -58,6 +58,7 @@ protected:
const VariableValue & _pf; const VariableValue & _pf;
bool _coupled_plith; bool _coupled_plith;
bool _coupled_pdyn; bool _coupled_pdyn;
bool _coupled_dam;
const unsigned int _component; const unsigned int _component;
bool _vol_locking_correction; bool _vol_locking_correction;
const MaterialProperty<RankTwoTensor> & _stress; const MaterialProperty<RankTwoTensor> & _stress;
...@@ -68,6 +69,7 @@ protected: ...@@ -68,6 +69,7 @@ protected:
const MaterialProperty<Real> & _rho_b; const MaterialProperty<Real> & _rho_b;
const MaterialProperty<Real> & _drho_dtemp; const MaterialProperty<Real> & _drho_dtemp;
const MaterialProperty<Real> & _drho_dev; const MaterialProperty<Real> & _drho_dev;
const MaterialProperty<RankTwoTensor> & _dstress_ddamage;
// Gradient of test function averaged over the element. Used in volumetric locking correction // Gradient of test function averaged over the element. Used in volumetric locking correction
// calculation. // calculation.
std::vector<std::vector<Real>> _avg_grad_test; std::vector<std::vector<Real>> _avg_grad_test;
...@@ -79,6 +81,7 @@ protected: ...@@ -79,6 +81,7 @@ protected:
unsigned int _pf_var; unsigned int _pf_var;
unsigned int _plith_var; unsigned int _plith_var;
unsigned int _pdyn_var; unsigned int _pdyn_var;
unsigned int _damage_var;
}; };
#endif // LYNXSOLIDMOMENTUM_H #endif // LYNXSOLIDMOMENTUM_H
...@@ -35,13 +35,10 @@ public: ...@@ -35,13 +35,10 @@ public:
virtual ~LynxDamageDeformation() {} virtual ~LynxDamageDeformation() {}
protected: protected:
virtual void initQpStatefulProperties() override;
virtual void initializeQpDeformation() override; virtual void initializeQpDeformation() override;
virtual void elasticModuli() override;
virtual void plasticCorrection(Real & pressure, RankTwoTensor & stress_dev) override; virtual void plasticCorrection(Real & pressure, RankTwoTensor & stress_dev) override;
virtual void damageCorrection() override; virtual void damageCorrection() override;
virtual RankFourTensor damageTangentOperator(const RankTwoTensor & flow_direction, virtual RankFourTensor damageTangentOperator(const RankFourTensor & tme) override;
const RankFourTensor & tme) override;
virtual Real computePlasticityYield(const Real & pressure, const Real & eqv_stress); virtual Real computePlasticityYield(const Real & pressure, const Real & eqv_stress);
virtual Real plasticIncrement(const Real & /*pressure*/, const Real & eqv_stress); virtual Real plasticIncrement(const Real & /*pressure*/, const Real & eqv_stress);
virtual Real computeConvexPlasticityYield2(const Real & pressure, const Real & eqv_stress); virtual Real computeConvexPlasticityYield2(const Real & pressure, const Real & eqv_stress);
...@@ -83,15 +80,10 @@ protected: ...@@ -83,15 +80,10 @@ protected:
// Damage-Plasticity utilities // Damage-Plasticity utilities
Real _dyield_dp_tr; Real _dyield_dp_tr;
Real _dyield_dq_tr; Real _dyield_dq_tr;
RankTwoTensor _damaged_stress;
RankFourTensor _damaged_tensor;
// Strain properties
MaterialProperty<RankTwoTensor> & _elastic_strain;
const MaterialProperty<RankTwoTensor> & _elastic_strain_old;
// Stress properties // Stress properties
// MaterialProperty<RankTwoTensor> & _dstress_ddamage; MaterialProperty<RankTwoTensor> & _dstress_ddamage;
MaterialProperty<RankTwoTensor> & _ddamage_rate_dstrain;
// Damage properties // Damage properties
MaterialProperty<Real> & _damage_rate; MaterialProperty<Real> & _damage_rate;
......
/******************************************************************************/
/* LYNX, a MOOSE-based application */
/* */
/* Copyright (C) 2017 by Antoine B. Jacquey and Mauro Cacace */
/* GFZ Potsdam, German Research Centre for Geosciences */
/* */
/* This program is free software: you can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation, either version 3 of the License, or */
/* (at your option) any later version. */
/* */
/* This program is distributed in the hope that it will be useful, */
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
/* GNU General Public License for more details. */
/* */
/* You should have received a copy of the GNU General Public License */
/* along with this program. If not, see <http://www.gnu.org/licenses/> */
/******************************************************************************/
#ifndef LYNXDAMAGEDEFORMATIONNEW_H
#define LYNXDAMAGEDEFORMATIONNEW_H
#include "LynxDeformation.h"
class LynxDamageDeformationNew;
template <>
InputParameters validParams<LynxDamageDeformationNew>();
class LynxDamageDeformationNew : public LynxDeformationBase
{
public:
LynxDamageDeformationNew(const InputParameters & parameters);
virtual ~LynxDamageDeformationNew() {}
protected:
virtual void initQpStatefulProperties() override;
virtual void initializeQpDeformation() override;
// virtual void elasticModuli() override;
virtual void plasticCorrection(Real & pressure, RankTwoTensor & stress_dev) override;
virtual void damageCorrection() override;
virtual RankFourTensor damageTangentOperator(const RankTwoTensor & flow_direction,
const RankFourTensor & tme) override;
virtual Real computePlasticityYield(const Real & pressure, const Real & eqv_stress);
virtual Real plasticIncrement(const Real & /*pressure*/, const Real & eqv_stress);
virtual Real computeConvexPlasticityYield2(const Real & pressure, const Real & eqv_stress);
virtual Real computeConvexPlasticityYield2(const Real & rho);
virtual Real convexPlasticIncrement(Real & vol_plastic_incr, Real & eqv_plastic_incr);
virtual void computeDamageProperties(const Real & pressure, const Real & eqv_stress);
virtual void updateDamageParameters();
virtual void initializeDamageParameters();
virtual void updateDamageConvexParameters(const Real & pressure, const Real & eqv_stress);
virtual Real convexReferencePressure();
virtual Real dConvexPlasticYield2(const Real & rho);
virtual Real dConvexPlasticYield2_dp(const Real & pressure, const Real & eqv_stress);
virtual Real dConvexPlasticYield2_dq(const Real & pressure, const Real & eqv_stress);
virtual Real getConvexProjection(const Real & x1, const Real & x2);
virtual Real strainRatio(const RankTwoTensor & elastic_strain);
virtual RankTwoTensor rotatedElasticStrain(const RankTwoTensor & elastic_strain);
// Coupled variables
bool _coupled_dam;
const VariableValue & _damage;
const VariableValue & _damage_old;
bool _coupled_phi;
const VariableValue & _porosity;
// Elastic moduli parameters
const std::vector<Real> _damage_modulus;
// Plastic parameters
const std::vector<Real> _friction_angle;
const std::vector<Real> _cohesion;
const std::vector<Real> _porous_coeff;
const std::vector<Real> _porous_coeff_linear;
std::vector<Real> _one_on_plastic_eta;
std::vector<Real> _one_on_damage_eta;
// Damage-Plasticity structure
damage_plasticity * _damage_plasticity;
// Damage-Plasticity utilities
// Real _dyield_dp_tr;
// Real _dyield_dq_tr;
// RankTwoTensor _damaged_stress;
// RankFourTensor _damaged_tensor;
// Strain properties
MaterialProperty<RankTwoTensor> & _elastic_strain;
const MaterialProperty<RankTwoTensor> & _elastic_strain_old;
// Stress properties
// MaterialProperty<RankTwoTensor> & _dstress_ddamage;
// Damage properties
MaterialProperty<Real> & _damage_rate;
};
#endif // LYNXDAMAGEDEFORMATIONNEW_H
...@@ -51,8 +51,8 @@ protected: ...@@ -51,8 +51,8 @@ protected:
virtual void computeQpDeformation(); virtual void computeQpDeformation();
virtual void initializeQpDeformation(); virtual void initializeQpDeformation();
virtual void elasticModuli(); virtual void elasticModuli();
virtual void volumetricDeformation(Real & pressure); virtual Real volumetricDeformation();
virtual void deviatoricDeformation(const Real & pressure, RankTwoTensor & stress_dev); virtual RankTwoTensor deviatoricDeformation(const Real & pressure);
virtual void reformStressTensor(const Real & pressure, const RankTwoTensor & stress_dev); virtual void reformStressTensor(const Real & pressure, const RankTwoTensor & stress_dev);
virtual void plasticCorrection(Real & pressure, RankTwoTensor & stress_dev) = 0; virtual void plasticCorrection(Real & pressure, RankTwoTensor & stress_dev) = 0;
virtual void damageCorrection(); virtual void damageCorrection();
...@@ -60,8 +60,7 @@ protected: ...@@ -60,8 +60,7 @@ protected:
virtual RankFourTensor viscousTangentOperator(const RankFourTensor & flow_direction_dyad); virtual RankFourTensor viscousTangentOperator(const RankFourTensor & flow_direction_dyad);
virtual RankFourTensor plasticTangentOperator(const RankTwoTensor & flow_direction, virtual RankFourTensor plasticTangentOperator(const RankTwoTensor & flow_direction,
const RankFourTensor & flow_direction_dyad); const RankFourTensor & flow_direction_dyad);
virtual RankFourTensor damageTangentOperator(const RankTwoTensor & /*flow_direction*/, virtual RankFourTensor damageTangentOperator(const RankFourTensor & /*tme*/);
const RankFourTensor & /*tme*/);
virtual void finiteTangentOperator(); virtual void finiteTangentOperator();
virtual Real computeStokeEffectiveViscosity(const Real & pressure); virtual Real computeStokeEffectiveViscosity(const Real & pressure);
virtual RankTwoTensor computeStokeEffectiveViscosityDerivative(); virtual RankTwoTensor computeStokeEffectiveViscosityDerivative();
...@@ -150,6 +149,8 @@ protected: ...@@ -150,6 +149,8 @@ protected:
Real _dq_dq_tr_p; Real _dq_dq_tr_p;
// Strain properties // Strain properties
MaterialProperty<RankTwoTensor> & _elastic_strain;
const MaterialProperty<RankTwoTensor> & _elastic_strain_old;
MaterialProperty<RankTwoTensor> & _strain_increment; MaterialProperty<RankTwoTensor> & _strain_increment;
MaterialProperty<RankTwoTensor> & _spin_tensor; MaterialProperty<RankTwoTensor> & _spin_tensor;
const MaterialProperty<RankTwoTensor> & _thermal_strain_incr; const MaterialProperty<RankTwoTensor> & _thermal_strain_incr;
...@@ -164,7 +165,6 @@ protected: ...@@ -164,7 +165,6 @@ protected:
// Stress properties // Stress properties
MaterialProperty<RankTwoTensor> & _stress; MaterialProperty<RankTwoTensor> & _stress;
const MaterialProperty<RankTwoTensor> & _stress_old;
MaterialProperty<Real> & _K; MaterialProperty<Real> & _K;
MaterialProperty<Real> & _G; MaterialProperty<Real> & _G;
MaterialProperty<RankFourTensor> & _tangent_modulus; MaterialProperty<RankFourTensor> & _tangent_modulus;
......
...@@ -37,4 +37,4 @@ protected: ...@@ -37,4 +37,4 @@ protected:
virtual void computeQpProperties() override; virtual void computeQpProperties() override;
}; };
#endif // LYNXDENSITYCONSTANT_H #endif // LYNXDENSITYCONSTANT_H
\ No newline at end of file
...@@ -64,4 +64,4 @@ protected: ...@@ -64,4 +64,4 @@ protected:
std::vector<Real> _eta_f; std::vector<Real> _eta_f;
}; };
#endif // LYNXHYDROBASE_H #endif // LYNXHYDROBASE_H
\ No newline at end of file
...@@ -45,4 +45,4 @@ protected: ...@@ -45,4 +45,4 @@ protected:
std::vector<Real> _solid_compr; std::vector<Real> _solid_compr;
}; };
#endif // LYNXHYDROCONSTANT #endif // LYNXHYDROCONSTANT
\ No newline at end of file
...@@ -50,4 +50,4 @@ protected: ...@@ -50,4 +50,4 @@ protected:
std::vector<const VariableValue *> _compositional_phases; std::vector<const VariableValue *> _compositional_phases;
}; };
#endif // LYNXSTRAINBASE_H #endif // LYNXSTRAINBASE_H
\ No newline at end of file
...@@ -69,4 +69,4 @@ protected: ...@@ -69,4 +69,4 @@ protected:
std::vector<Real> _beta_s; std::vector<Real> _beta_s;
}; };