Commit b6a8a2b0 authored by Antoine Jacquey's avatar Antoine Jacquey

Put fluid density back.

LynxDensityCompressible still need some changes.
parent 89da1ea4
...@@ -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
...@@ -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
// /******************************************************************************/ /******************************************************************************/
// /* LYNX, a MOOSE-based application */ /* LYNX, a MOOSE-based application */
// /* */ /* */
// /* Copyright (C) 2017 by Antoine B. Jacquey and Mauro Cacace */ /* Copyright (C) 2017 by Antoine B. Jacquey and Mauro Cacace */
// /* GFZ Potsdam, German Research Centre for Geosciences */ /* GFZ Potsdam, German Research Centre for Geosciences */
// /* */ /* */
// /* This program is free software: you can redistribute it and/or modify */ /* 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 */ /* it under the terms of the GNU General Public License as published by */
// /* the Free Software Foundation, either version 3 of the License, or */ /* the Free Software Foundation, either version 3 of the License, or */
// /* (at your option) any later version. */ /* (at your option) any later version. */
// /* */ /* */
// /* This program is distributed in the hope that it will be useful, */ /* This program is distributed in the hope that it will be useful, */
// /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ /* but WITHOUT ANY WARRANTY; without even the implied warranty of */
// /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
// /* GNU General Public License for more details. */ /* GNU General Public License for more details. */
// /* */ /* */
// /* You should have received a copy of the GNU General Public License */ /* You should have received a copy of the GNU General Public License */
// /* along with this program. If not, see <http://www.gnu.org/licenses/> */ /* along with this program. If not, see <http://www.gnu.org/licenses/> */
// /******************************************************************************/ /******************************************************************************/
// #ifndef LYNXSTRAINRATIOAUX_H #ifndef LYNXSTRAINRATIOAUX_H
// #define LYNXSTRAINRATIOAUX_H #define LYNXSTRAINRATIOAUX_H
// #include "LynxStrainAuxBase.h" #include "AuxKernel.h"
#include "RankTwoTensor.h"
// class LynxStrainRatioAux; #include "DerivativeMaterialInterface.h"
// template <> class LynxStrainRatioAux;
// InputParameters validParams<LynxStrainRatioAux>();
template <>
// class LynxStrainRatioAux : public LynxStrainAuxBase InputParameters validParams<LynxStrainRatioAux>();
// {
// public: class LynxStrainRatioAux : public DerivativeMaterialInterface<AuxKernel>
// LynxStrainRatioAux(const InputParameters & parameters); {
public:
// protected: LynxStrainRatioAux(const InputParameters & parameters);
// virtual Real computeValue() override;
// }; protected:
virtual Real computeValue();
// #endif // LYNXSTRAINRATIOAUX_H
\ No newline at end of file const MaterialProperty<RankTwoTensor> & _elastic_strain;
};
#endif // LYNXSTRAINRATIOAUX_H
...@@ -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
...@@ -18,26 +18,35 @@ ...@@ -18,26 +18,35 @@
/* along with this program. If not, see <http://www.gnu.org/licenses/> */ /* along with this program. If not, see <http://www.gnu.org/licenses/> */
/******************************************************************************/ /******************************************************************************/
#ifndef LYNXDAMAGEAUX_H #ifndef LYNXDAMAGERATE_H
#define LYNXDAMAGEAUX_H #define LYNXDAMAGERATE_H
#include "AuxKernel.h" #include "Kernel.h"
#include "DerivativeMaterialInterface.h" #include "DerivativeMaterialInterface.h"
class LynxDamageAux; class LynxDamageRate;
template <> template <>
InputParameters validParams<LynxDamageAux>(); InputParameters validParams<LynxDamageRate>();
class LynxDamageAux : public DerivativeMaterialInterface<AuxKernel> class LynxDamageRate : public DerivativeMaterialInterface<Kernel>
{ {
public: public:
LynxDamageAux(const InputParameters & parameters); LynxDamageRate(const InputParameters & parameters);
protected: protected:
virtual Real computeValue() override; virtual Real computeQpResidual() override;
virtual Real computeQpJacobian() override;
const MaterialProperty<Real> & _damage_rate; virtual Real computeQpOffDiagJacobian(unsigned int jvar) override;
const VariableValue & _u_old;
bool _coupled_dam;
bool _coupled_disp;
unsigned int _ndisp;
std::vector<unsigned> _disp_var;
const VariableValue & _damage_rate;
const MaterialProperty<Real> & _damage_rate_mat;
const MaterialProperty<RankTwoTensor> & _ddamage_rate_dstrain;
}; };
#endif // LYNXDAMAGEAUX_H #endif // LYNXDAMAGERATE_H
\ No newline at end of file
...@@ -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
...@@ -28,26 +28,34 @@ class LynxDamageDeformation; ...@@ -28,26 +28,34 @@ class LynxDamageDeformation;
template <> template <>
InputParameters validParams<LynxDamageDeformation>(); InputParameters validParams<LynxDamageDeformation>();
class LynxDamageDeformation : public LynxDeformation class LynxDamageDeformation : public LynxDeformationBase
{ {
public: public:
LynxDamageDeformation(const InputParameters & parameters); LynxDamageDeformation(const InputParameters & parameters);
virtual ~LynxDamageDeformation() {} virtual ~LynxDamageDeformation() {}
protected: protected:
virtual void initQpStatefulProperties() override; virtual void initializeQpDeformation() override;
virtual void computeQpDeformation() 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 convexPlasticCorrection(Real & pressure, RankTwoTensor & stress_dev); virtual void damageCorrection() override;
virtual Real convexReferencePressure(const Real & p_tr, const Real & q_tr); virtual RankFourTensor damageTangentOperator(const RankFourTensor & tme) override;
virtual Real convexPlasticYield2(const Real & rho); 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(const Real & rho);
virtual Real convexPlasticYield2(const Real & pressure, const Real & eqv_stress);
virtual Real dConvexPlasticYield2_dp(const Real & pressure, const Real & eqv_stress); virtual Real dConvexPlasticYield2_dp(const Real & pressure, const Real & eqv_stress);
virtual Real dConvexPlasticYield2_dq(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 getConvexProjection(const Real & x1, const Real & x2);
virtual Real strainRatio(const RankTwoTensor & elastic_strain); virtual Real strainRatio(const RankTwoTensor & elastic_strain);
virtual RankTwoTensor rotatedElasticStrain(const RankTwoTensor & elastic_strain);
// Coupled variables // Coupled variables
bool _coupled_dam; bool _coupled_dam;
const VariableValue & _damage; const VariableValue & _damage;
...@@ -55,39 +63,30 @@ protected: ...@@ -55,39 +63,30 @@ protected:
bool _coupled_phi; bool _coupled_phi;
const VariableValue & _porosity; const VariableValue & _porosity;
// Strain parameters
// Elastic moduli parameters // Elastic moduli parameters
const std::vector<Real> _damage_modulus; const std::vector<Real> _damage_modulus;
// Creep parameters
// Plastic parameters // Plastic parameters
const std::vector<Real> _critical_pressure; 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;
// Convex yield parameters // Damage-Plasticity structure
Real _p_cr; damage_plasticity * _damage_plasticity;
Real _xi0;
Real _p_r;
Real _q_r;
Real _dp_r_dp_tr;
Real _dp_r_dq_tr;
Real _p_tr;
Real _q_tr;
Real _rho_tr;
Real _rp;
Real _rq;
Real _p_k;
// Strain properties // Damage-Plasticity utilities
MaterialProperty<RankTwoTensor> & _elastic_strain; Real _dyield_dp_tr;
const MaterialProperty<RankTwoTensor> & _elastic_strain_old; Real _dyield_dq_tr;
// Viscous properties
// Plastic properties
// Stress properties // Stress properties
MaterialProperty<RankTwoTensor> & _dstress_ddamage;
MaterialProperty<RankTwoTensor> & _ddamage_rate_dstrain;
// Damage properties
MaterialProperty<Real> & _damage_rate;
}; };
#endif // LYNXDAMAGEDEFORMATION_H #endif // LYNXDAMAGEDEFORMATION_H
...@@ -21,105 +21,28 @@ ...@@ -21,105 +21,28 @@
#ifndef LYNXDEFORMATION_H #ifndef LYNXDEFORMATION_H
#define LYNXDEFORMATION_H #define LYNXDEFORMATION_H
#include "LynxMaterialBase.h" #include "LynxDeformationBase.h"
#include "LynxRheologyStructures.h"
#include "RankTwoTensor.h"
#include "RankFourTensor.h"
class LynxDeformation; class LynxDeformation;
template <> template <>
InputParameters validParams<LynxDeformation>(); InputParameters validParams<LynxDeformation>();
class LynxDeformation : public LynxMaterialBase class LynxDeformation : public LynxDeformationBase
{ {
public: public:
LynxDeformation(const InputParameters & parameters); LynxDeformation(const InputParameters & parameters);
virtual ~LynxDeformation() {} virtual ~LynxDeformation() {}
static MooseEnum strainModel();
static MooseEnum viscousUpdate();
protected: protected:
virtual void initQpStatefulProperties() override; virtual void initQpStatefulProperties() override;
virtual void computeProperties() override; virtual void plasticCorrection(Real & pressure, RankTwoTensor & stress_dev) override;
virtual void computeQpProperties() override;
virtual void computeStrainIncrement();
virtual void calculateSmallStrain(const RankTwoTensor & grad_tensor,
const RankTwoTensor & grad_tensor_old);
virtual void calculateFiniteStrain(const RankTwoTensor & grad_tensor,
const RankTwoTensor & grad_tensor_old);
virtual void computeQpDeformation();
virtual void elasticModuli();
virtual void volumetricDeformation(Real & pressure);
virtual void deviatoricDeformation(const Real & pressure, RankTwoTensor & stress_dev);
virtual void plasticCorrection(Real & pressure, RankTwoTensor & stress_dev);
virtual void tangentOperator();
virtual void finiteTangentOperator();
virtual Real computeStokeEffectiveViscosity(const Real & pressure);
virtual RankTwoTensor computeStokeEffectiveViscosityDerivative();
virtual Real computeEffectiveViscosity(const Real & pressure, const Real & eqv_stress);
virtual Real computeCreepRate(const Real A, const Real n, const Real eqv_stress);
virtual Real viscousIncrement(const Real & pressure, const Real & eqv_stress);
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 RankTwoTensor spinRotation(const RankTwoTensor & tensor);
virtual void updateSpinTangentModulus();
virtual void computeCreepProperties(const Real & pressure);
virtual void updateCreepParameters();
virtual void computePlasticityProperties(const Real & pressure); virtual void computePlasticityProperties(const Real & pressure);
virtual void updatePlasticityParameters(); virtual void updatePlasticityParameters();
virtual Real rootBrent(iterative_viscous & viscous_model, const Real x1, const Real x2);
virtual Real rootNewtonSafe(iterative_viscous & viscous_model