Line data Source code
1 : /****************************************************************************/ 2 : /* DO NOT MODIFY THIS HEADER */ 3 : /* */ 4 : /* MALAMUTE: MOOSE Application Library for Advanced Manufacturing UTilitiEs */ 5 : /* */ 6 : /* Copyright 2021 - 2024, Battelle Energy Alliance, LLC */ 7 : /* ALL RIGHTS RESERVED */ 8 : /****************************************************************************/ 9 : 10 : #include "INSMeltPoolMassTransferMaterial.h" 11 : 12 : registerADMooseObject("MalamuteApp", INSMeltPoolMassTransferMaterial); 13 : 14 : InputParameters 15 16 : INSMeltPoolMassTransferMaterial::validParams() 16 : { 17 16 : InputParameters params = ADMaterial::validParams(); 18 16 : params.addClassDescription("Computes extra residuals from mass transfer for the INS equations."); 19 32 : params.addRequiredCoupledVar("temperature", "Temperature variable"); 20 32 : params.addRequiredParam<Real>("atomic_weight", "Atomic weight of metal."); 21 32 : params.addRequiredParam<Real>("Boltzmann_constant", "Stefan Boltzmann constant."); 22 32 : params.addParam<Real>("retrodiffusion_coefficient", 0, "Retrodiffusion coefficient."); 23 32 : params.addRequiredParam<Real>("vaporization_latent_heat", "Latent heat of vaporization."); 24 32 : params.addRequiredParam<Real>("vaporization_temperature", "Vaporization temperature."); 25 32 : params.addRequiredParam<Real>("reference_pressure", "Reference pressure for vaporization."); 26 16 : return params; 27 0 : } 28 : 29 12 : INSMeltPoolMassTransferMaterial::INSMeltPoolMassTransferMaterial(const InputParameters & parameters) 30 : : ADMaterial(parameters), 31 12 : _temp(adCoupledValue("temperature")), 32 12 : _melt_pool_mass_rate(declareADProperty<Real>("melt_pool_mass_rate")), 33 24 : _m(getParam<Real>("atomic_weight")), 34 24 : _boltzmann(getParam<Real>("Boltzmann_constant")), 35 24 : _beta_r(getParam<Real>("retrodiffusion_coefficient")), 36 24 : _Lv(getParam<Real>("vaporization_latent_heat")), 37 24 : _vaporization_temperature(getParam<Real>("vaporization_temperature")), 38 24 : _p0(getParam<Real>("reference_pressure")), 39 24 : _saturated_vapor_pressure(declareADProperty<Real>("saturated_vapor_pressure")) 40 : { 41 12 : } 42 : 43 : void 44 362800 : INSMeltPoolMassTransferMaterial::computeQpProperties() 45 : { 46 362800 : _saturated_vapor_pressure[_qp] = 47 725600 : _p0 * std::exp(_m * _Lv / _boltzmann / _vaporization_temperature * 48 1088400 : (1 - _vaporization_temperature / _temp[_qp])); 49 : 50 725600 : _melt_pool_mass_rate[_qp] = std::sqrt(_m / (2 * libMesh::pi * _boltzmann)) * 51 725600 : _saturated_vapor_pressure[_qp] / std::sqrt(_temp[_qp]) * 52 725600 : (1 - _beta_r); 53 362800 : }