www.mooseframework.org
FluxBasedStrainIncrement.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 "libmesh/quadrature.h"
12 
13 registerMooseObject("SolidMechanicsApp", FluxBasedStrainIncrement);
14 
17 {
19  params.addClassDescription("Compute strain increment based on flux");
20  params.addRequiredCoupledVar("xflux", "x or 0-direction component of flux");
21  params.addCoupledVar("yflux", "y or 1-direction component of flux");
22  params.addCoupledVar("zflux", "z or 2-direction component of flux");
23  params.addCoupledVar("gb", "Grain boundary order parameter");
24  params.addRequiredParam<MaterialPropertyName>("property_name",
25  "Name of diffusive strain increment property");
26  return params;
27 }
28 
31  _grad_jx(&coupledGradient("xflux")),
32  _has_yflux(isCoupled("yflux")),
33  _has_zflux(isCoupled("zflux")),
34  _grad_jy(_has_yflux ? &coupledGradient("yflux") : nullptr),
35  _grad_jz(_has_zflux ? &coupledGradient("zflux") : nullptr),
36  _gb(isCoupled("gb") ? coupledValue("gb") : _zero),
37  _strain_increment(
38  declareProperty<RankTwoTensor>(getParam<MaterialPropertyName>("property_name")))
39 {
40 }
41 
42 void
44 {
45  _strain_increment[_qp].zero();
46 }
47 
48 void
50 {
52 
54  _strain_increment[_qp] *= (1.0 - _gb[_qp]) * _dt;
55 }
56 
57 void
59 {
61 
63 
64  if (_has_yflux)
66 
67  if (_has_zflux)
69 }
void fillRow(unsigned int r, const libMesh::TypeVector< Real > &v)
const VariableGradient *const _grad_jz
MaterialProperty< RankTwoTensor > & _strain_increment
void addRequiredParam(const std::string &name, const std::string &doc_string)
static InputParameters validParams()
static InputParameters validParams()
registerMooseObject("SolidMechanicsApp", FluxBasedStrainIncrement)
const VariableGradient *const _grad_jx
const VariableGradient *const _grad_jy
void addCoupledVar(const std::string &name, const std::string &doc_string)
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
RankTwoTensorTempl< Real > transpose() const
FluxBasedStrainIncrement computes strain increment based on flux (vacancy) Forest et...
FluxBasedStrainIncrement(const InputParameters &parameters)
void addClassDescription(const std::string &doc_string)