www.mooseframework.org
CosseratStressDivergenceTensors.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
11 #include "Material.h"
12 #include "RankFourTensor.h"
13 #include "ElasticityTensorTools.h"
14 #include "RankTwoTensor.h"
15 #include "MooseMesh.h"
16 
18 
21 {
23  params.addRequiredCoupledVar("Cosserat_rotations", "The 3 Cosserat rotation variables");
24  return params;
25 }
26 
28  : StressDivergenceTensors(parameters),
29  _nrots(coupledComponents("Cosserat_rotations")),
30  _wc_var(_nrots)
31 {
32  for (unsigned i = 0; i < _nrots; ++i)
33  _wc_var[i] = coupled("Cosserat_rotations", i);
34 }
35 
36 Real
38 {
39  for (unsigned int v = 0; v < _nrots; ++v)
40  if (jvar == _wc_var[v])
42  _Jacobian_mult[_qp], _component, v, _grad_test[_i][_qp], _phi[_j][_qp]);
43 
45 }
Real elasticJacobianWC(const RankFourTensor &r4t, unsigned int i, unsigned int k, const RealGradient &grad_test, Real phi)
This is used for the standard kernel stress_ij*d(test)/dx_j, when varied wrt w_k (the cosserat rotati...
const unsigned int _component
An integer corresponding to the direction this kernel acts in.
registerMooseObject("SolidMechanicsApp", CosseratStressDivergenceTensors)
Computes grad_i(stress_{i component}) This is exactly the same as StressDivergenceTensors, only the Jacobian entries are correct for the Cosserat case.
virtual Real computeQpOffDiagJacobian(unsigned int jvar) override
const MaterialProperty< RankFourTensor > & _Jacobian_mult
CosseratStressDivergenceTensors(const InputParameters &parameters)
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual Real computeQpOffDiagJacobian(unsigned int jvar)
static const std::string v
Definition: NS.h:82
static InputParameters validParams()
const unsigned int _nrots
Number of Cosserat rotation variables supplied by user.
std::vector< unsigned int > _wc_var
The MOOSE variable numbers of the Cosserat rotation variables.
StressDivergenceTensors mostly copies from StressDivergence.