https://mooseframework.inl.gov
WCNSFVFluxBCBase.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 "NS.h"
13 #include "FVFluxBC.h"
14 #include "INSFVFlowBC.h"
15 
19 class WCNSFVFluxBCBase : public FVFluxBC, public INSFVFlowBC
20 {
21 public:
23  WCNSFVFluxBCBase(const InputParameters & params);
24 
26  void residualSetup() override;
27  void jacobianSetup() override;
29 
30 protected:
35  void checkForInternalDirection() const;
36 
38  virtual bool isInflow() const;
39 
41  ADReal inflowMassFlux(const Moose::StateArg & state) const;
42 
44  ADReal inflowSpeed(const Moose::StateArg & state) const;
45 
47  ADRealVectorValue varVelocity(const Moose::StateArg & state) const;
48 
51 
54 
57 
60 
63 
67  const Point _direction;
68 
71 
77 };
78 
79 inline void
81 {
83  mooseError(
84  type(),
85  " can only be defined on an internal face if the 'direction' parameter is supplied!");
86 }
void checkForInternalDirection() const
check for improper use on an internal face, e.g.
const PostprocessorValue *const _velocity_pp
Postprocessor with the inlet velocity.
const PostprocessorValue *const _mdot_pp
Postprocessor with the inlet mass flow rate.
const bool _direction_specified_by_user
Flag to store if the flow direction is specified by the user.
const FaceInfo * _face_info
const Moose::Functor< ADReal > & _rho
Fluid density functor.
ADRealVectorValue varVelocity(const Moose::StateArg &state) const
returns the velocity vector (vel_x, vel_y, vel_z)
const Point _direction
The direction in which the flow is entering/leaving the domain.
ADReal inflowMassFlux(const Moose::StateArg &state) const
computes the inflow massflux
Base class for weakly compressible flux boundary conditions.
DualNumber< Real, DNDerivativeType, true > ADReal
const Moose::Functor< ADReal > *const _vel_y
ADReal inflowSpeed(const Moose::StateArg &state) const
computes the inflow speed
static InputParameters validParams()
void jacobianSetup() override
const Elem * neighborPtr() const
Real PostprocessorValue
const PostprocessorValue *const _area_pp
Postprocessor with the inlet area.
const std::string & type() const
const Moose::Functor< ADReal > *const _vel_z
virtual bool isInflow() const
true if a boundary is an inflow boundary, false if outflow
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const Moose::Functor< ADReal > & _vel_x
Velocity components.
const Real _scaling_factor
Scaling factor.
void mooseError(Args &&... args) const
void residualSetup() override
in residual and jacobian setup we check if the area is zero
A parent class for INSFV flow boundary conditions.
Definition: INSFVFlowBC.h:17
WCNSFVFluxBCBase(const InputParameters &params)