https://mooseframework.inl.gov
Loading...
Searching...
No Matches
MassDiffusionSpeciesGasMixDGKernel.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
19 params.addClassDescription("Adds mass diffusion to the species equation for FlowChannelGasMix.");
20
21 return params;
22}
23
29
32{
33 Real dx, dx_side;
34 computePositionChanges(dx, dx_side);
35
36 const ADReal rho = linearlyInterpolate(_rho_elem[_qp], _rho_neig[_qp], dx, dx_side);
37 const ADReal D = linearlyInterpolate(_D_elem[_qp], _D_neig[_qp], dx, dx_side);
39
40 return -rho * D * dxi_dx;
41}
DualNumber< Real, DNDerivativeType, true > ADReal
const double rho
registerMooseObject("ThermalHydraulicsApp", MassDiffusionSpeciesGasMixDGKernel)
unsigned int _qp
void addClassDescription(const std::string &doc_string)
Adds mass diffusion for FlowChannelGasMix.
ADReal computeGradient(const ADReal &y_elem, const ADReal &y_neig, Real dx) const
Computes the gradient of a quantity in the channel direction.
ADReal linearlyInterpolate(const ADReal &y_elem, const ADReal &y_neig, Real dx, Real dx_side) const
Linearly interpolates a quantity to the side position.
const ADMaterialProperty< Real > & _rho_neig
Density for neighbor element.
const ADMaterialProperty< Real > & _D_elem
Diffusion coefficient for current element.
const ADMaterialProperty< Real > & _D_neig
Diffusion coefficient for neighbor element.
const ADMaterialProperty< Real > & _rho_elem
Density for current element.
const ADMaterialProperty< Real > & _mass_fraction_elem
Mass fraction for current element.
void computePositionChanges(Real &dx, Real &dx_side) const
Computes the changes in position between elements and side.
const ADMaterialProperty< Real > & _mass_fraction_neig
Mass fraction for neighbor element.
Adds mass diffusion to the species equation for FlowChannelGasMix.
MassDiffusionSpeciesGasMixDGKernel(const InputParameters &parameters)
virtual ADReal computeQpFlux() const override
Computes the flux that will be applied to both sides for a q-point.