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 24 of file HomogenizedElasticConstants.h.

Constructor & Destructor Documentation

HomogenizedElasticConstants::HomogenizedElasticConstants ( const InputParameters &  parameters)

Definition at line 49 of file HomogenizedElasticConstants.C.

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

Real HomogenizedElasticConstants::computeQpIntegral ( )
protectedvirtual

Definition at line 187 of file HomogenizedElasticConstants.C.

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

Definition at line 161 of file HomogenizedElasticConstants.C.

162 {
163  _integral_value += computeIntegral();
164  _volume += _current_elem_volume;
165 }
Real HomogenizedElasticConstants::getValue ( )
virtual

Definition at line 168 of file HomogenizedElasticConstants.C.

169 {
170 
171  gatherSum(_integral_value);
172  gatherSum(_volume);
173 
174  return (_integral_value / _volume);
175 }
void HomogenizedElasticConstants::initialize ( )
virtual
void HomogenizedElasticConstants::threadJoin ( const UserObject &  y)
virtual

Definition at line 178 of file HomogenizedElasticConstants.C.

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

Member Data Documentation

const unsigned int HomogenizedElasticConstants::_column
private

Definition at line 63 of file HomogenizedElasticConstants.h.

Referenced by computeQpIntegral(), and HomogenizedElasticConstants().

const MaterialProperty<SymmElasticityTensor>& HomogenizedElasticConstants::_elasticity_tensor
private

Definition at line 62 of file HomogenizedElasticConstants.h.

Referenced by computeQpIntegral().

const VariableGradient& HomogenizedElasticConstants::_grad_disp_x_xx
private

Definition at line 38 of file HomogenizedElasticConstants.h.

Referenced by computeQpIntegral().

const VariableGradient& HomogenizedElasticConstants::_grad_disp_x_xy
private

Definition at line 50 of file HomogenizedElasticConstants.h.

Referenced by computeQpIntegral().

const VariableGradient& HomogenizedElasticConstants::_grad_disp_x_yy
private

Definition at line 42 of file HomogenizedElasticConstants.h.

Referenced by computeQpIntegral().

const VariableGradient& HomogenizedElasticConstants::_grad_disp_x_yz
private

Definition at line 54 of file HomogenizedElasticConstants.h.

Referenced by computeQpIntegral().

const VariableGradient& HomogenizedElasticConstants::_grad_disp_x_zx
private

Definition at line 58 of file HomogenizedElasticConstants.h.

Referenced by computeQpIntegral().

const VariableGradient& HomogenizedElasticConstants::_grad_disp_x_zz
private

Definition at line 46 of file HomogenizedElasticConstants.h.

Referenced by computeQpIntegral().

const VariableGradient& HomogenizedElasticConstants::_grad_disp_y_xx
private

Definition at line 39 of file HomogenizedElasticConstants.h.

Referenced by computeQpIntegral().

const VariableGradient& HomogenizedElasticConstants::_grad_disp_y_xy
private

Definition at line 51 of file HomogenizedElasticConstants.h.

Referenced by computeQpIntegral().

const VariableGradient& HomogenizedElasticConstants::_grad_disp_y_yy
private

Definition at line 43 of file HomogenizedElasticConstants.h.

Referenced by computeQpIntegral().

const VariableGradient& HomogenizedElasticConstants::_grad_disp_y_yz
private

Definition at line 55 of file HomogenizedElasticConstants.h.

Referenced by computeQpIntegral().

const VariableGradient& HomogenizedElasticConstants::_grad_disp_y_zx
private

Definition at line 59 of file HomogenizedElasticConstants.h.

Referenced by computeQpIntegral().

const VariableGradient& HomogenizedElasticConstants::_grad_disp_y_zz
private

Definition at line 47 of file HomogenizedElasticConstants.h.

Referenced by computeQpIntegral().

const VariableGradient& HomogenizedElasticConstants::_grad_disp_z_xx
private

Definition at line 40 of file HomogenizedElasticConstants.h.

Referenced by computeQpIntegral().

const VariableGradient& HomogenizedElasticConstants::_grad_disp_z_xy
private

Definition at line 52 of file HomogenizedElasticConstants.h.

Referenced by computeQpIntegral().

const VariableGradient& HomogenizedElasticConstants::_grad_disp_z_yy
private

Definition at line 44 of file HomogenizedElasticConstants.h.

Referenced by computeQpIntegral().

const VariableGradient& HomogenizedElasticConstants::_grad_disp_z_yz
private

Definition at line 56 of file HomogenizedElasticConstants.h.

Referenced by computeQpIntegral().

const VariableGradient& HomogenizedElasticConstants::_grad_disp_z_zx
private

Definition at line 60 of file HomogenizedElasticConstants.h.

Referenced by computeQpIntegral().

const VariableGradient& HomogenizedElasticConstants::_grad_disp_z_zz
private

Definition at line 48 of file HomogenizedElasticConstants.h.

Referenced by computeQpIntegral().

unsigned HomogenizedElasticConstants::_I
private

Definition at line 64 of file HomogenizedElasticConstants.h.

Referenced by computeQpIntegral(), and HomogenizedElasticConstants().

unsigned HomogenizedElasticConstants::_i
private

Definition at line 66 of file HomogenizedElasticConstants.h.

Referenced by HomogenizedElasticConstants().

Real HomogenizedElasticConstants::_integral_value
private

Definition at line 68 of file HomogenizedElasticConstants.h.

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

unsigned HomogenizedElasticConstants::_J
private

Definition at line 64 of file HomogenizedElasticConstants.h.

Referenced by computeQpIntegral(), and HomogenizedElasticConstants().

unsigned HomogenizedElasticConstants::_j
private

Definition at line 66 of file HomogenizedElasticConstants.h.

Referenced by HomogenizedElasticConstants().

unsigned HomogenizedElasticConstants::_k
private

Definition at line 65 of file HomogenizedElasticConstants.h.

Referenced by HomogenizedElasticConstants().

unsigned HomogenizedElasticConstants::_l
private

Definition at line 65 of file HomogenizedElasticConstants.h.

Referenced by HomogenizedElasticConstants().

const unsigned int HomogenizedElasticConstants::_row
private

Definition at line 63 of file HomogenizedElasticConstants.h.

Referenced by HomogenizedElasticConstants().

Real HomogenizedElasticConstants::_volume
private

Definition at line 67 of file HomogenizedElasticConstants.h.

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


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