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