https://mooseframework.inl.gov
INSFVElementalKernel.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 "INSFVElementalKernel.h"
11 
14 {
15  auto params = FVElementalKernel::validParams();
17  return params;
18 }
19 
22 {
23 }
24 
25 void
27 {
28  if (_rc_uo.segregated())
29  {
31  _local_re(0) +=
34  }
35 }
36 
37 void
39 {
40  if (_rc_uo.segregated())
41  {
43  mooseAssert(_var.dofIndices().size() == 1, "We're currently built to use CONSTANT MONOMIALS");
44  addJacobian(_assembly, std::array<ADReal, 1>{{r}}, _var.dofIndices(), _var.scalingFactor());
45  }
46 }
47 
48 void
50 {
51  if (_rc_uo.segregated())
52  {
55  _assembly, std::array<ADReal, 1>{{r}}, _var.dofIndices(), _var.scalingFactor());
56  }
57 }
58 
59 void
61 {
63  std::array<ADReal, 1>{{residual}},
64  std::array<dof_id_type, 1>{{dof_index}},
66 }
void addResidualAndJacobian(const ADReal &residual, dof_id_type dof)
Process into either the system residual or Jacobian.
void addResidualsAndJacobian(Assembly &assembly, const Residuals &residuals, const Indices &dof_indices, Real scaling_factor)
void accumulateTaggedLocalResidual()
unsigned int number() const
auto raw_value(const Eigen::Map< T > &in)
DualNumber< Real, DNDerivativeType, true > ADReal
RhieChowInterpolatorBase & _rc_uo
The Rhie Chow user object that is responsible for generating face velocities for advection terms...
void computeResidual() override
void addJacobian(Assembly &assembly, const Residuals &residuals, const Indices &dof_indices, Real scaling_factor)
virtual bool segregated() const =0
Bool of the Rhie Chow user object is used in monolithic/segregated approaches.
static InputParameters validParams()
INSFVElementalKernel(const InputParameters &params)
All objects that contribute to pressure-based (e.g.
Assembly & _assembly
static InputParameters validParams()
void computeJacobian() override
virtual ADReal computeSegregatedContribution()
Compute the contribution which goes into the residual of the segregated system.
DenseVector< Number > _local_re
void computeResidualAndJacobian() override
const Real & elemVolume() const
static InputParameters validParams()
void prepareVectorTag(Assembly &assembly, unsigned int ivar)
void scalingFactor(const std::vector< Real > &factor)
virtual const std::vector< dof_id_type > & dofIndices() const final
uint8_t dof_id_type
MooseVariableFV< Real > & _var