Commit 450402de authored by Antoine Jacquey's avatar Antoine Jacquey

Base of damage rheology

parent 61c45225
/******************************************************************************/
/* 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
/******************************************************************************/
/* 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 LYNXDAMAGEDEFORMATION_H
#define LYNXDAMAGEDEFORMATION_H
#include "LynxDeformation.h"
class LynxDamageDeformation;
template <>
InputParameters validParams<LynxDamageDeformation>();
class LynxDamageDeformation : public LynxDeformation
{
public:
LynxDamageDeformation(const InputParameters & parameters);
virtual ~LynxDamageDeformation() {}
protected:
virtual void plasticCorrection(Real & pressure, RankTwoTensor & stress_dev);
virtual void convexPlasticCorrection(Real & pressure, RankTwoTensor & stress_dev);
virtual Real convexReferencePressure(const Real & p_tr, const Real & q_tr);
virtual Real convexPlasticYield2(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_dq(const Real & pressure, const Real & eqv_stress);
virtual Real getConvexProjection(const Real & x1, const Real & x2);
// Coupled variables
bool _coupled_dam;
const VariableValue & _damage;
const VariableValue & _damage_old;
bool _coupled_phi;
const VariableValue & _porosity;
// Strain parameters
// Elastic moduli parameters
const std::vector<Real> _damage_modulus;
// Creep parameters
// Plastic parameters
const std::vector<Real> _critical_pressure;
// Convex yield parameters
Real _p_cr;
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
// Viscous properties
// Plastic properties
// Stress properties
};
#endif // LYNXDAMAGEDEFORMATION_H
/******************************************************************************/
/* 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/> */
/******************************************************************************/
#include "LynxDamageAux.h"
registerMooseObject("LynxApp", LynxDamageAux);
template <>
InputParameters
validParams<LynxDamageAux>()
{
InputParameters params = validParams<AuxKernel>();
params.addClassDescription("Updating the damage auxiliary variable.");
return params;
}
LynxDamageAux::LynxDamageAux(const InputParameters & parameters)
: DerivativeMaterialInterface<AuxKernel>(parameters),
_damage_rate(getDefaultMaterialProperty<Real>("damage_rate"))
{
}
Real
LynxDamageAux::computeValue()
{
Real damage_rate = _damage_rate[_qp];
if (damage_rate > (1.0 - _u_old[_qp]) / _dt)
damage_rate = (1.0 - _u_old[_qp]) / _dt;
return _u_old[_qp] + damage_rate * _dt;
}
\ No newline at end of file
This diff is collapsed.
[Mesh]
type = GeneratedMesh
dim = 3
nx = 2
ny = 2
nz = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
zmin = 0
zmax = 1
[]
[Variables]
[./disp_x]
order = FIRST
family = LAGRANGE
[../]
[./disp_y]
order = FIRST
family = LAGRANGE
[../]
[./disp_z]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./mech_x]
type = LynxSolidMomentum
variable = disp_x
displacements = 'disp_x disp_y disp_z'
component = 0
[../]
[./mech_y]
type = LynxSolidMomentum
variable = disp_y
displacements = 'disp_x disp_y disp_z'
component = 1
[../]
[./mech_z]
type = LynxSolidMomentum
variable = disp_z
displacements = 'disp_x disp_y disp_z'
component = 2
[../]
[]
[AuxVariables]
[./pressure]
order = CONSTANT
family = MONOMIAL
[../]
[./vol_strain]
order = CONSTANT
family = MONOMIAL
[../]
[./vol_plastic_strain]
order = CONSTANT
family = MONOMIAL
[../]
[./yield]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./pressure_aux]
type = LynxEffectivePressureAux
variable = pressure
execute_on = 'timestep_end'
[../]
[./vol_strain_aux]
type = LynxVolStrainAux
variable = vol_strain
execute_on = 'timestep_end'
[../]
[./vol_plastic_strain_aux]
type = LynxVolStrainAux
variable = vol_plastic_strain
strain_type = plastic
execute_on = 'timestep_end'
[../]
[./yield_aux]
type = MaterialRealAux
variable = yield
property = plastic_yield_function
execute_on = 'timestep_end'
[../]
[]
[BCs]
[./no_x_left]
type = PresetBC
variable = disp_x
boundary = left
value = 0.0
[../]
[./no_y_bottom]
type = PresetBC
variable = disp_y
boundary = 'bottom'
value = 0.0
[../]
[./no_z_back]
type = PresetBC
variable = disp_z
boundary = 'back'
value = 0.0
[../]
[./vx_comp]
type = LynxVelocityBC
variable = disp_x
boundary = 'right'
value = -1.6e-04
[../]
[./vy_comp]
type = LynxVelocityBC
variable = disp_y
boundary = 'top'
value = -1.6e-04
[../]
[./vz_comp]
type = LynxVelocityBC
variable = disp_z
boundary = 'front'
value = -1.6e-04
[../]
[]
[Materials]
[./deformation]
type = LynxDamageDeformation
displacements = 'disp_x disp_y disp_z'
bulk_modulus = 2.0e+09
shear_modulus = 2.0e+09
friction_angle = 30
critical_pressure = 8.0e+07
[../]
[]
[Postprocessors]
[./P]
type = ElementAverageValue
variable = pressure
outputs = csv
[../]
[./Ev]
type = ElementAverageValue
variable = vol_strain
outputs = csv
[../]
[./Ev_p]
type = ElementAverageValue
variable = vol_plastic_strain
outputs = csv
[../]
[]
[Preconditioning]
[./precond]
type = SMP
full = true
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it -ksp_max_it -sub_pc_type -sub_pc_factor_shift_type'
petsc_options_value = 'gmres asm 1E-05 1E-10 200 500 lu NONZERO'
[../]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
start_time = 0.0
end_time = 250
dt = 2.5
[]
[Outputs]
execute_on = 'timestep_end'
print_linear_residuals = true
perf_graph = true
exodus = true
csv = true
[]
[Mesh]
type = GeneratedMesh
dim = 3
nx = 2
ny = 2
nz = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
zmin = 0
zmax = 1
[]
[Variables]
[./disp_x]
order = FIRST
family = LAGRANGE
[../]
[./disp_y]
order = FIRST
family = LAGRANGE
[../]
[./disp_z]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./mech_x]
type = LynxSolidMomentum
variable = disp_x
displacements = 'disp_x disp_y disp_z'
component = 0
[../]
[./mech_y]
type = LynxSolidMomentum
variable = disp_y
displacements = 'disp_x disp_y disp_z'
component = 1
[../]
[./mech_z]
type = LynxSolidMomentum
variable = disp_z
displacements = 'disp_x disp_y disp_z'
component = 2
[../]
[]
[AuxVariables]
[./pressure]
order = CONSTANT
family = MONOMIAL
[../]
[./vol_strain]
order = CONSTANT
family = MONOMIAL
[../]
[./vol_plastic_strain]
order = CONSTANT
family = MONOMIAL
[../]
[./yield]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./pressure_aux]
type = LynxEffectivePressureAux
variable = pressure
execute_on = 'timestep_end'
[../]
[./vol_strain_aux]
type = LynxVolStrainAux
variable = vol_strain
execute_on = 'timestep_end'
[../]
[./vol_plastic_strain_aux]
type = LynxVolStrainAux
variable = vol_plastic_strain
strain_type = plastic
execute_on = 'timestep_end'
[../]
[./yield_aux]
type = MaterialRealAux
variable = yield
property = plastic_yield_function
execute_on = 'timestep_end'
[../]
[]
[BCs]
[./no_x_left]
type = PresetBC
variable = disp_x
boundary = left
value = 0.0
[../]
[./no_y_bottom]
type = PresetBC
variable = disp_y
boundary = 'bottom'
value = 0.0
[../]
[./no_z_back]
type = PresetBC
variable = disp_z
boundary = 'back'
value = 0.0
[../]
[./vx_comp]
type = LynxVelocityBC
variable = disp_x
boundary = 'right'
value = -1.6e-04
[../]
[./vy_comp]
type = LynxVelocityBC
variable = disp_y
boundary = 'top'
value = -1.6e-04
[../]
[./vz_comp]
type = LynxVelocityBC
variable = disp_z
boundary = 'front'
value = -1.6e-04
[../]
[]
[Materials]
[./deformation]
type = LynxDamageDeformation
displacements = 'disp_x disp_y disp_z'
bulk_modulus = 2.0e+09
shear_modulus = 2.0e+09
friction_angle = 30
critical_pressure = 8.0e+07
plastic_viscosity = 5.0e+10
[../]
[]
[Postprocessors]
[./P]
type = ElementAverageValue
variable = pressure
outputs = csv
[../]
[./Ev]
type = ElementAverageValue
variable = vol_strain
outputs = csv
[../]
[./Ev_p]
type = ElementAverageValue
variable = vol_plastic_strain
outputs = csv
[../]
[]
[Preconditioning]
[./precond]
type = SMP
full = true
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it -ksp_max_it -sub_pc_type -sub_pc_factor_shift_type'
petsc_options_value = 'gmres asm 1E-05 1E-10 200 500 lu NONZERO'
[../]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
start_time = 0.0
end_time = 250
dt = 2.5
[]
[Outputs]
execute_on = 'timestep_end'
print_linear_residuals = true
perf_graph = true
exodus = true
csv = true
[]
[Mesh]
type = GeneratedMesh
dim = 3
nx = 4
ny = 4
nz = 4
xmin = 0
xmax = 1
ymin = 0
ymax = 1
zmin = 0
zmax = 1
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Variables]
[./disp_x]
order = FIRST
family = LAGRANGE
[../]
[./disp_y]
order = FIRST
family = LAGRANGE
[../]
[./disp_z]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./mech_x]
type = LynxSolidMomentum
variable = disp_x
component = 0
[../]
[./mech_y]
type = LynxSolidMomentum
variable = disp_y
component = 1
[../]
[./mech_z]
type = LynxSolidMomentum
variable = disp_z
component = 2
[../]
[]
[AuxVariables]
[./strain_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./plastic_strain_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./yield]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./strain_xx_aux]
type = LynxStrainAux
variable = strain_xx
index_i = 0
index_j = 0
[../]
[./plastic_strain_xx_aux]
type = LynxStrainAux
variable = plastic_strain_xx
strain_type = plastic
index_i = 0
index_j = 0
[../]
[./stress_xx_aux]
type = LynxStressAux
variable = stress_xx
index_i = 0
index_j = 0
[../]
[./yield_aux]
type = MaterialRealAux
variable = yield
property = plastic_yield_function
[../]
[]
[BCs]
[./no_x_left]
type = PresetBC
variable = disp_x
boundary = left
value = 0.0
[../]
[./load_x_right]
type = LynxVelocityBC
variable = disp_x
boundary = right
value = -1.0e-05
[../]
[./no_y]
type = PresetBC
variable = disp_y
boundary = 'bottom top'
value = 0.0
[../]
[./no_z_back]
type = PresetBC