https://mooseframework.inl.gov
INSADSurfaceTensionBC.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 "INSADSurfaceTensionBC.h"
11 
12 registerMooseObject("NavierStokesApp", INSADSurfaceTensionBC);
13 
16 {
18  params.addClassDescription("Surface tension stresses.");
19  params.addParam<bool>("include_gradient_terms",
20  false,
21  "If the surface tension should include the gradient terms (increases "
22  "fidelity, decreases stability)");
23  return params;
24 }
25 
27  : ADVectorIntegratedBC(parameters),
28  _surface_term_curvature(getADMaterialProperty<RealVectorValue>("surface_term_curvature")),
29  _surface_term_gradient1(getADMaterialProperty<RealVectorValue>("surface_term_gradient1")),
30  _surface_term_gradient2(getADMaterialProperty<RealVectorValue>("surface_term_gradient2")),
31  _include_gradient_terms(getParam<bool>("include_gradient_terms")),
32  _curvature_factor(_subproblem.mesh().dimension() == 3 ? 1.0 : -1.0)
33 {
34 }
35 
36 ADReal
38 {
40 
43  return -_test[_i][_qp] * force;
44 }
static InputParameters validParams()
virtual ADReal computeQpResidual() override
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
MeshBase & mesh
A class that imparts a surface tension on the momentum equation The treatment is based on: Cairncross...
DualNumber< Real, DNDerivativeType, true > ADReal
static InputParameters validParams()
unsigned int _qp
registerMooseObject("NavierStokesApp", INSADSurfaceTensionBC)
const ADMaterialProperty< RealVectorValue > & _surface_term_gradient2
const ADMaterialProperty< RealVectorValue > & _surface_term_gradient1
const bool _include_gradient_terms
If the surface tension should include the gradient terms (increases fidelity, decreases stability) ...
INSADSurfaceTensionBC(const InputParameters &parameters)
const ADTemplateVariableTestValue< T > & _test
const Real _curvature_factor
Curvature force multiplier.
void addClassDescription(const std::string &doc_string)
const ADMaterialProperty< RealVectorValue > & _surface_term_curvature
The surface tension terms.