Commit 676c8e21 authored by Antoine Jacquey's avatar Antoine Jacquey

Added AuxKernel for elastic strain ratio.

parent 478519da
......@@ -218,7 +218,9 @@
"LynxADHeatFluxAux.C": "cpp",
"LynxADDamageBase.C": "cpp",
"LynxADDamageModelBase.C": "cpp",
"LynxADLyakhovskyDamage.C": "cpp"
"LynxADLyakhovskyDamage.C": "cpp",
"LynxADElasticStrainRatio.C": "cpp",
"LynxADElasticStrainRatioAux.C": "cpp"
},
"C_Cpp.errorSquiggles": "Disabled",
"python.pythonPath": "/opt/moose/miniconda/bin/python"
......
/******************************************************************************/
/* This file is part of */
/* LYNX, a MOOSE-based application */
/* Lithosphere dYnamic Numerical toolboX */
/* */
/* Copyright (C) 2017 by Antoine B. Jacquey and Mauro Cacace */
/* GFZ Potsdam, German Research Centre for Geosciences */
/* */
/* Licensed under GNU General Public License 3, */
/* please see LICENSE for details */
/* or http://www.gnu.org/licenses/gpl.html */
/******************************************************************************/
#pragma once
#include "AuxKernel.h"
class LynxADElasticStrainRatioAux : public AuxKernel
{
public:
static InputParameters validParams();
LynxADElasticStrainRatioAux(const InputParameters & parameters);
protected:
virtual Real computeValue() override;
const ADMaterialProperty<RankTwoTensor> & _elastic_strain;
};
\ No newline at end of file
/******************************************************************************/
/* This file is part of */
/* LYNX, a MOOSE-based application */
/* Lithosphere dYnamic Numerical toolboX */
/* */
/* Copyright (C) 2017 by Antoine B. Jacquey and Mauro Cacace */
/* GFZ Potsdam, German Research Centre for Geosciences */
/* */
/* Licensed under GNU General Public License 3, */
/* please see LICENSE for details */
/* or http://www.gnu.org/licenses/gpl.html */
/******************************************************************************/
#include "LynxADElasticStrainRatioAux.h"
#include "metaphysicl/raw_type.h"
registerMooseObject("LynxApp", LynxADElasticStrainRatioAux);
InputParameters
LynxADElasticStrainRatioAux::validParams()
{
InputParameters params = AuxKernel::validParams();
params.addClassDescription("Calculates the elastic strain ratio.");
return params;
}
LynxADElasticStrainRatioAux::LynxADElasticStrainRatioAux(const InputParameters & parameters)
: AuxKernel(parameters), _elastic_strain(getADMaterialProperty<RankTwoTensor>("elastic_strain"))
{
}
Real
LynxADElasticStrainRatioAux::computeValue()
{
Real vol_strain = MetaPhysicL::raw_value(_elastic_strain[_qp].trace());
Real e_norm = MetaPhysicL::raw_value(_elastic_strain[_qp].L2norm());
return (e_norm != 0.0) ? vol_strain / e_norm : -std::sqrt(3.0);
}
\ No newline at end of file
......@@ -39,7 +39,6 @@ LynxADLyakhovskyDamage::validParams()
LynxADLyakhovskyDamage::LynxADLyakhovskyDamage(const InputParameters & parameters)
: LynxADDamageModelBase(parameters),
_damage_modulus(getLynxParam<Real>("damage_modulus")),
// _critical_strain_ratio(getLynxParam<Real>("critical_strain_ratio")),
_friction_angle(getLynxParam<Real>("friction_angle")),
_cohesion(isParamValid("cohesion") ? getLynxParam<Real>("cohesion")
: std::vector<Real>(_n_composition, 0.0)),
......
......@@ -40,6 +40,10 @@
family = LAGRANGE
initial_condition = 1.0e+01
[../]
[./pressure]
order = CONSTANT
family = MONOMIAL
[../]
[./mises_stress]
order = CONSTANT
family = MONOMIAL
......@@ -72,7 +76,7 @@
order = CONSTANT
family = MONOMIAL
[../]
[./pressure]
[./strain_ratio]
order = CONSTANT
family = MONOMIAL
[../]
......@@ -84,6 +88,11 @@
variable = p_lith
value = 1.0e+01
[../]
[./pressure_aux]
type = LynxADEffectivePressureAux
variable = pressure
execute_on = 'TIMESTEP_END'
[../]
[./mises_stress_aux]
type = LynxADVonMisesStressAux
variable = mises_stress
......@@ -129,9 +138,9 @@
property = damage_force
execute_on = 'TIMESTEP_END'
[../]
[./pressure_aux]
type = LynxADEffectivePressureAux
variable = pressure
[./strain_ratio_aux]
type = LynxADElasticStrainRatioAux
variable = strain_ratio
execute_on = 'TIMESTEP_END'
[../]
[]
......@@ -165,7 +174,6 @@
[../]
[]
[Materials]
[./elastic_mat]
type = LynxADDamageDeformation
......@@ -190,6 +198,11 @@
variable = damage
outputs = csv
[../]
[./P]
type = ElementAverageValue
variable = pressure
outputs = csv
[../]
[./Se]
type = ElementAverageValue
variable = mises_stress
......@@ -225,6 +238,11 @@
variable = damage_force
outputs = csv
[../]
[./Xi]
type = ElementAverageValue
variable = strain_ratio
outputs = csv
[../]
[]
[Preconditioning]
......
......@@ -40,6 +40,10 @@
family = LAGRANGE
initial_condition = 1.0e+01
[../]
[./pressure]
order = CONSTANT
family = MONOMIAL
[../]
[./mises_stress]
order = CONSTANT
family = MONOMIAL
......@@ -72,7 +76,7 @@
order = CONSTANT
family = MONOMIAL
[../]
[./pressure]
[./strain_ratio]
order = CONSTANT
family = MONOMIAL
[../]
......@@ -84,6 +88,11 @@
variable = p_lith
value = 1.0e+01
[../]
[./pressure_aux]
type = LynxADEffectivePressureAux
variable = pressure
execute_on = 'TIMESTEP_END'
[../]
[./mises_stress_aux]
type = LynxADVonMisesStressAux
variable = mises_stress
......@@ -129,9 +138,9 @@
property = damage_force
execute_on = 'TIMESTEP_END'
[../]
[./pressure_aux]
type = LynxADEffectivePressureAux
variable = pressure
[./strain_ratio_aux]
type = LynxADElasticStrainRatioAux
variable = strain_ratio
execute_on = 'TIMESTEP_END'
[../]
[]
......@@ -165,7 +174,6 @@
[../]
[]
[Materials]
[./elastic_mat]
type = LynxADDamageDeformation
......@@ -190,6 +198,11 @@
variable = damage
outputs = csv
[../]
[./P]
type = ElementAverageValue
variable = pressure
outputs = csv
[../]
[./Se]
type = ElementAverageValue
variable = mises_stress
......@@ -225,6 +238,11 @@
variable = damage_force
outputs = csv
[../]
[./Xi]
type = ElementAverageValue
variable = strain_ratio
outputs = csv
[../]
[]
[Preconditioning]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment