www.mooseframework.org
Public Member Functions | Private Attributes | List of all members
BicrystalCircleGrainICAction Class Reference

Bicrystal with a circular grain and an embedding outer grain. More...

#include <BicrystalCircleGrainICAction.h>

Inheritance diagram for BicrystalCircleGrainICAction:
[legend]

Public Member Functions

 BicrystalCircleGrainICAction (const InputParameters &params)
 
virtual void act ()
 

Private Attributes

const std::string _var_name_base
 
const unsigned int _op_num
 
const Real _radius
 
const Real _x
 
const Real _y
 
const Real _z
 
const Real _int_width
 
const bool _3D_sphere
 

Detailed Description

Bicrystal with a circular grain and an embedding outer grain.

Definition at line 19 of file BicrystalCircleGrainICAction.h.

Constructor & Destructor Documentation

◆ BicrystalCircleGrainICAction()

BicrystalCircleGrainICAction::BicrystalCircleGrainICAction ( const InputParameters &  params)

Definition at line 36 of file BicrystalCircleGrainICAction.C.

37  : Action(params),
38  _var_name_base(getParam<std::string>("var_name_base")),
39  _op_num(getParam<unsigned int>("op_num")),
40  _radius(getParam<Real>("radius")),
41  _x(getParam<Real>("x")),
42  _y(getParam<Real>("y")),
43  _z(getParam<Real>("z")),
44  _int_width(getParam<Real>("int_width")),
45  _3D_sphere(getParam<bool>("3D_sphere"))
46 {
47  if (_op_num != 2)
48  paramError("op_num", "op_num must equal 2 for bicrystal ICs");
49 }

Member Function Documentation

◆ act()

void BicrystalCircleGrainICAction::act ( )
virtual

Definition at line 52 of file BicrystalCircleGrainICAction.C.

53 {
54  // Loop through the number of order parameters
55  for (unsigned int op = 0; op < _op_num; op++)
56  {
57  // Create variable names
58  std::string var_name = _var_name_base + Moose::stringify(op);
59 
60  // Set parameters for SmoothCircleIC
61  InputParameters poly_params = _factory.getValidParams("SmoothCircleIC");
62  poly_params.set<VariableName>("variable") = var_name;
63  poly_params.set<Real>("x1") = _x;
64  poly_params.set<Real>("y1") = _y;
65  poly_params.set<Real>("z1") = _z;
66  poly_params.set<Real>("radius") = _radius;
67  poly_params.set<Real>("int_width") = _int_width;
68  poly_params.set<bool>("3D_spheres") = _3D_sphere;
69  if (op == 0)
70  {
71  // Values for circle grain
72  poly_params.set<Real>("invalue") = 1.0;
73  poly_params.set<Real>("outvalue") = 0.0;
74  }
75  else
76  {
77  // Values for matrix grain
78  poly_params.set<Real>("invalue") = 0.0;
79  poly_params.set<Real>("outvalue") = 1.0;
80  }
81 
82  // Add initial condition
83  _problem->addInitialCondition(
84  "SmoothCircleIC", "BicrystalCircleGrainIC_" + Moose::stringify(op), poly_params);
85  }
86 }

Member Data Documentation

◆ _3D_sphere

const bool BicrystalCircleGrainICAction::_3D_sphere
private

Definition at line 34 of file BicrystalCircleGrainICAction.h.

Referenced by act().

◆ _int_width

const Real BicrystalCircleGrainICAction::_int_width
private

Definition at line 32 of file BicrystalCircleGrainICAction.h.

Referenced by act().

◆ _op_num

const unsigned int BicrystalCircleGrainICAction::_op_num
private

Definition at line 28 of file BicrystalCircleGrainICAction.h.

Referenced by act(), and BicrystalCircleGrainICAction().

◆ _radius

const Real BicrystalCircleGrainICAction::_radius
private

Definition at line 30 of file BicrystalCircleGrainICAction.h.

Referenced by act().

◆ _var_name_base

const std::string BicrystalCircleGrainICAction::_var_name_base
private

Definition at line 27 of file BicrystalCircleGrainICAction.h.

Referenced by act().

◆ _x

const Real BicrystalCircleGrainICAction::_x
private

Definition at line 31 of file BicrystalCircleGrainICAction.h.

Referenced by act().

◆ _y

const Real BicrystalCircleGrainICAction::_y
private

Definition at line 31 of file BicrystalCircleGrainICAction.h.

Referenced by act().

◆ _z

const Real BicrystalCircleGrainICAction::_z
private

Definition at line 31 of file BicrystalCircleGrainICAction.h.

Referenced by act().


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