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 21 of file EnrichmentFunctionCalculation.h.

Constructor & Destructor Documentation

EnrichmentFunctionCalculation::EnrichmentFunctionCalculation ( const CrackFrontDefinition crack_front_definition)

Definition at line 10 of file EnrichmentFunctionCalculation.C.

12 {
13  _crack_front_definition = crack_front_definition;
14 }
const CrackFrontDefinition * _crack_front_definition

Member Function Documentation

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 17 of file EnrichmentFunctionCalculation.C.

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

19 {
20  unsigned int crack_front_point_index =
22 
23  if (MooseUtils::absoluteFuzzyEqual(_r, 0.0))
24  mooseError("EnrichmentFunctionCalculation: the distance between a point and the crack "
25  "tip/front is zero.");
26 
27  Real st = std::sin(_theta);
28  Real st2 = std::sin(_theta / 2.0);
29  Real ct2 = std::cos(_theta / 2.0);
30  Real sr = std::sqrt(_r);
31 
32  B[0] = sr * st2;
33  B[1] = sr * ct2;
34  B[2] = sr * st2 * st;
35  B[3] = sr * ct2 * st;
36 
37  return crack_front_point_index;
38 }
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
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 41 of file EnrichmentFunctionCalculation.C.

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

43 {
44  unsigned int crack_front_point_index =
46 
47  if (MooseUtils::absoluteFuzzyEqual(_r, 0.0))
48  mooseError("EnrichmentFunctionCalculation: the distance between a point and the crack "
49  "tip/front is zero.");
50 
51  Real st = std::sin(_theta);
52  Real ct = std::cos(_theta);
53  Real st2 = std::sin(_theta / 2.0);
54  Real ct2 = std::cos(_theta / 2.0);
55  Real st15 = std::sin(1.5 * _theta);
56  Real ct15 = std::cos(1.5 * _theta);
57  Real sr = std::sqrt(_r);
58 
59  dB[0](0) = -0.5 / sr * st2;
60  dB[0](1) = 0.5 / sr * ct2;
61  dB[0](2) = 0.0;
62  dB[1](0) = 0.5 / sr * ct2;
63  dB[1](1) = 0.5 / sr * st2;
64  dB[1](2) = 0.0;
65  dB[2](0) = -0.5 / sr * st15 * st;
66  dB[2](1) = 0.5 / sr * (st2 + st15 * ct);
67  dB[2](2) = 0.0;
68  dB[3](0) = -0.5 / sr * ct15 * st;
69  dB[3](1) = 0.5 / sr * (ct2 + ct15 * ct);
70  dB[3](2) = 0.0;
71 
72  return crack_front_point_index;
73 }
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
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 76 of file EnrichmentFunctionCalculation.C.

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

79 {
80  rotated_vector = _crack_front_definition->rotateFromCrackFrontCoordsToGlobal(vector, point_index);
81 }
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

const CrackFrontDefinition* EnrichmentFunctionCalculation::_crack_front_definition
private
Real EnrichmentFunctionCalculation::_r
private
Real EnrichmentFunctionCalculation::_theta
private

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