Line data Source code
1 : //* This file is part of the MOOSE framework 2 : //* https://mooseframework.inl.gov 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 : 10 : #include "GBDependentDiffusivity.h" 11 : 12 : registerMooseObject("PhaseFieldApp", GBDependentDiffusivity); 13 : 14 : InputParameters 15 0 : GBDependentDiffusivity::validParams() 16 : { 17 0 : InputParameters params = GBDependentTensorBase::validParams(); 18 0 : params.addClassDescription("Compute diffusivity rank two tensor based on GB phase variable"); 19 0 : return params; 20 0 : } 21 : 22 0 : GBDependentDiffusivity::GBDependentDiffusivity(const InputParameters & parameters) 23 0 : : GBDependentTensorBase(parameters) 24 : { 25 0 : } 26 : 27 : void 28 0 : GBDependentDiffusivity::initQpStatefulProperties() 29 : { 30 0 : _gb_dependent_tensor[_qp].zero(); 31 0 : } 32 : 33 : void 34 0 : GBDependentDiffusivity::computeQpProperties() 35 : { 36 0 : RankTwoTensor iden(RankTwoTensor::initIdentity); 37 0 : RankTwoTensor gb_tensor; 38 : 39 0 : gb_tensor = (1.0 - _gb[_qp]) * _bulk_parameter * iden + 40 0 : _gb[_qp] * _gb_parameter * (iden - _gb_normal_tensor[_qp]); 41 0 : gb_tensor.fillRealTensor(_gb_dependent_tensor[_qp]); 42 0 : }