https://mooseframework.inl.gov
Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
NavierStokesStressIPHDGAssemblyHelper Class Reference

Implements all the methods for assembling a hybridized interior penalty discontinuous Galerkin (IPDG-H), which is a type of HDG method, discretization of the Navier-Stokes stress term. More...

#include <NavierStokesStressIPHDGAssemblyHelper.h>

Inheritance diagram for NavierStokesStressIPHDGAssemblyHelper:
[legend]

Public Member Functions

 NavierStokesStressIPHDGAssemblyHelper (const MooseObject *const moose_obj, MooseVariableDependencyInterface *const mvdi, const TransientInterface *const ti, const MooseMesh &mesh, SystemBase &sys, const Assembly &assembly, const THREAD_ID tid, const std::set< SubdomainID > &block_ids, const std::set< BoundaryID > &boundary_ids)
 
void resizeResiduals ()
 
void lmDirichlet (const Moose::Functor< Real > &dirichlet_value)
 
void lmPrescribedFlux (const Moose::Functor< Real > &flux_value)
 
std::array< ADResidualsPacket, 2 > taggingData () const
 
std::set< std::string > additionalROVariables ()
 
const MaterialProperty< T > & getFaceMaterialProperty (const std::string &name)
 
const MaterialProperty< T > & getFaceMaterialPropertyByName (const std::string &name)
 
const ADMaterialProperty< T > & getFaceADMaterialProperty (const std::string &name)
 
const MaterialProperty< T > & getFaceMaterialPropertyOld (const std::string &name)
 
const MaterialProperty< T > & getFaceMaterialPropertyOlder (const std::string &name)
 
const auto & getGenericFaceMaterialProperty (const std::string &name)
 
const GenericMaterialProperty< T, is_ad > & getGenericMaterialProperty (const std::string &name, MaterialData &material_data, const unsigned int state=0)
 
const GenericMaterialProperty< T, is_ad > & getGenericMaterialProperty (const std::string &name, const unsigned int state=0)
 
const GenericMaterialProperty< T, is_ad > & getGenericMaterialProperty (const std::string &name, const unsigned int state=0)
 
const MaterialProperty< T > & getMaterialProperty (const std::string &name, MaterialData &material_data, const unsigned int state=0)
 
const MaterialProperty< T > & getMaterialProperty (const std::string &name, const unsigned int state=0)
 
const MaterialProperty< T > & getMaterialProperty (const std::string &name, const unsigned int state=0)
 
const ADMaterialProperty< T > & getADMaterialProperty (const std::string &name, MaterialData &material_data)
 
const ADMaterialProperty< T > & getADMaterialProperty (const std::string &name)
 
const ADMaterialProperty< T > & getADMaterialProperty (const std::string &name)
 
const MaterialProperty< T > & getMaterialPropertyOld (const std::string &name, MaterialData &material_data)
 
const MaterialProperty< T > & getMaterialPropertyOld (const std::string &name)
 
const MaterialProperty< T > & getMaterialPropertyOld (const std::string &name)
 
const MaterialProperty< T > & getMaterialPropertyOlder (const std::string &name, MaterialData &material_data)
 
const MaterialProperty< T > & getMaterialPropertyOlder (const std::string &name)
 
const MaterialProperty< T > & getMaterialPropertyOlder (const std::string &name)
 
const GenericMaterialProperty< T, is_ad > & getGenericMaterialPropertyByName (const MaterialPropertyName &name, MaterialData &material_data, const unsigned int state)
 
const GenericMaterialProperty< T, is_ad > & getGenericMaterialPropertyByName (const MaterialPropertyName &name, const unsigned int state=0)
 
const GenericMaterialProperty< T, is_ad > & getGenericMaterialPropertyByName (const MaterialPropertyName &name, const unsigned int state=0)
 
const MaterialProperty< T > & getMaterialPropertyByName (const MaterialPropertyName &name, MaterialData &material_data, const unsigned int state=0)
 
const MaterialProperty< T > & getMaterialPropertyByName (const MaterialPropertyName &name, const unsigned int state=0)
 
const MaterialProperty< T > & getMaterialPropertyByName (const MaterialPropertyName &name, const unsigned int state=0)
 
const ADMaterialProperty< T > & getADMaterialPropertyByName (const MaterialPropertyName &name, MaterialData &material_data)
 
const ADMaterialProperty< T > & getADMaterialPropertyByName (const MaterialPropertyName &name)
 
const ADMaterialProperty< T > & getADMaterialPropertyByName (const MaterialPropertyName &name)
 
const MaterialProperty< T > & getMaterialPropertyOldByName (const MaterialPropertyName &name, MaterialData &material_data)
 
const MaterialProperty< T > & getMaterialPropertyOldByName (const MaterialPropertyName &name)
 
const MaterialProperty< T > & getMaterialPropertyOldByName (const MaterialPropertyName &name)
 
const MaterialProperty< T > & getMaterialPropertyOlderByName (const MaterialPropertyName &name, MaterialData &material_data)
 
const MaterialProperty< T > & getMaterialPropertyOlderByName (const MaterialPropertyName &name)
 
const MaterialProperty< T > & getMaterialPropertyOlderByName (const MaterialPropertyName &name)
 
std::pair< const MaterialProperty< T > *, std::set< SubdomainID > > getBlockMaterialProperty (const MaterialPropertyName &name)
 
const GenericMaterialProperty< T, is_ad > & getGenericZeroMaterialProperty (const std::string &name)
 
const GenericMaterialProperty< T, is_ad > & getGenericZeroMaterialProperty ()
 
const GenericMaterialProperty< T, is_ad > & getGenericZeroMaterialPropertyByName (const std::string &prop_name)
 
const MaterialProperty< T > & getZeroMaterialProperty (Ts... args)
 
std::set< SubdomainIDgetMaterialPropertyBlocks (const std::string &name)
 
std::vector< SubdomainName > getMaterialPropertyBlockNames (const std::string &name)
 
std::set< BoundaryIDgetMaterialPropertyBoundaryIDs (const std::string &name)
 
std::vector< BoundaryName > getMaterialPropertyBoundaryNames (const std::string &name)
 
void checkBlockAndBoundaryCompatibility (std::shared_ptr< MaterialBase > discrete)
 
std::unordered_map< SubdomainID, std::vector< MaterialBase *> > buildRequiredMaterials (bool allow_stateful=true)
 
void statefulPropertiesAllowed (bool)
 
bool getMaterialPropertyCalled () const
 
virtual const std::unordered_set< unsigned int > & getMatPropDependencies () const
 
virtual void resolveOptionalProperties ()
 
const GenericMaterialProperty< T, is_ad > & getPossiblyConstantGenericMaterialPropertyByName (const MaterialPropertyName &prop_name, MaterialData &material_data, const unsigned int state)
 
const GenericMaterialProperty< T, is_ad > & getGenericNeighborMaterialProperty (const std::string &name, const unsigned int state=0)
 
const GenericMaterialProperty< T, is_ad > & getGenericNeighborMaterialProperty (const std::string &name, const unsigned int state=0)
 
const MaterialProperty< T > & getNeighborMaterialProperty (const std::string &name, const unsigned int state=0)
 
const MaterialProperty< T > & getNeighborMaterialProperty (const std::string &name, const unsigned int state=0)
 
const ADMaterialProperty< T > & getNeighborADMaterialProperty (const std::string &name)
 
const ADMaterialProperty< T > & getNeighborADMaterialProperty (const std::string &name)
 
const MaterialProperty< T > & getNeighborMaterialPropertyOld (const std::string &name)
 
const MaterialProperty< T > & getNeighborMaterialPropertyOld (const std::string &name)
 
const MaterialProperty< T > & getNeighborMaterialPropertyOlder (const std::string &name)
 
const MaterialProperty< T > & getNeighborMaterialPropertyOlder (const std::string &name)
 
const GenericMaterialProperty< T, is_ad > & getGenericNeighborMaterialPropertyByName (const std::string &name, const unsigned int state=0)
 
const GenericMaterialProperty< T, is_ad > & getGenericNeighborMaterialPropertyByName (const std::string &name, const unsigned int state=0)
 
const MaterialProperty< T > & getNeighborMaterialPropertyByName (const std::string &name, const unsigned int state=0)
 
const MaterialProperty< T > & getNeighborMaterialPropertyByName (const std::string &name, const unsigned int state=0)
 
const ADMaterialProperty< T > & getNeighborADMaterialPropertyByName (const std::string &name)
 
const ADMaterialProperty< T > & getNeighborADMaterialPropertyByName (const std::string &name)
 
const GenericOptionalMaterialProperty< T, is_ad > & getGenericOptionalMaterialProperty (const std::string &name, const unsigned int state=0)
 
const GenericOptionalMaterialProperty< T, is_ad > & getGenericOptionalMaterialProperty (const std::string &name, const unsigned int state=0)
 
const OptionalMaterialProperty< T > & getOptionalMaterialProperty (const std::string &name, const unsigned int state=0)
 
const OptionalMaterialProperty< T > & getOptionalMaterialProperty (const std::string &name, const unsigned int state=0)
 
const OptionalADMaterialProperty< T > & getOptionalADMaterialProperty (const std::string &name)
 
const OptionalADMaterialProperty< T > & getOptionalADMaterialProperty (const std::string &name)
 
const OptionalMaterialProperty< T > & getOptionalMaterialPropertyOld (const std::string &name)
 
const OptionalMaterialProperty< T > & getOptionalMaterialPropertyOld (const std::string &name)
 
const OptionalMaterialProperty< T > & getOptionalMaterialPropertyOlder (const std::string &name)
 
const OptionalMaterialProperty< T > & getOptionalMaterialPropertyOlder (const std::string &name)
 
MaterialBasegetMaterial (const std::string &name)
 
MaterialBasegetMaterial (const std::string &name)
 
MaterialBasegetMaterialByName (const std::string &name, bool no_warn=false)
 
MaterialBasegetMaterialByName (const std::string &name, bool no_warn=false)
 
bool hasMaterialProperty (const std::string &name)
 
bool hasMaterialProperty (const std::string &name)
 
bool hasMaterialPropertyByName (const std::string &name)
 
bool hasMaterialPropertyByName (const std::string &name)
 
bool hasADMaterialProperty (const std::string &name)
 
bool hasADMaterialProperty (const std::string &name)
 
bool hasADMaterialPropertyByName (const std::string &name)
 
bool hasADMaterialPropertyByName (const std::string &name)
 
bool hasGenericMaterialProperty (const std::string &name)
 
bool hasGenericMaterialProperty (const std::string &name)
 
bool hasGenericMaterialPropertyByName (const std::string &name)
 
bool hasGenericMaterialPropertyByName (const std::string &name)
 

Static Public Member Functions

static InputParameters validParams ()
 

Static Public Attributes

static constexpr PropertyValue::id_type default_property_id
 
static constexpr PropertyValue::id_type zero_property_id
 

Protected Member Functions

virtual void scalarVolume () override
 Computes a local residual vector for the weak form: (Dq, grad(w)) - (f, w) where D is the diffusivity, w are the test functions associated with the scalar field, and f is a forcing function. More...
 
virtual void scalarFace () override
 Computes a local residual vector for the weak form: -<Dq*n, w> + < * (u - {u}) * n * n, w> More...
 
virtual void scalarDirichlet (const Moose::Functor< Real > &dirichlet_value) override
 
virtual void lmFace () override
 
virtual void checkMaterialProperty (const std::string &name, const unsigned int state)
 
void markMatPropRequested (const std::string &)
 
MaterialPropertyName getMaterialPropertyName (const std::string &name) const
 
void checkExecutionStage ()
 
const GenericMaterialProperty< T, is_ad > * defaultGenericMaterialProperty (const std::string &name)
 
const GenericMaterialProperty< T, is_ad > * defaultGenericMaterialProperty (const std::string &name)
 
const MaterialProperty< T > * defaultMaterialProperty (const std::string &name)
 
const MaterialProperty< T > * defaultMaterialProperty (const std::string &name)
 
const ADMaterialProperty< T > * defaultADMaterialProperty (const std::string &name)
 
const ADMaterialProperty< T > * defaultADMaterialProperty (const std::string &name)
 

Protected Attributes

const MooseVariableFE< Real > & _pressure_var
 The pressure variable on element interiors. More...
 
const MooseVariableFE< Real > & _pressure_face_var
 The pressure variable on element faces. More...
 
const ADVariableValue_pressure_sol
 The pressure solution on element interiors. More...
 
const ADVariableValue_pressure_face_sol
 The pressure solution on element faces. More...
 
const Moose::CoordinateSystemType_coord_sys
 The coordinate system. More...
 
const unsigned int _rz_radial_coord
 The radial coordinate index for RZ coordinate systems. More...
 
unsigned int _component
 The velocity component this object is adding a residual for. More...
 
const ADMaterialProperty< Real > & _diff
 
const ADMaterialProperty< Real > & _face_diff
 
const Real _alpha
 
const TransientInterface_ti
 
const MooseVariableFE< Real > & _u_var
 
const MooseVariableFE< Real > & _u_face_var
 
const std::vector< dof_id_type > & _u_dof_indices
 
const std::vector< dof_id_type > & _lm_u_dof_indices
 
const MooseArray< ADReal > & _u_sol
 
const MooseArray< ADRealVectorValue > & _grad_u_sol
 
const MooseArray< ADReal > & _lm_u_sol
 
const MooseArray< std::vector< Real > > & _scalar_phi
 
const MooseArray< std::vector< RealVectorValue > > & _grad_scalar_phi
 
const MooseArray< std::vector< Real > > & _scalar_phi_face
 
const MooseArray< std::vector< RealVectorValue > > & _grad_scalar_phi_face
 
const MooseArray< std::vector< Real > > & _lm_phi_face
 
const Real_elem_volume
 
const Real_side_area
 
const Elem *const & _ip_current_elem
 
const unsigned int_ip_current_side
 
const MooseArray< Real > & _ip_JxW
 
const QBase *const & _ip_qrule
 
const MooseArray< Point > & _ip_q_point
 
const MooseArray< Real > & _ip_JxW_face
 
const QBase *const & _ip_qrule_face
 
const MooseArray< Point > & _ip_q_point_face
 
const MooseArray< Point > & _ip_normals
 
DenseVector< ADReal_scalar_re
 
DenseVector< ADReal_lm_re
 
MaterialData_face_material_data
 
MaterialData_neighbor_material_data
 
const InputParameters_mi_params
 
const std::string _mi_name
 
const MooseObjectName _mi_moose_object_name
 
FEProblemBase_mi_feproblem
 
SubProblem_mi_subproblem
 
const THREAD_ID _mi_tid
 
const Moose::MaterialDataType _material_data_type
 
MaterialData_material_data
 
bool _stateful_allowed
 
bool _get_material_property_called
 
std::vector< std::unique_ptr< PropertyValue > > _default_properties
 
std::unordered_set< unsigned int_material_property_dependencies
 
const MaterialPropertyName _get_suffix
 
const bool _use_interpolated_state
 

Static Protected Attributes

static const std::string _interpolated_old
 
static const std::string _interpolated_older
 

Detailed Description

Implements all the methods for assembling a hybridized interior penalty discontinuous Galerkin (IPDG-H), which is a type of HDG method, discretization of the Navier-Stokes stress term.

Definition at line 18 of file NavierStokesStressIPHDGAssemblyHelper.h.

Constructor & Destructor Documentation

◆ NavierStokesStressIPHDGAssemblyHelper()

NavierStokesStressIPHDGAssemblyHelper::NavierStokesStressIPHDGAssemblyHelper ( const MooseObject *const  moose_obj,
MooseVariableDependencyInterface *const  mvdi,
const TransientInterface *const  ti,
const MooseMesh mesh,
SystemBase sys,
const Assembly assembly,
const THREAD_ID  tid,
const std::set< SubdomainID > &  block_ids,
const std::set< BoundaryID > &  boundary_ids 
)

Definition at line 35 of file NavierStokesStressIPHDGAssemblyHelper.C.

45  : DiffusionIPHDGAssemblyHelper(moose_obj, mvdi, ti, sys, assembly, tid, block_ids, boundary_ids),
47  tid, moose_obj->getParam<NonlinearVariableName>("pressure_variable"))),
49  tid, moose_obj->getParam<NonlinearVariableName>("pressure_face_variable"))),
52  _coord_sys(assembly.coordSystem()),
53  _rz_radial_coord(mesh.getAxisymmetricRadialCoord()),
54  _component(moose_obj->getParam<unsigned int>("component"))
55 {
56 }
MeshBase & mesh
const T & getParam(const std::string &name) const
const ADTemplateVariableValue< Real > & adSln() const override
const ADVariableValue & _pressure_face_sol
The pressure solution on element faces.
const Moose::CoordinateSystemType & coordSystem() const
const unsigned int _rz_radial_coord
The radial coordinate index for RZ coordinate systems.
const MooseVariableFE< Real > & _pressure_var
The pressure variable on element interiors.
const Moose::CoordinateSystemType & _coord_sys
The coordinate system.
MooseVariableFE< T > & getFieldVariable(THREAD_ID tid, const std::string &var_name)
DiffusionIPHDGAssemblyHelper(const MooseObject *const moose_obj, MooseVariableDependencyInterface *const mvdi, const TransientInterface *const ti, SystemBase &sys, const Assembly &assembly, const THREAD_ID tid, const std::set< SubdomainID > &block_ids, const std::set< BoundaryID > &boundary_ids)
const MooseVariableFE< Real > & _pressure_face_var
The pressure variable on element faces.
unsigned int _component
The velocity component this object is adding a residual for.
const ADVariableValue & _pressure_sol
The pressure solution on element interiors.

Member Function Documentation

◆ scalarDirichlet()

void NavierStokesStressIPHDGAssemblyHelper::scalarDirichlet ( const Moose::Functor< Real > &  dirichlet_value)
overrideprotectedvirtual

Reimplemented from DiffusionIPHDGAssemblyHelper.

Definition at line 84 of file NavierStokesStressIPHDGAssemblyHelper.C.

85 {
87 
88  for (const auto i : index_range(_scalar_re))
89  for (const auto qp : make_range(_ip_qrule_face->n_points()))
91  _scalar_phi_face[i][qp];
92 }
DenseVector< ADReal > _scalar_re
const QBase *const & _ip_qrule_face
const MooseArray< Point > & _ip_normals
unsigned int n_points() const
const ADVariableValue & _pressure_face_sol
The pressure solution on element faces.
const MooseArray< Real > & _ip_JxW_face
const MooseArray< std::vector< Real > > & _scalar_phi_face
IntRange< T > make_range(T beg, T end)
virtual void scalarDirichlet(const Moose::Functor< Real > &dirichlet_value) override
auto index_range(const T &sizable)
unsigned int _component
The velocity component this object is adding a residual for.

◆ scalarFace()

void NavierStokesStressIPHDGAssemblyHelper::scalarFace ( )
overrideprotectedvirtual

Computes a local residual vector for the weak form: -<Dq*n, w> + < * (u - {u}) * n * n, w>

Reimplemented from DiffusionIPHDGAssemblyHelper.

Definition at line 73 of file NavierStokesStressIPHDGAssemblyHelper.C.

74 {
76 
77  for (const auto i : index_range(_scalar_re))
78  for (const auto qp : make_range(_ip_qrule_face->n_points()))
80  _scalar_phi_face[i][qp];
81 }
DenseVector< ADReal > _scalar_re
const QBase *const & _ip_qrule_face
const MooseArray< Point > & _ip_normals
unsigned int n_points() const
const ADVariableValue & _pressure_face_sol
The pressure solution on element faces.
const MooseArray< Real > & _ip_JxW_face
const MooseArray< std::vector< Real > > & _scalar_phi_face
IntRange< T > make_range(T beg, T end)
virtual void scalarFace() override
auto index_range(const T &sizable)
unsigned int _component
The velocity component this object is adding a residual for.

◆ scalarVolume()

void NavierStokesStressIPHDGAssemblyHelper::scalarVolume ( )
overrideprotectedvirtual

Computes a local residual vector for the weak form: (Dq, grad(w)) - (f, w) where D is the diffusivity, w are the test functions associated with the scalar field, and f is a forcing function.

Reimplemented from DiffusionIPHDGAssemblyHelper.

Definition at line 59 of file NavierStokesStressIPHDGAssemblyHelper.C.

60 {
62 
63  for (const auto qp : make_range(_ip_qrule->n_points()))
64  for (const auto i : index_range(_scalar_re))
65  {
66  _scalar_re(i) -= _ip_JxW[qp] * (_grad_scalar_phi[i][qp](_component) * _pressure_sol[qp]);
69  }
70 }
DenseVector< ADReal > _scalar_re
virtual void scalarVolume() override
const MooseArray< std::vector< RealVectorValue > > & _grad_scalar_phi
const MooseArray< Real > & _ip_JxW
const QBase *const & _ip_qrule
unsigned int n_points() const
const unsigned int _rz_radial_coord
The radial coordinate index for RZ coordinate systems.
const Moose::CoordinateSystemType & _coord_sys
The coordinate system.
IntRange< T > make_range(T beg, T end)
const MooseArray< Point > & _ip_q_point
auto index_range(const T &sizable)
const MooseArray< std::vector< Real > > & _scalar_phi
unsigned int _component
The velocity component this object is adding a residual for.
const ADVariableValue & _pressure_sol
The pressure solution on element interiors.

◆ validParams()

InputParameters NavierStokesStressIPHDGAssemblyHelper::validParams ( )
static

Definition at line 24 of file NavierStokesStressIPHDGAssemblyHelper.C.

Referenced by NavierStokesStressIPHDGDirichletBC::validParams(), and NavierStokesStressIPHDGKernel::validParams().

25 {
27  params.addRequiredParam<NonlinearVariableName>(
28  "pressure_variable", "The pressure variable that lives on element interiors.");
29  params.addRequiredParam<NonlinearVariableName>(
30  "pressure_face_variable", "The pressure variable that lives on element faces.");
31  params.addRequiredParam<unsigned int>("component", "number of component (0 = x, 1 = y, 2 = z)");
32  return params;
33 }
static InputParameters validParams()

Member Data Documentation

◆ _component

unsigned int NavierStokesStressIPHDGAssemblyHelper::_component
protected

The velocity component this object is adding a residual for.

Definition at line 67 of file NavierStokesStressIPHDGAssemblyHelper.h.

Referenced by scalarDirichlet(), scalarFace(), and scalarVolume().

◆ _coord_sys

const Moose::CoordinateSystemType& NavierStokesStressIPHDGAssemblyHelper::_coord_sys
protected

The coordinate system.

Definition at line 61 of file NavierStokesStressIPHDGAssemblyHelper.h.

Referenced by scalarVolume().

◆ _pressure_face_sol

const ADVariableValue& NavierStokesStressIPHDGAssemblyHelper::_pressure_face_sol
protected

The pressure solution on element faces.

Definition at line 58 of file NavierStokesStressIPHDGAssemblyHelper.h.

Referenced by scalarDirichlet(), and scalarFace().

◆ _pressure_face_var

const MooseVariableFE<Real>& NavierStokesStressIPHDGAssemblyHelper::_pressure_face_var
protected

The pressure variable on element faces.

Definition at line 53 of file NavierStokesStressIPHDGAssemblyHelper.h.

◆ _pressure_sol

const ADVariableValue& NavierStokesStressIPHDGAssemblyHelper::_pressure_sol
protected

The pressure solution on element interiors.

Definition at line 56 of file NavierStokesStressIPHDGAssemblyHelper.h.

Referenced by scalarVolume().

◆ _pressure_var

const MooseVariableFE<Real>& NavierStokesStressIPHDGAssemblyHelper::_pressure_var
protected

The pressure variable on element interiors.

Definition at line 51 of file NavierStokesStressIPHDGAssemblyHelper.h.

◆ _rz_radial_coord

const unsigned int NavierStokesStressIPHDGAssemblyHelper::_rz_radial_coord
protected

The radial coordinate index for RZ coordinate systems.

Definition at line 64 of file NavierStokesStressIPHDGAssemblyHelper.h.

Referenced by scalarVolume().


The documentation for this class was generated from the following files: