www.mooseframework.org
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Attributes | List of all members
AsymptoticExpansionHomogenizationElasticConstants Class Reference

This postprocessor computes homogenized elastic constants. More...

#include <AsymptoticExpansionHomogenizationElasticConstants.h>

Inheritance diagram for AsymptoticExpansionHomogenizationElasticConstants:
[legend]

Public Member Functions

 AsymptoticExpansionHomogenizationElasticConstants (const InputParameters &parameters)
 
virtual void initialize ()
 
virtual void execute ()
 
virtual Real getValue ()
 
virtual void threadJoin (const UserObject &y)
 

Static Public Member Functions

static InputParameters validParams ()
 

Protected Member Functions

virtual Real computeQpIntegral ()
 

Private Attributes

const std::string _base_name
 
const std::array< std::array< const VariableGradient *, 3 >, 6 > _grad
 
const MaterialProperty< RankFourTensor > & _elasticity_tensor
 
const unsigned int _column
 
const unsigned int _row
 
const std::array< unsigned int, 6 > _ik_index
 
const std::array< unsigned int, 6 > _jl_index
 
const unsigned _i
 
const unsigned _j
 
const unsigned _k
 
const unsigned _l
 
Real _volume
 
Real _integral_value
 

Detailed Description

This postprocessor computes homogenized elastic constants.

Definition at line 23 of file AsymptoticExpansionHomogenizationElasticConstants.h.

Constructor & Destructor Documentation

◆ AsymptoticExpansionHomogenizationElasticConstants()

AsymptoticExpansionHomogenizationElasticConstants::AsymptoticExpansionHomogenizationElasticConstants ( const InputParameters &  parameters)

Definition at line 58 of file AsymptoticExpansionHomogenizationElasticConstants.C.

59  : ElementIntegralPostprocessor(parameters),
60  _base_name(isParamValid("base_name") ? getParam<std::string>("base_name") + "_" : ""),
61  _grad({{{{&coupledGradient("dx_xx"),
62  &coupledGradient("dy_xx"),
63  (_subproblem.mesh().dimension() == 3 ? &coupledGradient("dz_xx") : &_grad_zero)}},
64  {{&coupledGradient("dx_yy"),
65  &coupledGradient("dy_yy"),
66  (_subproblem.mesh().dimension() == 3 ? &coupledGradient("dz_yy") : &_grad_zero)}},
67  {{(_subproblem.mesh().dimension() == 3 ? &coupledGradient("dx_zz") : &_grad_zero),
68  (_subproblem.mesh().dimension() == 3 ? &coupledGradient("dy_zz") : &_grad_zero),
69  (_subproblem.mesh().dimension() == 3 ? &coupledGradient("dz_zz") : &_grad_zero)}},
70  {{(_subproblem.mesh().dimension() == 3 ? &coupledGradient("dx_yz") : &_grad_zero),
71  (_subproblem.mesh().dimension() == 3 ? &coupledGradient("dy_yz") : &_grad_zero),
72  (_subproblem.mesh().dimension() == 3 ? &coupledGradient("dz_yz") : &_grad_zero)}},
73  {{(_subproblem.mesh().dimension() == 3 ? &coupledGradient("dx_zx") : &_grad_zero),
74  (_subproblem.mesh().dimension() == 3 ? &coupledGradient("dy_zx") : &_grad_zero),
75  (_subproblem.mesh().dimension() == 3 ? &coupledGradient("dz_zx") : &_grad_zero)}},
76  {{(&coupledGradient("dx_xy")),
77  (&coupledGradient("dy_xy")),
78  (_subproblem.mesh().dimension() == 3 ? &coupledGradient("dz_xy") : &_grad_zero)}}}}),
79  _elasticity_tensor(getMaterialPropertyByName<RankFourTensor>(_base_name + "elasticity_tensor")),
80  _column(getParam<MooseEnum>("column")),
81  _row(getParam<MooseEnum>("row")),
82  _ik_index({{0, 1, 2, 1, 0, 0}}),
83  _jl_index({{0, 1, 2, 2, 2, 1}}),
84  _i(_ik_index[_row]),
85  _j(_jl_index[_row]),
88  _volume(0),
90 {
91 }

Member Function Documentation

◆ computeQpIntegral()

Real AsymptoticExpansionHomogenizationElasticConstants::computeQpIntegral ( )
protectedvirtual

Definition at line 128 of file AsymptoticExpansionHomogenizationElasticConstants.C.

129 {
130  Real value = 0;
131  for (unsigned p = 0; p < 3; ++p)
132  for (unsigned q = 0; q < 3; ++q)
133  value += _elasticity_tensor[_qp](_i, _j, p, q) * (*_grad[_column][p])[_qp](q);
134 
135  return _elasticity_tensor[_qp](_i, _j, _k, _l) + value;
136 }

◆ execute()

void AsymptoticExpansionHomogenizationElasticConstants::execute ( )
virtual

Definition at line 101 of file AsymptoticExpansionHomogenizationElasticConstants.C.

102 {
103  _integral_value += computeIntegral();
104  _volume += _current_elem_volume;
105 }

◆ getValue()

Real AsymptoticExpansionHomogenizationElasticConstants::getValue ( )
virtual

Definition at line 108 of file AsymptoticExpansionHomogenizationElasticConstants.C.

109 {
110 
111  gatherSum(_integral_value);
112  gatherSum(_volume);
113 
114  return (_integral_value / _volume);
115 }

◆ initialize()

void AsymptoticExpansionHomogenizationElasticConstants::initialize ( )
virtual

Definition at line 94 of file AsymptoticExpansionHomogenizationElasticConstants.C.

95 {
96  _integral_value = 0;
97  _volume = 0;
98 }

◆ threadJoin()

void AsymptoticExpansionHomogenizationElasticConstants::threadJoin ( const UserObject &  y)
virtual

Definition at line 118 of file AsymptoticExpansionHomogenizationElasticConstants.C.

119 {
121  dynamic_cast<const AsymptoticExpansionHomogenizationElasticConstants &>(y);
122 
124  _volume += pps._volume;
125 }

◆ validParams()

InputParameters AsymptoticExpansionHomogenizationElasticConstants::validParams ( )
static

Definition at line 18 of file AsymptoticExpansionHomogenizationElasticConstants.C.

19 {
20  InputParameters params = ElementIntegralPostprocessor::validParams();
21  params.addClassDescription(
22  "Postprocessor for asymptotic expansion homogenization for elasticity");
23  params.addRequiredCoupledVar("dx_xx", "solution in xx");
24  params.addRequiredCoupledVar("dy_xx", "solution in xx");
25  params.addCoupledVar("dz_xx", "solution in xx");
26  params.addRequiredCoupledVar("dx_yy", "solution in yy");
27  params.addRequiredCoupledVar("dy_yy", "solution in yy");
28  params.addCoupledVar("dz_yy", "solution in yy");
29  params.addCoupledVar("dx_zz", "solution in zz");
30  params.addCoupledVar("dy_zz", "solution in zz");
31  params.addCoupledVar("dz_zz", "solution in zz");
32  params.addRequiredCoupledVar("dx_xy", "solution in xy");
33  params.addRequiredCoupledVar("dy_xy", "solution in xy");
34  params.addCoupledVar("dz_xy", "solution in xy");
35  params.addCoupledVar("dx_yz", "solution in yz");
36  params.addCoupledVar("dy_yz", "solution in yz");
37  params.addCoupledVar("dz_yz", "solution in yz");
38  params.addCoupledVar("dx_zx", "solution in zx");
39  params.addCoupledVar("dy_zx", "solution in zx");
40  params.addCoupledVar("dz_zx", "solution in zx");
41  params.addParam<std::string>("base_name",
42  "Optional parameter that allows the user to define "
43  "multiple mechanics material systems on the same "
44  "block, i.e. for multiple phases");
45  MooseEnum column("xx yy zz yz xz xy");
46  params.addRequiredParam<MooseEnum>("column",
47  column,
48  "The column of the material matrix this kernel acts in. "
49  "(xx, yy, zz, yz, xz, or xy)");
50  params.addRequiredParam<MooseEnum>("row",
51  column,
52  "The row of the material matrix this kernel acts in. "
53  "(xx, yy, zz, yz, xz, or xy)");
54  return params;
55 }

Member Data Documentation

◆ _base_name

const std::string AsymptoticExpansionHomogenizationElasticConstants::_base_name
private

◆ _column

const unsigned int AsymptoticExpansionHomogenizationElasticConstants::_column
private

◆ _elasticity_tensor

const MaterialProperty<RankFourTensor>& AsymptoticExpansionHomogenizationElasticConstants::_elasticity_tensor
private

◆ _grad

const std::array<std::array<const VariableGradient *, 3>, 6> AsymptoticExpansionHomogenizationElasticConstants::_grad
private

◆ _i

const unsigned AsymptoticExpansionHomogenizationElasticConstants::_i
private

◆ _ik_index

const std::array<unsigned int, 6> AsymptoticExpansionHomogenizationElasticConstants::_ik_index
private

◆ _integral_value

Real AsymptoticExpansionHomogenizationElasticConstants::_integral_value
private

◆ _j

const unsigned AsymptoticExpansionHomogenizationElasticConstants::_j
private

◆ _jl_index

const std::array<unsigned int, 6> AsymptoticExpansionHomogenizationElasticConstants::_jl_index
private

◆ _k

const unsigned AsymptoticExpansionHomogenizationElasticConstants::_k
private

◆ _l

const unsigned AsymptoticExpansionHomogenizationElasticConstants::_l
private

◆ _row

const unsigned int AsymptoticExpansionHomogenizationElasticConstants::_row
private

◆ _volume

Real AsymptoticExpansionHomogenizationElasticConstants::_volume
private

The documentation for this class was generated from the following files:
AsymptoticExpansionHomogenizationElasticConstants::_j
const unsigned _j
Definition: AsymptoticExpansionHomogenizationElasticConstants.h:47
AsymptoticExpansionHomogenizationElasticConstants::_jl_index
const std::array< unsigned int, 6 > _jl_index
Definition: AsymptoticExpansionHomogenizationElasticConstants.h:46
AsymptoticExpansionHomogenizationElasticConstants::_elasticity_tensor
const MaterialProperty< RankFourTensor > & _elasticity_tensor
Definition: AsymptoticExpansionHomogenizationElasticConstants.h:43
AsymptoticExpansionHomogenizationElasticConstants::_column
const unsigned int _column
Definition: AsymptoticExpansionHomogenizationElasticConstants.h:44
AsymptoticExpansionHomogenizationElasticConstants::_grad
const std::array< std::array< const VariableGradient *, 3 >, 6 > _grad
Definition: AsymptoticExpansionHomogenizationElasticConstants.h:41
AsymptoticExpansionHomogenizationElasticConstants::_integral_value
Real _integral_value
Definition: AsymptoticExpansionHomogenizationElasticConstants.h:49
AsymptoticExpansionHomogenizationElasticConstants::_row
const unsigned int _row
Definition: AsymptoticExpansionHomogenizationElasticConstants.h:44
validParams
InputParameters validParams()
AsymptoticExpansionHomogenizationElasticConstants
This postprocessor computes homogenized elastic constants.
Definition: AsymptoticExpansionHomogenizationElasticConstants.h:23
AsymptoticExpansionHomogenizationElasticConstants::_l
const unsigned _l
Definition: AsymptoticExpansionHomogenizationElasticConstants.h:47
RankFourTensorTempl
Definition: ACGrGrElasticDrivingForce.h:20
AsymptoticExpansionHomogenizationElasticConstants::_volume
Real _volume
Definition: AsymptoticExpansionHomogenizationElasticConstants.h:48
AsymptoticExpansionHomogenizationElasticConstants::_base_name
const std::string _base_name
Definition: AsymptoticExpansionHomogenizationElasticConstants.h:39
AsymptoticExpansionHomogenizationElasticConstants::_k
const unsigned _k
Definition: AsymptoticExpansionHomogenizationElasticConstants.h:47
AsymptoticExpansionHomogenizationElasticConstants::_ik_index
const std::array< unsigned int, 6 > _ik_index
Definition: AsymptoticExpansionHomogenizationElasticConstants.h:45
AsymptoticExpansionHomogenizationElasticConstants::_i
const unsigned _i
Definition: AsymptoticExpansionHomogenizationElasticConstants.h:47