www.mooseframework.org
Public Member Functions | Private Attributes | List of all members
EnrichmentFunctionCalculation Class Reference

Perform calculation of enrichment function values and derivatives. More...

#include <EnrichmentFunctionCalculation.h>

Inheritance diagram for EnrichmentFunctionCalculation:
[legend]

Public Member Functions

 EnrichmentFunctionCalculation (const CrackFrontDefinition *crack_front_definition)
 
virtual unsigned int crackTipEnrichementFunctionAtPoint (const Point &point, std::vector< Real > &B)
 calculate the enrichment function values at point More...
 
virtual unsigned int crackTipEnrichementFunctionDerivativeAtPoint (const Point &point, std::vector< RealVectorValue > &dB)
 calculate the enrichment function derivatives at point More...
 
void rotateFromCrackFrontCoordsToGlobal (const RealVectorValue &vector, RealVectorValue &rotated_vector, const unsigned int point_index)
 rotate a vector from crack front coordinate to global cooridate More...
 

Private Attributes

const CrackFrontDefinition_crack_front_definition
 
Real _r
 
Real _theta
 

Detailed Description

Perform calculation of enrichment function values and derivatives.

Definition at line 23 of file EnrichmentFunctionCalculation.h.

Constructor & Destructor Documentation

◆ EnrichmentFunctionCalculation()

EnrichmentFunctionCalculation::EnrichmentFunctionCalculation ( const CrackFrontDefinition crack_front_definition)

Definition at line 12 of file EnrichmentFunctionCalculation.C.

14 {
15  _crack_front_definition = crack_front_definition;
16 }
const CrackFrontDefinition * _crack_front_definition

Member Function Documentation

◆ crackTipEnrichementFunctionAtPoint()

unsigned int EnrichmentFunctionCalculation::crackTipEnrichementFunctionAtPoint ( const Point &  point,
std::vector< Real > &  B 
)
virtual

calculate the enrichment function values at point

Returns
the closest crack front index

Definition at line 19 of file EnrichmentFunctionCalculation.C.

Referenced by ComputeCrackTipEnrichmentSmallStrain::computeProperties(), CrackTipEnrichmentStressDivergenceTensors::computeQpJacobian(), CrackTipEnrichmentStressDivergenceTensors::computeQpOffDiagJacobian(), ComputeCrackTipEnrichmentSmallStrain::computeQpProperties(), and CrackTipEnrichmentStressDivergenceTensors::computeQpResidual().

21 {
22  unsigned int crack_front_point_index =
24 
25  if (MooseUtils::absoluteFuzzyEqual(_r, 0.0))
26  mooseError("EnrichmentFunctionCalculation: the distance between a point and the crack "
27  "tip/front is zero.");
28 
29  Real st = std::sin(_theta);
30  Real st2 = std::sin(_theta / 2.0);
31  Real ct2 = std::cos(_theta / 2.0);
32  Real sr = std::sqrt(_r);
33 
34  B[0] = sr * st2;
35  B[1] = sr * ct2;
36  B[2] = sr * st2 * st;
37  B[3] = sr * ct2 * st;
38 
39  return crack_front_point_index;
40 }
void calculateRThetaToCrackFront(const Point qp, const unsigned int point_index, Real &r, Real &theta) const
calculate r and theta in the crack front polar cooridnate
const CrackFrontDefinition * _crack_front_definition

◆ crackTipEnrichementFunctionDerivativeAtPoint()

unsigned int EnrichmentFunctionCalculation::crackTipEnrichementFunctionDerivativeAtPoint ( const Point &  point,
std::vector< RealVectorValue > &  dB 
)
virtual

calculate the enrichment function derivatives at point

Returns
the closest crack front index

Definition at line 43 of file EnrichmentFunctionCalculation.C.

Referenced by CrackTipEnrichmentStressDivergenceTensors::computeQpJacobian(), CrackTipEnrichmentStressDivergenceTensors::computeQpOffDiagJacobian(), ComputeCrackTipEnrichmentSmallStrain::computeQpProperties(), and CrackTipEnrichmentStressDivergenceTensors::computeQpResidual().

45 {
46  unsigned int crack_front_point_index =
48 
49  if (MooseUtils::absoluteFuzzyEqual(_r, 0.0))
50  mooseError("EnrichmentFunctionCalculation: the distance between a point and the crack "
51  "tip/front is zero.");
52 
53  Real st = std::sin(_theta);
54  Real ct = std::cos(_theta);
55  Real st2 = std::sin(_theta / 2.0);
56  Real ct2 = std::cos(_theta / 2.0);
57  Real st15 = std::sin(1.5 * _theta);
58  Real ct15 = std::cos(1.5 * _theta);
59  Real sr = std::sqrt(_r);
60 
61  dB[0](0) = -0.5 / sr * st2;
62  dB[0](1) = 0.5 / sr * ct2;
63  dB[0](2) = 0.0;
64  dB[1](0) = 0.5 / sr * ct2;
65  dB[1](1) = 0.5 / sr * st2;
66  dB[1](2) = 0.0;
67  dB[2](0) = -0.5 / sr * st15 * st;
68  dB[2](1) = 0.5 / sr * (st2 + st15 * ct);
69  dB[2](2) = 0.0;
70  dB[3](0) = -0.5 / sr * ct15 * st;
71  dB[3](1) = 0.5 / sr * (ct2 + ct15 * ct);
72  dB[3](2) = 0.0;
73 
74  return crack_front_point_index;
75 }
void calculateRThetaToCrackFront(const Point qp, const unsigned int point_index, Real &r, Real &theta) const
calculate r and theta in the crack front polar cooridnate
const CrackFrontDefinition * _crack_front_definition

◆ rotateFromCrackFrontCoordsToGlobal()

void EnrichmentFunctionCalculation::rotateFromCrackFrontCoordsToGlobal ( const RealVectorValue &  vector,
RealVectorValue &  rotated_vector,
const unsigned int  point_index 
)

rotate a vector from crack front coordinate to global cooridate

Parameters
rotated_vectorrotated vector

Definition at line 78 of file EnrichmentFunctionCalculation.C.

Referenced by CrackTipEnrichmentStressDivergenceTensors::computeQpJacobian(), CrackTipEnrichmentStressDivergenceTensors::computeQpOffDiagJacobian(), ComputeCrackTipEnrichmentSmallStrain::computeQpProperties(), and CrackTipEnrichmentStressDivergenceTensors::computeQpResidual().

81 {
82  rotated_vector = _crack_front_definition->rotateFromCrackFrontCoordsToGlobal(vector, point_index);
83 }
const CrackFrontDefinition * _crack_front_definition
RealVectorValue rotateFromCrackFrontCoordsToGlobal(const RealVectorValue vector, const unsigned int point_index) const
rotate a vector from crack front cartesian coordinate to global cartesian coordinate ...

Member Data Documentation

◆ _crack_front_definition

const CrackFrontDefinition* EnrichmentFunctionCalculation::_crack_front_definition
private

◆ _r

Real EnrichmentFunctionCalculation::_r
private

◆ _theta

Real EnrichmentFunctionCalculation::_theta
private

The documentation for this class was generated from the following files: