Line data Source code
1 : //* This file is part of the MOOSE framework 2 : //* https://www.mooseframework.org 3 : //* 4 : //* All rights reserved, see COPYRIGHT for full restrictions 5 : //* https://github.com/idaholab/moose/blob/master/COPYRIGHT 6 : //* 7 : //* Licensed under LGPL 2.1, please see LICENSE for details 8 : //* https://www.gnu.org/licenses/lgpl-2.1.html 9 : 10 : #pragma once 11 : #include "ComputeIncrementalStrainBase.h" 12 : #include "Material.h" 13 : #include "RankTwoTensor.h" 14 : #include "RankFourTensor.h" 15 : #include "RotationTensor.h" 16 : #include "Assembly.h" 17 : #include "CrackFrontDefinition.h" 18 : #include "EnrichmentFunctionCalculation.h" 19 : 20 : /** 21 : * ComputeIncrementalStrain defines a strain increment and rotation increment (=1), for small 22 : * strains. 23 : */ 24 : class ComputeCrackTipEnrichmentIncrementalStrain : public ComputeIncrementalStrainBase, 25 : public EnrichmentFunctionCalculation 26 : { 27 : public: 28 : static InputParameters validParams(); 29 : 30 : ComputeCrackTipEnrichmentIncrementalStrain(const InputParameters & parameters); 31 48 : virtual ~ComputeCrackTipEnrichmentIncrementalStrain() {} 32 : virtual void computeProperties() override; 33 : 34 : protected: 35 : /// enrichment displacement 36 : std::vector<Real> _enrich_disp; 37 : 38 : /// gradient of enrichment displacement 39 : std::vector<RealVectorValue> _grad_enrich_disp; 40 : std::vector<RealVectorValue> _grad_enrich_disp_old; 41 : 42 : /// enrichment displacement variables 43 : std::vector<std::vector<MooseVariableFEBase *>> _enrich_variable; 44 : 45 : /// the current shape functions 46 : const VariablePhiValue & _phi; 47 : 48 : /// gradient of the shape function 49 : const VariablePhiGradient & _grad_phi; 50 : 51 : /// gradient of the enriched solution 52 : MaterialProperty<RankTwoTensor> & _grad_enrich_disp_tensor; 53 : const MaterialProperty<RankTwoTensor> & _grad_enrich_disp_tensor_old; 54 : 55 : private: 56 : /// enrichment function value 57 : std::vector<Real> _B; 58 : /// derivatives of enrichment function respect to global cooridnate 59 : std::vector<RealVectorValue> _dBX; 60 : /// derivatives of enrichment function respect to crack front cooridnate 61 : std::vector<RealVectorValue> _dBx; 62 : /// enrichment function at node I 63 : std::vector<std::vector<Real>> _BI; 64 : /// shape function 65 : const std::vector<std::vector<Real>> * _fe_phi; 66 : /// gradient of shape function 67 : const std::vector<std::vector<RealGradient>> * _fe_dphi; 68 : NonlinearSystem * _nl; 69 : const NumericVector<Number> * _sln; 70 : };