Line data Source code
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 : 10 : #include "MassDiffusionSpeciesGasMixDGKernel.h" 11 : 12 : registerMooseObject("ThermalHydraulicsApp", MassDiffusionSpeciesGasMixDGKernel); 13 : 14 : InputParameters 15 41 : MassDiffusionSpeciesGasMixDGKernel::validParams() 16 : { 17 41 : InputParameters params = MassDiffusionBaseGasMixDGKernel::validParams(); 18 : 19 41 : params.addClassDescription("Adds mass diffusion to the species equation for FlowChannelGasMix."); 20 : 21 41 : return params; 22 0 : } 23 : 24 22 : MassDiffusionSpeciesGasMixDGKernel::MassDiffusionSpeciesGasMixDGKernel( 25 22 : const InputParameters & parameters) 26 22 : : MassDiffusionBaseGasMixDGKernel(parameters) 27 : { 28 22 : } 29 : 30 : ADReal 31 22540 : MassDiffusionSpeciesGasMixDGKernel::computeQpFlux() const 32 : { 33 : Real dx, dx_side; 34 22540 : computePositionChanges(dx, dx_side); 35 : 36 22540 : const ADReal rho = linearlyInterpolate(_rho_elem[_qp], _rho_neig[_qp], dx, dx_side); 37 22540 : const ADReal D = linearlyInterpolate(_D_elem[_qp], _D_neig[_qp], dx, dx_side); 38 22540 : const ADReal dxi_dx = computeGradient(_mass_fraction_elem[_qp], _mass_fraction_neig[_qp], dx); 39 : 40 22540 : return -rho * D * dxi_dx; 41 : }