Commit fa24595c authored by Antoine Jacquey's avatar Antoine Jacquey

Added AuxKernels for elastic strain invariants.

parent 7e93a5b6
/******************************************************************************/
/* 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 LYNXELASTICEQVSTRAINAUX_H
#define LYNXELASTICEQVSTRAINAUX_H
#include "LynxElasticStrainAuxBase.h"
class LynxElasticEqvStrainAux;
template <>
InputParameters validParams<LynxElasticEqvStrainAux>();
class LynxElasticEqvStrainAux : public LynxElasticStrainAuxBase
{
public:
LynxElasticEqvStrainAux(const InputParameters & parameters);
protected:
virtual Real computeValue();
};
#endif // LYNXELASTICEQVSTRAINAUX_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/> */
/******************************************************************************/
#ifndef LYNXELASTICSTRAINAUXBASE_H
#define LYNXELASTICSTRAINAUXBASE_H
#include "AuxKernel.h"
#include "RankTwoTensor.h"
#include "DerivativeMaterialInterface.h"
class LynxElasticStrainAuxBase;
template <>
InputParameters validParams<LynxElasticStrainAuxBase>();
class LynxElasticStrainAuxBase : public DerivativeMaterialInterface<AuxKernel>
{
public:
LynxElasticStrainAuxBase(const InputParameters & parameters);
const MaterialProperty<RankTwoTensor> & _elastic_strain;
};
#endif // LYNXELASTICSTRAINAUXBASE_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/> */
/******************************************************************************/
#ifndef LYNXELASTICVOLSTRAINAUX_H
#define LYNXELASTICVOLSTRAINAUX_H
#include "LynxElasticStrainAuxBase.h"
class LynxElasticVolStrainAux;
template <>
InputParameters validParams<LynxElasticVolStrainAux>();
class LynxElasticVolStrainAux : public LynxElasticStrainAuxBase
{
public:
LynxElasticVolStrainAux(const InputParameters & parameters);
protected:
virtual Real computeValue();
};
#endif // LYNXELASTICVOLSTRAINAUX_H
......@@ -21,24 +21,20 @@
#ifndef LYNXSTRAINRATIOAUX_H
#define LYNXSTRAINRATIOAUX_H
#include "AuxKernel.h"
#include "RankTwoTensor.h"
#include "DerivativeMaterialInterface.h"
#include "LynxElasticStrainAuxBase.h"
class LynxStrainRatioAux;
template <>
InputParameters validParams<LynxStrainRatioAux>();
class LynxStrainRatioAux : public DerivativeMaterialInterface<AuxKernel>
class LynxStrainRatioAux : public LynxElasticStrainAuxBase
{
public:
LynxStrainRatioAux(const InputParameters & parameters);
protected:
virtual Real computeValue();
const MaterialProperty<RankTwoTensor> & _elastic_strain;
};
#endif // LYNXSTRAINRATIOAUX_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 "LynxElasticEqvStrainAux.h"
registerMooseObject("LynxApp", LynxElasticEqvStrainAux);
template <>
InputParameters
validParams<LynxElasticEqvStrainAux>()
{
InputParameters params = validParams<LynxElasticStrainAuxBase>();
params.addClassDescription(
"Access the volumetric elastic strain.");
return params;
}
LynxElasticEqvStrainAux::LynxElasticEqvStrainAux(const InputParameters & parameters)
: LynxElasticStrainAuxBase(parameters)
{
}
Real
LynxElasticEqvStrainAux::computeValue()
{
return std::sqrt(2.0 / 3.0) * _elastic_strain[_qp].deviatoric().L2norm();
}
/******************************************************************************/
/* 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 "LynxElasticStrainAuxBase.h"
template <>
InputParameters
validParams<LynxElasticStrainAuxBase>()
{
InputParameters params = validParams<AuxKernel>();
params.addClassDescription(
"Base class to access the elastic strain tensor.");
return params;
}
LynxElasticStrainAuxBase::LynxElasticStrainAuxBase(const InputParameters & parameters)
: DerivativeMaterialInterface<AuxKernel>(parameters),
_elastic_strain(getDefaultMaterialProperty<RankTwoTensor>("elastic_strain"))
{
}
/******************************************************************************/
/* 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 "LynxElasticVolStrainAux.h"
registerMooseObject("LynxApp", LynxElasticVolStrainAux);
template <>
InputParameters
validParams<LynxElasticVolStrainAux>()
{
InputParameters params = validParams<LynxElasticStrainAuxBase>();
params.addClassDescription(
"Access the volumetric elastic strain.");
return params;
}
LynxElasticVolStrainAux::LynxElasticVolStrainAux(const InputParameters & parameters)
: LynxElasticStrainAuxBase(parameters)
{
}
Real
LynxElasticVolStrainAux::computeValue()
{
return _elastic_strain[_qp].trace();
}
......@@ -26,15 +26,14 @@ template <>
InputParameters
validParams<LynxStrainRatioAux>()
{
InputParameters params = validParams<AuxKernel>();
InputParameters params = validParams<LynxElasticStrainAuxBase>();
params.addClassDescription(
"Access the strain ratio (volumetric strain on norm of the elastic strain).");
return params;
}
LynxStrainRatioAux::LynxStrainRatioAux(const InputParameters & parameters)
: DerivativeMaterialInterface<AuxKernel>(parameters),
_elastic_strain(getDefaultMaterialProperty<RankTwoTensor>("elastic_strain"))
: LynxElasticStrainAuxBase(parameters)
{
}
......
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