Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add domain form J integral #122

Open
wants to merge 3 commits into
base: devel
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions doc/content/source/postprocessors/JIntegralContourForm.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# JIntegralContourForm

!syntax description /UserObjects/JIntegralContourForm

## Overview

The contour form J-integral is defined as

\begin{equation}
J = \int\limits_{\bodyboundary} \bft \cdot \bs{\Sigma} \bfn \diff{s},
\begin{equation}

where $\bft$ is the unit vector in the direction of crack growth, $\bfn$ is the surface normal, and $\bs{\Sigma}$ is the energy-momentum tensor defined as

\begin{equation}
\bs{\Sigma} = \psi^e \bfI - \bfH^T \stress,
\end{equation}

where $\psi^e$ is the elastic energy, $\bfI$ is the identity tensor, $\bfH$ is the gradients of displacements.

## Example Input File Syntax

!syntax parameters /UserObjects/JIntegralContourForm

!syntax inputs /UserObjects/JIntegralContourForm

!syntax children /UserObjects/JIntegralContourForm
27 changes: 27 additions & 0 deletions doc/content/source/postprocessors/JIntegralDomainForm.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# JIntegralDomainForm

!syntax description /UserObjects/JIntegralDomainForm

## Overview

The domain form J-integral is defined as

\begin{equation}
J = - \int\limits_{\body} \bft \cdot \bs{\Sigma} \grad q \diff{V},
\begin{equation}

where $\bft$ is the unit vector in the direction of crack growth, $q$ is the domain indicator function ($q = 1$ inside the domain where the J-integral is being evaluated, and $q = 0$ elsewhere), and $\bs{\Sigma}$ is the energy-momentum tensor defined as

\begin{equation}
\bs{\Sigma} = \psi^e \bfI - \bfH^T \stress,
\end{equation}

where $\psi^e$ is the elastic energy, $\bfI$ is the identity tensor, $\bfH$ is the gradients of displacements.

## Example Input File Syntax

!syntax parameters /UserObjects/JIntegralDomainForm

!syntax inputs /UserObjects/JIntegralDomainForm

!syntax children /UserObjects/JIntegralDomainForm
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# JIntegralDomainFormPressureWork

!syntax description /UserObjects/JIntegralDomainFormPressureWork

## Overview

The standard forms of J-integral, e.g. [`JIntegralContourForm`](JIntegralContourForm.md) and [`JIntegralDomainForm`](JIntegralDomainForm.md), assume crack surfaces (regularized or not) to be traction-free. When the crack surfaces are not traction-free, the J-integral need to be corrected.

This classes concerns with the special case where pressure is acting on phase-field regularized crack surfaces. The correction term can be written as

\begin{equation}
J_p = - \int\limits_{\body} p \bft \cdot \bfH \grad d I_{,d} q \diff{V},
\begin{equation}

where $p$ is the pressure, $\bft$ is the direction of crack propagation, $\bfH$ is the displacement gradient tnesor, $q$ is the domain indicator function, and $I$ is the phase-field indicator function.

## Example Input File Syntax

!syntax parameters /UserObjects/JIntegralDomainFormPressureWork

!syntax inputs /UserObjects/JIntegralDomainFormPressureWork

!syntax children /UserObjects/JIntegralDomainFormPressureWork
27 changes: 0 additions & 27 deletions doc/content/source/postprocessors/LargeDeformationJIntegral.md

This file was deleted.

10 changes: 1 addition & 9 deletions doc/content/source/postprocessors/PhaseFieldJIntegral.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
# PhaseFieldJIntegral

!syntax description /UserObjects/PhaseFieldJIntegral

## Example Input File Syntax

!syntax parameters /UserObjects/PhaseFieldJIntegral

!syntax inputs /UserObjects/PhaseFieldJIntegral

!syntax children /UserObjects/PhaseFieldJIntegral
This class is renamed to [`JIntegralContourForm`](JIntegralContourForm.md).
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,31 @@
#pragma once

#include "SideIntegralPostprocessor.h"
#include "RankTwoTensor.h"
#include "RankTwoTensorForward.h"
#include "BaseNameInterface.h"

class PhaseFieldJIntegral : public SideIntegralPostprocessor, public BaseNameInterface
class JIntegralContourForm : public SideIntegralPostprocessor, public BaseNameInterface
{
public:
static InputParameters validParams();

PhaseFieldJIntegral(const InputParameters & parameters);
JIntegralContourForm(const InputParameters & parameters);

protected:
virtual Real computeQpIntegral() override;

/// The stress tensor
const ADMaterialProperty<RankTwoTensor> & _stress;

/// The strain energy density
const ADMaterialProperty<Real> & _psie;

/// Number of displacement variables provided
const unsigned int _ndisp;

/// Gradient of displacements
std::vector<const VariableGradient *> _grad_disp;

/// Direction of J integral
const RealVectorValue _t;
};
38 changes: 38 additions & 0 deletions include/postprocessors/JIntegralDomainForm.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
//* This file is part of the RACCOON application
//* being developed at Dolbow lab at Duke University
//* http://dolbow.pratt.duke.edu

#pragma once

#include "ElementIntegralPostprocessor.h"
#include "RankTwoTensorForward.h"
#include "BaseNameInterface.h"

class JIntegralDomainForm : public ElementIntegralPostprocessor, public BaseNameInterface
{
public:
static InputParameters validParams();

JIntegralDomainForm(const InputParameters & parameters);

protected:
virtual Real computeQpIntegral() override;

/// The stress tensor
const ADMaterialProperty<RankTwoTensor> & _stress;

/// The strain energy density
const ADMaterialProperty<Real> & _psie;

/// The number of displacements
const unsigned int _ndisp;

/// Vector of displacement gradients
std::vector<const VariableGradient *> _grad_u;

/// Direction of J-integral
const RealVectorValue _t;

/// Gradient of the domain indicator function
const VariableGradient & _grad_q;
};
46 changes: 46 additions & 0 deletions include/postprocessors/JIntegralDomainFormPressureWork.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
//* This file is part of the RACCOON application
//* being developed at Dolbow lab at Duke University
//* http://dolbow.pratt.duke.edu

#pragma once

#include "ElementIntegralPostprocessor.h"
#include "BaseNameInterface.h"
#include "DerivativeMaterialPropertyNameInterface.h"

class JIntegralDomainFormPressureWork : public ElementIntegralPostprocessor,
public BaseNameInterface,
public DerivativeMaterialPropertyNameInterface
{
public:
static InputParameters validParams();

JIntegralDomainFormPressureWork(const InputParameters & parameters);

protected:
virtual Real computeQpIntegral() override;

/// Cumulative sum of the post-processor value from the old time step
const PostprocessorValue & _integral_value_old;

/// The gradient of phase field
const VariableGradient & _grad_d;

/// The applied pressure
const ADMaterialProperty<Real> & _p;

/// The derivative of the indicator function w.r.t. the phase field
const ADMaterialProperty<Real> & _dI_dd;

/// The number of displacements
const unsigned int _ndisp;

/// Vector of displacement gradients
std::vector<const VariableGradient *> _grad_u;

/// Direction of the J-integral
const RealVectorValue _t;

/// The domain indicator function
const VariableValue & _q;
};
32 changes: 0 additions & 32 deletions include/postprocessors/LargeDeformationJIntegral.h

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,21 @@
//* being developed at Dolbow lab at Duke University
//* http://dolbow.pratt.duke.edu

#include "PhaseFieldJIntegral.h"
#include "JIntegralContourForm.h"

registerMooseObject("raccoonApp", PhaseFieldJIntegral);
registerMooseObjectRenamed("raccoonApp",
PhaseFieldJIntegral,
"01/01/2023 00:00",
JIntegralContourForm);

registerMooseObject("raccoonApp", JIntegralContourForm);

InputParameters
PhaseFieldJIntegral::validParams()
JIntegralContourForm::validParams()
{
InputParameters params = SideIntegralPostprocessor::validParams();
params += BaseNameInterface::validParams();
params.addClassDescription("Compute the J integral for a phase-field model of fracture");
params.addClassDescription("This class computes the contour form J-integral.");
params.addRequiredParam<RealVectorValue>("J_direction", "direction of J integral");
params.addParam<MaterialPropertyName>("strain_energy_density",
"psie"
Expand All @@ -22,7 +27,7 @@ PhaseFieldJIntegral::validParams()
return params;
}

PhaseFieldJIntegral::PhaseFieldJIntegral(const InputParameters & parameters)
JIntegralContourForm::JIntegralContourForm(const InputParameters & parameters)
: SideIntegralPostprocessor(parameters),
BaseNameInterface(parameters),
_stress(getADMaterialPropertyByName<RankTwoTensor>(prependBaseName("stress"))),
Expand All @@ -37,7 +42,7 @@ PhaseFieldJIntegral::PhaseFieldJIntegral(const InputParameters & parameters)
}

Real
PhaseFieldJIntegral::computeQpIntegral()
JIntegralContourForm::computeQpIntegral()
{
RankTwoTensor H((*_grad_disp[0])[_qp], (*_grad_disp[1])[_qp], (*_grad_disp[2])[_qp]);
RankTwoTensor I2(RankTwoTensor::initIdentity);
Expand Down
49 changes: 49 additions & 0 deletions src/postprocessors/JIntegralDomainForm.C
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
//* This file is part of the RACCOON application
//* being developed at Dolbow lab at Duke University
//* http://dolbow.pratt.duke.edu

#include "JIntegralDomainForm.h"

registerMooseObject("raccoonApp", JIntegralDomainForm);

InputParameters
JIntegralDomainForm::validParams()
{
InputParameters params = ElementIntegralPostprocessor::validParams();
params += BaseNameInterface::validParams();
params.addClassDescription("This class computes the domain form J integral.");
params.addRequiredCoupledVar(
"displacements",
"The displacements appropriate for the simulation geometry and coordinate system");
params.addRequiredParam<RealVectorValue>("J_direction", "direction of J integral");
params.addParam<MaterialPropertyName>("strain_energy_density",
"psie"
"Name of the strain energy density");
params.addRequiredCoupledVar(
"domain",
"The domain indication variable q. q = 1 inside the domain, q = 0 outside the domain.");
return params;
}

JIntegralDomainForm::JIntegralDomainForm(const InputParameters & parameters)
: ElementIntegralPostprocessor(parameters),
BaseNameInterface(parameters),
_stress(getADMaterialPropertyByName<RankTwoTensor>(prependBaseName("stress"))),
_psie(getADMaterialProperty<Real>(prependBaseName("strain_energy_density"))),
_ndisp(coupledComponents("displacements")),
_grad_u(coupledGradients("displacements")),
_t(getParam<RealVectorValue>("J_direction")),
_grad_q(coupledGradient("domain"))
{
for (unsigned int i = _ndisp; i < 3; ++i)
_grad_u.push_back(&_grad_zero);
}

Real
JIntegralDomainForm::computeQpIntegral()
{
RankTwoTensor H((*_grad_u[0])[_qp], (*_grad_u[1])[_qp], (*_grad_u[2])[_qp]);
RankTwoTensor I2(RankTwoTensor::initIdentity);
ADRankTwoTensor Sigma = _psie[_qp] * I2 - H.transpose() * _stress[_qp];
return -raw_value(_t * Sigma * _grad_q[_qp]);
}
Loading