https://mooseframework.inl.gov
INSFVMassAdvection.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 
10 #include "INSFVMassAdvection.h"
11 #include "NS.h"
12 
13 registerMooseObject("NavierStokesApp", INSFVMassAdvection);
14 
17 {
18  auto params = INSFVAdvectionKernel::validParams();
19  params.addClassDescription("Object for advecting mass, e.g. rho");
20  params.addRequiredParam<MooseFunctorName>(NS::density, "Density functor");
21  return params;
22 }
23 
25  : INSFVAdvectionKernel(params), _rho(getFunctor<ADReal>(NS::density))
26 {
27 }
28 
29 ADReal
31 {
32  const auto v = velocity();
33  const auto rho_face = _rho(makeFace(*_face_info,
36  determineState());
37 
38  return _normal * v * rho_face;
39 }
Moose::FV::InterpMethod _advected_interp_method
The interpolation method to use for the advected quantity.
static InputParameters validParams()
registerMooseObject("NavierStokesApp", INSFVMassAdvection)
virtual ADReal computeQpResidual() override
const FaceInfo * _face_info
Moose::StateArg determineState() const
static const std::string density
Definition: NS.h:33
auto raw_value(const Eigen::Map< T > &in)
RealVectorValue _normal
DualNumber< Real, DNDerivativeType, true > ADReal
LimiterType limiterType(InterpMethod interp_method)
A flux kernel transporting mass across cell faces.
const Moose::Functor< ADReal > & _rho
Density.
static const std::string v
Definition: NS.h:84
An advection kernel that implements interpolation schemes specific to Navier-Stokes flow physics...
ADRealVectorValue velocity() const
static InputParameters validParams()
Moose::FaceArg makeFace(const FaceInfo &fi, const Moose::FV::LimiterType limiter_type, const bool elem_is_upwind, const bool correct_skewness=false, const Moose::StateArg *state_limiter=nullptr) const
INSFVMassAdvection(const InputParameters &params)