21 "Class for computing and outputing components and scalar quantities "
22 "of nodal rank two strain and stress tensors for bond-based and ordinary "
23 "state-based peridynamic models");
26 params.
addCoupledVar(
"temperature",
"Nonlinear variable name for the temperature");
28 "Scalar variable for strain in the out-of-plane direction");
32 "Plane stress problem or not. This option applies to BPD and OSPD models only");
33 params.
addParam<Real>(
"youngs_modulus",
"Material constant: Young's modulus");
34 params.
addParam<Real>(
"poissons_ratio",
"Material constant: Poisson's ratio");
35 params.
addParam<Real>(
"thermal_expansion_coeff",
36 "Value of material thermal expansion coefficient");
37 params.
addParam<Real>(
"stress_free_temperature", 0.0,
"Stress free temperature");
40 "Parameter to set which rank two tensor: total_strain, mechanical_strain or stress");
41 params.
addRequiredParam<std::string>(
"output_type",
"Type of output: component or scalar");
44 params.
addParam<
unsigned int>(
"index_i",
"The index i of ij for the tensor to output (0, 1, 2)");
45 params.
addParam<
unsigned int>(
"index_j",
"The index j of ij for the tensor to output (0, 1, 2)");
48 "Start point for axis used to calculate some direction dependent material "
49 "tensor scalar quantities");
52 "End point for axis used to calculate some direction dependent material "
53 "tensor scalar quantities");
60 _has_temp(isCoupled(
"temperature")),
61 _temp_var(_has_temp ? getVar(
"temperature", 0) : nullptr),
62 _bond_status_var(&_subproblem.getStandardVariable(_tid,
"bond_status")),
63 _scalar_out_of_plane_strain_coupled(isCoupledScalar(
"scalar_out_of_plane_strain")),
64 _scalar_out_of_plane_strain(_scalar_out_of_plane_strain_coupled
65 ? coupledScalarValue(
"scalar_out_of_plane_strain")
67 _plane_stress(getParam<bool>(
"plane_stress")),
68 _temp_ref(getParam<Real>(
"stress_free_temperature")),
69 _rank_two_tensor(getParam<
std::string>(
"rank_two_tensor")),
70 _output_type(getParam<
std::string>(
"output_type")),
71 _scalar_type(getParam<
MooseEnum>(
"scalar_type")),
72 _point1(parameters.get<Point>(
"point1")),
73 _point2(parameters.get<Point>(
"point2"))
76 mooseError(
"NodalRankTwoPD operates on nodal variable!");
79 mooseError(
"Number of displacements should be the same as problem dimension!");
88 "Both Young's modulus and Poisson's ratio must be provided for stress calculation");
95 std::vector<Real> iso_const(2);
105 mooseError(
"thermal_expansion_coeff is required when temperature is coupled");
107 _alpha = getParam<Real>(
"thermal_expansion_coeff");
112 mooseError(
"The output_type is 'component', both 'index_i' and 'index_j' must be provided!");
115 _i = getParam<unsigned int>(
"index_i");
116 _j = getParam<unsigned int>(
"index_j");
121 mooseError(
"The output_type is 'scalar', but no 'scalar_type' is provided!");
130 Point
p = Point(0, 0, 0);
141 mooseError(
"NodalRankTwoPD Error: Pass valid rank two tensor: total_strain, "
142 "mechanical_strain or stress");
149 mooseError(
"NodalRankTwoPD Error: Pass valid output type - component or scalar");
170 shape(2, 2) = dgrad(2, 2) = 1.0;
172 thermal_strain.zero();
175 RealGradient origin_vec, current_vec;
177 for (
unsigned int nb = 0; nb < neighbors.size(); ++nb)
185 for (
unsigned int k = 0; k <
_dim; ++k)
186 current_vec(k) = origin_vec(k) +
_disp_var[k]->getNodalValue(*neighbor_nb) -
189 weight = horizon / origin_vec.norm();
191 for (
unsigned int k = 0; k <
_dim; ++k)
192 for (
unsigned int l = 0; l <
_dim; ++l)
194 shape(k, l) += weight * origin_vec(k) * origin_vec(l) * vol_nb;
195 dgrad(k, l) += weight * current_vec(k) * origin_vec(l) * vol_nb;
200 if (shape.det() != 0.)
218 -(
_Cijkl(2, 2, 0, 0) * mstrain00 +
_Cijkl(2, 2, 1, 1) * mstrain11) /
_Cijkl(2, 2, 2, 2);
registerMooseObject("PeridynamicsApp", NodalRankTwoPD)
Peridynamic Aux Kernel base class.
PeridynamicsMesh & _pdmesh
Reference to peridynamic mesh object.
const unsigned int _dim
Problem dimension.
static InputParameters validParams()
const MooseArray< Point > & _q_point
const Node *const & _current_node
MooseVariableField< ComputeValueType > & _var
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
unsigned int coupledComponents(const std::string &var_name) const
void mooseError(Args &&... args) const
bool isParamValid(const std::string &name) const
virtual Elem * elemPtr(const dof_id_type i)
virtual const Node * nodePtr(const dof_id_type i) const
virtual bool isNodal() const
DofValue getElementalValue(const Elem *elem, unsigned int idx=0) const
DofValue getNodalValue(const Node &node) const
Aux Kernel class to postprocess and output the strain and stress components and equivalents for perid...
const bool _plane_stress
plane stress problem or not
bool _scalar_out_of_plane_strain_coupled
variable for generalized plane strain cases
const Point _point1
Points for direction dependent scalar output.
virtual void computeRankTwoTensors()
Function to compute the total strain, mechanical strain, and stress tensors at each discrete material...
static InputParameters validParams()
Real computeValue() override
MooseVariable * _temp_var
coupled temperature variable
std::vector< MooseVariable * > _disp_var
@
RankFourTensor _Cijkl
elasticity tensor
NodalRankTwoPD(const InputParameters ¶meters)
const Real _temp_ref
reference temperature
MooseVariable * _bond_status_var
bond_status variable
std::string _output_type
output type: component or scalar
RankTwoTensor _mechanical_strain
Real _youngs_modulus
material constants
const VariableValue & _scalar_out_of_plane_strain
unsigned int _i
component index
std::string _rank_two_tensor
name of rank two tensor to be processed: total_strain, mechanical_strain or stress
MooseEnum _scalar_type
specific scalar type to be output
RankTwoTensor _total_strain
rank two tensors
Real getNodeVolume(dof_id_type node_id)
Function to return nodal volume for node node_id.
Real getHorizon(dof_id_type node_id)
Function to return horizon size.
Point getNodeCoord(dof_id_type node_id)
Function to return coordinates for node node_id.
std::vector< dof_id_type > getBonds(dof_id_type node_id)
Function to return the bond number connected with node node_id.
std::vector< dof_id_type > getNeighbors(dof_id_type node_id)
Function to return neighbor nodes indices for node node_id.
void fillFromInputVector(const std::vector< T > &input, FillMethod fill_method)
RankTwoTensorTempl< T > inverse() const
RankTwoTensorTempl< T > transpose() const