https://mooseframework.inl.gov
XFEMPhaseTransitionMovingInterfaceVelocity.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 
13 
16 {
18  params.addRequiredParam<Real>("diffusivity_at_positive_level_set",
19  "Diffusivity for level set positive region.");
20  params.addRequiredParam<Real>("diffusivity_at_negative_level_set",
21  "Diffusivity for level set negative region.");
22  params.addRequiredParam<Real>("equilibrium_concentration_jump",
23  "The jump of the equilibrium concentration at the interface.");
24  params.addClassDescription(
25  "calculate the interface velocity for a simple phase transition problem.");
26  return params;
27 }
28 
30  const InputParameters & parameters)
31  : XFEMMovingInterfaceVelocityBase(parameters),
32  _diffusivity_at_positive_level_set(getParam<Real>("diffusivity_at_positive_level_set")),
33  _diffusivity_at_negative_level_set(getParam<Real>("diffusivity_at_negative_level_set")),
34  _equilibrium_concentration_jump(getParam<Real>("equilibrium_concentration_jump"))
35 {
36 }
37 
38 Real
40  dof_id_type point_id, RealVectorValue normal) const
41 {
42  Real value_positive = _value_at_interface_uo->getValueAtPositiveLevelSet()[point_id];
43  Real value_negative = _value_at_interface_uo->getValueAtNegativeLevelSet()[point_id];
46 
47  return std::abs((_diffusivity_at_positive_level_set * grad_positive -
48  _diffusivity_at_negative_level_set * grad_negative) *
49  normal / (value_positive - value_negative + _equilibrium_concentration_jump));
50 }
Real _diffusivity_at_negative_level_set
Diffusivity in the negative level set region.
Real _diffusivity_at_positive_level_set
Diffusivity in the positive level set region.
Real _equilibrium_concentration_jump
Jump of the equilibrium concentrations at phase boundary.
void addRequiredParam(const std::string &name, const std::string &doc_string)
std::map< unsigned int, Real > getValueAtNegativeLevelSet() const
get the map that stores the point index and its values at the negative level set side ...
std::map< unsigned int, RealVectorValue > getGradientAtNegativeLevelSet() const
get the map that stores the point index and its graident at the negative level set side ...
const NodeValueAtXFEMInterface * _value_at_interface_uo
Pointer to NodeValueAtXFEMInterface object.
std::map< unsigned int, RealVectorValue > getGradientAtPositiveLevelSet() const
get the map that stores the point index and its gradient at the positive level set side ...
registerMooseObject("XFEMApp", XFEMPhaseTransitionMovingInterfaceVelocity)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
XFEMPhaseTransitionMovingInterfaceVelocity(const InputParameters &parameters)
void addClassDescription(const std::string &doc_string)
virtual Real computeMovingInterfaceVelocity(dof_id_type point_id, RealVectorValue normal) const override
Compute the interface velocity for a node.
std::map< unsigned int, Real > getValueAtPositiveLevelSet() const
get the map that stores the point index and its values at the positive level set side ...
uint8_t dof_id_type