https://mooseframework.inl.gov
PCNSFVKT.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 "FVFluxKernel.h"
13 #include <memory>
14 #include <utility>
15 
16 namespace Moose
17 {
18 namespace FV
19 {
20 template <typename>
21 class Limiter;
22 }
23 }
25 
29 class PCNSFVKT : public FVFluxKernel
30 {
31 public:
33  PCNSFVKT(const InputParameters & params);
34 
35 protected:
36  virtual ADReal computeQpResidual() override;
37  std::pair<ADReal, ADReal> computeAlphaAndOmega(const ADReal & u_elem_normal,
38  const ADReal & u_neighbor_normal,
39  const ADReal & c_elem,
40  const ADReal & c_neighbor) const;
41  static ADReal computeFaceFlux(const ADReal & alpha,
42  const ADReal & omega,
43  const ADReal & sup_vel_elem_normal,
44  const ADReal & sup_vel_neighbor_normal,
45  const ADReal & adv_quant_elem,
46  const ADReal & adv_quant_neighbor);
47 
50 
65 
72 
79 
84 
86  const MooseEnum _eqn;
87 
89  const unsigned int _index;
90 
97 
99  std::unique_ptr<Moose::FV::Limiter<ADReal>> _limiter;
100 
103  const bool _knp_for_omega;
104 };
const SinglePhaseFluidProperties & _fluid
fluid properties
Definition: PCNSFVKT.h:49
const unsigned int _index
When solving the momentum equation, the momentum component we are solving for.
Definition: PCNSFVKT.h:89
static InputParameters validParams()
Definition: PCNSFVKT.C:20
const ADMaterialProperty< RealVectorValue > & _grad_T_fluid_elem
Definition: PCNSFVKT.h:69
const ADVariableGradient *const _grad_scalar_neighbor
Definition: PCNSFVKT.h:95
const MooseEnum _eqn
The equation we are solving, e.g. mass, momentum, fluid energy, or passive scalar.
Definition: PCNSFVKT.h:86
const ADMaterialProperty< Real > & _pressure_elem
pressure left == elem, right == neighbor
Definition: PCNSFVKT.h:74
const MaterialProperty< Real > & _eps_neighbor
Definition: PCNSFVKT.h:82
const ADMaterialProperty< Real > & _sup_vel_x_elem
superficial velocities left == elem, right == neighbor
Definition: PCNSFVKT.h:52
DualNumber< Real, DNDerivativeType, true > ADReal
const ADMaterialProperty< RealVectorValue > & _grad_sup_vel_z_elem
Definition: PCNSFVKT.h:62
const ADMaterialProperty< Real > & _sup_vel_y_neighbor
Definition: PCNSFVKT.h:57
virtual ADReal computeQpResidual() override
Definition: PCNSFVKT.C:128
static ADReal computeFaceFlux(const ADReal &alpha, const ADReal &omega, const ADReal &sup_vel_elem_normal, const ADReal &sup_vel_neighbor_normal, const ADReal &adv_quant_elem, const ADReal &adv_quant_neighbor)
Definition: PCNSFVKT.C:115
const bool _knp_for_omega
Whether to use the Kurganov, Noelle, and Petrova method to compute the omega parameter for stabilizat...
Definition: PCNSFVKT.h:103
const ADMaterialProperty< Real > & _sup_vel_y_elem
Definition: PCNSFVKT.h:56
const ADMaterialProperty< Real > & _sup_vel_z_neighbor
Definition: PCNSFVKT.h:61
const ADVariableGradient *const _grad_scalar_elem
Definition: PCNSFVKT.h:94
const ADMaterialProperty< Real > & _T_fluid_neighbor
Definition: PCNSFVKT.h:68
std::unique_ptr< Moose::FV::Limiter< ADReal > > _limiter
The slope limiter we will apply when interpolating from cell centroids to faces.
Definition: PCNSFVKT.h:99
const ADMaterialProperty< RealVectorValue > & _grad_sup_vel_y_neighbor
Definition: PCNSFVKT.h:59
Common class for single phase fluid properties.
const ADMaterialProperty< Real > & _pressure_neighbor
Definition: PCNSFVKT.h:75
const MaterialProperty< Real > & _eps_elem
porosity left == elem, right == neighbor
Definition: PCNSFVKT.h:81
const ADMaterialProperty< RealVectorValue > & _grad_sup_vel_x_elem
Definition: PCNSFVKT.h:54
static const std::string alpha
Definition: NS.h:134
const ADMaterialProperty< RealVectorValue > & _grad_sup_vel_x_neighbor
Definition: PCNSFVKT.h:55
const ADMaterialProperty< RealVectorValue > & _grad_pressure_neighbor
Definition: PCNSFVKT.h:77
const ADMaterialProperty< RealVectorValue > & _grad_pressure_elem
Definition: PCNSFVKT.h:76
Implements the centered Kurganov-Tadmor discretization of advective fluxes.
Definition: PCNSFVKT.h:29
const ADMaterialProperty< RealVectorValue > & _grad_sup_vel_z_neighbor
Definition: PCNSFVKT.h:63
const ADVariableValue & _scalar_elem
passive scalar values left == elem, right == neighbor
Definition: PCNSFVKT.h:92
const ADMaterialProperty< RealVectorValue > & _grad_T_fluid_neighbor
Definition: PCNSFVKT.h:70
const ADMaterialProperty< Real > & _T_fluid_elem
fluid temperature left == elem, right == neighbor
Definition: PCNSFVKT.h:67
const ADMaterialProperty< Real > & _sup_vel_z_elem
Definition: PCNSFVKT.h:60
const ADMaterialProperty< Real > & _sup_vel_x_neighbor
Definition: PCNSFVKT.h:53
const ADMaterialProperty< RealVectorValue > & _grad_sup_vel_y_elem
Definition: PCNSFVKT.h:58
PCNSFVKT(const InputParameters &params)
Definition: PCNSFVKT.C:42
const ADVariableValue & _scalar_neighbor
Definition: PCNSFVKT.h:93
std::pair< ADReal, ADReal > computeAlphaAndOmega(const ADReal &u_elem_normal, const ADReal &u_neighbor_normal, const ADReal &c_elem, const ADReal &c_neighbor) const
Definition: PCNSFVKT.C:91