15 #include "libmesh/numeric_vector.h" 27 "momentum equation.");
33 _mesh_dimension(_mesh.dimension()),
34 _rho_u(coupledValue(
"rho_u")),
35 _rho_v(_mesh_dimension >= 2 ? coupledValue(
"rho_v") : _zero),
36 _rho_w(_mesh_dimension >= 3 ? coupledValue(
"rho_w") : _zero),
37 _rho_u_var(getVar(
"rho_u", 0)),
38 _rho_v_var(getVar(
"rho_v", 0)),
39 _rho_w_var(getVar(
"rho_w", 0))
42 mooseError(
type(),
" is not applicable for one-dimensional mesh.");
44 mooseError(
type(),
" has not been implemented for three-dimensional mesh.");
48 auto check_var = [
this](
const auto & var_name,
const auto *
const var_ptr)
54 paramError(var_name,
"A coupled constant for this variable is not supported in this class");
56 mooseError(var_name,
"This variable must be supplied.");
58 if (!var_ptr->isNodal())
59 paramError(var_name,
"Only nodal variables supported");
82 auto set_residual = [
this](
auto & residual)
88 const auto Re_u = residual(rho_u_dof_idx);
89 const auto Re_v = residual(rho_v_dof_idx);
100 const auto rho_u_val =
102 const auto rho_v_val =
107 residual.set(rho_u_dof_idx, rho_u_val);
108 residual.set(rho_v_dof_idx, rho_v_val);
virtual bool isCoupledConstant(const std::string &var_name) const
const MooseVariable *const _rho_u_var
x-velocity variable
const VariableValue & _nz
static InputParameters validParams()
static InputParameters validParams()
Boundary condition that applies free slip condition at nodes.
const MooseVariable *const _rho_w_var
z-velocity variable
MomentumFreeSlipBC(const InputParameters ¶meters)
virtual ~MomentumFreeSlipBC()
FEProblemBase & _fe_problem
const std::string & type() const
void paramError(const std::string ¶m, Args... args) const
virtual void computeResidual() override
const VariableValue & _nx
const VariableValue & _ny
const VariableValue & _rho_v
Momentum in y-direction.
const dof_id_type & nodalDofIndex() const override
registerMooseObject("NavierStokesApp", MomentumFreeSlipBC)
void mooseError(Args &&... args) const
const bool & currentlyComputingJacobian() const
const MooseVariable *const _rho_v_var
y-velocity variable
const VariableValue & _rho_u
Momentum in x-direction.
void setResidual(SystemBase &sys, const T &residual, MooseVariableFE< T > &var)
virtual bool shouldApply() const override
const unsigned int _mesh_dimension
The dimension of the mesh.