https://mooseframework.inl.gov
DiscreteNucleationForce.C
Go to the documentation of this file.
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 
11 #include "DiscreteNucleationMap.h"
12 
14 
17 {
19  params.addClassDescription(
20  "Term for inserting grain nuclei or phases in non-conserved order parameter fields");
21  params.addRequiredParam<UserObjectName>("map", "DiscreteNucleationMap user object");
22  params.addParam<Real>("no_nucleus_value", 0.0, "Variable value indicating no nucleus is present");
23  params.addParam<Real>(
24  "nucleus_value", 1.0, "Variable value indicating the presence of a nucleus");
25  return params;
26 }
27 
29  : Kernel(params),
30  _map(getUserObject<DiscreteNucleationMap>("map")),
31  _v0(getParam<Real>("no_nucleus_value")),
32  _v1(getParam<Real>("nucleus_value"))
33 {
34 }
35 
36 void
38 {
39  // check if a nucleation event list is available for the current element
41 }
42 
43 Real
45 {
46  return -((*_nucleus)[_qp] * (_v1 - _v0) + _v0) * _test[_i][_qp];
47 }
static InputParameters validParams()
This UserObject maintains a per QP map that indicates if a nucleus is present or not.
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
const std::vector< Real > * _nucleus
nucleus data for the current element
void addRequiredParam(const std::string &name, const std::string &doc_string)
const VariableTestValue & _test
static InputParameters validParams()
const DiscreteNucleationMap & _map
UserObject providing a map of currently active nuclei.
DiscreteNucleationForce(const InputParameters &params)
unsigned int _i
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
registerMooseObject("PhaseFieldApp", DiscreteNucleationForce)
void addClassDescription(const std::string &doc_string)
const Real _v0
Bounds for the returned values.
const Elem *const & _current_elem
const std::vector< Real > & nuclei(const Elem *) const
Free energy penalty contribution to force the nucleation of subresolution particles.
unsigned int _qp