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

This Kernel computes epsilon_ijk * stress_jk (sum over j and k) "i" is called _component in this class and epsilon is the permutation pseudo-tensor. More...

#include <MomentBalancing.h>

Inheritance diagram for MomentBalancing:
[legend]

Public Member Functions

 MomentBalancing (const InputParameters &parameters)
 

Protected Member Functions

virtual Real computeQpResidual ()
 
virtual Real computeQpJacobian ()
 
virtual Real computeQpOffDiagJacobian (unsigned int jvar)
 

Protected Attributes

const MaterialProperty< RankTwoTensor > & _stress
 the stress tensor (not the moment stress) at the quad-point. More...
 
const MaterialProperty< RankFourTensor > & _Jacobian_mult
 d(stress tensor)/(d strain tensor) Here strain_ij = grad_j disp_i + epsilon_ijk * wc_k More...
 
const unsigned int _component
 The Kernel computes epsilon_{component j k}*stress_{j k}. More...
 
const unsigned int _nrots
 
std::vector< unsigned int > _wc_var
 the moose variable numbers for the Cosserat rotation degrees of freedom More...
 
const unsigned int _ndisp
 
std::vector< unsigned int > _disp_var
 the moose variable numbers for the displacements More...
 

Detailed Description

This Kernel computes epsilon_ijk * stress_jk (sum over j and k) "i" is called _component in this class and epsilon is the permutation pseudo-tensor.

This Kernel is added to CosseratStressDivergenceTensors to form the equilibrium equations for the Cosserat moment-stress.

Definition at line 30 of file MomentBalancing.h.

Constructor & Destructor Documentation

MomentBalancing::MomentBalancing ( const InputParameters &  parameters)

Definition at line 36 of file MomentBalancing.C.

37  : Kernel(parameters),
38  _stress(getMaterialProperty<RankTwoTensor>("stress" +
39  getParam<std::string>("appended_property_name"))),
40  _Jacobian_mult(getMaterialProperty<RankFourTensor>(
41  "Jacobian_mult" + getParam<std::string>("appended_property_name"))),
42  _component(getParam<unsigned int>("component")),
43  _nrots(coupledComponents("Cosserat_rotations")),
44  _wc_var(_nrots),
45  _ndisp(coupledComponents("displacements")),
47 {
48  if (_nrots != 3)
49  mooseError("MomentBalancing: This Kernel is only defined for 3-dimensional simulations so 3 "
50  "Cosserat rotation variables are needed");
51  for (unsigned i = 0; i < _nrots; ++i)
52  _wc_var[i] = coupled("Cosserat_rotations", i);
53 
54  if (_ndisp != 3)
55  mooseError("MomentBalancing: This Kernel is only defined for 3-dimensional simulations so 3 "
56  "displacement variables are needed");
57  for (unsigned i = 0; i < _ndisp; ++i)
58  _disp_var[i] = coupled("displacements", i);
59 
60  // Following check is necessary to ensure the correct Jacobian is calculated
61  if (_wc_var[_component] != _var.number())
62  mooseError("MomentBalancing: The variable for this Kernel must be equal to the Cosserat "
63  "rotation variable defined by the \"component\" and the \"Cosserat_rotations\" "
64  "parameters");
65 }
std::vector< unsigned int > _disp_var
the moose variable numbers for the displacements
std::vector< unsigned int > _wc_var
the moose variable numbers for the Cosserat rotation degrees of freedom
const MaterialProperty< RankTwoTensor > & _stress
the stress tensor (not the moment stress) at the quad-point.
const unsigned int _nrots
const MaterialProperty< RankFourTensor > & _Jacobian_mult
d(stress tensor)/(d strain tensor) Here strain_ij = grad_j disp_i + epsilon_ijk * wc_k ...
const unsigned int _ndisp
const unsigned int _component
The Kernel computes epsilon_{component j k}*stress_{j k}.

Member Function Documentation

Real MomentBalancing::computeQpJacobian ( )
protectedvirtual

Definition at line 78 of file MomentBalancing.C.

79 {
81  _Jacobian_mult[_qp], _component, _component, _test[_i][_qp], _phi[_j][_qp]);
82 }
Real momentJacobianWC(const RankFourTensor &r4t, unsigned int i, unsigned int k, Real test, Real phi)
This is used for the moment-balancing kernel eps_ijk*stress_jk*test, when varied wrt w_k (the cossera...
const MaterialProperty< RankFourTensor > & _Jacobian_mult
d(stress tensor)/(d strain tensor) Here strain_ij = grad_j disp_i + epsilon_ijk * wc_k ...
const unsigned int _component
The Kernel computes epsilon_{component j k}*stress_{j k}.
Real MomentBalancing::computeQpOffDiagJacobian ( unsigned int  jvar)
protectedvirtual

Definition at line 85 of file MomentBalancing.C.

86 {
87  // What does 2D look like here?
88  for (unsigned v = 0; v < _ndisp; ++v)
89  if (jvar == _disp_var[v])
91  _Jacobian_mult[_qp], _component, v, _test[_i][_qp], _grad_phi[_j][_qp]);
92 
93  // What does 2D look like here?
94  for (unsigned v = 0; v < _nrots; ++v)
95  if (jvar == _wc_var[v])
97  _Jacobian_mult[_qp], _component, v, _test[_i][_qp], _phi[_j][_qp]);
98 
99  return 0.0;
100 }
std::vector< unsigned int > _disp_var
the moose variable numbers for the displacements
std::vector< unsigned int > _wc_var
the moose variable numbers for the Cosserat rotation degrees of freedom
Real momentJacobianWC(const RankFourTensor &r4t, unsigned int i, unsigned int k, Real test, Real phi)
This is used for the moment-balancing kernel eps_ijk*stress_jk*test, when varied wrt w_k (the cossera...
const unsigned int _nrots
const MaterialProperty< RankFourTensor > & _Jacobian_mult
d(stress tensor)/(d strain tensor) Here strain_ij = grad_j disp_i + epsilon_ijk * wc_k ...
Real momentJacobian(const RankFourTensor &r4t, unsigned int i, unsigned int k, Real test, const RealGradient &grad_phi)
This is used for the moment-balancing kernel eps_ijk*stress_jk*test, when varied wrt u_k Jacobian ent...
const unsigned int _ndisp
const unsigned int _component
The Kernel computes epsilon_{component j k}*stress_{j k}.
Real MomentBalancing::computeQpResidual ( )
protectedvirtual

Definition at line 68 of file MomentBalancing.C.

69 {
70  Real the_sum = 0.0;
71  for (unsigned int j = 0; j < LIBMESH_DIM; ++j)
72  for (unsigned int k = 0; k < LIBMESH_DIM; ++k)
73  the_sum += PermutationTensor::eps(_component, j, k) * _stress[_qp](j, k);
74  return _test[_i][_qp] * the_sum;
75 }
const MaterialProperty< RankTwoTensor > & _stress
the stress tensor (not the moment stress) at the quad-point.
const unsigned int _component
The Kernel computes epsilon_{component j k}*stress_{j k}.

Member Data Documentation

const unsigned int MomentBalancing::_component
protected

The Kernel computes epsilon_{component j k}*stress_{j k}.

Definition at line 50 of file MomentBalancing.h.

Referenced by computeQpJacobian(), computeQpOffDiagJacobian(), computeQpResidual(), and MomentBalancing().

std::vector<unsigned int> MomentBalancing::_disp_var
protected

the moose variable numbers for the displacements

Definition at line 62 of file MomentBalancing.h.

Referenced by computeQpOffDiagJacobian(), and MomentBalancing().

const MaterialProperty<RankFourTensor>& MomentBalancing::_Jacobian_mult
protected

d(stress tensor)/(d strain tensor) Here strain_ij = grad_j disp_i + epsilon_ijk * wc_k

Definition at line 47 of file MomentBalancing.h.

Referenced by computeQpJacobian(), and computeQpOffDiagJacobian().

const unsigned int MomentBalancing::_ndisp
protected

Definition at line 59 of file MomentBalancing.h.

Referenced by computeQpOffDiagJacobian(), and MomentBalancing().

const unsigned int MomentBalancing::_nrots
protected

Definition at line 53 of file MomentBalancing.h.

Referenced by computeQpOffDiagJacobian(), and MomentBalancing().

const MaterialProperty<RankTwoTensor>& MomentBalancing::_stress
protected

the stress tensor (not the moment stress) at the quad-point.

Definition at line 41 of file MomentBalancing.h.

Referenced by computeQpResidual().

std::vector<unsigned int> MomentBalancing::_wc_var
protected

the moose variable numbers for the Cosserat rotation degrees of freedom

Definition at line 56 of file MomentBalancing.h.

Referenced by computeQpOffDiagJacobian(), and MomentBalancing().


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