https://mooseframework.inl.gov
INSFVFluxBC.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 "INSFVFluxBC.h"
11 #include "SystemBase.h"
12 #include "Assembly.h"
13 #include "MooseVariableBase.h"
14 
17 {
18  auto params = FVFluxBC::validParams();
20  return params;
21 }
22 
24  : FVFluxBC(params), INSFVMomentumResidualObject(*this)
25 {
26 }
27 
28 void
30 {
31  if (_rc_uo.segregated())
33 }
34 
35 void
37 {
38  if (_rc_uo.segregated())
40 }
41 
42 void
44 {
45  if (_rc_uo.segregated())
47 }
48 
49 ADReal
51 {
52  mooseAssert(_rc_uo.segregated(), "We should not get here if we are not segregated!");
54 }
55 
56 void
58 {
59  const auto * const elem = (_face_type == FaceInfo::VarFaceNeighbors::ELEM)
60  ? &_face_info->elem()
62  const auto dof_index = elem->dof_number(_sys.number(), _var.number(), 0);
63 
65  std::array<ADReal, 1>{{residual}},
66  std::array<dof_id_type, 1>{{dof_index}},
68 }
const FaceInfo * _face_info
void computeResidualAndJacobian(const FaceInfo &fi) override
FaceInfo::VarFaceNeighbors _face_type
void addResidualsAndJacobian(Assembly &assembly, const Residuals &residuals, const Indices &dof_indices, Real scaling_factor)
void computeResidualAndJacobian(const FaceInfo &fi) override
Definition: INSFVFluxBC.C:43
static InputParameters validParams()
SystemBase & _sys
unsigned int number() const
void computeResidual(const FaceInfo &fi) override
Definition: INSFVFluxBC.C:29
const Elem & elem() const
INSFVFluxBC(const InputParameters &params)
Definition: INSFVFluxBC.C:23
Assembly & _assembly
MooseVariableFV< Real > & _var
DualNumber< Real, DNDerivativeType, true > ADReal
RhieChowInterpolatorBase & _rc_uo
The Rhie Chow user object that is responsible for generating face velocities for advection terms...
const Elem * neighborPtr() const
virtual bool segregated() const =0
Bool of the Rhie Chow user object is used in monolithic/segregated approaches.
unsigned int number() const
void addResidualAndJacobian(const ADReal &residual)
Process into either the system residual or Jacobian.
Definition: INSFVFluxBC.C:57
All objects that contribute to pressure-based (e.g.
virtual ADReal computeSegregatedContribution()
Compute the contribution which goes into the residual of the segregated system.
Definition: INSFVFluxBC.h:45
static InputParameters validParams()
Definition: INSFVFluxBC.C:16
static InputParameters validParams()
ADReal computeQpResidual() override final
Definition: INSFVFluxBC.C:50
void computeJacobian(const FaceInfo &fi) override
void computeResidual(const FaceInfo &fi) override
void scalingFactor(const std::vector< Real > &factor)
void computeJacobian(const FaceInfo &fi) override
Definition: INSFVFluxBC.C:36