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 : 12 : // MOOSE includes 13 : #include "Coupleable.h" 14 : #include "EqualValueEmbeddedConstraint.h" 15 : #include "Moose.h" 16 : 17 : /** 18 : * A RebarBondSlipConstraint enforces the constraint between concrete and 19 : * reinforcing bars establishing a slip vs. bond_stress relationship 20 : */ 21 : template <bool is_ad> 22 : class RebarBondSlipConstraintTempl : public EqualValueEmbeddedConstraintTempl<is_ad> 23 : { 24 : public: 25 : static InputParameters validParams(); 26 : 27 : RebarBondSlipConstraintTempl(const InputParameters & parameters); 28 : virtual void initialSetup() override; 29 : virtual void timestepSetup() override; 30 : 31 : void reinitConstraint() override; 32 : 33 : /** 34 : * Determine whether the coupled variable is one of the displacement variables, 35 : * and find its component 36 : * @param var_num The number of the variable to be checked 37 : * @param component The component index computed in this routine 38 : * @return bool indicating whether the coupled variable is one of the displacement variables 39 : */ 40 : bool getCoupledVarComponent(unsigned int var_num, unsigned int & component); 41 : 42 : protected: 43 : virtual GenericReal<is_ad> computeQpResidual(Moose::ConstraintType type) override; 44 : virtual Real computeQpJacobian(Moose::ConstraintJacobianType type) override; 45 : virtual Real computeQpOffDiagJacobian(Moose::ConstraintJacobianType type, 46 : unsigned int jvar) override; 47 : 48 : /// method to calculate the tangential direction for the rebars 49 : virtual void computeTangent(); 50 : 51 : /// node element constraint bond slip model 52 : const enum class BondSlipModel { 53 : CONCRETE_REBAR_MODEL, 54 : ELASTIC_PERFECT_PLASTIC_MODEL 55 : } _bondslip_model; 56 : 57 : /** 58 : * Struct designed to hold info about the bond-slip history 59 : * slip_min miminum slip value at the current step 60 : * slip_max maximum slip value at the current step 61 : * slip_min_old minimum slip value from the history 62 : * slip_max_old maximum slip value from the history 63 : * bond_stress_min miminum bond_stress value at the current step 64 : * bond_stress_max maximum bond_stress value at the current step 65 : * bond_stress_min_old minimum bond_stress value from the history 66 : * bond_stress_max_old maximum bond_stress value from the history 67 : */ 68 : struct bondSlipData 69 : { 70 : Real slip_min; 71 : Real slip_max; 72 : Real slip_min_old; 73 : Real slip_max_old; 74 : Real bond_stress_min; 75 : Real bond_stress_max; 76 : Real bond_stress_min_old; 77 : Real bond_stress_max_old; 78 : 79 : /// initializing the bond-slip data 80 0 : bondSlipData() 81 0 : : slip_min(0.0), 82 0 : slip_max(0.0), 83 0 : slip_min_old(0.0), 84 0 : slip_max_old(0.0), 85 0 : bond_stress_min(0.0), 86 0 : bond_stress_max(0.0), 87 0 : bond_stress_min_old(0.0), 88 0 : bond_stress_max_old(0.0) 89 : { 90 0 : } 91 : }; 92 : 93 : /// storage for the bond-slip history values for each of the nodes 94 : std::map<dof_id_type, bondSlipData> _bondslip; 95 : 96 : /// constraint model with elastic perfect plastic force slip model 97 : void elasticPerfectPlasticModel(const GenericReal<is_ad> slip, 98 : const bondSlipData * const bond_slip, 99 : GenericReal<is_ad> & bond_stress, 100 : GenericReal<is_ad> & bond_stress_deriv, 101 : Real & plastic_slip) const; 102 : 103 : /// constraint model for concrete rebar from eqn 11 in Mehlhorn 1983. 104 : void concreteRebarModel(const GenericReal<is_ad> slip, 105 : const bondSlipData * const bond_slip, 106 : GenericReal<is_ad> & bond_stress, 107 : GenericReal<is_ad> & bond_stress_deriv, 108 : Real & plastic_slip) const; 109 : 110 : /// component of the displacements in which the constraint works 111 : unsigned int _component; 112 : 113 : /// problem dimesion 114 : const unsigned int _mesh_dimension; 115 : 116 : /// displacement variables 117 : std::vector<unsigned int> _disp_vars_nums; 118 : std::vector<MooseVariable *> _disp_vars; 119 : 120 : /// maximum bond stress 121 : const Real _max_bond_stress; 122 : 123 : /// radius of the reinforcing bars 124 : const Real _bar_radius; 125 : 126 : /// slip values at the transition points of the bond-slip curve 127 : const Real _transitional_slip; 128 : 129 : /// constraint force needed to enforce the constraint 130 : GenericRealVectorValue<is_ad> _constraint_residual; 131 : 132 : /// constraint force needed to enforce the constraint 133 : GenericRealVectorValue<is_ad> _constraint_jacobian_axial; 134 : 135 : /// tangent direction for the rebars 136 : GenericRealVectorValue<is_ad> _secondary_node_tangent; 137 : 138 : /// current element volume/length for the rabar 139 : GenericReal<is_ad> _secondary_node_length; 140 : 141 : /// bond stress value 142 : GenericReal<is_ad> _bond_stress; 143 : 144 : /// derivative of the bond stress function w.r.t slip 145 : GenericReal<is_ad> _bond_stress_deriv; 146 : 147 : ///@{Variables for optional output of bond constraint data 148 : MooseWritableVariable * _output_axial_slip = nullptr; 149 : MooseWritableVariable * _output_axial_force = nullptr; 150 : MooseWritableVariable * _output_axial_plastic_slip = nullptr; 151 : ///@} 152 : usingGenericNodeElemConstraint; 153 : 154 : private: 155 : /** 156 : * Compute the relative displacement of the node relative to its original position within the 157 : * displaced solid element that contains it. 158 : * @return vector of the components of the relative displacement 159 : */ 160 : GenericRealVectorValue<is_ad> computeRelativeDisplacement(); 161 : }; 162 : 163 : typedef RebarBondSlipConstraintTempl<false> RebarBondSlipConstraint; 164 : typedef RebarBondSlipConstraintTempl<true> ADRebarBondSlipConstraint;