www.mooseframework.org
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
InteractionIntegralBenchmarkBC Class Reference

Implements a boundary condition that enforces a displacement field around a crack tip based on applied stress intensity factors KI, KII, and KIII. More...

#include <InteractionIntegralBenchmarkBC.h>

Inheritance diagram for InteractionIntegralBenchmarkBC:
[legend]

Public Member Functions

 InteractionIntegralBenchmarkBC (const InputParameters &parameters)
 

Static Public Member Functions

static InputParameters validParams ()
 

Protected Member Functions

virtual Real computeQpValue ()
 Evaluate the function at the current quadrature point and timestep. More...
 

Protected Attributes

const int _component
 
const CrackFrontDefinition_crack_front_definition
 
const unsigned int _crack_front_point_index
 
Real _r
 
Real _theta
 
const Real _poissons_ratio
 
const Real _youngs_modulus
 
Real _kappa
 
Real _mu
 
const Function & _ki_function
 
const Function & _kii_function
 
const Function & _kiii_function
 

Detailed Description

Implements a boundary condition that enforces a displacement field around a crack tip based on applied stress intensity factors KI, KII, and KIII.

This is used to test the interaction integral capability.

Definition at line 28 of file InteractionIntegralBenchmarkBC.h.

Constructor & Destructor Documentation

◆ InteractionIntegralBenchmarkBC()

InteractionIntegralBenchmarkBC::InteractionIntegralBenchmarkBC ( const InputParameters &  parameters)

Definition at line 42 of file InteractionIntegralBenchmarkBC.C.

43  : DirichletBCBase(parameters),
44  _component(getParam<MooseEnum>("component")),
45  _crack_front_definition(&getUserObject<CrackFrontDefinition>("crack_front_definition")),
46  _crack_front_point_index(getParam<unsigned int>("crack_front_point_index")),
47  _poissons_ratio(getParam<Real>("poissons_ratio")),
48  _youngs_modulus(getParam<Real>("youngs_modulus")),
49  _ki_function(getFunction("KI_function")),
50  _kii_function(getFunction("KII_function")),
51  _kiii_function(getFunction("KIII_function"))
52 {
53  _kappa = 3 - 4 * _poissons_ratio;
54  _mu = _youngs_modulus / (2 * (1 + _poissons_ratio));
55 }

Member Function Documentation

◆ computeQpValue()

Real InteractionIntegralBenchmarkBC::computeQpValue ( )
protectedvirtual

Evaluate the function at the current quadrature point and timestep.

Definition at line 58 of file InteractionIntegralBenchmarkBC.C.

59 {
60  const Real ki_val = _ki_function.value(_t, *_current_node);
61  const Real kii_val = _kii_function.value(_t, *_current_node);
62  const Real kiii_val = _kiii_function.value(_t, *_current_node);
63 
64  const Point p(*_current_node);
66 
67  if (_r == 0)
68  _theta = 0;
69 
70  const Real st2 = std::sin(_theta / 2.0);
71  const Real ct2 = std::cos(_theta / 2.0);
72 
73  Real disp(0.0);
74 
75  if (_component == 0)
76  disp = 1 / (2 * _mu) * std::sqrt(_r / (2 * libMesh::pi)) *
77  (ki_val * ct2 * (_kappa - 1 + 2 * st2 * st2) +
78  kii_val * st2 * (_kappa + 1 + 2 * ct2 * ct2));
79  else if (_component == 1)
80  disp = 1 / (2 * _mu) * std::sqrt(_r / (2 * libMesh::pi)) *
81  (ki_val * st2 * (_kappa + 1 - 2 * ct2 * ct2) -
82  kii_val * ct2 * (_kappa - 1 - 2 * st2 * st2));
83  else if (_component == 2)
84  disp = 1 / _mu * std::sqrt(2 * _r / libMesh::pi) * kiii_val * st2;
85 
86  return disp;
87 }

◆ validParams()

InputParameters InteractionIntegralBenchmarkBC::validParams ( )
static

Definition at line 18 of file InteractionIntegralBenchmarkBC.C.

19 {
20  MooseEnum disp_component("x=0 y=1 z=2");
21  InputParameters params = DirichletBCBase::validParams();
22  params.addClassDescription("Implements a boundary condition that enforces a displacement field "
23  "around a crack tip based on applied stress intensity factors.");
24  params.addRequiredParam<MooseEnum>(
25  "component", disp_component, "The component of the displacement to apply BC on.");
26  params.addRequiredParam<UserObjectName>("crack_front_definition",
27  "The CrackFrontDefinition user object name");
28  params.addParam<unsigned int>(
29  "crack_front_point_index", 0, "The index of the point on the crack front.");
30  params.addRequiredParam<Real>("poissons_ratio", "Poisson's ratio for the material.");
31  params.addRequiredParam<Real>("youngs_modulus", "Young's modulus of the material.");
32  params.addRequiredParam<FunctionName>("KI_function",
33  "Function describing the Mode I stress intensity factor.");
34  params.addRequiredParam<FunctionName>("KII_function",
35  "Function describing the Mode II stress intensity factor.");
36  params.addRequiredParam<FunctionName>(
37  "KIII_function", "Function describing the Mode III stress intensity factor.");
38  params.set<bool>("preset") = true;
39  return params;
40 }

Member Data Documentation

◆ _component

const int InteractionIntegralBenchmarkBC::_component
protected

Definition at line 41 of file InteractionIntegralBenchmarkBC.h.

Referenced by computeQpValue().

◆ _crack_front_definition

const CrackFrontDefinition* InteractionIntegralBenchmarkBC::_crack_front_definition
protected

Definition at line 42 of file InteractionIntegralBenchmarkBC.h.

Referenced by computeQpValue().

◆ _crack_front_point_index

const unsigned int InteractionIntegralBenchmarkBC::_crack_front_point_index
protected

Definition at line 43 of file InteractionIntegralBenchmarkBC.h.

Referenced by computeQpValue().

◆ _kappa

Real InteractionIntegralBenchmarkBC::_kappa
protected

◆ _ki_function

const Function& InteractionIntegralBenchmarkBC::_ki_function
protected

Definition at line 51 of file InteractionIntegralBenchmarkBC.h.

Referenced by computeQpValue().

◆ _kii_function

const Function& InteractionIntegralBenchmarkBC::_kii_function
protected

Definition at line 52 of file InteractionIntegralBenchmarkBC.h.

Referenced by computeQpValue().

◆ _kiii_function

const Function& InteractionIntegralBenchmarkBC::_kiii_function
protected

Definition at line 53 of file InteractionIntegralBenchmarkBC.h.

Referenced by computeQpValue().

◆ _mu

Real InteractionIntegralBenchmarkBC::_mu
protected

◆ _poissons_ratio

const Real InteractionIntegralBenchmarkBC::_poissons_ratio
protected

Definition at line 47 of file InteractionIntegralBenchmarkBC.h.

Referenced by InteractionIntegralBenchmarkBC().

◆ _r

Real InteractionIntegralBenchmarkBC::_r
protected

Definition at line 45 of file InteractionIntegralBenchmarkBC.h.

Referenced by computeQpValue().

◆ _theta

Real InteractionIntegralBenchmarkBC::_theta
protected

Definition at line 46 of file InteractionIntegralBenchmarkBC.h.

Referenced by computeQpValue().

◆ _youngs_modulus

const Real InteractionIntegralBenchmarkBC::_youngs_modulus
protected

Definition at line 48 of file InteractionIntegralBenchmarkBC.h.

Referenced by InteractionIntegralBenchmarkBC().


The documentation for this class was generated from the following files:
InteractionIntegralBenchmarkBC::_r
Real _r
Definition: InteractionIntegralBenchmarkBC.h:45
InteractionIntegralBenchmarkBC::_mu
Real _mu
Definition: InteractionIntegralBenchmarkBC.h:50
InteractionIntegralBenchmarkBC::_theta
Real _theta
Definition: InteractionIntegralBenchmarkBC.h:46
InteractionIntegralBenchmarkBC::_youngs_modulus
const Real _youngs_modulus
Definition: InteractionIntegralBenchmarkBC.h:48
InteractionIntegralBenchmarkBC::_crack_front_point_index
const unsigned int _crack_front_point_index
Definition: InteractionIntegralBenchmarkBC.h:43
CrackFrontDefinition::calculateRThetaToCrackFront
void calculateRThetaToCrackFront(const Point qp, const unsigned int point_index, Real &r, Real &theta) const
calculate r and theta in the crack front polar coordinates
Definition: CrackFrontDefinition.C:1150
validParams
InputParameters validParams()
InteractionIntegralBenchmarkBC::_ki_function
const Function & _ki_function
Definition: InteractionIntegralBenchmarkBC.h:51
InteractionIntegralBenchmarkBC::_crack_front_definition
const CrackFrontDefinition * _crack_front_definition
Definition: InteractionIntegralBenchmarkBC.h:42
InteractionIntegralBenchmarkBC::_kappa
Real _kappa
Definition: InteractionIntegralBenchmarkBC.h:49
InteractionIntegralBenchmarkBC::_component
const int _component
Definition: InteractionIntegralBenchmarkBC.h:41
InteractionIntegralBenchmarkBC::_kiii_function
const Function & _kiii_function
Definition: InteractionIntegralBenchmarkBC.h:53
InteractionIntegralBenchmarkBC::_kii_function
const Function & _kii_function
Definition: InteractionIntegralBenchmarkBC.h:52
InteractionIntegralBenchmarkBC::_poissons_ratio
const Real _poissons_ratio
Definition: InteractionIntegralBenchmarkBC.h:47