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

This postprocessor computes the average grain area in a polycrystal. More...

#include <HomogenizedElasticConstants.h>

Inheritance diagram for HomogenizedElasticConstants:
[legend]

Public Member Functions

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

Protected Member Functions

virtual Real computeQpIntegral ()
 

Private Attributes

const VariableGradient & _grad_disp_x_xx
 
const VariableGradient & _grad_disp_y_xx
 
const VariableGradient & _grad_disp_z_xx
 
const VariableGradient & _grad_disp_x_yy
 
const VariableGradient & _grad_disp_y_yy
 
const VariableGradient & _grad_disp_z_yy
 
const VariableGradient & _grad_disp_x_zz
 
const VariableGradient & _grad_disp_y_zz
 
const VariableGradient & _grad_disp_z_zz
 
const VariableGradient & _grad_disp_x_xy
 
const VariableGradient & _grad_disp_y_xy
 
const VariableGradient & _grad_disp_z_xy
 
const VariableGradient & _grad_disp_x_yz
 
const VariableGradient & _grad_disp_y_yz
 
const VariableGradient & _grad_disp_z_yz
 
const VariableGradient & _grad_disp_x_zx
 
const VariableGradient & _grad_disp_y_zx
 
const VariableGradient & _grad_disp_z_zx
 
const MaterialProperty< SymmElasticityTensor > & _elasticity_tensor
 
const unsigned int _column
 
const unsigned int _row
 
unsigned _I
 
unsigned _J
 
unsigned _l
 
unsigned _k
 
unsigned _i
 
unsigned _j
 
Real _volume
 
Real _integral_value
 

Detailed Description

This postprocessor computes the average grain area in a polycrystal.

Definition at line 27 of file HomogenizedElasticConstants.h.

Constructor & Destructor Documentation

◆ HomogenizedElasticConstants()

HomogenizedElasticConstants::HomogenizedElasticConstants ( const InputParameters &  parameters)

Definition at line 53 of file HomogenizedElasticConstants.C.

54  : ElementAverageValue(parameters),
55  _grad_disp_x_xx(coupledGradient("dx_xx")),
56  _grad_disp_y_xx(coupledGradient("dy_xx")),
57  _grad_disp_z_xx(_subproblem.mesh().dimension() == 3 ? coupledGradient("dz_xx") : _grad_zero),
58  _grad_disp_x_yy(coupledGradient("dx_yy")),
59  _grad_disp_y_yy(coupledGradient("dy_yy")),
60  _grad_disp_z_yy(_subproblem.mesh().dimension() == 3 ? coupledGradient("dz_yy") : _grad_zero),
61  _grad_disp_x_zz(_subproblem.mesh().dimension() == 3 ? coupledGradient("dx_zz") : _grad_zero),
62  _grad_disp_y_zz(_subproblem.mesh().dimension() == 3 ? coupledGradient("dy_zz") : _grad_zero),
63  _grad_disp_z_zz(_subproblem.mesh().dimension() == 3 ? coupledGradient("dz_zz") : _grad_zero),
64  _grad_disp_x_xy(coupledGradient("dx_xy")),
65  _grad_disp_y_xy(coupledGradient("dy_xy")),
66  _grad_disp_z_xy(_subproblem.mesh().dimension() == 3 ? coupledGradient("dz_xy") : _grad_zero),
67  _grad_disp_x_yz(_subproblem.mesh().dimension() == 3 ? coupledGradient("dx_yz") : _grad_zero),
68  _grad_disp_y_yz(_subproblem.mesh().dimension() == 3 ? coupledGradient("dy_yz") : _grad_zero),
69  _grad_disp_z_yz(_subproblem.mesh().dimension() == 3 ? coupledGradient("dz_yz") : _grad_zero),
70  _grad_disp_x_zx(_subproblem.mesh().dimension() == 3 ? coupledGradient("dx_zx") : _grad_zero),
71  _grad_disp_y_zx(_subproblem.mesh().dimension() == 3 ? coupledGradient("dy_zx") : _grad_zero),
72  _grad_disp_z_zx(_subproblem.mesh().dimension() == 3 ? coupledGradient("dz_zx") : _grad_zero),
73  _elasticity_tensor(getMaterialProperty<SymmElasticityTensor>(
74  "elasticity_tensor" + getParam<std::string>("appended_property_name"))),
75  _column(getParam<unsigned int>("column")),
76  _row(getParam<unsigned int>("row")),
77  _volume(0),
79 {
80 
81  if (_column == 0)
82  {
83  _k = 0;
84  _l = 0;
85  }
86 
87  if (_column == 1)
88  {
89  _k = 1;
90  _l = 1;
91  }
92 
93  if (_column == 2)
94  {
95  _k = 2;
96  _l = 2;
97  }
98 
99  if (_column == 3)
100  {
101  _k = 0;
102  _l = 1;
103  }
104 
105  if (_column == 4)
106  {
107  _k = 1;
108  _l = 2;
109  }
110 
111  if (_column == 5)
112  {
113  _k = 2;
114  _l = 0;
115  }
116 
117  if (_row == 0)
118  {
119  _i = 0;
120  _j = 0;
121  }
122 
123  if (_row == 1)
124  {
125  _i = 1;
126  _j = 1;
127  }
128 
129  if (_row == 2)
130  {
131  _i = 2;
132  _j = 2;
133  }
134 
135  if (_row == 3)
136  {
137  _i = 0;
138  _j = 1;
139  }
140 
141  if (_row == 4)
142  {
143  _i = 1;
144  _j = 2;
145  }
146 
147  if (_row == 5)
148  {
149  _i = 2;
150  _j = 0;
151  }
152 
153  _J = (3 * _l + _k);
154  _I = (3 * _j + _i);
155 }
This class defines a basic set of capabilities any elasticity tensor should have. ...
const VariableGradient & _grad_disp_z_yy
const VariableGradient & _grad_disp_y_yy
const VariableGradient & _grad_disp_z_zz
const VariableGradient & _grad_disp_x_yz
const VariableGradient & _grad_disp_z_zx
const VariableGradient & _grad_disp_z_yz
const VariableGradient & _grad_disp_y_yz
const VariableGradient & _grad_disp_y_zz
const VariableGradient & _grad_disp_x_xy
const VariableGradient & _grad_disp_y_xx
const MaterialProperty< SymmElasticityTensor > & _elasticity_tensor
const VariableGradient & _grad_disp_z_xy
const VariableGradient & _grad_disp_y_zx
const VariableGradient & _grad_disp_x_yy
const VariableGradient & _grad_disp_x_zx
const VariableGradient & _grad_disp_z_xx
const VariableGradient & _grad_disp_x_zz
const VariableGradient & _grad_disp_y_xy
const VariableGradient & _grad_disp_x_xx

Member Function Documentation

◆ computeQpIntegral()

Real HomogenizedElasticConstants::computeQpIntegral ( )
protectedvirtual

Definition at line 191 of file HomogenizedElasticConstants.C.

192 {
193  ColumnMajorMatrix E(_elasticity_tensor[_qp].columnMajorMatrix9x9());
194  Real value;
195 
196  value = 0.0;
197 
198  const VariableGradient * grad[6][3];
199  grad[0][0] = &_grad_disp_x_xx;
200  grad[0][1] = &_grad_disp_y_xx;
201  grad[0][2] = &_grad_disp_z_xx;
202 
203  grad[1][0] = &_grad_disp_x_yy;
204  grad[1][1] = &_grad_disp_y_yy;
205  grad[1][2] = &_grad_disp_z_yy;
206 
207  grad[2][0] = &_grad_disp_x_zz;
208  grad[2][1] = &_grad_disp_y_zz;
209  grad[2][2] = &_grad_disp_z_zz;
210 
211  grad[3][0] = &_grad_disp_x_xy;
212  grad[3][1] = &_grad_disp_y_xy;
213  grad[3][2] = &_grad_disp_z_xy;
214 
215  grad[4][0] = &_grad_disp_x_yz;
216  grad[4][1] = &_grad_disp_y_yz;
217  grad[4][2] = &_grad_disp_z_yz;
218 
219  grad[5][0] = &_grad_disp_x_zx;
220  grad[5][1] = &_grad_disp_y_zx;
221  grad[5][2] = &_grad_disp_z_zx;
222 
223  for (int p = 0; p < 3; p++)
224  {
225  for (int q = 0; q < 3; q++)
226  {
227  value += E(_I, 3 * q + p) * (*grad[_column][p])[_qp](q);
228  }
229  }
230 
231  return (E(_I, _J) + value);
232 }
const VariableGradient & _grad_disp_z_yy
const VariableGradient & _grad_disp_y_yy
const VariableGradient & _grad_disp_z_zz
const VariableGradient & _grad_disp_x_yz
const VariableGradient & _grad_disp_z_zx
const VariableGradient & _grad_disp_z_yz
const VariableGradient & _grad_disp_y_yz
const VariableGradient & _grad_disp_y_zz
const VariableGradient & _grad_disp_x_xy
const VariableGradient & _grad_disp_y_xx
const MaterialProperty< SymmElasticityTensor > & _elasticity_tensor
const VariableGradient & _grad_disp_z_xy
const VariableGradient & _grad_disp_y_zx
const VariableGradient & _grad_disp_x_yy
const VariableGradient & _grad_disp_x_zx
const VariableGradient & _grad_disp_z_xx
const VariableGradient & _grad_disp_x_zz
const VariableGradient & _grad_disp_y_xy
const VariableGradient & _grad_disp_x_xx

◆ execute()

void HomogenizedElasticConstants::execute ( )
virtual

Definition at line 165 of file HomogenizedElasticConstants.C.

166 {
167  _integral_value += computeIntegral();
168  _volume += _current_elem_volume;
169 }

◆ getValue()

Real HomogenizedElasticConstants::getValue ( )
virtual

Definition at line 172 of file HomogenizedElasticConstants.C.

173 {
174 
175  gatherSum(_integral_value);
176  gatherSum(_volume);
177 
178  return (_integral_value / _volume);
179 }

◆ initialize()

void HomogenizedElasticConstants::initialize ( )
virtual

◆ threadJoin()

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

Definition at line 182 of file HomogenizedElasticConstants.C.

183 {
184  const HomogenizedElasticConstants & pps = dynamic_cast<const HomogenizedElasticConstants &>(y);
185 
187  _volume += pps._volume;
188 }
This postprocessor computes the average grain area in a polycrystal.

Member Data Documentation

◆ _column

const unsigned int HomogenizedElasticConstants::_column
private

Definition at line 66 of file HomogenizedElasticConstants.h.

Referenced by computeQpIntegral(), and HomogenizedElasticConstants().

◆ _elasticity_tensor

const MaterialProperty<SymmElasticityTensor>& HomogenizedElasticConstants::_elasticity_tensor
private

Definition at line 65 of file HomogenizedElasticConstants.h.

Referenced by computeQpIntegral().

◆ _grad_disp_x_xx

const VariableGradient& HomogenizedElasticConstants::_grad_disp_x_xx
private

Definition at line 41 of file HomogenizedElasticConstants.h.

Referenced by computeQpIntegral().

◆ _grad_disp_x_xy

const VariableGradient& HomogenizedElasticConstants::_grad_disp_x_xy
private

Definition at line 53 of file HomogenizedElasticConstants.h.

Referenced by computeQpIntegral().

◆ _grad_disp_x_yy

const VariableGradient& HomogenizedElasticConstants::_grad_disp_x_yy
private

Definition at line 45 of file HomogenizedElasticConstants.h.

Referenced by computeQpIntegral().

◆ _grad_disp_x_yz

const VariableGradient& HomogenizedElasticConstants::_grad_disp_x_yz
private

Definition at line 57 of file HomogenizedElasticConstants.h.

Referenced by computeQpIntegral().

◆ _grad_disp_x_zx

const VariableGradient& HomogenizedElasticConstants::_grad_disp_x_zx
private

Definition at line 61 of file HomogenizedElasticConstants.h.

Referenced by computeQpIntegral().

◆ _grad_disp_x_zz

const VariableGradient& HomogenizedElasticConstants::_grad_disp_x_zz
private

Definition at line 49 of file HomogenizedElasticConstants.h.

Referenced by computeQpIntegral().

◆ _grad_disp_y_xx

const VariableGradient& HomogenizedElasticConstants::_grad_disp_y_xx
private

Definition at line 42 of file HomogenizedElasticConstants.h.

Referenced by computeQpIntegral().

◆ _grad_disp_y_xy

const VariableGradient& HomogenizedElasticConstants::_grad_disp_y_xy
private

Definition at line 54 of file HomogenizedElasticConstants.h.

Referenced by computeQpIntegral().

◆ _grad_disp_y_yy

const VariableGradient& HomogenizedElasticConstants::_grad_disp_y_yy
private

Definition at line 46 of file HomogenizedElasticConstants.h.

Referenced by computeQpIntegral().

◆ _grad_disp_y_yz

const VariableGradient& HomogenizedElasticConstants::_grad_disp_y_yz
private

Definition at line 58 of file HomogenizedElasticConstants.h.

Referenced by computeQpIntegral().

◆ _grad_disp_y_zx

const VariableGradient& HomogenizedElasticConstants::_grad_disp_y_zx
private

Definition at line 62 of file HomogenizedElasticConstants.h.

Referenced by computeQpIntegral().

◆ _grad_disp_y_zz

const VariableGradient& HomogenizedElasticConstants::_grad_disp_y_zz
private

Definition at line 50 of file HomogenizedElasticConstants.h.

Referenced by computeQpIntegral().

◆ _grad_disp_z_xx

const VariableGradient& HomogenizedElasticConstants::_grad_disp_z_xx
private

Definition at line 43 of file HomogenizedElasticConstants.h.

Referenced by computeQpIntegral().

◆ _grad_disp_z_xy

const VariableGradient& HomogenizedElasticConstants::_grad_disp_z_xy
private

Definition at line 55 of file HomogenizedElasticConstants.h.

Referenced by computeQpIntegral().

◆ _grad_disp_z_yy

const VariableGradient& HomogenizedElasticConstants::_grad_disp_z_yy
private

Definition at line 47 of file HomogenizedElasticConstants.h.

Referenced by computeQpIntegral().

◆ _grad_disp_z_yz

const VariableGradient& HomogenizedElasticConstants::_grad_disp_z_yz
private

Definition at line 59 of file HomogenizedElasticConstants.h.

Referenced by computeQpIntegral().

◆ _grad_disp_z_zx

const VariableGradient& HomogenizedElasticConstants::_grad_disp_z_zx
private

Definition at line 63 of file HomogenizedElasticConstants.h.

Referenced by computeQpIntegral().

◆ _grad_disp_z_zz

const VariableGradient& HomogenizedElasticConstants::_grad_disp_z_zz
private

Definition at line 51 of file HomogenizedElasticConstants.h.

Referenced by computeQpIntegral().

◆ _I

unsigned HomogenizedElasticConstants::_I
private

Definition at line 67 of file HomogenizedElasticConstants.h.

Referenced by computeQpIntegral(), and HomogenizedElasticConstants().

◆ _i

unsigned HomogenizedElasticConstants::_i
private

Definition at line 69 of file HomogenizedElasticConstants.h.

Referenced by HomogenizedElasticConstants().

◆ _integral_value

Real HomogenizedElasticConstants::_integral_value
private

Definition at line 71 of file HomogenizedElasticConstants.h.

Referenced by execute(), getValue(), initialize(), and threadJoin().

◆ _J

unsigned HomogenizedElasticConstants::_J
private

Definition at line 67 of file HomogenizedElasticConstants.h.

Referenced by computeQpIntegral(), and HomogenizedElasticConstants().

◆ _j

unsigned HomogenizedElasticConstants::_j
private

Definition at line 69 of file HomogenizedElasticConstants.h.

Referenced by HomogenizedElasticConstants().

◆ _k

unsigned HomogenizedElasticConstants::_k
private

Definition at line 68 of file HomogenizedElasticConstants.h.

Referenced by HomogenizedElasticConstants().

◆ _l

unsigned HomogenizedElasticConstants::_l
private

Definition at line 68 of file HomogenizedElasticConstants.h.

Referenced by HomogenizedElasticConstants().

◆ _row

const unsigned int HomogenizedElasticConstants::_row
private

Definition at line 66 of file HomogenizedElasticConstants.h.

Referenced by HomogenizedElasticConstants().

◆ _volume

Real HomogenizedElasticConstants::_volume
private

Definition at line 70 of file HomogenizedElasticConstants.h.

Referenced by execute(), getValue(), initialize(), and threadJoin().


The documentation for this class was generated from the following files: