https://mooseframework.inl.gov
Loading...
Searching...
No Matches
AriaLaserWeld304LStainlessSteel.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.addParam<Real>("c_mu0", 0.15616, "mu0 coefficient");
19 params.addParam<Real>("c_mu1", -3.3696e-5, "mu1 coefficient");
20 params.addParam<Real>("c_mu2", 1.0191e-8, "mu2 coefficient");
21 params.addParam<Real>("c_mu3", -1.0413e-12, "mu3 coefficient");
22 params.addParam<Real>("Tmax", 4000, "The maximum temperature");
23 params.addParam<Real>("Tl", 1623, "The liquidus temperature");
24 params.addParam<Real>(
25 "T90", 1528, "The T90 temperature (I don't know what this means physically)");
26 params.addParam<Real>("beta", 1e11, "beta coefficient");
27 params.addParam<Real>("c_k0", 10.7143, "k0 coefficient");
28 params.addParam<Real>("c_k1", 14.2857e-3, "k1 coefficient");
29 params.addParam<Real>("c_cp0", 425.75, "cp0 coefficient");
30 params.addParam<Real>("c_cp1", 170.833e-3, "cp1 coefficient");
31 params.addParam<Real>("c_rho0", 7.9e3, "The constant density");
32 params.addRequiredCoupledVar("temperature", "The temperature in K");
33 params.addParam<MaterialPropertyName>(
34 "mu_name", "mu", "The name of the viscosity material property");
35 params.addParam<MaterialPropertyName>("k_name", "k", "The name of the thermal conductivity");
36 params.addParam<MaterialPropertyName>("cp_name", "cp", "The name of the specific heat capacity");
37 params.addParam<MaterialPropertyName>("rho_name", "rho", "The name of the density");
38 return params;
39}
40
42 : Material(parameters),
43 _c_mu0(getParam<Real>("c_mu0")),
44 _c_mu1(getParam<Real>("c_mu1")),
45 _c_mu2(getParam<Real>("c_mu2")),
46 _c_mu3(getParam<Real>("c_mu3")),
47 _Tmax(getParam<Real>("Tmax")),
48 _Tl(getParam<Real>("Tl")),
49 _T90(getParam<Real>("T90")),
50 _beta(getParam<Real>("beta")),
51 _c_k0(getParam<Real>("c_k0")),
52 _c_k1(getParam<Real>("c_k1")),
53 _c_cp0(getParam<Real>("c_cp0")),
54 _c_cp1(getParam<Real>("c_cp1")),
55 _c_rho0(getParam<Real>("c_rho0")),
56 _temperature(adCoupledValue("temperature")),
57 _grad_temperature(adCoupledGradient("temperature")),
58 _mu(declareADProperty<Real>(getParam<MaterialPropertyName>("mu_name"))),
59 _k(declareADProperty<Real>(getParam<MaterialPropertyName>("k_name"))),
60 _cp(declareADProperty<Real>(getParam<MaterialPropertyName>("cp_name"))),
61 _rho(declareADProperty<Real>(getParam<MaterialPropertyName>("rho_name"))),
62 _grad_k(declareADProperty<RealVectorValue>("grad_" + getParam<MaterialPropertyName>("k_name")))
63{
64}
65
66void
68{
69 if (_temperature[_qp] < _Tl)
70 _mu[_qp] = (_c_mu0 + _c_mu1 * _Tl + _c_mu2 * _Tl * _Tl + _c_mu3 * _Tl * _Tl * _Tl) *
71 (_beta + (1 - _beta) * (_temperature[_qp] - _T90) / (_Tl - _T90));
72 else
73 {
74 ADReal That;
76 _mu[_qp] = (_c_mu0 + _c_mu1 * That + _c_mu2 * That * That + _c_mu3 * That * That * That);
77 }
81 _rho[_qp] = _c_rho0;
82}
DualNumber< Real, DNDerivativeType, true > ADReal
registerMooseObject("NavierStokesTestApp", AriaLaserWeld304LStainlessSteel)
A material that computes 304L volumetric stainless steel properties relevant to doing laser welding m...
AriaLaserWeld304LStainlessSteel(const InputParameters &parameters)
ADMaterialProperty< RealVectorValue > & _grad_k
void addRequiredCoupledVar(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)
unsigned int _qp
static InputParameters validParams()