www.mooseframework.org
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ComputeSurfaceTensionKKS Class Reference

#include <ComputeSurfaceTensionKKS.h>

Inheritance diagram for ComputeSurfaceTensionKKS:
[legend]

Public Member Functions

 ComputeSurfaceTensionKKS (const InputParameters &parameters)
 

Protected Member Functions

virtual void computeQpProperties () override
 

Protected Attributes

const VariableValue & _v
 Order parameter. More...
 
const VariableGradient & _grad_v
 Gradient of order parameter. More...
 
const MaterialProperty< Real > & _kappa
 Material property for gradient energy coefficient. More...
 
const MaterialProperty< Real > & _g
 Material property for barrier function. More...
 
Real _w
 double well height parameter More...
 
MaterialProperty< RankTwoTensor > & _planar_stress
 

Detailed Description

Definition at line 23 of file ComputeSurfaceTensionKKS.h.

Constructor & Destructor Documentation

◆ ComputeSurfaceTensionKKS()

ComputeSurfaceTensionKKS::ComputeSurfaceTensionKKS ( const InputParameters &  parameters)

Definition at line 33 of file ComputeSurfaceTensionKKS.C.

34  : Material(parameters),
35  _v(coupledValue("v")),
36  _grad_v(coupledGradient("v")),
37  _kappa(getMaterialProperty<Real>("kappa_name")),
38  _g(getMaterialProperty<Real>("g")),
39  _w(getParam<Real>("w")),
41  declareProperty<RankTwoTensor>(getParam<MaterialPropertyName>("planar_stress_name")))
42 {
43 }
Real _w
double well height parameter
const VariableValue & _v
Order parameter.
MaterialProperty< RankTwoTensor > & _planar_stress
const MaterialProperty< Real > & _kappa
Material property for gradient energy coefficient.
const MaterialProperty< Real > & _g
Material property for barrier function.
const VariableGradient & _grad_v
Gradient of order parameter.

Member Function Documentation

◆ computeQpProperties()

void ComputeSurfaceTensionKKS::computeQpProperties ( )
overrideprotectedvirtual

Definition at line 46 of file ComputeSurfaceTensionKKS.C.

47 {
48  auto & S = _planar_stress[_qp];
49  S.zero();
50 
51  // compute norm square of the order parameter gradient
52  const Real grad_norm_sq = _grad_v[_qp].norm_sq();
53 
54  const Real nx = _grad_v[_qp](0);
55  const Real ny = _grad_v[_qp](1);
56  const Real nz = _grad_v[_qp](2);
57  Real fsum = _w * _g[_qp] + 0.5 * _kappa[_qp] * grad_norm_sq;
58 
59  S(0, 0) += fsum - _kappa[_qp] * nx * nx;
60  S(0, 1) += -_kappa[_qp] * nx * ny;
61  S(1, 1) += fsum - _kappa[_qp] * ny * ny;
62  S(0, 2) += -_kappa[_qp] * nx * nz;
63  S(1, 2) += -_kappa[_qp] * ny * nz;
64  S(2, 2) += fsum - _kappa[_qp] * nz * nz;
65 
66  // fill in symmetrically
67  S(1, 0) = S(0, 1);
68  S(2, 0) = S(0, 2);
69  S(2, 1) = S(1, 2);
70 }
Real _w
double well height parameter
MaterialProperty< RankTwoTensor > & _planar_stress
const MaterialProperty< Real > & _kappa
Material property for gradient energy coefficient.
const MaterialProperty< Real > & _g
Material property for barrier function.
const VariableGradient & _grad_v
Gradient of order parameter.

Member Data Documentation

◆ _g

const MaterialProperty<Real>& ComputeSurfaceTensionKKS::_g
protected

Material property for barrier function.

Definition at line 39 of file ComputeSurfaceTensionKKS.h.

Referenced by computeQpProperties().

◆ _grad_v

const VariableGradient& ComputeSurfaceTensionKKS::_grad_v
protected

Gradient of order parameter.

Definition at line 34 of file ComputeSurfaceTensionKKS.h.

Referenced by computeQpProperties().

◆ _kappa

const MaterialProperty<Real>& ComputeSurfaceTensionKKS::_kappa
protected

Material property for gradient energy coefficient.

Definition at line 37 of file ComputeSurfaceTensionKKS.h.

Referenced by computeQpProperties().

◆ _planar_stress

MaterialProperty<RankTwoTensor>& ComputeSurfaceTensionKKS::_planar_stress
protected

Definition at line 43 of file ComputeSurfaceTensionKKS.h.

Referenced by computeQpProperties().

◆ _v

const VariableValue& ComputeSurfaceTensionKKS::_v
protected

Order parameter.

Definition at line 32 of file ComputeSurfaceTensionKKS.h.

◆ _w

Real ComputeSurfaceTensionKKS::_w
protected

double well height parameter

Definition at line 41 of file ComputeSurfaceTensionKKS.h.

Referenced by computeQpProperties().


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