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");
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();
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) -
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);
virtual bool isNodal() const
RankTwoTensorTempl< Real > inverse() const
RankTwoTensor _mechanical_strain
auto norm() const -> decltype(std::norm(Real()))
virtual Elem * elemPtr(const dof_id_type i)
std::vector< dof_id_type > getNeighbors(dof_id_type node_id)
Function to return neighbor nodes indices for node node_id.
const Node *const & _current_node
virtual void computeRankTwoTensors()
Function to compute the total strain, mechanical strain, and stress tensors at each discrete material...
int delta(unsigned int i, unsigned int j)
Delta function, which returns zero if $i j$ and unity if $i=j$.
const Real _temp_ref
reference temperature
const unsigned int _dim
Problem dimension.
Peridynamic Aux Kernel base class.
MooseVariable * getVar(const std::string &var_name, unsigned int comp)
void fillFromInputVector(const std::vector< T > &input, FillMethod fill_method)
OutputData getElementalValue(const Elem *elem, unsigned int idx=0) const
bool isParamValid(const std::string &name) const
std::vector< MooseVariable * > _disp_var
@
const Point _point1
Points for direction dependent scalar output.
std::string _output_type
output type: component or scalar
virtual const Node * nodePtr(const dof_id_type i) const
registerMooseObject("PeridynamicsApp", NodalRankTwoPD)
PeridynamicsMesh & _pdmesh
Reference to peridynamic mesh object.
Real getNodeVolume(dof_id_type node_id)
Function to return nodal volume for node node_id.
RankFourTensor _Cijkl
elasticity tensor
OutputData getNodalValue(const Node &node) const
MooseEnum _scalar_type
specific scalar type to be output
unsigned int coupledComponents(const std::string &var_name) const
unsigned int _i
component index
RankTwoTensorTempl< Real > transpose() const
MooseVariableField< Real > & _var
std::string _rank_two_tensor
name of rank two tensor to be processed: total_strain, mechanical_strain or stress ...
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
Point getNodeCoord(dof_id_type node_id)
Function to return coordinates for node node_id.
NodalRankTwoPD(const InputParameters ¶meters)
static InputParameters validParams()
const bool _plane_stress
plane stress problem or not
bool _scalar_out_of_plane_strain_coupled
variable for generalized plane strain cases
MooseVariable * _temp_var
coupled temperature variable
static InputParameters validParams()
RankTwoTensor _total_strain
rank two tensors
Real _youngs_modulus
material constants
void mooseError(Args &&... args) const
Real computeValue() override
const VariableValue & _scalar_out_of_plane_strain
Aux Kernel class to postprocess and output the strain and stress components and equivalents for perid...
std::vector< dof_id_type > getBonds(dof_id_type node_id)
Function to return the bond number connected with node node_id.
const MooseArray< Point > & _q_point
static const std::string k
const Elem & get(const ElemType type_in)
MooseVariable * _bond_status_var
bond_status variable
Real getHorizon(dof_id_type node_id)
Function to return horizon size.