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 "LevelSetPhaseChange.h" 11 : 12 : registerMooseObject("MalamuteApp", LevelSetPhaseChange); 13 : 14 : InputParameters 15 6 : LevelSetPhaseChange::validParams() 16 : { 17 6 : InputParameters params = ADKernelValue::validParams(); 18 6 : params.addClassDescription("Computes interface velocity due to phase change."); 19 12 : params.addRequiredParam<Real>("rho_l", "Liquid density."); 20 12 : params.addRequiredParam<Real>("rho_g", "Gas density."); 21 6 : return params; 22 0 : } 23 : 24 3 : LevelSetPhaseChange::LevelSetPhaseChange(const InputParameters & parameters) 25 : : ADKernelValue(parameters), 26 3 : _delta_function(getADMaterialProperty<Real>("delta_function")), 27 6 : _heaviside_function(getADMaterialProperty<Real>("heaviside_function")), 28 6 : _melt_pool_mass_rate(getADMaterialProperty<Real>("melt_pool_mass_rate")), 29 6 : _rho_l(getParam<Real>("rho_l")), 30 9 : _rho_g(getParam<Real>("rho_g")) 31 : { 32 3 : } 33 : 34 : ADReal 35 150000 : LevelSetPhaseChange::precomputeQpResidual() 36 : { 37 450000 : return -(_heaviside_function[_qp] / _rho_g + (1 - _heaviside_function[_qp]) / _rho_l) * 38 300000 : _melt_pool_mass_rate[_qp] * _delta_function[_qp]; 39 : }