https://mooseframework.inl.gov
INSFVMomentumAdvection.h
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 #pragma once
11 
12 #include "INSFVAdvectionKernel.h"
15 
21 {
22 public:
25 
31 
35  static std::vector<std::string> listOfCommonParams();
36 
37  void gatherRCData(const Elem &) override final {}
38  void gatherRCData(const FaceInfo & fi) override final;
39  void initialSetup() override;
41  void computeResidual(const FaceInfo & fi) override final;
43  void computeJacobian(const FaceInfo & fi) override final;
44 
45 protected:
46  virtual ADReal computeQpResidual() override final;
47  virtual bool hasMaterialTimeDerivative() const override { return true; }
48 
52  virtual const Moose::FunctorBase<ADReal> & epsilon() const { return _unity_functor; }
53 
57  virtual void computeResidualsAndAData(const FaceInfo & fi);
58 
61 
63  const bool _approximate_as;
64 
66  const Real _cs;
67 
69  std::unique_ptr<PiecewiseByBlockLambdaFunctor<ADReal>> _rho_u;
70 
72  ADReal _ae = 0;
73 
75  ADReal _an = 0;
76 
79 
82 
85 };
ADReal _neighbor_residual
The neighbor residual.
static InputParameters uniqueParams()
Parameters of this object that should be added to the NSFV action that are unique to this object...
std::unique_ptr< PiecewiseByBlockLambdaFunctor< ADReal > > _rho_u
Our local momentum functor.
static InputParameters validParams()
DualNumber< Real, DNDerivativeType, true > ADReal
ADReal _ae
The a coefficient for the element.
void gatherRCData(const Elem &) override final
Should be a non-empty implementation if the residual object is a FVElementalKernel and introduces res...
void computeJacobian() override
const Real _cs
Characteristic speed.
INSFVMomentumAdvection(const InputParameters &params)
const bool _approximate_as
Whether to approximately calculate the &#39;a&#39; coefficients.
const Moose::Functor< ADReal > & _rho
Density.
virtual const Moose::FunctorBase< ADReal > & epsilon() const
A virtual method that allows us to reuse all the code from free-flow for porous.
virtual ADReal computeQpResidual() override final
static std::vector< std::string > listOfCommonParams()
An advection kernel that implements interpolation schemes specific to Navier-Stokes flow physics...
All objects that contribute to pressure-based (e.g.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
An advection kernel that implements interpolation schemes specific to Navier-Stokes flow physics...
ADReal _an
The a coefficient for the neighbor.
ADReal _elem_residual
The element residual.
virtual bool hasMaterialTimeDerivative() const override
const Moose::ConstantFunctor< ADReal > _unity_functor
A unity functor used in the epsilon virtual method.
virtual void computeResidualsAndAData(const FaceInfo &fi)
Helper method that computes the &#39;a&#39; coefficients and AD residuals.
void computeResidual() override