- face_variableThe face variable
C++ Type:NonlinearVariableName
Unit:(no unit assumed)
Controllable:No
Description:The face variable
- variableThe name of the variable that this residual object operates on
C++ Type:NonlinearVariableName
Unit:(no unit assumed)
Controllable:No
Description:The name of the variable that this residual object operates on
- velocityVelocity vector
C++ Type:MaterialPropertyName
Unit:(no unit assumed)
Controllable:No
Description:Velocity vector
AdvectionIPHDGKernel
This kernel implements the element volume and interior face integrals of an advection term for a hybridized interior penalty (IP-H) discontinuous Galerkin discretization.
Input Parameters
- blockThe list of blocks (ids or names) that this object will be applied
C++ Type:std::vector<SubdomainName>
Controllable:No
Description:The list of blocks (ids or names) that this object will be applied
- coeff1A constant coefficient. This could be something like a density
Default:1
C++ Type:double
Unit:(no unit assumed)
Controllable:No
Description:A constant coefficient. This could be something like a density
- displacementsThe displacements
C++ Type:std::vector<VariableName>
Unit:(no unit assumed)
Controllable:No
Description:The displacements
- matrix_onlyFalseWhether this object is only doing assembly to matrices (no vectors)
Default:False
C++ Type:bool
Controllable:No
Description:Whether this object is only doing assembly to matrices (no vectors)
- self_advectionTrueWhether this kernel should advect its variables, e.g. its variable/side_variable pair. If false, we will advect unity (possibly multiplied by the 'coeff' parameter
Default:True
C++ Type:bool
Controllable:No
Description:Whether this kernel should advect its variables, e.g. its variable/side_variable pair. If false, we will advect unity (possibly multiplied by the 'coeff' parameter
Optional Parameters
- absolute_value_vector_tagsThe tags for the vectors this residual object should fill with the absolute value of the residual contribution
C++ Type:std::vector<TagName>
Controllable:No
Description:The tags for the vectors this residual object should fill with the absolute value of the residual contribution
- extra_matrix_tagsThe extra tags for the matrices this Kernel should fill
C++ Type:std::vector<TagName>
Controllable:No
Description:The extra tags for the matrices this Kernel should fill
- extra_vector_tagsThe extra tags for the vectors this Kernel should fill
C++ Type:std::vector<TagName>
Controllable:No
Description:The extra tags for the vectors this Kernel should fill
- matrix_tagssystemThe tag for the matrices this Kernel should fill
Default:system
C++ Type:MultiMooseEnum
Options:nontime, system
Controllable:No
Description:The tag for the matrices this Kernel should fill
- vector_tagsnontimeThe tag for the vectors this Kernel should fill
Default:nontime
C++ Type:MultiMooseEnum
Options:nontime, time
Controllable:No
Description:The tag for the vectors this Kernel should fill
Contribution To Tagged Field Data Parameters
- control_tagsAdds user-defined labels for accessing object parameters via control logic.
C++ Type:std::vector<std::string>
Controllable:No
Description:Adds user-defined labels for accessing object parameters via control logic.
- diag_save_inThe name of auxiliary variables to save this Kernel's diagonal Jacobian contributions to. Everything about that variable must match everything about this variable (the type, what blocks it's on, etc.)
C++ Type:std::vector<AuxVariableName>
Unit:(no unit assumed)
Controllable:No
Description:The name of auxiliary variables to save this Kernel's diagonal Jacobian contributions to. Everything about that variable must match everything about this variable (the type, what blocks it's on, etc.)
- enableTrueSet the enabled status of the MooseObject.
Default:True
C++ Type:bool
Controllable:Yes
Description:Set the enabled status of the MooseObject.
- implicitTrueDetermines whether this object is calculated using an implicit or explicit form
Default:True
C++ Type:bool
Controllable:No
Description:Determines whether this object is calculated using an implicit or explicit form
- save_inThe name of auxiliary variables to save this Kernel's residual contributions to. Everything about that variable must match everything about this variable (the type, what blocks it's on, etc.)
C++ Type:std::vector<AuxVariableName>
Unit:(no unit assumed)
Controllable:No
Description:The name of auxiliary variables to save this Kernel's residual contributions to. Everything about that variable must match everything about this variable (the type, what blocks it's on, etc.)
- seed0The seed for the master random number generator
Default:0
C++ Type:unsigned int
Controllable:No
Description:The seed for the master random number generator
- use_displaced_meshFalseWhether or not this object should use the displaced mesh for computation. Note that in the case this is true but no displacements are provided in the Mesh block the undisplaced mesh will still be used.
Default:False
C++ Type:bool
Controllable:No
Description:Whether or not this object should use the displaced mesh for computation. Note that in the case this is true but no displacements are provided in the Mesh block the undisplaced mesh will still be used.
Advanced Parameters
- prop_getter_suffixAn optional suffix parameter that can be appended to any attempt to retrieve/get material properties. The suffix will be prepended with a '_' character.
C++ Type:MaterialPropertyName
Unit:(no unit assumed)
Controllable:No
Description:An optional suffix parameter that can be appended to any attempt to retrieve/get material properties. The suffix will be prepended with a '_' character.
- use_interpolated_stateFalseFor the old and older state use projected material properties interpolated at the quadrature points. To set up projection use the ProjectedStatefulMaterialStorageAction.
Default:False
C++ Type:bool
Controllable:No
Description:For the old and older state use projected material properties interpolated at the quadrature points. To set up projection use the ProjectedStatefulMaterialStorageAction.
Material Property Retrieval Parameters
Input Files
- (modules/navier_stokes/test/tests/finite_element/ins/hdg/ip/lid-driven/mms-lid-driven.i)
- (modules/navier_stokes/test/tests/finite_element/ins/hdg/ip/lid-driven/stokes-lid-driven.i)
- (modules/navier_stokes/test/tests/finite_element/ins/hdg/ip/lid-driven/mms-second-lid-driven.i)
- (test/tests/hdgkernels/ip-advection-diffusion/mms-advection-diffusion.i)
- (test/tests/hdgkernels/ip-advection-diffusion/simple_ip_hdg_advection.i)
- (modules/navier_stokes/test/tests/finite_element/ins/hdg/ip/lid-driven/sc-lid-driven.i)
- (modules/navier_stokes/test/tests/finite_element/ins/hdg/ip/lid-driven/lid-driven-fsp.i)
- (modules/navier_stokes/test/tests/finite_element/ins/hdg/ip/lid-driven/lid-driven.i)
- (modules/navier_stokes/test/tests/finite_element/ins/hdg/ip/lid-driven/matrix-testing.i)
(modules/navier_stokes/test/tests/finite_element/ins/hdg/ip/lid-driven/mms-lid-driven.i)
mu = 2
rho = 2
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 2
ny = 2
elem_type = TRI6
[]
[]
[Variables]
[vel_x]
family = MONOMIAL
order = FIRST
[]
[vel_y]
family = MONOMIAL
order = FIRST
[]
[pressure]
family = MONOMIAL
order = CONSTANT
[]
[vel_bar_x]
family = SIDE_HIERARCHIC
order = FIRST
[]
[vel_bar_y]
family = SIDE_HIERARCHIC
order = FIRST
[]
[pressure_bar]
family = SIDE_HIERARCHIC
order = FIRST
[]
[lambda]
family = SCALAR
order = FIRST
[]
[]
[HDGKernels]
[momentum_x_convection]
type = AdvectionIPHDGKernel
variable = vel_x
face_variable = vel_bar_x
velocity = 'velocity'
coeff = ${rho}
[]
[momentum_x_diffusion]
type = NavierStokesStressIPHDGKernel
variable = vel_x
face_variable = vel_bar_x
diffusivity = 'mu'
alpha = 6
pressure_variable = pressure
pressure_face_variable = pressure_bar
component = 0
[]
[momentum_y_convection]
type = AdvectionIPHDGKernel
variable = vel_y
face_variable = vel_bar_y
velocity = 'velocity'
coeff = ${rho}
[]
[momentum_y_diffusion]
type = NavierStokesStressIPHDGKernel
variable = vel_y
face_variable = vel_bar_y
diffusivity = 'mu'
alpha = 6
pressure_variable = pressure
pressure_face_variable = pressure_bar
component = 1
[]
[pressure_convection]
type = AdvectionIPHDGKernel
variable = pressure
face_variable = pressure_bar
velocity = 'velocity'
coeff = '${fparse -rho}'
self_advection = false
[]
[]
[Kernels]
[momentum_x_ffn]
type = BodyForce
variable = vel_x
function = forcing_u
[]
[momentum_y_ffn]
type = BodyForce
variable = vel_y
function = forcing_v
[]
[mass_ffn]
type = BodyForce
variable = pressure
function = forcing_p
[]
[mean_zero_pressure]
type = ScalarLagrangeMultiplier
variable = pressure
lambda = lambda
[]
[]
[ScalarKernels]
[mean_zero_pressure_lm]
type = AverageValueConstraint
variable = lambda
pp_name = pressure_integral
value = 0
[]
[]
[BCs]
[momentum_x_diffusion_all]
type = NavierStokesStressIPHDGDirichletBC
boundary = 'left bottom right top'
variable = vel_x
face_variable = vel_bar_x
pressure_variable = pressure
pressure_face_variable = pressure_bar
alpha = 6
functor = exact_u
diffusivity = 'mu'
component = 0
[]
[momentum_y_diffusion_all]
type = NavierStokesStressIPHDGDirichletBC
boundary = 'left bottom right top'
variable = vel_y
face_variable = vel_bar_y
pressure_variable = pressure
pressure_face_variable = pressure_bar
alpha = 6
functor = exact_v
diffusivity = 'mu'
component = 1
[]
[mass_convection]
type = AdvectionIPHDGPrescribedFluxBC
face_variable = pressure_bar
variable = pressure
velocity = 'velocity'
coeff = '${fparse -rho}'
self_advection = false
boundary = 'left bottom top right'
prescribed_normal_flux = 0
[]
[]
[Functions]
[exact_u]
type = ParsedFunction
expression = 'sin(y)*cos((1/2)*x*pi)'
[]
[forcing_u]
type = ParsedFunction
expression = 'mu*sin(y)*cos((1/2)*x*pi) + (1/4)*pi^2*mu*sin(y)*cos((1/2)*x*pi) - 1/2*pi*rho*sin(x)*sin(y)*sin((1/2)*y*pi)*cos((1/2)*x*pi) + rho*sin(x)*cos(y)*cos((1/2)*x*pi)*cos((1/2)*y*pi) - pi*rho*sin(y)^2*sin((1/2)*x*pi)*cos((1/2)*x*pi) + sin(y)*cos(x)'
symbol_names = 'mu rho'
symbol_values = '${mu} ${rho}'
[]
[exact_v]
type = ParsedFunction
expression = 'sin(x)*cos((1/2)*y*pi)'
[]
[forcing_v]
type = ParsedFunction
expression = 'mu*sin(x)*cos((1/2)*y*pi) + (1/4)*pi^2*mu*sin(x)*cos((1/2)*y*pi) - pi*rho*sin(x)^2*sin((1/2)*y*pi)*cos((1/2)*y*pi) - 1/2*pi*rho*sin(x)*sin(y)*sin((1/2)*x*pi)*cos((1/2)*y*pi) + rho*sin(y)*cos(x)*cos((1/2)*x*pi)*cos((1/2)*y*pi) + sin(x)*cos(y)'
symbol_names = 'mu rho'
symbol_values = '${mu} ${rho}'
[]
[exact_p]
type = ParsedFunction
expression = 'sin(x)*sin(y)'
[]
[forcing_p]
type = ParsedFunction
expression = '(1/2)*pi*rho*sin(x)*sin((1/2)*y*pi) + (1/2)*pi*rho*sin(y)*sin((1/2)*x*pi)'
symbol_names = 'rho'
symbol_values = '${rho}'
[]
[]
[Materials]
[const]
type = ADGenericConstantMaterial
prop_names = 'rho mu'
prop_values = '${rho} ${mu}'
[]
[vel]
type = ADVectorFromComponentVariablesMaterial
vector_prop_name = 'velocity'
u = vel_x
v = vel_y
[]
[]
[AuxVariables]
[vel_exact_x]
[]
[vel_exact_y]
[]
[pressure_exact]
[]
[]
[AuxKernels]
[vel_exact_x]
type = FunctionAux
variable = vel_exact_x
function = exact_u
[]
[vel_exact_y]
type = FunctionAux
variable = vel_exact_y
function = exact_v
[]
[pressure_exact]
type = FunctionAux
variable = pressure_exact
function = exact_p
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
nl_rel_tol = 1e-12
[]
[Outputs]
[out]
type = Exodus
hide = 'lambda pressure_integral'
[]
csv = true
[]
[Postprocessors]
[pressure_integral]
type = ElementIntegralVariablePostprocessor
variable = pressure
execute_on = linear
[]
[h]
type = AverageElementSize
execute_on = 'timestep_end'
[]
[L2u]
type = ElementL2Error
variable = vel_x
function = exact_u
execute_on = 'timestep_end'
[]
[L2v]
type = ElementL2Error
variable = vel_y
function = exact_v
execute_on = 'timestep_end'
[]
[L2p]
type = ElementL2Error
variable = pressure
function = exact_p
execute_on = 'timestep_end'
[]
[]
(modules/navier_stokes/test/tests/finite_element/ins/hdg/ip/lid-driven/stokes-lid-driven.i)
mu = 1
rho = 1
l = 1
U = 1
n = 4
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = ${l}
ymin = 0
ymax = ${l}
nx = ${n}
ny = ${n}
elem_type = QUAD9
[]
[]
[Variables]
[vel_x]
family = L2_HIERARCHIC
order = SECOND
[]
[vel_y]
family = L2_HIERARCHIC
order = SECOND
[]
[pressure]
family = L2_HIERARCHIC
order = FIRST
[]
[vel_bar_x]
family = SIDE_HIERARCHIC
order = SECOND
[]
[vel_bar_y]
family = SIDE_HIERARCHIC
order = SECOND
[]
[pressure_bar]
family = SIDE_HIERARCHIC
order = FIRST
[]
[lambda]
family = SCALAR
order = FIRST
[]
[]
[HDGKernels]
[momentum_x_diffusion]
type = NavierStokesStressIPHDGKernel
variable = vel_x
face_variable = vel_bar_x
diffusivity = 'mu'
alpha = 6
pressure_variable = pressure
pressure_face_variable = pressure_bar
component = 0
[]
[momentum_y_diffusion]
type = NavierStokesStressIPHDGKernel
variable = vel_y
face_variable = vel_bar_y
diffusivity = 'mu'
alpha = 6
pressure_variable = pressure
pressure_face_variable = pressure_bar
component = 1
[]
[pressure_convection]
type = AdvectionIPHDGKernel
variable = pressure
face_variable = pressure_bar
velocity = 'velocity'
coeff = '${fparse -rho}'
self_advection = false
[]
[]
[Kernels]
[mean_zero_pressure]
type = ScalarLagrangeMultiplier
variable = pressure
lambda = lambda
[]
[]
[ScalarKernels]
[mean_zero_pressure_lm]
type = AverageValueConstraint
variable = lambda
pp_name = pressure_integral
value = 0
[]
[]
[BCs]
[momentum_x_diffusion_walls]
type = NavierStokesStressIPHDGDirichletBC
boundary = 'left bottom right'
variable = vel_x
face_variable = vel_bar_x
pressure_variable = pressure
pressure_face_variable = pressure_bar
alpha = 6
functor = '0'
diffusivity = 'mu'
component = 0
[]
[momentum_x_diffusion_top]
type = NavierStokesStressIPHDGDirichletBC
boundary = 'top'
variable = vel_x
face_variable = vel_bar_x
pressure_variable = pressure
pressure_face_variable = pressure_bar
alpha = 6
functor = '${U}'
diffusivity = 'mu'
component = 0
[]
[momentum_y_diffusion_all]
type = NavierStokesStressIPHDGDirichletBC
boundary = 'left bottom right top'
variable = vel_y
face_variable = vel_bar_y
pressure_variable = pressure
pressure_face_variable = pressure_bar
alpha = 6
functor = '0'
diffusivity = 'mu'
component = 1
[]
[mass_convection]
type = AdvectionIPHDGPrescribedFluxBC
face_variable = pressure_bar
variable = pressure
velocity = 'velocity'
coeff = '${fparse -rho}'
self_advection = false
boundary = 'left bottom top right'
prescribed_normal_flux = 0
[]
[]
[Materials]
[const]
type = ADGenericConstantMaterial
prop_names = 'rho mu'
prop_values = '${rho} ${mu}'
[]
[vel]
type = ADVectorFromComponentVariablesMaterial
vector_prop_name = 'velocity'
u = vel_x
v = vel_y
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
nl_rel_tol = 1e-12
[]
[Outputs]
[out]
type = CSV
show = 'symmetric'
execute_on = 'timestep_end'
[]
[]
[Postprocessors]
[symmetric]
type = MatrixSymmetryCheck
execute_on = 'timestep_end'
[]
[pressure_integral]
type = ElementIntegralVariablePostprocessor
variable = pressure
execute_on = linear
[]
[]
(modules/navier_stokes/test/tests/finite_element/ins/hdg/ip/lid-driven/mms-second-lid-driven.i)
mu = 2
rho = 2
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 2
ny = 2
elem_type = TRI6
[]
[]
[Variables]
[vel_x]
family = MONOMIAL
order = SECOND
[]
[vel_y]
family = MONOMIAL
order = SECOND
[]
[pressure]
family = MONOMIAL
order = FIRST
[]
[vel_bar_x]
family = SIDE_HIERARCHIC
order = SECOND
[]
[vel_bar_y]
family = SIDE_HIERARCHIC
order = SECOND
[]
[pressure_bar]
family = SIDE_HIERARCHIC
order = SECOND
[]
[lambda]
family = SCALAR
order = FIRST
[]
[]
[HDGKernels]
[momentum_x_convection]
type = AdvectionIPHDGKernel
variable = vel_x
face_variable = vel_bar_x
velocity = 'velocity'
coeff = ${rho}
[]
[momentum_x_diffusion]
type = NavierStokesStressIPHDGKernel
variable = vel_x
face_variable = vel_bar_x
diffusivity = 'mu'
alpha = 6
pressure_variable = pressure
pressure_face_variable = pressure_bar
component = 0
[]
[momentum_y_convection]
type = AdvectionIPHDGKernel
variable = vel_y
face_variable = vel_bar_y
velocity = 'velocity'
coeff = ${rho}
[]
[momentum_y_diffusion]
type = NavierStokesStressIPHDGKernel
variable = vel_y
face_variable = vel_bar_y
diffusivity = 'mu'
alpha = 6
pressure_variable = pressure
pressure_face_variable = pressure_bar
component = 1
[]
[pressure_convection]
type = AdvectionIPHDGKernel
variable = pressure
face_variable = pressure_bar
velocity = 'velocity'
coeff = '${fparse -rho}'
self_advection = false
[]
[]
[Kernels]
[momentum_x_ffn]
type = BodyForce
variable = vel_x
function = forcing_u
[]
[momentum_y_ffn]
type = BodyForce
variable = vel_y
function = forcing_v
[]
[mass_ffn]
type = BodyForce
variable = pressure
function = forcing_p
[]
[mean_zero_pressure]
type = ScalarLagrangeMultiplier
variable = pressure
lambda = lambda
[]
[]
[ScalarKernels]
[mean_zero_pressure_lm]
type = AverageValueConstraint
variable = lambda
pp_name = pressure_integral
value = 0
[]
[]
[BCs]
[momentum_x_diffusion_all]
type = NavierStokesStressIPHDGDirichletBC
boundary = 'left bottom right top'
variable = vel_x
face_variable = vel_bar_x
pressure_variable = pressure
pressure_face_variable = pressure_bar
alpha = 6
functor = exact_u
diffusivity = 'mu'
component = 0
[]
[momentum_y_diffusion_all]
type = NavierStokesStressIPHDGDirichletBC
boundary = 'left bottom right top'
variable = vel_y
face_variable = vel_bar_y
pressure_variable = pressure
pressure_face_variable = pressure_bar
alpha = 6
functor = exact_v
diffusivity = 'mu'
component = 1
[]
[mass_convection]
type = AdvectionIPHDGPrescribedFluxBC
face_variable = pressure_bar
variable = pressure
velocity = 'velocity'
coeff = '${fparse -rho}'
self_advection = false
boundary = 'left bottom top right'
prescribed_normal_flux = 0
[]
[]
[Functions]
[exact_u]
type = ParsedFunction
expression = 'sin(y)*cos((1/2)*x*pi)'
[]
[forcing_u]
type = ParsedFunction
expression = 'mu*sin(y)*cos((1/2)*x*pi) + (1/4)*pi^2*mu*sin(y)*cos((1/2)*x*pi) - 1/2*pi*rho*sin(x)*sin(y)*sin((1/2)*y*pi)*cos((1/2)*x*pi) + rho*sin(x)*cos(y)*cos((1/2)*x*pi)*cos((1/2)*y*pi) - pi*rho*sin(y)^2*sin((1/2)*x*pi)*cos((1/2)*x*pi) + sin(y)*cos(x)'
symbol_names = 'mu rho'
symbol_values = '${mu} ${rho}'
[]
[exact_v]
type = ParsedFunction
expression = 'sin(x)*cos((1/2)*y*pi)'
[]
[forcing_v]
type = ParsedFunction
expression = 'mu*sin(x)*cos((1/2)*y*pi) + (1/4)*pi^2*mu*sin(x)*cos((1/2)*y*pi) - pi*rho*sin(x)^2*sin((1/2)*y*pi)*cos((1/2)*y*pi) - 1/2*pi*rho*sin(x)*sin(y)*sin((1/2)*x*pi)*cos((1/2)*y*pi) + rho*sin(y)*cos(x)*cos((1/2)*x*pi)*cos((1/2)*y*pi) + sin(x)*cos(y)'
symbol_names = 'mu rho'
symbol_values = '${mu} ${rho}'
[]
[exact_p]
type = ParsedFunction
expression = 'sin(x)*sin(y)'
[]
[forcing_p]
type = ParsedFunction
expression = '(1/2)*pi*rho*sin(x)*sin((1/2)*y*pi) + (1/2)*pi*rho*sin(y)*sin((1/2)*x*pi)'
symbol_names = 'rho'
symbol_values = '${rho}'
[]
[]
[Materials]
[const]
type = ADGenericConstantMaterial
prop_names = 'rho mu'
prop_values = '${rho} ${mu}'
[]
[vel]
type = ADVectorFromComponentVariablesMaterial
vector_prop_name = 'velocity'
u = vel_x
v = vel_y
[]
[]
[AuxVariables]
[vel_exact_x]
[]
[vel_exact_y]
[]
[pressure_exact]
[]
[]
[AuxKernels]
[vel_exact_x]
type = FunctionAux
variable = vel_exact_x
function = exact_u
[]
[vel_exact_y]
type = FunctionAux
variable = vel_exact_y
function = exact_v
[]
[pressure_exact]
type = FunctionAux
variable = pressure_exact
function = exact_p
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
nl_rel_tol = 1e-12
[]
[Outputs]
[out]
type = Exodus
hide = 'lambda pressure_integral'
[]
csv = true
[]
[Postprocessors]
[pressure_integral]
type = ElementIntegralVariablePostprocessor
variable = pressure
execute_on = linear
[]
[h]
type = AverageElementSize
execute_on = 'timestep_end'
[]
[L2u]
type = ElementL2Error
variable = vel_x
function = exact_u
execute_on = 'timestep_end'
[]
[L2v]
type = ElementL2Error
variable = vel_y
function = exact_v
execute_on = 'timestep_end'
[]
[L2p]
type = ElementL2Error
variable = pressure
function = exact_p
execute_on = 'timestep_end'
[]
[]
(test/tests/hdgkernels/ip-advection-diffusion/mms-advection-diffusion.i)
diff=2
a=2
[GlobalParams]
variable = u
face_variable = side_u
diffusivity = ${diff}
alpha = 6
velocity = vel
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
elem_type = QUAD9
[]
[Variables]
[u]
order = FIRST
family = MONOMIAL
[]
[side_u]
order = FIRST
family = SIDE_HIERARCHIC
[]
[]
[Kernels]
[ffn]
type = BodyForce
variable = u
function = forcing
[]
[]
[HDGKernels]
[diff]
type = DiffusionIPHDGKernel
[]
[adv]
type = AdvectionIPHDGKernel
[]
[]
[BCs]
[dirichlet_diff]
type = DiffusionIPHDGDirichletBC
functor = exact
boundary = 'left right top bottom'
[]
[dirichlet_adv]
type = AdvectionIPHDGDirichletBC
functor = exact
boundary = 'left right top bottom'
[]
[]
[Materials]
[vel]
type = ADGenericConstantVectorMaterial
prop_names = 'vel'
prop_values = '${a} ${fparse 2*a} 0'
[]
[]
[Functions]
[exact]
type = ParsedFunction
expression = 'sin(x)*cos(y)'
[]
[forcing]
type = ParsedFunction
expression = '-2*a*sin(x)*sin(y) + a*cos(x)*cos(y) + 2*diff*sin(x)*cos(y)'
symbol_names = 'a diff'
symbol_values = '${a} ${diff}'
[]
[]
[Executioner]
type = Steady
nl_rel_tol = 1e-10
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
solve_type = NEWTON
[]
[Outputs]
csv = true
[]
[Postprocessors]
[h]
type = AverageElementSize
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2u]
type = ElementL2Error
variable = u
function = exact
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[]
(test/tests/hdgkernels/ip-advection-diffusion/simple_ip_hdg_advection.i)
[GlobalParams]
variable = u
face_variable = side_u
velocity = vel
[]
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
[]
[Variables]
[u]
order = FIRST
family = MONOMIAL
[]
[side_u]
order = FIRST
family = SIDE_HIERARCHIC
[]
[]
[HDGKernels]
[adv]
type = AdvectionIPHDGKernel
[]
[]
[BCs]
[inflow]
type = AdvectionIPHDGDirichletBC
functor = 1
boundary = 'left'
[]
[outflow]
type = AdvectionIPHDGOutflowBC
boundary = 'right'
[]
[]
[Materials]
[vel]
type = ADGenericConstantVectorMaterial
prop_names = 'vel'
prop_values = '2 0 0'
[]
[]
[Executioner]
type = Steady
nl_rel_tol = 1e-10
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
solve_type = NEWTON
[]
[Postprocessors]
[symmetric]
type = MatrixSymmetryCheck
[]
[avg_u]
type = ElementAverageValue
variable = u
[]
[avg_side_u]
type = ElementAverageValue
variable = side_u
[]
[]
[Outputs]
csv = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/hdg/ip/lid-driven/sc-lid-driven.i)
mu = 1
rho = 1
l = 1
U = 100
n = 8
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = ${l}
ymin = 0
ymax = ${l}
nx = ${n}
ny = ${n}
elem_type = TRI6
[]
[]
[Variables]
[vel_x]
family = L2_HIERARCHIC
order = SECOND
[]
[vel_y]
family = L2_HIERARCHIC
order = SECOND
[]
[pressure]
family = L2_HIERARCHIC
order = FIRST
[]
[vel_bar_x]
family = SIDE_HIERARCHIC
order = SECOND
[]
[vel_bar_y]
family = SIDE_HIERARCHIC
order = SECOND
[]
[pressure_bar]
family = SIDE_HIERARCHIC
order = FIRST
[]
[lambda]
family = SCALAR
order = FIRST
[]
[]
[HDGKernels]
[momentum_x_advection]
type = AdvectionIPHDGKernel
variable = vel_x
face_variable = vel_bar_x
velocity = 'velocity'
coeff = ${rho}
[]
[momentum_x_diffusion]
type = NavierStokesStressIPHDGKernel
variable = vel_x
face_variable = vel_bar_x
diffusivity = 'mu'
alpha = 6
pressure_variable = pressure
pressure_face_variable = pressure_bar
component = 0
[]
[momentum_y_advection]
type = AdvectionIPHDGKernel
variable = vel_y
face_variable = vel_bar_y
velocity = 'velocity'
coeff = ${rho}
[]
[momentum_y_diffusion]
type = NavierStokesStressIPHDGKernel
variable = vel_y
face_variable = vel_bar_y
diffusivity = 'mu'
alpha = 6
pressure_variable = pressure
pressure_face_variable = pressure_bar
component = 1
[]
[mass_advection]
type = AdvectionIPHDGKernel
variable = pressure
face_variable = pressure_bar
velocity = 'velocity'
coeff = '${fparse -rho}'
self_advection = false
[]
[]
[Kernels]
[mean_zero_pressure]
type = ScalarLagrangeMultiplier
variable = pressure
lambda = lambda
[]
[]
[ScalarKernels]
[mean_zero_pressure_lm]
type = AverageValueConstraint
variable = lambda
pp_name = pressure_integral
value = 0
[]
[]
[BCs]
[momentum_x_diffusion_walls]
type = NavierStokesStressIPHDGDirichletBC
boundary = 'left bottom right'
variable = vel_x
face_variable = vel_bar_x
pressure_variable = pressure
pressure_face_variable = pressure_bar
alpha = 6
functor = '0'
diffusivity = 'mu'
component = 0
[]
[momentum_x_diffusion_top]
type = NavierStokesStressIPHDGDirichletBC
boundary = 'top'
variable = vel_x
face_variable = vel_bar_x
pressure_variable = pressure
pressure_face_variable = pressure_bar
alpha = 6
functor = '${U}'
diffusivity = 'mu'
component = 0
[]
[momentum_y_diffusion_all]
type = NavierStokesStressIPHDGDirichletBC
boundary = 'left bottom right top'
variable = vel_y
face_variable = vel_bar_y
pressure_variable = pressure
pressure_face_variable = pressure_bar
alpha = 6
functor = '0'
diffusivity = 'mu'
component = 1
[]
[mass_advection]
type = AdvectionIPHDGPrescribedFluxBC
face_variable = pressure_bar
variable = pressure
velocity = 'velocity'
coeff = '${fparse -rho}'
self_advection = false
boundary = 'left bottom top right'
prescribed_normal_flux = 0
[]
[]
[Materials]
[const]
type = ADGenericConstantMaterial
prop_names = 'rho mu'
prop_values = '${rho} ${mu}'
[]
[vel]
type = ADVectorFromComponentVariablesMaterial
vector_prop_name = 'velocity'
u = vel_x
v = vel_y
[]
[]
[Preconditioning]
[sc]
type = StaticCondensation
petsc_options_iname = '-pc_type -pc_factor_shift_type -ksp_view_pmat'
petsc_options_value = 'lu NONZERO binary'
[]
[]
[Executioner]
type = Steady
nl_rel_tol = 1e-12
petsc_options_iname = '-ksp_type'
petsc_options_value = 'preonly'
[]
[Outputs]
[out]
type = Exodus
hide = 'lambda pressure_integral symmetric vel_bar_x vel_bar_y pressure_bar'
[]
[csv]
type = CSV
hide = 'lambda pressure_integral'
[]
[]
[Postprocessors]
[Re]
type = ParsedPostprocessor
pp_names = ''
expression = '${rho} * ${U} * ${l} / ${mu}'
[]
[symmetric]
type = MatrixSymmetryCheck
mat = binaryoutput
mat_number_to_load = 2
[]
[pressure_integral]
type = ElementIntegralVariablePostprocessor
variable = pressure
execute_on = linear
[]
[]
(modules/navier_stokes/test/tests/finite_element/ins/hdg/ip/lid-driven/lid-driven-fsp.i)
mu = 1
rho = 1
l = 1
U = 1e3
n = 200
gamma = 1e5
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = ${l}
ymin = 0
ymax = ${l}
nx = ${n}
ny = ${n}
elem_type = TRI6
[]
[]
[Problem]
type = NavierStokesProblem
extra_tag_matrices = 'mass'
mass_matrix = 'mass'
use_pressure_mass_matrix = true
[]
[Variables]
[vel_x]
family = MONOMIAL
order = FIRST
[]
[vel_y]
family = MONOMIAL
order = FIRST
[]
[pressure]
family = MONOMIAL
order = CONSTANT
[]
[vel_bar_x]
family = SIDE_HIERARCHIC
order = FIRST
[]
[vel_bar_y]
family = SIDE_HIERARCHIC
order = FIRST
[]
[pressure_bar]
family = SIDE_HIERARCHIC
order = FIRST
[]
[]
[HDGKernels]
[momentum_x_convection]
type = AdvectionIPHDGKernel
variable = vel_x
face_variable = vel_bar_x
velocity = 'velocity'
coeff = ${rho}
[]
[momentum_x_diffusion]
type = NavierStokesStressIPHDGKernel
variable = vel_x
face_variable = vel_bar_x
diffusivity = 'mu'
alpha = 6
pressure_variable = pressure
pressure_face_variable = pressure_bar
component = 0
[]
[momentum_y_convection]
type = AdvectionIPHDGKernel
variable = vel_y
face_variable = vel_bar_y
velocity = 'velocity'
coeff = ${rho}
[]
[momentum_y_diffusion]
type = NavierStokesStressIPHDGKernel
variable = vel_y
face_variable = vel_bar_y
diffusivity = 'mu'
alpha = 6
pressure_variable = pressure
pressure_face_variable = pressure_bar
component = 1
[]
[pressure_convection]
type = AdvectionIPHDGKernel
variable = pressure
face_variable = pressure_bar
velocity = 'velocity'
coeff = '${fparse -rho}'
self_advection = false
[]
[]
[Kernels]
[mass_matrix_pressure]
type = MassMatrix
variable = pressure
matrix_tags = 'mass'
density = '${fparse -1/gamma}'
[]
[grad_div_x]
type = GradDiv
variable = vel_x
u = vel_x
v = vel_y
gamma = ${gamma}
component = 0
[]
[grad_div_y]
type = GradDiv
variable = vel_y
u = vel_x
v = vel_y
gamma = ${gamma}
component = 1
[]
[]
[DGKernels]
[pb_mass]
type = MassMatrixDGKernel
variable = pressure_bar
matrix_tags = 'mass'
density = '${fparse -1/gamma}'
[]
[u_jump]
type = MassFluxPenalty
variable = vel_x
u = vel_x
v = vel_y
component = 0
gamma = ${gamma}
[]
[v_jump]
type = MassFluxPenalty
variable = vel_y
u = vel_x
v = vel_y
component = 1
gamma = ${gamma}
[]
[]
[BCs]
[momentum_x_diffusion_walls]
type = NavierStokesStressIPHDGDirichletBC
boundary = 'left bottom right'
variable = vel_x
face_variable = vel_bar_x
pressure_variable = pressure
pressure_face_variable = pressure_bar
alpha = 6
functor = '0'
diffusivity = 'mu'
component = 0
[]
[momentum_x_diffusion_top]
type = NavierStokesStressIPHDGDirichletBC
boundary = 'top'
variable = vel_x
face_variable = vel_bar_x
pressure_variable = pressure
pressure_face_variable = pressure_bar
alpha = 6
functor = '${U}'
diffusivity = 'mu'
component = 0
[]
[momentum_y_diffusion_all]
type = NavierStokesStressIPHDGDirichletBC
boundary = 'left bottom right top'
variable = vel_y
face_variable = vel_bar_y
pressure_variable = pressure
pressure_face_variable = pressure_bar
alpha = 6
functor = '0'
diffusivity = 'mu'
component = 1
[]
[mass_convection]
type = AdvectionIPHDGPrescribedFluxBC
face_variable = pressure_bar
variable = pressure
velocity = 'velocity'
coeff = '${fparse -rho}'
self_advection = false
boundary = 'left bottom top right'
prescribed_normal_flux = 0
[]
[pb_mass]
type = MassMatrixIntegratedBC
variable = pressure_bar
matrix_tags = 'mass'
boundary = 'left right bottom top'
density = '${fparse -1/gamma}'
[]
[u_jump_walls]
type = MassFluxPenaltyBC
variable = vel_x
u = vel_x
v = vel_y
component = 0
boundary = 'left right bottom'
gamma = ${gamma}
dirichlet_value = 'walls'
[]
[v_jump_walls]
type = MassFluxPenaltyBC
variable = vel_y
u = vel_x
v = vel_y
component = 1
boundary = 'left right bottom'
gamma = ${gamma}
dirichlet_value = 'walls'
[]
[u_jump_top]
type = MassFluxPenaltyBC
variable = vel_x
u = vel_x
v = vel_y
component = 0
boundary = 'top'
gamma = ${gamma}
dirichlet_value = 'top'
[]
[v_jump_top]
type = MassFluxPenaltyBC
variable = vel_y
u = vel_x
v = vel_y
component = 1
boundary = 'top'
gamma = ${gamma}
dirichlet_value = 'top'
[]
[]
[Functions]
[top]
type = ParsedVectorFunction
value_x = ${U}
value_y = 0
[]
[walls]
type = ParsedVectorFunction
value_x = 0
value_y = 0
[]
[]
[Materials]
[const]
type = ADGenericConstantMaterial
prop_names = 'rho mu'
prop_values = '${rho} ${mu}'
[]
[vel]
type = ADVectorFromComponentVariablesMaterial
vector_prop_name = 'velocity'
u = vel_x
v = vel_y
[]
[]
[Preconditioning]
[FSP]
type = FSP
topsplit = 'up'
[up]
splitting = 'u p'
splitting_type = schur
petsc_options_iname = '-pc_fieldsplit_schur_fact_type -pc_fieldsplit_schur_precondition -ksp_gmres_restart -ksp_type -ksp_pc_side -ksp_rtol'
petsc_options_value = 'full self 300 fgmres right 1e-4'
[]
[u]
vars = 'vel_x vel_y vel_bar_x vel_bar_y'
petsc_options = '-ksp_converged_reason'
petsc_options_iname = '-pc_type -ksp_type -ksp_rtol -ksp_gmres_restart -ksp_pc_side -pc_factor_mat_solver_type'
petsc_options_value = 'ilu gmres 1e-2 300 right strumpack'
[]
[p]
vars = 'pressure pressure_bar'
petsc_options = '-ksp_converged_reason'
petsc_options_iname = '-ksp_type -ksp_gmres_restart -ksp_rtol -pc_type -ksp_pc_side'
petsc_options_value = 'gmres 300 1e-2 ilu right'
[]
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
[]
[Outputs]
active = ''
[out]
type = Exodus
hide = 'pressure_average vel_bar_x vel_bar_y pressure_bar'
[]
[]
[Postprocessors]
[Re]
type = ParsedPostprocessor
pp_names = ''
expression = '${rho} * ${U} * ${l} / ${mu}'
[]
[pressure_average]
type = ElementAverageValue
variable = pressure
[]
[]
[Correctors]
[set_pressure]
type = NSPressurePin
pin_type = 'average'
variable = pressure
pressure_average = 'pressure_average'
[]
[]
(modules/navier_stokes/test/tests/finite_element/ins/hdg/ip/lid-driven/lid-driven.i)
mu = 1
rho = 1
l = 1
U = 100
n = 8
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = ${l}
ymin = 0
ymax = ${l}
nx = ${n}
ny = ${n}
elem_type = TRI6
[]
[]
[Variables]
[vel_x]
family = L2_HIERARCHIC
order = SECOND
[]
[vel_y]
family = L2_HIERARCHIC
order = SECOND
[]
[pressure]
family = L2_HIERARCHIC
order = FIRST
[]
[vel_bar_x]
family = SIDE_HIERARCHIC
order = SECOND
[]
[vel_bar_y]
family = SIDE_HIERARCHIC
order = SECOND
[]
[pressure_bar]
family = SIDE_HIERARCHIC
order = FIRST
[]
[lambda]
family = SCALAR
order = FIRST
[]
[]
[HDGKernels]
[momentum_x_convection]
type = AdvectionIPHDGKernel
variable = vel_x
face_variable = vel_bar_x
velocity = 'velocity'
coeff = ${rho}
[]
[momentum_x_diffusion]
type = NavierStokesStressIPHDGKernel
variable = vel_x
face_variable = vel_bar_x
diffusivity = 'mu'
alpha = 6
pressure_variable = pressure
pressure_face_variable = pressure_bar
component = 0
[]
[momentum_y_convection]
type = AdvectionIPHDGKernel
variable = vel_y
face_variable = vel_bar_y
velocity = 'velocity'
coeff = ${rho}
[]
[momentum_y_diffusion]
type = NavierStokesStressIPHDGKernel
variable = vel_y
face_variable = vel_bar_y
diffusivity = 'mu'
alpha = 6
pressure_variable = pressure
pressure_face_variable = pressure_bar
component = 1
[]
[pressure_convection]
type = AdvectionIPHDGKernel
variable = pressure
face_variable = pressure_bar
velocity = 'velocity'
coeff = '${fparse -rho}'
self_advection = false
[]
[]
[Kernels]
[mean_zero_pressure]
type = ScalarLagrangeMultiplier
variable = pressure
lambda = lambda
[]
[]
[ScalarKernels]
[mean_zero_pressure_lm]
type = AverageValueConstraint
variable = lambda
pp_name = pressure_integral
value = 0
[]
[]
[BCs]
[momentum_x_diffusion_walls]
type = NavierStokesStressIPHDGDirichletBC
boundary = 'left bottom right'
variable = vel_x
face_variable = vel_bar_x
pressure_variable = pressure
pressure_face_variable = pressure_bar
alpha = 6
functor = '0'
diffusivity = 'mu'
component = 0
[]
[momentum_x_diffusion_top]
type = NavierStokesStressIPHDGDirichletBC
boundary = 'top'
variable = vel_x
face_variable = vel_bar_x
pressure_variable = pressure
pressure_face_variable = pressure_bar
alpha = 6
functor = '${U}'
diffusivity = 'mu'
component = 0
[]
[momentum_y_diffusion_all]
type = NavierStokesStressIPHDGDirichletBC
boundary = 'left bottom right top'
variable = vel_y
face_variable = vel_bar_y
pressure_variable = pressure
pressure_face_variable = pressure_bar
alpha = 6
functor = '0'
diffusivity = 'mu'
component = 1
[]
[mass_convection]
type = AdvectionIPHDGPrescribedFluxBC
face_variable = pressure_bar
variable = pressure
velocity = 'velocity'
coeff = '${fparse -rho}'
self_advection = false
boundary = 'left bottom top right'
prescribed_normal_flux = 0
[]
[]
[Materials]
[const]
type = ADGenericConstantMaterial
prop_names = 'rho mu'
prop_values = '${rho} ${mu}'
[]
[vel]
type = ADVectorFromComponentVariablesMaterial
vector_prop_name = 'velocity'
u = vel_x
v = vel_y
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
nl_rel_tol = 1e-12
[]
[Outputs]
[out]
type = Exodus
hide = 'lambda pressure_integral vel_bar_x vel_bar_y pressure_bar'
[]
[]
[Postprocessors]
[Re]
type = ParsedPostprocessor
pp_names = ''
expression = '${rho} * ${U} * ${l} / ${mu}'
[]
[pressure_integral]
type = ElementIntegralVariablePostprocessor
variable = pressure
execute_on = linear
[]
[]
(modules/navier_stokes/test/tests/finite_element/ins/hdg/ip/lid-driven/matrix-testing.i)
mu = 1
rho = 1
U = 1
n = 5
l = 1
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = ${l}
ymin = 0
ymax = ${l}
nx = ${n}
ny = ${n}
elem_type = TRI6
[]
[]
[Problem]
type = PrintMatricesNSProblem
extra_tag_matrices = 'mass jump combined grad_div'
pressure_mass_matrix = 'mass'
velocity_mass_matrix = 'mass'
augmented_lagrange_matrices = 'jump grad_div combined'
u = vel_x
v = vel_y
pressure = pressure
pressure_bar = pressure_bar
print = false
[]
[Variables]
[vel_x]
family = MONOMIAL
order = FIRST
[]
[vel_y]
family = MONOMIAL
order = FIRST
[]
[pressure]
family = MONOMIAL
order = CONSTANT
[]
[vel_bar_x]
family = SIDE_HIERARCHIC
order = FIRST
[]
[vel_bar_y]
family = SIDE_HIERARCHIC
order = FIRST
[]
[pressure_bar]
family = SIDE_HIERARCHIC
order = FIRST
[]
[lambda]
family = SCALAR
order = FIRST
[]
[]
[HDGKernels]
[momentum_x_diffusion]
type = NavierStokesStressIPHDGKernel
variable = vel_x
face_variable = vel_bar_x
diffusivity = 'mu'
alpha = 6
pressure_variable = pressure
pressure_face_variable = pressure_bar
component = 0
[]
[momentum_y_diffusion]
type = NavierStokesStressIPHDGKernel
variable = vel_y
face_variable = vel_bar_y
diffusivity = 'mu'
alpha = 6
pressure_variable = pressure
pressure_face_variable = pressure_bar
component = 1
[]
[pressure_convection]
type = AdvectionIPHDGKernel
variable = pressure
face_variable = pressure_bar
velocity = 'velocity'
coeff = '${fparse -rho}'
self_advection = false
[]
[]
[Kernels]
[mean_zero_pressure]
type = ScalarLagrangeMultiplier
variable = pressure
lambda = lambda
[]
[mass_matrix_vel_x]
type = MassMatrix
variable = vel_x
matrix_tags = 'mass'
[]
[mass_matrix_vel_y]
type = MassMatrix
variable = vel_y
matrix_tags = 'mass'
[]
[mass_matrix_pressure]
type = MassMatrix
variable = pressure
matrix_tags = 'mass'
[]
[u_jump]
type = GradDiv
matrix_only = true
variable = vel_x
u = vel_x
v = vel_y
component = 0
vector_tags = ''
matrix_tags = 'grad_div combined'
[]
[v_jump]
type = GradDiv
matrix_only = true
variable = vel_y
u = vel_x
v = vel_y
component = 1
vector_tags = ''
matrix_tags = 'grad_div combined'
[]
[]
[ScalarKernels]
[mean_zero_pressure_lm]
type = AverageValueConstraint
variable = lambda
pp_name = pressure_integral
value = 0
[]
[]
[DGKernels]
[pb_mass]
type = MassMatrixDGKernel
variable = pressure_bar
matrix_tags = 'mass'
[]
[u_jump]
type = MassFluxPenalty
matrix_only = true
variable = vel_x
u = vel_x
v = vel_y
component = 0
vector_tags = ''
matrix_tags = 'jump combined'
[]
[v_jump]
type = MassFluxPenalty
matrix_only = true
variable = vel_y
u = vel_x
v = vel_y
component = 1
vector_tags = ''
matrix_tags = 'jump combined'
[]
[]
[BCs]
[momentum_x_diffusion_walls]
type = NavierStokesStressIPHDGDirichletBC
boundary = 'left bottom right'
variable = vel_x
face_variable = vel_bar_x
pressure_variable = pressure
pressure_face_variable = pressure_bar
alpha = 6
functor = '0'
diffusivity = 'mu'
component = 0
[]
[momentum_x_diffusion_top]
type = NavierStokesStressIPHDGDirichletBC
boundary = 'top'
variable = vel_x
face_variable = vel_bar_x
pressure_variable = pressure
pressure_face_variable = pressure_bar
alpha = 6
functor = '${U}'
diffusivity = 'mu'
component = 0
[]
[momentum_y_diffusion_all]
type = NavierStokesStressIPHDGDirichletBC
boundary = 'left bottom right top'
variable = vel_y
face_variable = vel_bar_y
pressure_variable = pressure
pressure_face_variable = pressure_bar
alpha = 6
functor = '0'
diffusivity = 'mu'
component = 1
[]
[mass_convection]
type = AdvectionIPHDGPrescribedFluxBC
face_variable = pressure_bar
variable = pressure
velocity = 'velocity'
coeff = '${fparse -rho}'
self_advection = false
boundary = 'left bottom top right'
prescribed_normal_flux = 0
[]
[pb_mass]
type = MassMatrixIntegratedBC
variable = pressure_bar
matrix_tags = 'mass'
boundary = 'left right bottom top'
[]
[u_jump_walls]
type = MassFluxPenaltyBC
matrix_only = true
variable = vel_x
u = vel_x
v = vel_y
component = 0
vector_tags = ''
matrix_tags = 'jump combined'
boundary = 'left right bottom'
dirichlet_value = 'walls'
[]
[v_jump_walls]
type = MassFluxPenaltyBC
matrix_only = true
variable = vel_y
u = vel_x
v = vel_y
component = 1
vector_tags = ''
matrix_tags = 'jump combined'
boundary = 'left right bottom'
dirichlet_value = 'walls'
[]
[u_jump_top]
type = MassFluxPenaltyBC
matrix_only = true
variable = vel_x
u = vel_x
v = vel_y
component = 0
vector_tags = ''
matrix_tags = 'jump combined'
boundary = 'top'
dirichlet_value = 'top'
[]
[v_jump_top]
type = MassFluxPenaltyBC
matrix_only = true
variable = vel_y
u = vel_x
v = vel_y
component = 1
vector_tags = ''
matrix_tags = 'jump combined'
boundary = 'top'
dirichlet_value = 'top'
[]
[]
[Functions]
[top]
type = ParsedVectorFunction
value_x = ${U}
value_y = 0
[]
[walls]
type = ParsedVectorFunction
value_x = 0
value_y = 0
[]
[]
[Materials]
[const]
type = ADGenericConstantMaterial
prop_names = 'rho mu'
prop_values = '${rho} ${mu}'
[]
[vel]
type = ADVectorFromComponentVariablesMaterial
vector_prop_name = 'velocity'
u = vel_x
v = vel_y
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
nl_rel_tol = 1e-12
[]
[Outputs]
[out]
type = CSV
hide = 'pressure_integral lambda'
execute_on = 'timestep_end'
[]
[]
[Postprocessors]
[symmetric]
type = MatrixSymmetryCheck
execute_on = 'timestep_end'
[]
[pressure_integral]
type = ElementIntegralVariablePostprocessor
variable = pressure
execute_on = linear
[]
[fe_jump_and_upb_equiv]
type = MatrixEqualityCheck
mat1 = 'vel_pb_grad_div.mat'
mat2 = 'jump.mat'
[]
[fe_grad_div_and_up_equiv]
type = MatrixEqualityCheck
mat1 = 'vel_p_grad_div.mat'
mat2 = 'grad_div.mat'
[]
[fe_combined_and_upall_equiv]
type = MatrixEqualityCheck
mat1 = 'vel_all_p_grad_div.mat'
mat2 = 'combined.mat'
[]
[upb_grad_div_num_zero_eig]
type = MatrixEigenvalueCheck
mat = vel_pb_grad_div.mat
[]
[upb_div_grad_num_zero_eig]
type = MatrixEigenvalueCheck
mat = vel_pb_div_grad.mat
[]
[up_grad_div_num_zero_eig]
type = MatrixEigenvalueCheck
mat = vel_p_grad_div.mat
[]
[up_div_grad_num_zero_eig]
type = MatrixEigenvalueCheck
mat = vel_p_div_grad.mat
[]
[upall_grad_div_num_zero_eig]
type = MatrixEigenvalueCheck
mat = vel_all_p_grad_div.mat
[]
[upall_div_grad_num_zero_eig]
type = MatrixEigenvalueCheck
mat = vel_all_p_div_grad.mat
[]
[]