PorousFlowVolumetricStrain Class Reference

PorousFlowVolumetricStrain computes volumetric strains, and derivatives thereof. More...

#include <PorousFlowVolumetricStrain.h>

Inheritance diagram for PorousFlowVolumetricStrain:
[legend]

## Public Member Functions

PorousFlowVolumetricStrain (const InputParameters &parameters)

## Protected Member Functions

virtual void initQpStatefulProperties () override

virtual void computeQpProperties () override

## Protected Attributes

const bool _consistent
If true then the strain rate will include terms that ensure mass is conserved when doing integrals over the displaced mesh. More...

const unsigned int _ndisp
number of displacements supplied (1 in 1D, 2 in 2D, 3 in 3D) More...

std::vector< const VariableValue * > _disp
displacement variable values at the quad point More...

std::vector< unsigned int > _disp_var_num
moose variable number of the displacements variables provided More...

old value of gradient of the displacements More...

MaterialProperty< Real > & _vol_strain_rate_qp
The volumetric strain rate at the quadpoints. More...

MaterialProperty< std::vector< RealGradient > > & _dvol_strain_rate_qp_dvar
The derivative of the volumetric strain rate with respect to the porous flow variables. More...

MaterialProperty< Real > & _vol_total_strain_qp
The total volumetric strain at the quadpoints. More...

MaterialProperty< std::vector< RealGradient > > & _dvol_total_strain_qp_dvar
The derivative of the total volumetric strain with respect to the porous flow variables. More...

const unsigned int _num_phases
Number of phases. More...

const unsigned int _num_components
Number of fluid components. More...

const unsigned int _num_var
Number of PorousFlow variables. More...

## Detailed Description

PorousFlowVolumetricStrain computes volumetric strains, and derivatives thereof.

Definition at line 17 of file PorousFlowVolumetricStrain.h.

## Constructor & Destructor Documentation

 PorousFlowVolumetricStrain::PorousFlowVolumetricStrain ( const InputParameters & parameters )

Definition at line 34 of file PorousFlowVolumetricStrain.C.

35  : PorousFlowMaterialVectorBase(parameters),
36  _consistent(getParam<bool>("consistent_with_displaced_mesh")),
37  _ndisp(coupledComponents("displacements")),
38  _disp(3),
39  _disp_var_num(3),
42
43  _vol_strain_rate_qp(declareProperty<Real>("PorousFlow_volumetric_strain_rate_qp")),
46  _vol_total_strain_qp(declareProperty<Real>("PorousFlow_total_volumetric_strain_qp")),
49 {
50  if (_ndisp != _mesh.dimension())
51  mooseError("PorousFlowVolumetricStrain: The number of variables supplied in 'displacements' "
52  "must match the mesh dimension.");
53
54  // fetch coupled variables and gradients (as stateful properties if necessary)
55  for (unsigned int i = 0; i < _ndisp; ++i)
56  {
57  _disp[i] = &coupledValue("displacements", i);
58  _disp_var_num[i] = coupled("displacements", i);
61  }
62
63  // set unused dimensions to zero
64  for (unsigned i = _ndisp; i < 3; ++i)
65  {
66  _disp[i] = &_zero;
67  _disp_var_num[i] = 0;
68  while (_dictator.isPorousFlowVariable(_disp_var_num[i]))
69  _disp_var_num[i]++; // increment until disp_var_num[i] is not a porflow var
72  }
73  if (_nodal_material == true)
74  mooseError("PorousFlowVolumetricStrain classes are only defined for at_nodes = false");
75 }
MaterialProperty< std::vector< RealGradient > > & _dvol_strain_rate_qp_dvar
The derivative of the volumetric strain rate with respect to the porous flow variables.
old value of gradient of the displacements
const unsigned int _ndisp
number of displacements supplied (1 in 1D, 2 in 2D, 3 in 3D)
MaterialProperty< Real > & _vol_total_strain_qp
The total volumetric strain at the quadpoints.
std::vector< const VariableValue * > _disp
displacement variable values at the quad point
MaterialProperty< Real > & _vol_strain_rate_qp
The volumetric strain rate at the quadpoints.
MaterialProperty< std::vector< RealGradient > > & _dvol_total_strain_qp_dvar
The derivative of the total volumetric strain with respect to the porous flow variables.
PorousFlowMaterialVectorBase(const InputParameters &parameters)
const bool _consistent
If true then the strain rate will include terms that ensure mass is conserved when doing integrals ov...
std::vector< unsigned int > _disp_var_num
moose variable number of the displacements variables provided

## Member Function Documentation

 void PorousFlowVolumetricStrain::computeQpProperties ( )
overrideprotectedvirtual

Definition at line 84 of file PorousFlowVolumetricStrain.C.

85 {
86  RankTwoTensor A(
91
92  _vol_total_strain_qp[_qp] = A.trace();
93
95
96  RankTwoTensor total_strain_increment = 0.5 * (A + A.transpose());
97  const Real andy = (_consistent
100  : 1.0);
101  _vol_strain_rate_qp[_qp] = total_strain_increment.trace() / _dt / andy;
102
103  // prepare the derivatives with zeroes
106  for (unsigned i = 0; i < _ndisp; ++i)
107  if (_dictator.isPorousFlowVariable(_disp_var_num[i]))
108  {
109  // the i_th displacement is a porous-flow variable
110  const unsigned int pvar = _dictator.porousFlowVariableNum(_disp_var_num[i]);
111  _dvol_strain_rate_qp_dvar[_qp][pvar](i) = 1.0 / _dt / andy;
112  _dvol_total_strain_qp_dvar[_qp][pvar](i) = 1.0;
113  }
114 }
MaterialProperty< std::vector< RealGradient > > & _dvol_strain_rate_qp_dvar
The derivative of the volumetric strain rate with respect to the porous flow variables.
old value of gradient of the displacements
const unsigned int _ndisp
number of displacements supplied (1 in 1D, 2 in 2D, 3 in 3D)
MaterialProperty< Real > & _vol_total_strain_qp
The total volumetric strain at the quadpoints.
MaterialProperty< Real > & _vol_strain_rate_qp
The volumetric strain rate at the quadpoints.
MaterialProperty< std::vector< RealGradient > > & _dvol_total_strain_qp_dvar
The derivative of the total volumetric strain with respect to the porous flow variables.
const unsigned int _num_var
Number of PorousFlow variables.
const bool _consistent
If true then the strain rate will include terms that ensure mass is conserved when doing integrals ov...
std::vector< unsigned int > _disp_var_num
moose variable number of the displacements variables provided
 void PorousFlowVolumetricStrain::initQpStatefulProperties ( )
overrideprotectedvirtual

Definition at line 78 of file PorousFlowVolumetricStrain.C.

79 {
80  _vol_total_strain_qp[_qp] = 0.0;
81 }
MaterialProperty< Real > & _vol_total_strain_qp
The total volumetric strain at the quadpoints.

## Member Data Documentation

 const bool PorousFlowVolumetricStrain::_consistent
protected

If true then the strain rate will include terms that ensure mass is conserved when doing integrals over the displaced mesh.

Definition at line 27 of file PorousFlowVolumetricStrain.h.

Referenced by computeQpProperties().

 std::vector PorousFlowVolumetricStrain::_disp
protected

displacement variable values at the quad point

Definition at line 33 of file PorousFlowVolumetricStrain.h.

Referenced by PorousFlowVolumetricStrain().

 std::vector PorousFlowVolumetricStrain::_disp_var_num
protected

moose variable number of the displacements variables provided

Definition at line 36 of file PorousFlowVolumetricStrain.h.

Referenced by computeQpProperties(), and PorousFlowVolumetricStrain().

 MaterialProperty >& PorousFlowVolumetricStrain::_dvol_strain_rate_qp_dvar
protected

The derivative of the volumetric strain rate with respect to the porous flow variables.

Since the volumetric strain rate depends on derivatives of the displacement variables, this should be multiplied by _grad_phi in kernels

Definition at line 52 of file PorousFlowVolumetricStrain.h.

Referenced by computeQpProperties().

 MaterialProperty >& PorousFlowVolumetricStrain::_dvol_total_strain_qp_dvar
protected

The derivative of the total volumetric strain with respect to the porous flow variables.

Since the total volumetric strain depends on derivatives of the displacement variables, this should be multiplied by _grad_phi in kernels

Definition at line 62 of file PorousFlowVolumetricStrain.h.

Referenced by computeQpProperties().

protected

Definition at line 39 of file PorousFlowVolumetricStrain.h.

Referenced by computeQpProperties(), and PorousFlowVolumetricStrain().

protected

old value of gradient of the displacements

Definition at line 42 of file PorousFlowVolumetricStrain.h.

Referenced by computeQpProperties(), and PorousFlowVolumetricStrain().

 const unsigned int PorousFlowVolumetricStrain::_ndisp
protected

number of displacements supplied (1 in 1D, 2 in 2D, 3 in 3D)

Definition at line 30 of file PorousFlowVolumetricStrain.h.

Referenced by computeQpProperties(), and PorousFlowVolumetricStrain().

 const unsigned int PorousFlowMaterialVectorBase::_num_components
protectedinherited

Number of fluid components.

Definition at line 32 of file PorousFlowMaterialVectorBase.h.

 MaterialProperty& PorousFlowVolumetricStrain::_vol_strain_rate_qp
protected

The volumetric strain rate at the quadpoints.

Definition at line 45 of file PorousFlowVolumetricStrain.h.

Referenced by computeQpProperties().

 MaterialProperty& PorousFlowVolumetricStrain::_vol_total_strain_qp
protected

The total volumetric strain at the quadpoints.

Definition at line 55 of file PorousFlowVolumetricStrain.h.

Referenced by computeQpProperties(), and initQpStatefulProperties().

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