21 "Return a time step limit for nucleation event to be used by IterationAdaptiveDT");
23 "Time step to cut back to at the start of a nucleation event");
27 "p2nucleus > 0 & p2nucleus < 1",
28 "Maximum probability for more than one nucleus to appear during a time " 29 "step. This will limit the time step based on the total nucleation rate for " 30 "the domain to make sure the probability for two or more nuclei to appear " 31 "is always below the chosen number.");
32 params.
addRequiredParam<UserObjectName>(
"inserter",
"DiscreteNucleationInserter user object");
39 _dt_nucleation(getParam<
Real>(
"dt_max")),
40 _changes_made(_inserter.getInsertionsAndDeletions()),
41 _rate(_inserter.getRate())
49 const Real p2n = getParam<Real>(
"p2nucleus");
54 Real lower_bound = 0.0;
59 for (
unsigned int i = 0; i < 100; ++i)
61 const Real p_upper = 1.0 - (1.0 + upper_bound) * std::exp(-upper_bound);
69 lower_bound = upper_bound;
74 for (
unsigned int i = 0; i < 100; ++i)
77 _max_lambda = (upper_bound - lower_bound) / 2.0 + lower_bound;
105 return std::numeric_limits<Real>::max();
bool absoluteFuzzyEqual(const T &var1, const T2 &var2, const T3 &tol=libMesh::TOLERANCE *libMesh::TOLERANCE)
Real _max_lambda
Maximum total event expectation value that is low enough so that the probability for more than one * ...
static InputParameters validParams()
Returns a user defined timestep limit for the simulation step right after the introduction of a new n...
const Real _dt_nucleation
User specified nucleation time step.
const DiscreteNucleationInserterBase::NucleusChanges & _changes_made
nucleus count changes performed by the inserter
static InputParameters validParams()
This UserObject manages the insertion and expiration of nuclei in the simulation domain it manages a ...
DiscreteNucleationTimeStep(const InputParameters ¶meters)
const Real & _rate
total nucleation rate integrated over the entire domain
registerMooseObject("PhaseFieldApp", DiscreteNucleationTimeStep)
virtual PostprocessorValue getValue() const override
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real