https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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
12
14
17{
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
36void
38{
39 // check if a nucleation event list is available for the current element
41}
42
43Real
45{
46 return -((*_nucleus)[_qp] * (_v1 - _v0) + _v0) * _test[_i][_qp];
47}
registerMooseObject("PhaseFieldApp", DiscreteNucleationForce)
Free energy penalty contribution to force the nucleation of subresolution particles.
const std::vector< Real > * _nucleus
nucleus data for the current element
DiscreteNucleationForce(const InputParameters &params)
const Real _v0
Bounds for the returned values.
static InputParameters validParams()
const DiscreteNucleationMap & _map
UserObject providing a map of currently active nuclei.
This UserObject maintains a per QP map that indicates if a nucleus is present or not.
const std::vector< Real > & nuclei(const Elem *) const
void addRequiredParam(const std::string &name, const std::string &doc_string)
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
unsigned int _qp
const Elem *const & _current_elem
unsigned int _i
const VariableTestValue & _test
static InputParameters validParams()