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 33 of file MomentBalancing.h.

Constructor & Destructor Documentation

◆ MomentBalancing()

MomentBalancing::MomentBalancing ( const InputParameters &  parameters)

Definition at line 41 of file MomentBalancing.C.

42  : Kernel(parameters),
43  _stress(getMaterialProperty<RankTwoTensor>("stress" +
44  getParam<std::string>("appended_property_name"))),
45  _Jacobian_mult(getMaterialProperty<RankFourTensor>(
46  "Jacobian_mult" + getParam<std::string>("appended_property_name"))),
47  _component(getParam<unsigned int>("component")),
48  _nrots(coupledComponents("Cosserat_rotations")),
49  _wc_var(_nrots),
50  _ndisp(coupledComponents("displacements")),
52 {
53  if (_nrots != 3)
54  mooseError("MomentBalancing: This Kernel is only defined for 3-dimensional simulations so 3 "
55  "Cosserat rotation variables are needed");
56  for (unsigned i = 0; i < _nrots; ++i)
57  _wc_var[i] = coupled("Cosserat_rotations", i);
58 
59  if (_ndisp != 3)
60  mooseError("MomentBalancing: This Kernel is only defined for 3-dimensional simulations so 3 "
61  "displacement variables are needed");
62  for (unsigned i = 0; i < _ndisp; ++i)
63  _disp_var[i] = coupled("displacements", i);
64 
65  // Following check is necessary to ensure the correct Jacobian is calculated
66  if (_wc_var[_component] != _var.number())
67  mooseError("MomentBalancing: The variable for this Kernel must be equal to the Cosserat "
68  "rotation variable defined by the \"component\" and the \"Cosserat_rotations\" "
69  "parameters");
70 }
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

◆ computeQpJacobian()

Real MomentBalancing::computeQpJacobian ( )
protectedvirtual

Definition at line 83 of file MomentBalancing.C.

84 {
86  _Jacobian_mult[_qp], _component, _component, _test[_i][_qp], _phi[_j][_qp]);
87 }
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}.

◆ computeQpOffDiagJacobian()

Real MomentBalancing::computeQpOffDiagJacobian ( unsigned int  jvar)
protectedvirtual

Definition at line 90 of file MomentBalancing.C.

91 {
92  // What does 2D look like here?
93  for (unsigned v = 0; v < _ndisp; ++v)
94  if (jvar == _disp_var[v])
96  _Jacobian_mult[_qp], _component, v, _test[_i][_qp], _grad_phi[_j][_qp]);
97 
98  // What does 2D look like here?
99  for (unsigned v = 0; v < _nrots; ++v)
100  if (jvar == _wc_var[v])
102  _Jacobian_mult[_qp], _component, v, _test[_i][_qp], _phi[_j][_qp]);
103 
104  return 0.0;
105 }
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}.

◆ computeQpResidual()

Real MomentBalancing::computeQpResidual ( )
protectedvirtual

Definition at line 73 of file MomentBalancing.C.

74 {
75  Real the_sum = 0.0;
76  for (unsigned int j = 0; j < LIBMESH_DIM; ++j)
77  for (unsigned int k = 0; k < LIBMESH_DIM; ++k)
78  the_sum += PermutationTensor::eps(_component, j, k) * _stress[_qp](j, k);
79  return _test[_i][_qp] * the_sum;
80 }
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

◆ _component

const unsigned int MomentBalancing::_component
protected

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

Definition at line 53 of file MomentBalancing.h.

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

◆ _disp_var

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

the moose variable numbers for the displacements

Definition at line 65 of file MomentBalancing.h.

Referenced by computeQpOffDiagJacobian(), and MomentBalancing().

◆ _Jacobian_mult

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 50 of file MomentBalancing.h.

Referenced by computeQpJacobian(), and computeQpOffDiagJacobian().

◆ _ndisp

const unsigned int MomentBalancing::_ndisp
protected

Definition at line 62 of file MomentBalancing.h.

Referenced by computeQpOffDiagJacobian(), and MomentBalancing().

◆ _nrots

const unsigned int MomentBalancing::_nrots
protected

Definition at line 56 of file MomentBalancing.h.

Referenced by computeQpOffDiagJacobian(), and MomentBalancing().

◆ _stress

const MaterialProperty<RankTwoTensor>& MomentBalancing::_stress
protected

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

Definition at line 44 of file MomentBalancing.h.

Referenced by computeQpResidual().

◆ _wc_var

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

the moose variable numbers for the Cosserat rotation degrees of freedom

Definition at line 59 of file MomentBalancing.h.

Referenced by computeQpOffDiagJacobian(), and MomentBalancing().


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