https://mooseframework.inl.gov
LaserWeld316LStainlessSteelBoundary.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 "Assembly.h"
12 
14 
17 {
19  params.addParam<Real>("P0", 1e5, "The ambient pressure for the recoil pressure");
20  params.addParam<Real>("L_v", 7.45E6, "Latent heat from evaporation for the recoil pressure");
21  params.addParam<Real>("M", 56E-3, "Molar mass for the recoil pressure");
22  params.addParam<Real>("T_v", 3080, "The vaporization temperature for recoil pressure");
23  params.addParam<Real>("R", 8.314, "The gas constant for recoil pressure");
24  params.addParam<Real>("c_gamma0", 1.593, "Constant term in the surface tension");
25  params.addParam<Real>("c_gamma1", 1.9e-4, "Linear term multiplier in the surface tension");
26  params.addParam<Real>("Tl", 1708, "The liquidus temperature");
27  params.addRequiredCoupledVar("temperature", "The temperature in K");
28  params.addParam<MaterialPropertyName>("rc_pressure_name", "rc_pressure", "The recoil pressure");
29  params.addParam<MaterialPropertyName>(
30  "surface_tension_name", "surface_tension", "The surface tension");
31  params.addParam<MaterialPropertyName>(
32  "grad_surface_tension_name", "grad_surface_tension", "The gradient of the surface tension");
33  return params;
34 }
35 
37  const InputParameters & parameters)
38  : Material(parameters),
39  _P0(getParam<Real>("P0")),
40  _L_v(getParam<Real>("L_v")),
41  _M(getParam<Real>("M")),
42  _T_v(getParam<Real>("T_v")),
43  _R(getParam<Real>("R")),
44  _c_gamma0(getParam<Real>("c_gamma0")),
45  _c_gamma1(getParam<Real>("c_gamma1")),
46  _Tl(getParam<Real>("Tl")),
47  _rc_pressure(declareADProperty<Real>(getParam<MaterialPropertyName>("rc_pressure_name"))),
48  _surface_tension(
49  declareADProperty<Real>(getParam<MaterialPropertyName>("surface_tension_name"))),
50  _grad_surface_tension(declareADProperty<RealVectorValue>(
51  getParam<MaterialPropertyName>("grad_surface_tension_name"))),
52  _surface_term_curvature(declareADProperty<RealVectorValue>("surface_term_curvature")),
53  _surface_term_gradient1(declareADProperty<RealVectorValue>("surface_term_gradient1")),
54  _surface_term_gradient2(declareADProperty<RealVectorValue>("surface_term_gradient2")),
55  _ad_normals(_assembly.adNormals()),
56  _ad_curvatures(_assembly.adCurvatures()),
57  _temperature(adCoupledValue("temperature")),
58  _grad_temperature(adCoupledGradient("temperature"))
59 {
60 }
61 
62 void
64 {
65  // Below the vaporization temperature we don't have recoil pressure
66  if (_temperature[_qp] < _T_v)
67  _rc_pressure[_qp] = 0;
68  else
69  _rc_pressure[_qp] =
70  0.54 * _P0 *
71  std::exp(_L_v * _M / _R * (_temperature[_qp] - _T_v) / (_temperature[_qp] * _T_v));
72 
73  // The surface tension treatment methodology is from:
74  // Noble, David R et al, Use of Aria to simulate laser weld pool dynamics for neutron generator production,
75  // 2007, Sandia National Laboratories (SNL), Albuquerque, NM, and Livermore, CA
76  //
77  // with the surface tension from:
78  //
79  // Pichler, Peter, et al. "Surface tension and thermal conductivity of NIST SRM 1155a
80  // (AISI 316L stainless steel)."
83 
84  // These terms are needed for the treatment in:
85  // Cairncross RA, Schunk PR, Baer TA, Rao RR, Sackinger PA. A finite element method for free surface
86  // flows of incompressible fluids in three dimensions. Part I. Boundary fitted mesh motion.
87  // International journal for numerical methods in fluids. 2000 Jun 15;33(3):375-403.
92 }
ADMaterialProperty< Real > & _rc_pressure
Declaring the material properties.
const Real _P0
The vapor recoil pressure is taken from: Chen, Xuehui, et al.
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
const Real _c_gamma0
The surface tension is taken from: Pichler, Peter, et al.
registerMooseObject("NavierStokesTestApp", LaserWeld316LStainlessSteelBoundary)
const ADVariableValue & _temperature
We need to know the temperature and the gradient of the temperature.
ADMaterialProperty< RealVectorValue > & _surface_term_gradient2
ADMaterialProperty< RealVectorValue > & _grad_surface_tension
unsigned int _qp
static InputParameters validParams()
A material that computes 316L surface stainless steel boundary properties relevant to doing laser wel...
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
LaserWeld316LStainlessSteelBoundary(const InputParameters &parameters)
ADMaterialProperty< RealVectorValue > & _surface_term_curvature
ADMaterialProperty< RealVectorValue > & _surface_term_gradient1