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

Action that sets up ACSEDGPoly Kernels that adds the stored energy contribution to grain growth models. More...

#include <PolycrystalStoredEnergyAction.h>

Inheritance diagram for PolycrystalStoredEnergyAction:
[legend]

Public Member Functions

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

Protected Attributes

const unsigned int _op_num
 number of grains to create More...
 
const std::string _var_name_base
 base name for the order parameter variables More...
 
const unsigned int _deformed_grain_num
 number of deformed grains More...
 

Detailed Description

Action that sets up ACSEDGPoly Kernels that adds the stored energy contribution to grain growth models.

This allows such models to simulate recrystallization as well.

Definition at line 16 of file PolycrystalStoredEnergyAction.h.

Constructor & Destructor Documentation

PolycrystalStoredEnergyAction::PolycrystalStoredEnergyAction ( const InputParameters &  params)

Definition at line 35 of file PolycrystalStoredEnergyAction.C.

36  : Action(params),
37  _op_num(getParam<unsigned int>("op_num")),
38  _var_name_base(getParam<std::string>("var_name_base")),
39  _deformed_grain_num(getParam<unsigned int>("deformed_grain_num"))
40 {
41 }
const unsigned int _op_num
number of grains to create
const unsigned int _deformed_grain_num
number of deformed grains
const std::string _var_name_base
base name for the order parameter variables

Member Function Documentation

void PolycrystalStoredEnergyAction::act ( )
virtual

Definition at line 44 of file PolycrystalStoredEnergyAction.C.

45 {
46  for (unsigned int op = 0; op < _op_num; ++op)
47  {
48  //
49  // Create variable names
50  //
51 
52  std::string var_name = _var_name_base + Moose::stringify(op);
53  std::vector<VariableName> v;
54  v.resize(_op_num - 1);
55 
56  unsigned int ind = 0;
57  for (unsigned int j = 0; j < _op_num; ++j)
58  if (j != op)
59  v[ind++] = _var_name_base + Moose::stringify(j);
60 
61  //
62  // Set up ACSEDGPoly Stored Energy in Deformed Grains kernels
63  //
64 
65  InputParameters params = _factory.getValidParams("ACSEDGPoly");
66  params.set<NonlinearVariableName>("variable") = var_name;
67  params.set<std::vector<VariableName>>("v") = v;
68  params.set<UserObjectName>("grain_tracker") = getParam<UserObjectName>("grain_tracker");
69  params.set<bool>("use_displaced_mesh") = getParam<bool>("use_displaced_mesh");
70  params.set<unsigned int>("deformed_grain_num") = getParam<unsigned int>("deformed_grain_num");
71  params.set<unsigned int>("op_index") = op;
72 
73  std::string kernel_name = "ACStoredEnergy_" + var_name;
74  _problem->addKernel("ACSEDGPoly", kernel_name, params);
75  }
76 }
const unsigned int _op_num
number of grains to create
const std::string _var_name_base
base name for the order parameter variables

Member Data Documentation

const unsigned int PolycrystalStoredEnergyAction::_deformed_grain_num
protected

number of deformed grains

Definition at line 31 of file PolycrystalStoredEnergyAction.h.

const unsigned int PolycrystalStoredEnergyAction::_op_num
protected

number of grains to create

Definition at line 25 of file PolycrystalStoredEnergyAction.h.

Referenced by act().

const std::string PolycrystalStoredEnergyAction::_var_name_base
protected

base name for the order parameter variables

Definition at line 28 of file PolycrystalStoredEnergyAction.h.

Referenced by act().


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