https://mooseframework.inl.gov
Loading...
Searching...
No Matches
DiscreteNucleationAux.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{
19 params.addClassDescription("Project the DiscreteNucleationMap state onto an AuxVariable");
20 params.addRequiredParam<UserObjectName>("map", "DiscreteNucleationMap user object");
21 params.addParam<Real>("no_nucleus_value", 0.0, "Variable value indicating no nucleus is present");
22 params.addParam<Real>(
23 "nucleus_value", 1.0, "Variable value indicating the presence of a nucleus");
24 return params;
25}
26
28 : AuxKernel(params),
29 _map(getUserObject<DiscreteNucleationMap>("map")),
30 _v0(getParam<Real>("no_nucleus_value")),
31 _v1(getParam<Real>("nucleus_value"))
32{
33 if (isNodal())
34 paramError("variable", "This kernel must operate on an elemental AuxVariable.");
35}
36
37void
39{
40 // check if a nucleation event list is available for the current element
42}
43
44Real
46{
47 return (*_nucleus)[_qp] * (_v1 - _v0) + _v0;
48}
registerMooseObject("PhaseFieldApp", DiscreteNucleationAux)
const Elem *const & _current_elem
static InputParameters validParams()
Project the DiscreteNucleationMap onto an AuxVariable field.
static InputParameters validParams()
const std::vector< Real > * _nucleus
nucleus data for the current element
const DiscreteNucleationMap & _map
UserObject providing a map of currently active nuclei.
void precalculateValue() override
DiscreteNucleationAux(const InputParameters &params)
const Real _v0
Bounds for the returned values.
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)
void paramError(const std::string &param, Args... args) const