https://mooseframework.inl.gov
Loading...
Searching...
No Matches
CylindricalRankTwoAux.C
Go to the documentation of this file.
1//* This file is part of the MOOSE framework
2//* https://mooseframework.inl.gov
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
11
13
16{
19 "Takes RankTwoTensor material and outputs component in cylindrical coordinates");
20 params.addRequiredParam<MaterialPropertyName>("rank_two_tensor",
21 "The rank two material tensor name");
22 params.addRequiredRangeCheckedParam<unsigned int>(
23 "index_i",
24 "index_i >= 0 & index_i <= 2",
25 "The index i of ij for the tensor to output (0, 1, 2)");
26 params.addRequiredRangeCheckedParam<unsigned int>(
27 "index_j",
28 "index_j >= 0 & index_j <= 2",
29 "The index j of ij for the tensor to output (0, 1, 2)");
30 params.addRequiredParam<Point>("center_point",
31 "Location of the center point of the cylindrical coordinates");
32 return params;
33}
34
36 : AuxKernel(parameters),
37 _tensor(getMaterialProperty<RankTwoTensor>("rank_two_tensor")),
38 _i(getParam<unsigned int>("index_i")),
39 _j(getParam<unsigned int>("index_j")),
40 _center_point(getParam<Point>("center_point"))
41{
42}
43
44Real
46{
47 Point loc_from_center = _q_point[_qp] - _center_point;
48
49 Real theta = std::atan2(loc_from_center(1), loc_from_center(0));
51 R(0, 0) = std::cos(theta);
52 R(0, 1) = std::sin(theta);
53 R(1, 0) = -std::sin(theta);
54 R(1, 1) = std::cos(theta);
55
56 RankTwoTensor rotated_tensor = R * _tensor[_qp] * R.transpose();
57
58 return rotated_tensor(_i, _j);
59}
registerMooseObject("SolidMechanicsApp", CylindricalRankTwoAux)
const double R
void ErrorVector unsigned int
const MooseArray< Point > & _q_point
static InputParameters validParams()
CylindricalRankTwoAux is designed to take the data in the CylindricalRankTwoTensor material property,...
static InputParameters validParams()
const MaterialProperty< RankTwoTensor > & _tensor
CylindricalRankTwoAux(const InputParameters &parameters)
void addRequiredRangeCheckedParam(const std::string &name, const std::string &parsed_function, const std::string &doc_string)
void addRequiredParam(const std::string &name, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
RankTwoTensorTempl< T > transpose() const