https://mooseframework.inl.gov
AriaLaserWeld304LStainlessSteelBoundary.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>("c_mu0", 0.15616, "mu0 coefficient");
20  params.addParam<Real>("ap0", 0, "");
21  params.addParam<Real>("ap1", 1.851502e1, "");
22  params.addParam<Real>("ap2", -1.96945e-1, "");
23  params.addParam<Real>("ap3", 1.594124e-3, "");
24  params.addParam<Real>("bp0", 0, "");
25  params.addParam<Real>("bp1", -5.809553e1, "");
26  params.addParam<Real>("bp2", 4.610515e-1, "");
27  params.addParam<Real>("bp3", 2.332819e-4, "");
28  params.addParam<Real>("Tb", 3000, "The boiling temperature");
29  params.addParam<Real>("Tbound1", 0, "The first temperature bound");
30  params.addParam<Real>("Tbound2", 170, "The second temperature bound");
31  params.addRequiredCoupledVar("temperature", "The temperature in K");
32  params.addParam<MaterialPropertyName>("rc_pressure_name", "rc_pressure", "The recoil pressure");
33  params.addParam<Real>(
34  "alpha", -4.3e-4, "The derivative of the surface tension with respect to temperature");
35  params.addParam<Real>("sigma0", 1.943, "The surface tension at T0");
36  params.addParam<Real>("T0", 1809, "The reference temperature for the surface tension");
37  params.addParam<MaterialPropertyName>(
38  "surface_tension_name", "surface_tension", "The surface tension");
39  params.addParam<MaterialPropertyName>(
40  "grad_surface_tension_name", "grad_surface_tension", "The gradient of the surface tension");
41  return params;
42 }
43 
45  const InputParameters & parameters)
46  : Material(parameters),
47  _ap0(getParam<Real>("ap0")),
48  _ap1(getParam<Real>("ap1")),
49  _ap2(getParam<Real>("ap2")),
50  _ap3(getParam<Real>("ap3")),
51  _bp0(getParam<Real>("bp0")),
52  _bp1(getParam<Real>("bp1")),
53  _bp2(getParam<Real>("bp2")),
54  _bp3(getParam<Real>("bp3")),
55  _Tb(getParam<Real>("Tb")),
56  _Tbound1(getParam<Real>("Tbound1")),
57  _Tbound2(getParam<Real>("Tbound2")),
58  _temperature(adCoupledValue("temperature")),
59  _grad_temperature(adCoupledGradient("temperature")),
60  _rc_pressure(declareADProperty<Real>(getParam<MaterialPropertyName>("rc_pressure_name"))),
61  _alpha(getParam<Real>("alpha")),
62  _sigma0(getParam<Real>("sigma0")),
63  _T0(getParam<Real>("T0")),
64  _surface_tension(
65  declareADProperty<Real>(getParam<MaterialPropertyName>("surface_tension_name"))),
66  _grad_surface_tension(declareADProperty<RealVectorValue>(
67  getParam<MaterialPropertyName>("grad_surface_tension_name"))),
68  _ad_normals(_assembly.adNormals()),
69  _ad_curvatures(_assembly.adCurvatures()),
70  _surface_term_curvature(declareADProperty<RealVectorValue>("surface_term_curvature")),
71  _surface_term_gradient1(declareADProperty<RealVectorValue>("surface_term_gradient1")),
72  _surface_term_gradient2(declareADProperty<RealVectorValue>("surface_term_gradient2"))
73 {
74 }
75 
76 void
78 {
79  const auto theta = _temperature[_qp] - _Tb;
80  if (theta < _Tbound1)
81  _rc_pressure[_qp] = 0;
82  else if (theta < _Tbound2)
83  _rc_pressure[_qp] = _ap0 + _ap1 * theta + _ap2 * theta * theta + _ap3 * theta * theta * theta;
84  else
85  _rc_pressure[_qp] = _bp0 + _bp1 * theta + _bp2 * theta * theta + _bp3 * theta * theta * theta;
86 
93 }
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
A material that computes 304L surface stainless steel properties relevant to doing laser welding mode...
ADMaterialProperty< RealVectorValue > & _surface_term_gradient1
registerMooseObject("NavierStokesTestApp", AriaLaserWeld304LStainlessSteelBoundary)
unsigned int _qp
AriaLaserWeld304LStainlessSteelBoundary(const InputParameters &parameters)
ADMaterialProperty< RealVectorValue > & _grad_surface_tension
static InputParameters validParams()
ADMaterialProperty< RealVectorValue > & _surface_term_gradient2
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
ADMaterialProperty< RealVectorValue > & _surface_term_curvature