- epsilonepsilon
C++ Type:double
Controllable:No
Description:epsilon
- sigmasigma
C++ Type:double
Controllable:No
Description:sigma
- variableThe name of the variable that this residual object operates on
C++ Type:NonlinearVariableName
Controllable:No
Description:The name of the variable that this residual object operates on
DGDiffusion
Computes residual contribution for the diffusion operator using discontinous Galerkin method.
More information about the discontinuous Galerkin method, and in particular for the Poisson equation, may be found in the DGKernels syntax page.
Example input syntax
This example is a 2D diffusion-reaction-source case using DG. The kernels are taking care of the volumetric terms in the equation, while the DGDiffusion
DGKernel is defined on the element sides.
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./abs]
type = Reaction
variable = u
[../]
[./forcing]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[DGKernels]
[./dg_diff]
type = DGDiffusion
variable = u
epsilon = -1
sigma = 6
[../]
[]
(test/tests/dgkernels/2d_diffusion_dg/dg_stateful.i)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
- boundaryThe list of boundaries (ids or names) from the mesh where this object applies
C++ Type:std::vector<BoundaryName>
Controllable:No
Description:The list of boundaries (ids or names) from the mesh where this object applies
- diff1The diffusion (or thermal conductivity or viscosity) coefficient.
Default:1
C++ Type:MaterialPropertyName
Controllable:No
Description:The diffusion (or thermal conductivity or viscosity) coefficient.
- exclude_boundaryThe internal side sets to be excluded from this kernel.
C++ Type:std::vector<BoundaryName>
Controllable:No
Description:The internal side sets to be excluded from this kernel.
- 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
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.
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
Tagging 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>
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>
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
Input Files
- (test/tests/misc/check_error/dg_kernel_with_aux_var.i)
- (test/tests/dgkernels/3d_diffusion_dg/3d_diffusion_p_refinement.i)
- (test/tests/dgkernels/2d_diffusion_dg/no_functor_additions.i)
- (test/tests/dgkernels/dg_displacement/dg_displacement.i)
- (test/tests/time_integrators/implicit-euler/ie-monomials.i)
- (test/tests/dgkernels/2d_diffusion_dg/2d_diffusion_dg_test.i)
- (test/tests/preconditioners/pbp/pbp_dg_test.i)
- (test/tests/quadrature/order/material_with_order.i)
- (modules/heat_transfer/test/tests/sideset_heat_transfer/gap_thermal_ktemp_1D.i)
- (test/tests/controls/time_periods/dgkernels/dgkernels.i)
- (test/tests/userobjects/domain-user-object/measure-conservation.i)
- (test/tests/coord_type/coord_type_rz_integrated.i)
- (test/tests/misc/save_in/dg_save_in_test.i)
- (modules/navier_stokes/test/tests/finite_element/ins/cg-dg-hybrid/mms/lid-driven-skewed/hybrid-skewed-vortex.i)
- (modules/heat_transfer/test/tests/sideset_heat_transfer/gap_thermal_1D.i)
- (test/tests/dgkernels/stateful-coupled-var/test.i)
- (test/tests/tag/2d_diffusion_dg_tag.i)
- (modules/navier_stokes/test/tests/finite_element/ins/cg-dg-hybrid/channel-flow/channel-hybrid.i)
- (modules/navier_stokes/test/tests/finite_element/ins/cg-dg-hybrid/lid-driven/hybrid-cg-dg.i)
- (test/tests/materials/material/material_test_dg.i)
- (modules/navier_stokes/test/tests/finite_element/ins/cg-dg-hybrid/mms/lid-driven/hybrid-cg-dg-mms.i)
- (test/tests/dgkernels/passive-scalar-channel-flow/test.i)
- (test/tests/kernels/array_kernels/standard_save_in.i)
- (test/tests/dgkernels/dg_block_restrict/1d_dg_block_restrict.i)
- (test/tests/outputs/exodus/exodus_discontinuous.i)
- (test/tests/auxkernels/mesh_integer/dg_mesh_integer.i)
- (test/tests/dgkernels/advection_diffusion_mixed_bcs_test_resid_jac/dg_advection_diffusion_test.i)
- (test/tests/adaptivity/dont-p-refine/test.i)
- (test/tests/postprocessors/internal_side_jump/internal_side_jump.i)
- (test/tests/outputs/debug/show_execution_kernels_bcs.i)
- (test/tests/interfacekernels/1d_interface/mixed_shapes.i)
- (test/tests/dgkernels/3d_diffusion_dg/3d_diffusion_dg_test.i)
- (test/tests/dgkernels/adaptivity/adaptivity.i)
- (test/tests/problems/eigen_problem/eigensolvers/dg_krylovschur.i)
- (test/tests/dgkernels/dg_block_restrict/2d_dg_diffusion_block_restrict.i)
- (test/tests/dgkernels/2d_diffusion_dg/dg_stateful.i)
(test/tests/dgkernels/2d_diffusion_dg/dg_stateful.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
elem_type = QUAD4
[]
[Variables]
[./u]
order = FIRST
family = MONOMIAL
[./InitialCondition]
type = ConstantIC
value = 1
[../]
[../]
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
expression = 2*pow(e,-x-(y*y))*(1-2*y*y)
[../]
[./exact_fn]
type = ParsedGradFunction
expression = pow(e,-x-(y*y))
grad_x = -pow(e,-x-(y*y))
grad_y = -2*y*pow(e,-x-(y*y))
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./abs]
type = Reaction
variable = u
[../]
[./forcing]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[DGKernels]
[./dg_diff]
type = DGDiffusion
variable = u
epsilon = -1
sigma = 6
[../]
[]
[BCs]
[./all]
type = DGFunctionDiffusionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
epsilon = -1
sigma = 6
[../]
[]
[Materials]
[./stateful]
type = StatefulMaterial
initial_diffusivity = 1
boundary = 'left'
[../]
[./general]
type = GenericConstantMaterial
block = '0'
prop_names = 'dummy'
prop_values = '1'
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
nl_rel_tol = 1e-10
[]
(test/tests/misc/check_error/dg_kernel_with_aux_var.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./v]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./rea]
type = Reaction
variable = u
[../]
[]
[DGKernels]
[./nope]
type = DGDiffusion
variable = v
epsilon = -1
sigma = 6
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = 1
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = 2
value = 1
[../]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
[]
[Outputs]
file_base = out
[]
(test/tests/dgkernels/3d_diffusion_dg/3d_diffusion_p_refinement.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = 0
xmax = 1
ymin = 0
ymax = 1
zmin = 0
zmax = 1
elem_type = HEX8
[]
[Variables]
[u]
order = FIRST
family = MONOMIAL
[InitialCondition]
type = ConstantIC
value = 0.5
[]
[]
[]
[Functions]
[forcing_fn]
type = ParsedFunction
expression = 2*pow(e,-x-(y*y))*(1-2*y*y)
[]
[exact_fn]
type = ParsedGradFunction
expression = pow(e,-x-(y*y))
grad_x = -pow(e,-x-(y*y))
grad_y = -2*y*pow(e,-x-(y*y))
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[abs]
type = Reaction
variable = u
[]
[forcing]
type = BodyForce
variable = u
function = forcing_fn
[]
[]
[DGKernels]
[dg_diff]
type = DGDiffusion
variable = u
epsilon = -1
sigma = 6
[]
[]
[BCs]
[all]
type = DGFunctionDiffusionDirichletBC
variable = u
boundary = '0 1 2 3 4 5'
function = exact_fn
epsilon = -1
sigma = 6
[]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[Adaptivity]
switch_h_to_p_refinement = true
steps = 2
refine_fraction = 1.0
coarsen_fraction = 0
max_h_level = 8
[]
[]
[Postprocessors]
[h]
type = AverageElementSize
execute_on = 'initial timestep_end'
[]
[dofs]
type = NumDOFs
execute_on = 'initial timestep_end'
[]
[l2_err]
type = ElementL2Error
variable = u
function = exact_fn
execute_on = 'initial timestep_end'
[]
[]
[Outputs]
exodus = true
[]
(test/tests/dgkernels/2d_diffusion_dg/no_functor_additions.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
elem_type = QUAD4
[]
[Variables]
[./u]
order = FIRST
family = MONOMIAL
[./InitialCondition]
type = ConstantIC
value = 1
[../]
[../]
[]
[AuxVariables]
[v]
order = FIRST
family = MONOMIAL
[]
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
expression = 2*pow(e,-x-(y*y))*(1-2*y*y)
[../]
[./exact_fn]
type = ParsedGradFunction
expression = pow(e,-x-(y*y))
grad_x = -pow(e,-x-(y*y))
grad_y = -2*y*pow(e,-x-(y*y))
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./abs] # u * v
type = Reaction
variable = u
[../]
[./forcing]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[DGKernels]
[regular_dg_diffusion]
type = DGDiffusion
variable = u
epsilon = -1
sigma = 6
[]
[]
[DGDiffusionAction]
variable = u
kernels_to_add = 'COUPLED'
coupled_var = v
[]
[BCs]
[./all]
type = DGFunctionDiffusionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
epsilon = -1
sigma = 6
[../]
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
[console]
type = Console
system_info = 'framework mesh aux nonlinear relationship execution'
[]
[]
[Problem]
error_on_jacobian_nonzero_reallocation = true
[]
[Postprocessors]
[num_rm]
type = NumRelationshipManagers
[]
[]
(test/tests/dgkernels/dg_displacement/dg_displacement.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
displacements = 'disp_x disp_y'
[]
[Variables]
[./u]
order = FIRST
family = MONOMIAL
[../]
[]
[AuxVariables]
[./disp_x]
[../]
[./disp_y]
[../]
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
expression = 2*pow(e,-x-(y*y))*(1-2*y*y)
[../]
[./exact_fn]
type = ParsedGradFunction
expression = pow(e,-x-(y*y))
grad_x = -pow(e,-x-(y*y))
grad_y = -2*y*pow(e,-x-(y*y))
[../]
[./disp_func]
type = ParsedFunction
expression = x
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./abs]
type = Reaction
variable = u
[../]
[./forcing]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[DGKernels]
[./dg_diff]
type = DGDiffusion
variable = u
epsilon = -1
sigma = 6
use_displaced_mesh = true
[../]
[]
[BCs]
[./all]
type = DGFunctionDiffusionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
epsilon = -1
sigma = 6
[../]
[]
[Executioner]
type = Steady
solve_type = PJFNK
nl_rel_tol = 1e-10
[]
[Outputs]
execute_on = 'timestep_end'
file_base = out
exodus = true
[]
[ICs]
[./disp_x_ic]
function = disp_func
variable = disp_x
type = FunctionIC
[../]
[]
(test/tests/time_integrators/implicit-euler/ie-monomials.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
elem_type = QUAD4
[]
[Variables]
[./u]
order = FIRST
family = MONOMIAL
[../]
[]
[ICs]
[./u_ic]
type = ConstantIC
variable = u
value = 1
[../]
[]
[Functions]
active = 'forcing_fn exact_fn'
[./forcing_fn]
type = ParsedFunction
expression = 2*pow(e,-x-(y*y))*(1-2*y*y)
[../]
[./exact_fn]
type = ParsedGradFunction
value = pow(e,-x-(y*y))
grad_x = -pow(e,-x-(y*y))
grad_y = -2*y*pow(e,-x-(y*y))
[../]
[]
[Kernels]
[./time]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./abs] # u * v
type = Reaction
variable = u
[../]
[./forcing]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[DGKernels]
[./dg_diff]
type = DGDiffusion
variable = u
epsilon = -1
sigma = 6
[../]
[]
[BCs]
[./all]
type = DGFunctionDiffusionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
epsilon = -1
sigma = 6
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
solve_type = 'NEWTON'
[../]
[]
[Executioner]
type = Transient
nl_rel_tol = 1e-10
num_steps = 1
[]
[Outputs]
execute_on = 'timestep_end'
console = true
[]
(test/tests/dgkernels/2d_diffusion_dg/2d_diffusion_dg_test.i)
###########################################################
# This is a test of the Discontinuous Galerkin System.
# Discontinous basis functions are used (Monomials) and
# a Laplacian DGKernel contributes to the
# internal edges around each element. Jumps are allowed
# but penalized by this method.
#
# @Requirement F3.60
###########################################################
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
# xmin = -1
# xmax = 1
# ymin = -1
# ymax = 1
xmin = 0
xmax = 1
ymin = 0
ymax = 1
elem_type = QUAD4
[]
[Variables]
active = 'u'
[u]
order = FIRST
family = MONOMIAL
[InitialCondition]
type = ConstantIC
value = 1
[]
[]
[]
[Functions]
active = 'forcing_fn exact_fn'
[forcing_fn]
type = ParsedFunction
# function = -4.0+(x*x)+(y*y)
# function = x
# function = (x*x)-2.0
expression = 2*pow(e,-x-(y*y))*(1-2*y*y)
# function = (x*x*x)-6.0*x
[]
[exact_fn]
type = ParsedGradFunction
# function = x
# grad_x = 1
# grad_y = 0
# function = (x*x)+(y*y)
# grad_x = 2*x
# grad_y = 2*y
# function = (x*x)
# grad_x = 2*x
# grad_y = 0
expression = pow(e,-x-(y*y))
grad_x = -pow(e,-x-(y*y))
grad_y = -2*y*pow(e,-x-(y*y))
# function = (x*x*x)
# grad_x = 3*x*x
# grad_y = 0
[]
[]
[Kernels]
active = 'diff abs forcing'
[diff]
type = Diffusion
variable = u
[]
[abs] # u * v
type = Reaction
variable = u
[]
[forcing]
type = BodyForce
variable = u
function = forcing_fn
[]
[]
[DGKernels]
active = 'dg_diff'
[dg_diff]
type = DGDiffusion
variable = u
epsilon = -1
sigma = 6
[]
[]
[BCs]
active = 'all'
[all]
type = DGFunctionDiffusionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
epsilon = -1
sigma = 6
[]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
# petsc_options = '-snes_mf'
# petsc_options_iname = '-pc_type -pc_hypre_type'
# petsc_options_value = 'hypre boomeramg'
# petsc_options = '-snes_mf'
# max_r_steps = 2
[Adaptivity]
steps = 2
refine_fraction = 1.0
coarsen_fraction = 0
max_h_level = 8
[]
nl_rel_tol = 1e-10
# nl_rel_tol = 1e-12
[]
[Postprocessors]
active = 'h dofs l2_err'
[h]
type = AverageElementSize
[]
[dofs]
type = NumDOFs
[]
[l2_err]
type = ElementL2Error
variable = u
function = exact_fn
[]
[]
[Outputs]
file_base = out
exodus = true
[]
(test/tests/preconditioners/pbp/pbp_dg_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 20
xmin = 0
xmax = 1
ymin = 0
ymax = 1
elem_type = QUAD4
[]
[Variables]
[./u]
order = FIRST
family = MONOMIAL
[../]
[./v]
order = FIRST
family = MONOMIAL
[../]
[]
[Preconditioning]
[./PBP]
type = PBP
solve_order = 'u v'
preconditioner = 'AMG AMG'
[../]
[]
[Kernels]
[./diff_u]
type = Diffusion
variable = u
[../]
[./abs_u]
type = Reaction
variable = u
[../]
[./forcing_u]
type = BodyForce
variable = u
function = forcing_fn
[../]
[./diff_v]
type = Diffusion
variable = v
[../]
[./abs_v]
type = Reaction
variable = v
[../]
[./forcing_v]
type = BodyForce
variable = v
function = forcing_fn
[../]
[./conv_v]
type = CoupledForce
variable = v
v = u
[../]
[]
[DGKernels]
[./dg_diff]
type = DGDiffusion
variable = u
epsilon = -1
sigma = 6
[../]
[./dg_diff_2]
type = DGDiffusion
variable = v
epsilon = -1
sigma = 6
[../]
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
expression = 2*pow(e,-x-(y*y))*(1-2*y*y)
[../]
[./exact_fn]
type = ParsedGradFunction
value = pow(e,-x-(y*y))
grad_x = -pow(e,-x-(y*y))
grad_y = -2*y*pow(e,-x-(y*y))
[../]
[]
[BCs]
[./all_u]
type = DGFunctionDiffusionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
epsilon = -1
sigma = 6
[../]
[./all_v]
type = DGFunctionDiffusionDirichletBC
variable = v
boundary = '0 1 2 3'
function = exact_fn
epsilon = -1
sigma = 6
[../]
[]
[Problem]
type = FEProblem
error_on_jacobian_nonzero_reallocation = true
[]
[Executioner]
type = Steady
l_max_its = 10
nl_max_its = 10
solve_type = JFNK
[]
[Outputs]
exodus = true
[]
(test/tests/quadrature/order/material_with_order.i)
[Mesh]
[cmg]
type = CartesianMeshGenerator
dim = 2
dx = '1 1 1'
dy = ' 1 1 1'
subdomain_id = '1 2 3
4 5 6
7 8 9'
[]
[]
[Variables]
[u]
order = FIRST
family = L2_LAGRANGE
initial_condition = 1
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[forcing]
type = BodyForce
variable = u
[]
[]
[DGKernels]
[dg_diff]
type = DGDiffusion
variable = u
epsilon = -1
sigma = 6
[]
[test]
type = MatDGKernel
variable = u
mat_prop = dummy
[]
[]
[BCs]
[bc]
type = PenaltyDirichletBC
variable = u
boundary = '0 1 2 3'
penalty = 1e4
value = 0
[]
[]
[Postprocessors]
[block1_qps]
type = NumElemQPs
block = 1
[]
[block5_qps]
type = NumElemQPs
block = 5
[]
[block6_qps]
type = NumElemQPs
block = 6
[]
[]
[Materials]
[dummy]
type = GenericConstantMaterial
block = '1 2 3 4 6 7 8 9'
prop_names = dummy
prop_values = 1
[]
[qordermaterial]
type = QuadratureMaterial
block = 5
property_name = dummy
[]
[]
[Executioner]
type = Steady
[]
[Outputs]
execute_on = 'timestep_end'
csv = true
[]
(modules/heat_transfer/test/tests/sideset_heat_transfer/gap_thermal_ktemp_1D.i)
[Mesh]
[mesh]
type = GeneratedMeshGenerator
dim = 1
nx = 2
xmax = 2
[]
[split]
type = SubdomainBoundingBoxGenerator
input = mesh
block_id = 1
bottom_left = '1 0 0'
top_right = '2 0 0'
[]
[interface]
type = SideSetsBetweenSubdomainsGenerator
input = split
primary_block = 1
paired_block = 0
new_boundary = 'interface0'
[]
uniform_refine = 4
[]
[Variables]
[T]
order = FIRST
family = MONOMIAL
[]
[]
[AuxVariables]
[Tbulk]
order = FIRST
family = LAGRANGE
initial_condition = 300 # K
[]
[]
[Kernels]
[diff]
type = MatDiffusion
variable = T
diffusivity = conductivity
[]
[source]
type = BodyForce
variable = T
value = 1.0
[]
[]
[DGKernels]
[dg_diff]
type = DGDiffusion
variable = T
epsilon = -1
sigma = 6
diff = conductivity
exclude_boundary = 'interface0'
[]
[]
[InterfaceKernels]
[gap_var]
type = SideSetHeatTransferKernel
variable = T
neighbor_var = T
boundary = 'interface0'
Tbulk_var = Tbulk
[]
[]
[Functions]
# Defining temperature dependent fucntion for conductivity across side set
[kgap]
type = ParsedFunction
expression = 't / 200'
[]
[bc_func]
type = ConstantFunction
value = 300
[]
[exact]
type = ParsedFunction
expression = '
A := if(x < 1, -0.5, -0.25);
B := if(x < 1, -0.293209850655001, 0.0545267662299068);
C := if(x < 1, 300.206790149345, 300.19547323377);
d := -1;
A * (x+d) * (x+d) + B * (x+d) + C'
[]
[]
[BCs]
[bc_left]
type = DGFunctionDiffusionDirichletBC
boundary = 'left'
variable = T
diff = 'conductivity'
epsilon = -1
sigma = 6
function = bc_func
[]
[bc_right]
type = DGFunctionDiffusionDirichletBC
boundary = 'right'
variable = T
diff = 'conductivity'
epsilon = -1
sigma = 6
function = bc_func
[]
[]
[Materials]
[k0]
type = GenericConstantMaterial
prop_names = 'conductivity'
prop_values = 1.0
block = 0
[]
[k1]
type = GenericConstantMaterial
prop_names = 'conductivity'
prop_values = 2.0
block = 1
[]
[gap_mat]
type = SideSetHeatTransferMaterial
boundary = 'interface0'
# Using temperature dependent function for gap conductivity
conductivity_temperature_function = kgap
# Variable to evaluate conductivity with
gap_temperature = Tbulk
gap_length = 1.0
h_primary = 1
h_neighbor = 1
emissivity_primary = 1
emissivity_neighbor = 1
[]
[]
[Postprocessors]
[error]
type = ElementL2Error
variable = T
function = exact
[]
[]
[Executioner]
type = Steady
nl_rel_tol = 1e-12
[]
[Outputs]
exodus = true
[]
(test/tests/controls/time_periods/dgkernels/dgkernels.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
[]
[Adaptivity]
marker = uniform_marker
[Markers]
[uniform_marker]
type = UniformMarker
mark = REFINE
[]
[]
[]
[Variables]
[u]
order = FIRST
family = MONOMIAL
initial_condition = 1
[]
[]
[Functions]
[forcing_fn]
type = ParsedFunction
expression = 2*pow(e,-x-(y*y))*(1-2*y*y)
[]
[exact_fn]
type = ParsedGradFunction
expression = pow(e,-x-(y*y))
grad_x = -pow(e,-x-(y*y))
grad_y = -2*y*pow(e,-x-(y*y))
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[abs] # u * v
type = Reaction
variable = u
[]
[forcing]
type = BodyForce
variable = u
function = forcing_fn
[]
[]
[DGKernels]
[dg_diff]
type = DGDiffusion
variable = u
epsilon = -1
sigma = 6
[]
[dg_diff2]
type = DGDiffusion
variable = u
epsilon = -1
sigma = 4
[]
[]
[BCs]
[all]
type = DGFunctionDiffusionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
epsilon = -1
sigma = 6
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
num_steps = 4
dt = 1
nl_rel_tol = 1e-10
[]
[Outputs]
exodus = true
[]
[Controls]
[dg_problem]
type = TimePeriod
enable_objects = 'DGKernels/dg_diff2'
disable_objects = 'DGKernel::dg_diff'
start_time = '2'
execute_on = 'initial timestep_begin'
[]
[]
(test/tests/userobjects/domain-user-object/measure-conservation.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
[]
[Variables]
[u]
order = FIRST
family = MONOMIAL
[]
[]
[UserObjects]
[test]
type = DGDiffusionDomainUserObject
function = 'x'
epsilon = -1
sigma = 6
u = u
diff = 'diff'
ad_diff = 'ad_diff'
[]
[]
[Kernels]
[diff]
type = MatDiffusion
variable = u
diffusivity = 'diff'
[]
[]
[DGKernels]
[dg_diff]
type = DGDiffusion
variable = u
epsilon = -1
sigma = 6
diff = 'diff'
[]
[]
[BCs]
[all]
type = DGFunctionDiffusionDirichletBC
variable = u
boundary = 'left right'
function = 'x'
epsilon = -1
sigma = 6
diff = 'diff'
[]
[]
[Materials]
[constant]
type = GenericConstantMaterial
prop_names = 'diff'
prop_values = '2'
[]
[ad_constant]
type = ADGenericConstantMaterial
prop_names = 'ad_diff'
prop_values = '2'
[]
[]
[Executioner]
type = Steady
nl_rel_tol = 1e-14
[]
[Outputs]
exodus = true
[]
(test/tests/coord_type/coord_type_rz_integrated.i)
[Mesh]
type = GeneratedMesh
nx = 10
xmax = 1
ny = 10
ymax = 1
dim = 2
allow_renumbering = false
[]
[Problem]
type = FEProblem
coord_type = RZ
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
[./out]
type = Exodus
[../]
[]
[Kernels]
[./diff_u]
type = Diffusion
variable = u
[../]
[]
[DGKernels]
[./dg_diff]
type = DGDiffusion
variable = u
epsilon = -1
sigma = 6
[../]
[]
[Variables]
[./u]
order = FIRST
family = MONOMIAL
[../]
[]
[BCs]
[./source]
type = DGFunctionDiffusionDirichletBC
variable = u
boundary = 'right'
function = exact_fn
epsilon = -1
sigma = 6
[../]
[./vacuum]
boundary = 'top'
type = VacuumBC
variable = u
[../]
[]
[Functions]
[./exact_fn]
type = ConstantFunction
value = 1
[../]
[]
[ICs]
[./u]
type = ConstantIC
value = 1
variable = u
[../]
[]
(test/tests/misc/save_in/dg_save_in_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 9
ny = 9
elem_type = QUAD4
[]
[Variables]
[./u]
order = FIRST
family = MONOMIAL
[./InitialCondition]
type = ConstantIC
value = 1
[../]
[../]
[]
[AuxVariables]
[./tot_resid]
order = FIRST
family = MONOMIAL
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
save_in = 'tot_resid'
[../]
[./forcing]
type = BodyForce
variable = u
function = 1
save_in = 'tot_resid'
[../]
[]
[DGKernels]
[./dg_diff]
type = DGDiffusion
variable = u
epsilon = -1
sigma = 6
save_in = 'tot_resid'
[../]
[]
[BCs]
[./robin]
type = RobinBC
boundary = 'left right top bottom'
variable = u
save_in = 'tot_resid'
[../]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
nl_rel_tol = 1e-10
[]
[Outputs]
exodus = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/cg-dg-hybrid/mms/lid-driven-skewed/hybrid-skewed-vortex.i)
rho=1
mu=1
[Mesh]
[gen_mesh]
type = FileMeshGenerator
file = skewed.msh
[]
[corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = gen_mesh
[]
[]
[Variables]
[u]
family = MONOMIAL
order = SECOND
[]
[v]
family = MONOMIAL
order = SECOND
[]
[pressure][]
[]
[Kernels]
[momentum_x_convection]
type = ADConservativeAdvection
variable = u
velocity = 'velocity'
[]
[momentum_x_diffusion]
type = Diffusion
variable = u
[]
[momentum_x_pressure]
type = PressureGradient
integrate_p_by_parts = false
variable = u
pressure = pressure
component = 0
[]
[u_forcing]
type = BodyForce
variable = u
function = forcing_u
[]
[momentum_y_convection]
type = ADConservativeAdvection
variable = v
velocity = 'velocity'
[]
[momentum_y_diffusion]
type = Diffusion
variable = v
[]
[momentum_y_pressure]
type = PressureGradient
integrate_p_by_parts = false
variable = v
pressure = pressure
component = 1
[]
[v_forcing]
type = BodyForce
variable = v
function = forcing_v
[]
[mass]
type = ADConservativeAdvection
variable = pressure
velocity = velocity
advected_quantity = -1
[]
[]
[DGKernels]
[momentum_x_convection]
type = ADDGAdvection
variable = u
velocity = 'velocity'
[]
[momentum_x_diffusion]
type = DGDiffusion
variable = u
sigma = 6
epsilon = -1
[]
[momentum_y_convection]
type = ADDGAdvection
variable = v
velocity = 'velocity'
[]
[momentum_y_diffusion]
type = DGDiffusion
variable = v
sigma = 6
epsilon = -1
[]
[]
[BCs]
[u_walls]
type = DGFunctionDiffusionDirichletBC
boundary = 'left bottom right top'
variable = u
sigma = 6
epsilon = -1
function = exact_u
[]
[v_walls]
type = DGFunctionDiffusionDirichletBC
boundary = 'left bottom right top'
variable = v
sigma = 6
epsilon = -1
function = exact_v
[]
[pressure_pin]
type = FunctionDirichletBC
variable = pressure
boundary = 'pinned_node'
function = 'exact_p'
[]
[]
[Materials]
[rho]
type = ADGenericConstantMaterial
prop_names = 'rho'
prop_values = '${rho}'
[]
[vel]
type = ADVectorFromComponentVariablesMaterial
vector_prop_name = 'velocity'
u = u
v = v
[]
[rhou]
type = ADParsedMaterial
property_name = 'rhou'
coupled_variables = 'u'
material_property_names = 'rho'
expression = 'rho*u'
[]
[rhov]
type = ADParsedMaterial
property_name = 'rhov'
coupled_variables = 'v'
material_property_names = 'rho'
expression = 'rho*v'
[]
[]
[Functions]
[exact_u]
type = ParsedFunction
expression = 'x^2*(1-x)^2*(2*y-6*y^2+4*y^3)'
[]
[exact_v]
type = ParsedFunction
expression = '-y^2*(1-y)^2*(2*x-6*x^2+4*x^3)'
[]
[exact_p]
type = ParsedFunction
expression = 'x*(1-x)-2/12'
[]
[forcing_u]
type = ParsedFunction
expression = '-4*mu/rho*(-1+2*y)*(y^2-6*x*y^2+6*x^2*y^2-y+6*x*y-6*x^2*y+3*x^2-6*x^3+3*x^4)+1-2*x+4*x^3'
'*y^2*(2*y^2-2*y+1)*(y-1)^2*(-1+2*x)*(x-1)^3'
symbol_names = 'mu rho'
symbol_values = '${mu} ${rho}'
[]
[forcing_v]
type = ParsedFunction
expression = '4*mu/rho*(-1+2*x)*(x^2-6*y*x^2+6*x^2*y^2-x+6*x*y-6*x*y^2+3*y^2-6*y^3+3*y^4)+4*y^3*x^2*(2'
'*x^2-2*x+1)*(x-1)^2*(-1+2*y)*(y-1)^3'
symbol_names = 'mu rho'
symbol_values = '${mu} ${rho}'
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_mat_solver_type'
petsc_options_value = 'lu NONZERO mumps'
nl_rel_tol = 1e-12
[]
[Outputs]
exodus = true
csv = true
[]
[Postprocessors]
[h]
type = AverageElementSize
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2u]
type = ElementL2Error
variable = u
function = exact_u
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2v]
variable = v
function = exact_v
type = ElementL2Error
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2p]
variable = pressure
function = exact_p
type = ElementL2Error
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[]
(modules/heat_transfer/test/tests/sideset_heat_transfer/gap_thermal_1D.i)
[Mesh]
[mesh]
type = GeneratedMeshGenerator
dim = 1
nx = 2
xmax = 2
[]
[split]
type = SubdomainBoundingBoxGenerator
input = mesh
block_id = 1
bottom_left = '1 0 0'
top_right = '2 0 0'
[]
[interface]
type = SideSetsBetweenSubdomainsGenerator
input = split
primary_block = 1
paired_block = 0
new_boundary = 'interface0'
[]
uniform_refine = 4
[]
[Variables]
# Defining a DFEM variable to handle gap discontinuity
[T]
order = FIRST
family = MONOMIAL
[]
[]
[AuxVariables]
# Auxvariable containing bulk temperature of gap
[Tbulk]
order = FIRST
family = LAGRANGE
initial_condition = 300 # K
[]
[]
[Kernels]
[diff]
type = MatDiffusion
variable = T
diffusivity = conductivity
[]
[source]
type = BodyForce
variable = T
value = 1.0
[]
[]
[DGKernels]
# DG kernel to represent diffusion accross element faces
[./dg_diff]
type = DGDiffusion
variable = T
epsilon = -1
sigma = 6
diff = conductivity
# Ignoring gap side set because no diffusion accross there
exclude_boundary = 'interface0'
[../]
[]
[InterfaceKernels]
active = 'gap'
# Heat transfer kernel using Tbulk as material
[gap]
type = SideSetHeatTransferKernel
variable = T
neighbor_var = T
boundary = 'interface0'
[]
# Heat transfer kernel using Tbulk as auxvariable
[gap_var]
type = SideSetHeatTransferKernel
variable = T
neighbor_var = T
boundary = 'interface0'
Tbulk_var = Tbulk
[]
[]
[Functions]
[bc_func]
type = ConstantFunction
value = 300
[]
[exact]
type = ParsedFunction
expression = '
A := if(x < 1, -0.5, -0.25);
B := if(x < 1, -0.293209850655001, 0.0545267662299068);
C := if(x < 1, 300.206790149345, 300.19547323377);
d := -1;
A * (x+d) * (x+d) + B * (x+d) + C'
[]
[]
[BCs]
[bc_left]
type = DGFunctionDiffusionDirichletBC
boundary = 'left'
variable = T
diff = 'conductivity'
epsilon = -1
sigma = 6
function = bc_func
[]
[bc_right]
type = DGFunctionDiffusionDirichletBC
boundary = 'right'
variable = T
diff = 'conductivity'
epsilon = -1
sigma = 6
function = bc_func
[]
[]
[Materials]
[k0]
type = GenericConstantMaterial
prop_names = 'conductivity'
prop_values = 1.0
block = 0
[]
[k1]
type = GenericConstantMaterial
prop_names = 'conductivity'
prop_values = 2.0
block = 1
[]
[gap_mat]
type = SideSetHeatTransferMaterial
boundary = 'interface0'
conductivity = 1.5
gap_length = 1.0
h_primary = 1
h_neighbor = 1
Tbulk = 300
emissivity_primary = 1
emissivity_neighbor = 1
[]
[]
[Postprocessors]
[error]
type = ElementL2Error
variable = T
function = exact
[]
[]
[Executioner]
type = Steady
nl_rel_tol = 1e-12
[]
[Outputs]
exodus = true
[]
(test/tests/dgkernels/stateful-coupled-var/test.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
elem_type = QUAD4
[]
[Variables]
[u]
order = FIRST
family = MONOMIAL
[]
[]
[Functions]
[exact_fn]
type = ParsedGradFunction
expression = pow(e,-x-(y*y))
grad_x = -pow(e,-x-(y*y))
grad_y = -2*y*pow(e,-x-(y*y))
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[]
[DGKernels]
[dg_diff]
type = DGDiffusion
variable = u
epsilon = -1
sigma = 6
diff = diffusion
[]
[]
[Materials]
[coupled_mat]
type = VarCouplingMaterial
var = u
declare_old = true
use_tag = false
[]
[]
[BCs]
[all]
type = DGFunctionDiffusionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
epsilon = -1
sigma = 6
[]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
(test/tests/tag/2d_diffusion_dg_tag.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 4
xmin = 0
xmax = 1
ymin = 0
ymax = 1
elem_type = QUAD4
[]
[Variables]
[./u]
order = FIRST
family = MONOMIAL
[./InitialCondition]
type = ConstantIC
value = 1
[../]
[../]
[]
[AuxVariables]
[./tag_variable1]
order = FIRST
family = MONOMIAL
[../]
[./tag_variable2]
order = FIRST
family = MONOMIAL
[../]
[]
[AuxKernels]
[./TagVectorAux1]
type = TagVectorAux
variable = tag_variable1
v = u
vector_tag = vec_tag2
execute_on = timestep_end
[../]
[./TagVectorAux2]
type = TagMatrixAux
variable = tag_variable2
v = u
matrix_tag = mat_tag2
execute_on = timestep_end
[../]
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
expression = 2*pow(e,-x-(y*y))*(1-2*y*y)
[../]
[./exact_fn]
type = ParsedGradFunction
value = pow(e,-x-(y*y))
grad_x = -pow(e,-x-(y*y))
grad_y = -2*y*pow(e,-x-(y*y))
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
extra_matrix_tags = 'mat_tag1 mat_tag2'
extra_vector_tags = 'vec_tag1 vec_tag2'
[../]
[./abs]
type = Reaction
variable = u
extra_matrix_tags = 'mat_tag1 mat_tag2'
extra_vector_tags = 'vec_tag1 vec_tag2'
[../]
[./forcing]
type = BodyForce
variable = u
function = forcing_fn
extra_matrix_tags = 'mat_tag1 mat_tag2'
extra_vector_tags = 'vec_tag1'
[../]
[]
[DGKernels]
[./dg_diff]
type = DGDiffusion
variable = u
epsilon = -1
sigma = 6
extra_matrix_tags = 'mat_tag1 mat_tag2'
extra_vector_tags = 'vec_tag1 vec_tag2'
[../]
[]
[BCs]
[./all]
type = DGFunctionDiffusionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
epsilon = -1
sigma = 6
extra_matrix_tags = 'mat_tag1 mat_tag2'
extra_vector_tags = 'vec_tag1 vec_tag2'
[../]
[]
[Problem]
type = TagTestProblem
test_tag_vectors = 'nontime residual vec_tag1 vec_tag2'
test_tag_matrices = 'mat_tag1 mat_tag2'
extra_tag_matrices = 'mat_tag1 mat_tag2'
extra_tag_vectors = 'vec_tag1 vec_tag2'
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
nl_rel_tol = 1e-10
[]
[Postprocessors]
[./h]
type = AverageElementSize
[../]
[./dofs]
type = NumDOFs
[../]
[./l2_err]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[]
[Outputs]
exodus = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/cg-dg-hybrid/channel-flow/channel-hybrid.i)
mu = 1.1
rho = 1.1
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 10
ymin = -1
ymax = 1
nx = 100
ny = 20
[]
[]
[Variables]
[u]
family = MONOMIAL
[]
[v]
family = MONOMIAL
[]
[pressure][]
[]
[Kernels]
[momentum_x_convection]
type = ADConservativeAdvection
variable = u
velocity = 'velocity'
advected_quantity = 'rhou'
[]
[momentum_x_diffusion]
type = MatDiffusion
variable = u
diffusivity = 'mu'
[]
[momentum_x_pressure]
type = PressureGradient
integrate_p_by_parts = false
variable = u
pressure = pressure
component = 0
[]
[momentum_y_convection]
type = ADConservativeAdvection
variable = v
velocity = 'velocity'
advected_quantity = 'rhov'
[]
[momentum_y_diffusion]
type = MatDiffusion
variable = v
diffusivity = 'mu'
[]
[momentum_y_pressure]
type = PressureGradient
integrate_p_by_parts = false
variable = v
pressure = pressure
component = 1
[]
[mass]
type = ADConservativeAdvection
variable = pressure
velocity = velocity
advected_quantity = -1
[]
[]
[DGKernels]
[momentum_x_convection]
type = ADDGAdvection
variable = u
velocity = 'velocity'
advected_quantity = 'rhou'
[]
[momentum_x_diffusion]
type = DGDiffusion
variable = u
sigma = 6
epsilon = -1
diff = 'mu'
[]
[momentum_y_convection]
type = ADDGAdvection
variable = v
velocity = 'velocity'
advected_quantity = 'rhov'
[]
[momentum_y_diffusion]
type = DGDiffusion
variable = v
sigma = 6
epsilon = -1
diff = 'mu'
[]
[]
[Functions]
[v_inlet]
type = ParsedVectorFunction
expression_x = '1'
[]
[]
[BCs]
[u_walls]
type = DGFunctionDiffusionDirichletBC
boundary = 'bottom top'
variable = u
sigma = 6
epsilon = -1
function = '0'
diff = 'mu'
[]
[v_walls]
type = DGFunctionDiffusionDirichletBC
boundary = 'bottom top'
variable = v
sigma = 6
epsilon = -1
function = '0'
diff = 'mu'
[]
[u_in]
type = ADConservativeAdvectionBC
boundary = 'left'
variable = u
velocity_function = v_inlet
primal_dirichlet_value = 1
primal_coefficient = 'rho'
[]
[v_in]
type = ADConservativeAdvectionBC
boundary = 'left'
variable = v
velocity_function = v_inlet
primal_dirichlet_value = 0
primal_coefficient = 'rho'
[]
[p_in]
type = ADConservativeAdvectionBC
boundary = 'left'
variable = pressure
velocity_function = v_inlet
advected_quantity = -1
[]
[u_out]
type = ADConservativeAdvectionBC
boundary = 'right'
variable = u
velocity_mat_prop = 'velocity'
advected_quantity = 'rhou'
[]
[v_out]
type = ADConservativeAdvectionBC
boundary = 'right'
variable = v
velocity_mat_prop = 'velocity'
advected_quantity = 'rhov'
[]
[p_out]
type = DirichletBC
variable = pressure
boundary = 'right'
value = 0
[]
[]
[Materials]
[const]
type = ADGenericConstantMaterial
prop_names = 'rho'
prop_values = '${rho}'
[]
[const_reg]
type = GenericConstantMaterial
prop_names = 'mu'
prop_values = '${mu}'
[]
[vel]
type = ADVectorFromComponentVariablesMaterial
vector_prop_name = 'velocity'
u = u
v = v
[]
[rhou]
type = ADParsedMaterial
property_name = 'rhou'
coupled_variables = 'u'
material_property_names = 'rho'
expression = 'rho*u'
[]
[rhov]
type = ADParsedMaterial
property_name = 'rhov'
coupled_variables = 'v'
material_property_names = 'rho'
expression = 'rho*v'
[]
[]
[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]
exodus = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/cg-dg-hybrid/lid-driven/hybrid-cg-dg.i)
mu = 1
rho = 1
l = 200
U = 1
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = ${l}
ymin = 0
ymax = ${l}
nx = 20
ny = 20
[]
[corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = gen
[]
[]
[Variables]
[u]
family = MONOMIAL
[]
[v]
family = MONOMIAL
[]
[pressure][]
[]
[Kernels]
[momentum_x_convection]
type = ADConservativeAdvection
variable = u
velocity = 'velocity'
advected_quantity = 'rhou'
[]
[momentum_x_diffusion]
type = MatDiffusion
variable = u
diffusivity = 'mu'
[]
[momentum_x_pressure]
type = PressureGradient
integrate_p_by_parts = false
variable = u
pressure = pressure
component = 0
[]
[momentum_y_convection]
type = ADConservativeAdvection
variable = v
velocity = 'velocity'
advected_quantity = 'rhov'
[]
[momentum_y_diffusion]
type = MatDiffusion
variable = v
diffusivity = 'mu'
[]
[momentum_y_pressure]
type = PressureGradient
integrate_p_by_parts = false
variable = v
pressure = pressure
component = 1
[]
[mass]
type = ADConservativeAdvection
variable = pressure
velocity = velocity
advected_quantity = -1
[]
[]
[DGKernels]
[momentum_x_convection]
type = ADDGAdvection
variable = u
velocity = 'velocity'
advected_quantity = 'rhou'
[]
[momentum_x_diffusion]
type = DGDiffusion
variable = u
sigma = 6
epsilon = -1
diff = 'mu'
[]
[momentum_y_convection]
type = ADDGAdvection
variable = v
velocity = 'velocity'
advected_quantity = 'rhov'
[]
[momentum_y_diffusion]
type = DGDiffusion
variable = v
sigma = 6
epsilon = -1
diff = 'mu'
[]
[]
[BCs]
[u_walls]
type = DGFunctionDiffusionDirichletBC
boundary = 'left bottom right'
variable = u
sigma = 6
epsilon = -1
function = '0'
diff = 'mu'
[]
[v_walls]
type = DGFunctionDiffusionDirichletBC
boundary = 'left bottom right top'
variable = v
sigma = 6
epsilon = -1
function = '0'
diff = 'mu'
[]
[u_top]
type = DGFunctionDiffusionDirichletBC
boundary = 'top'
variable = u
sigma = 6
epsilon = -1
function = '${U}'
diff = 'mu'
[]
[pressure_pin]
type = DirichletBC
variable = pressure
boundary = 'pinned_node'
value = 0
[]
[]
[Materials]
[const]
type = ADGenericConstantMaterial
prop_names = 'rho'
prop_values = '${rho}'
[]
[const_reg]
type = GenericConstantMaterial
prop_names = 'mu'
prop_values = '${mu}'
[]
[vel]
type = ADVectorFromComponentVariablesMaterial
vector_prop_name = 'velocity'
u = u
v = v
[]
[rhou]
type = ADParsedMaterial
property_name = 'rhou'
coupled_variables = 'u'
material_property_names = 'rho'
expression = 'rho*u'
[]
[rhov]
type = ADParsedMaterial
property_name = 'rhov'
coupled_variables = 'v'
material_property_names = 'rho'
expression = 'rho*v'
[]
[]
[AuxVariables]
[vel_x]
family = MONOMIAL
order = CONSTANT
[]
[vel_y]
family = MONOMIAL
order = CONSTANT
[]
[p]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[vel_x]
type = ProjectionAux
variable = vel_x
v = u
[]
[vel_y]
type = ProjectionAux
variable = vel_y
v = v
[]
[p]
type = ProjectionAux
variable = p
v = pressure
[]
[]
[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]
exodus = true
[]
[Postprocessors]
[Re]
type = ParsedPostprocessor
expression = '${rho} * ${U} * ${l} / ${mu}'
[]
[]
(test/tests/materials/material/material_test_dg.i)
[Mesh]
file = sq-2blk.e
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = MONOMIAL
[./InitialCondition]
type = ConstantIC
value = 1
[../]
[../]
[]
[Functions]
active = 'forcing_fn exact_fn'
[./forcing_fn]
type = ParsedFunction
expression = (x*x*x)-6.0*x
[../]
[./exact_fn]
type = ParsedGradFunction
value = (x*x*x)
grad_x = 3*x*x
grad_y = 0
[../]
[]
[Kernels]
active = 'diff abs forcing'
[./diff]
type = MatDiffusionTest
variable = u
prop_name = matp
[../]
[./abs]
type = Reaction
variable = u
[../]
[./forcing]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[DGKernels]
active = 'dgdiff'
[./dgdiff]
type = DGDiffusion
variable = u
sigma = 6
epsilon = -1.0
diff = matp
[../]
[]
[BCs]
active = 'all'
[./all]
type = DGMDDBC
variable = u
boundary = '1 2 3 4'
function = exact_fn
prop_name = matp
sigma = 6
epsilon = -1.0
[../]
[]
[Materials]
active = 'mat_1 mat_2'
[./mat_1]
type = MTMaterial
block = 1
value = 1
[../]
[./mat_2]
type = MTMaterial
block = 2
value = 2
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
file_base = out_dg
exodus = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/cg-dg-hybrid/mms/lid-driven/hybrid-cg-dg-mms.i)
rho=1.1
mu=1.1
cp=1.1
k=1.1
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = -1
xmax = 1.0
ymin = -1
ymax = 1.0
nx = 2
ny = 2
[]
[corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = gen
[]
[]
[Variables]
[u]
family = MONOMIAL
[]
[v]
family = MONOMIAL
[]
[pressure][]
[T]
family = MONOMIAL
[]
[]
[Kernels]
[momentum_x_convection]
type = ADConservativeAdvection
variable = u
velocity = 'velocity'
advected_quantity = 'rhou'
[]
[momentum_x_diffusion]
type = MatDiffusion
variable = u
diffusivity = 'mu'
[]
[momentum_x_pressure]
type = PressureGradient
integrate_p_by_parts = false
variable = u
pressure = pressure
component = 0
[]
[u_forcing]
type = BodyForce
variable = u
function = forcing_u
[]
[momentum_y_convection]
type = ADConservativeAdvection
variable = v
velocity = 'velocity'
advected_quantity = 'rhov'
[]
[momentum_y_diffusion]
type = MatDiffusion
variable = v
diffusivity = 'mu'
[]
[momentum_y_pressure]
type = PressureGradient
integrate_p_by_parts = false
variable = v
pressure = pressure
component = 1
[]
[v_forcing]
type = BodyForce
variable = v
function = forcing_v
[]
[mass]
type = ADConservativeAdvection
variable = pressure
velocity = velocity
advected_quantity = -1
[]
[p_forcing]
type = BodyForce
variable = pressure
function = forcing_p
[]
[T_convection]
type = ADConservativeAdvection
variable = T
velocity = 'velocity'
advected_quantity = 'rho_cp_temp'
[]
[T_diffusion]
type = MatDiffusion
variable = T
diffusivity = 'k'
[]
[T_forcing]
type = BodyForce
variable = T
function = forcing_T
[]
[]
[DGKernels]
[momentum_x_convection]
type = ADDGAdvection
variable = u
velocity = 'velocity'
advected_quantity = 'rhou'
[]
[momentum_x_diffusion]
type = DGDiffusion
variable = u
sigma = 6
epsilon = -1
diff = 'mu'
[]
[momentum_y_convection]
type = ADDGAdvection
variable = v
velocity = 'velocity'
advected_quantity = 'rhov'
[]
[momentum_y_diffusion]
type = DGDiffusion
variable = v
sigma = 6
epsilon = -1
diff = 'mu'
[]
[T_convection]
type = ADDGAdvection
variable = T
velocity = 'velocity'
advected_quantity = 'rho_cp_temp'
[]
[T_diffusion]
type = DGDiffusion
variable = T
sigma = 6
epsilon = -1
diff = 'k'
[]
[]
[BCs]
[u_walls]
type = DGFunctionDiffusionDirichletBC
boundary = 'left bottom right top'
variable = u
sigma = 6
epsilon = -1
function = exact_u
diff = 'mu'
[]
[v_walls]
type = DGFunctionDiffusionDirichletBC
boundary = 'left bottom right top'
variable = v
sigma = 6
epsilon = -1
function = exact_v
diff = 'mu'
[]
[pressure_pin]
type = FunctionDirichletBC
variable = pressure
boundary = 'pinned_node'
function = 'exact_p'
[]
[T_walls]
type = DGFunctionDiffusionDirichletBC
boundary = 'left bottom right top'
variable = T
sigma = 6
epsilon = -1
function = exact_T
diff = 'k'
[]
[]
[Materials]
[const]
type = ADGenericConstantMaterial
prop_names = 'rho cp'
prop_values = '${rho} ${cp}'
[]
[const_reg]
type = GenericConstantMaterial
prop_names = 'mu k'
prop_values = '${mu} ${k}'
[]
[vel]
type = ADVectorFromComponentVariablesMaterial
vector_prop_name = 'velocity'
u = u
v = v
[]
[rhou]
type = ADParsedMaterial
property_name = 'rhou'
coupled_variables = 'u'
material_property_names = 'rho'
expression = 'rho*u'
[]
[rhov]
type = ADParsedMaterial
property_name = 'rhov'
coupled_variables = 'v'
material_property_names = 'rho'
expression = 'rho*v'
[]
[rho_cp]
type = ADParsedMaterial
property_name = 'rho_cp'
material_property_names = 'rho cp'
expression = 'rho*cp'
[]
[rho_cp_temp]
type = ADParsedMaterial
property_name = 'rho_cp_temp'
material_property_names = 'rho cp'
coupled_variables = 'T'
expression = 'rho*cp*T'
[]
[]
[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*sin(x)*sin((1/2)*y*pi) + (1/2)*pi*sin(y)*sin((1/2)*x*pi)'
[]
[exact_T]
type = ParsedFunction
expression = 'cos(x)*cos(y)'
[]
[forcing_T]
type = ParsedFunction
expression = '-cp*rho*sin(x)*sin(y)*cos(x)*cos((1/2)*y*pi) - cp*rho*sin(x)*sin(y)*cos(y)*cos((1/2)*x*pi) - 1/2*pi*cp*rho*sin(x)*sin((1/2)*y*pi)*cos(x)*cos(y) - 1/2*pi*cp*rho*sin(y)*sin((1/2)*x*pi)*cos(x)*cos(y) + 2*k*cos(x)*cos(y)'
symbol_names = 'rho cp k'
symbol_values = '${rho} ${cp} ${k}'
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_mat_solver_type'
petsc_options_value = 'lu NONZERO mumps'
nl_rel_tol = 1e-12
[]
[Outputs]
exodus = true
csv = true
[]
[Postprocessors]
[h]
type = AverageElementSize
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2u]
type = ElementL2Error
variable = u
function = exact_u
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2v]
variable = v
function = exact_v
type = ElementL2Error
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2T]
variable = T
function = exact_T
type = ElementL2Error
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2p]
variable = pressure
function = exact_p
type = ElementL2Error
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[]
(test/tests/dgkernels/passive-scalar-channel-flow/test.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 10
ymin = -1
ymax = 1
nx = 20
ny = 4
[]
[]
[Variables]
[u]
family = MONOMIAL
[]
[]
[Kernels]
[convection]
type = ADConservativeAdvection
variable = u
velocity = 'velocity'
[]
[diffusion]
type = MatDiffusion
variable = u
diffusivity = 1
[]
[]
[DGKernels]
[convection]
type = ADDGAdvection
variable = u
velocity = 'velocity'
[]
[diffusion]
type = DGDiffusion
variable = u
sigma = 6
epsilon = -1
diff = 1
[]
[]
[Functions]
[v_inlet]
type = ParsedVectorFunction
expression_x = '1'
[]
[]
[BCs]
[u_walls]
type = DGFunctionDiffusionDirichletBC
boundary = 'bottom top'
variable = u
sigma = 6
epsilon = -1
function = '0'
diff = 1
[]
[u_in]
type = ADConservativeAdvectionBC
boundary = 'left'
variable = u
velocity_function = v_inlet
primal_dirichlet_value = 1
[]
[u_out]
type = ADConservativeAdvectionBC
boundary = 'right'
variable = u
velocity_mat_prop = 'velocity'
[]
[]
[Materials]
[vel]
type = ADVectorFromComponentVariablesMaterial
vector_prop_name = 'velocity'
u = 1
v = 0
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
nl_rel_tol = 1e-12
[]
[Outputs]
exodus = true
[]
(test/tests/kernels/array_kernels/standard_save_in.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 4
ny = 4
[]
[subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '0.5 0.5 0'
top_right = '1 1 0'
block_id = 1
[]
[]
[Variables]
[u_0]
order = FIRST
family = L2_LAGRANGE
[]
[u_1]
order = FIRST
family = L2_LAGRANGE
[]
[]
[AuxVariables]
[u_diff_save_in_0]
order = FIRST
family = L2_LAGRANGE
[]
[u_diff_save_in_1]
order = FIRST
family = L2_LAGRANGE
[]
[u_vacuum_save_in_0]
order = FIRST
family = L2_LAGRANGE
[]
[u_vacuum_save_in_1]
order = FIRST
family = L2_LAGRANGE
[]
[u_dg_save_in_0]
order = FIRST
family = L2_LAGRANGE
[]
[u_dg_save_in_1]
order = FIRST
family = L2_LAGRANGE
[]
[u_diff_diag_save_in_0]
order = FIRST
family = L2_LAGRANGE
[]
[u_diff_diag_save_in_1]
order = FIRST
family = L2_LAGRANGE
[]
[u_vacuum_diag_save_in_0]
order = FIRST
family = L2_LAGRANGE
[]
[u_vacuum_diag_save_in_1]
order = FIRST
family = L2_LAGRANGE
[]
[u_dg_diag_save_in_0]
order = FIRST
family = L2_LAGRANGE
[]
[u_dg_diag_save_in_1]
order = FIRST
family = L2_LAGRANGE
[]
[]
[Kernels]
[diff0]
type = MatCoefDiffusion
variable = u_0
conductivity = dc
save_in = u_diff_save_in_0
diag_save_in = u_diff_diag_save_in_0
[]
[diff1]
type = Diffusion
variable = u_1
save_in = u_diff_save_in_1
diag_save_in = u_diff_diag_save_in_1
[]
[reaction0]
type = CoefReaction
variable = u_0
[]
[reaction1]
type = CoefReaction
variable = u_1
[]
[reaction01]
type = CoupledForce
variable = u_1
v = u_0
coef = 0.1
[]
[]
[DGKernels]
[dgdiff0]
type = DGDiffusion
variable = u_0
diff = dc
sigma = 4
epsilon = 1
save_in = u_dg_save_in_0
diag_save_in = u_dg_diag_save_in_0
[]
[dgdiff1]
type = DGDiffusion
variable = u_1
sigma = 4
epsilon = 1
save_in = u_dg_save_in_1
diag_save_in = u_dg_diag_save_in_1
[]
[]
[BCs]
[left0]
type = VacuumBC
variable = u_0
boundary = 1
save_in = u_vacuum_save_in_0
diag_save_in = u_vacuum_diag_save_in_0
[]
[left1]
type = VacuumBC
variable = u_1
boundary = 1
save_in = u_vacuum_save_in_1
diag_save_in = u_vacuum_diag_save_in_1
[]
[right0]
type = PenaltyDirichletBC
variable = u_0
boundary = 2
value = 1
penalty = 4
[]
[right1]
type = PenaltyDirichletBC
variable = u_1
boundary = 2
value = 2
penalty = 4
[]
[]
[Materials]
[dc0]
type = GenericConstantMaterial
block = 0
prop_names = dc
prop_values = 1
[]
[dc1]
type = GenericConstantMaterial
block = 1
prop_names = dc
prop_values = 2
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
[intu0]
type = ElementIntegralVariablePostprocessor
variable = u_0
[]
[intu1]
type = ElementIntegralVariablePostprocessor
variable = u_1
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
[]
[Outputs]
file_base = array_save_in_out
exodus = true
[]
(test/tests/dgkernels/dg_block_restrict/1d_dg_block_restrict.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 1
nx = 100
xmax = 2
[]
[subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '1.0 0 0'
block_id = 1
top_right = '2.0 0 0'
[]
[interface]
input = subdomain1
type = SideSetsBetweenSubdomainsGenerator
primary_block = '0'
paired_block = '1'
new_boundary = 'primary0_interface'
[]
[interface_again]
type = SideSetsBetweenSubdomainsGenerator
input = interface
primary_block = '1'
paired_block = '0'
new_boundary = 'primary1_interface'
show_info = true
[]
# skip_partitioning = true
[]
[Variables]
[u]
order = FIRST
family = MONOMIAL
block = 0
[]
[v]
order = FIRST
family = MONOMIAL
block = 1
[]
[]
[Kernels]
[test_u]
type = Diffusion
variable = u
block = 0
[]
[adv_u]
type = ConservativeAdvection
variable = u
velocity = '1 0 0'
block = 0
[]
[test_v]
type = Diffusion
variable = v
block = 1
[]
[adv_v]
type = ConservativeAdvection
variable = v
velocity = '1 0 0'
block = 1
[]
[]
[DGKernels]
[dg_advection_u]
type = DGConvection
variable = u
velocity = '1 0 0'
block = 0
[]
[dg_diffusion_u]
type = DGDiffusion
variable = u
sigma = 0
epsilon = -1
block = 0
[]
[dg_advection_v]
type = DGConvection
variable = v
velocity = '1 0 0'
block = 1
[]
[dg_diffusion_v]
type = DGDiffusion
variable = v
sigma = 0
epsilon = -1
block = 1
[]
[]
[BCs]
[left]
type = InflowBC
variable = u
boundary = 'left'
inlet_conc = 2
velocity = '1 0 0'
[]
[primary0_inteface]
type = RobinBC
variable = u
boundary = 'primary0_interface'
[]
[primary1_interface]
type = InflowBC
variable = v
boundary = 'primary1_interface'
inlet_conc = 4
velocity = '1 0 0'
[]
[right]
type = RobinBC
variable = v
boundary = 'right'
[]
[]
[ICs]
[u_ic]
type = ConstantIC
variable = u
value = 0
[]
[v_ic]
type = ConstantIC
variable = v
value = 0
[]
[]
[Preconditioning]
[fdp]
type = SMP
full = true
[]
[]
[Executioner]
type = Steady
nl_abs_tol = 1e-12
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[]
[Outputs]
exodus = true
print_linear_residuals = false
[]
[Debug]
show_var_residual_norms = true
[]
(test/tests/outputs/exodus/exodus_discontinuous.i)
##
# \file exodus/exodus_discontinuous.i
# \example exodus/exodus_discontinuous.i
# Input file for testing discontinuous data output
#
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./disc_u]
family = monomial
order = first
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = disc_u
[../]
[./forcing]
type = BodyForce
variable = disc_u
value = 7
[../]
[]
[DGKernels]
[./diff_dg]
type = DGDiffusion
variable = disc_u
sigma = 1
epsilon = 1
[../]
[]
[Functions]
[./zero_fn]
type = ParsedFunction
expression = 0.0
[../]
[]
[BCs]
[./all]
type = DGFunctionDiffusionDirichletBC
variable = disc_u
boundary = 'left right top bottom'
function = zero_fn
sigma = 1
epsilon = 1
[../]
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
execute_on = 'timestep_end'
[./exo_out]
type = Exodus
discontinuous = true
file_base = 'exodus_discontinuous_out'
[../]
[]
(test/tests/auxkernels/mesh_integer/dg_mesh_integer.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 5
ny = 5
extra_element_integers = 'material_id'
[]
[set_material_id0]
type = SubdomainBoundingBoxGenerator
input = gmg
bottom_left = '0 0 0'
top_right = '0.8 0.6 0'
block_id = 0
location = INSIDE
integer_name = material_id
[]
[set_material_id1]
type = SubdomainBoundingBoxGenerator
input = set_material_id0
bottom_left = '0 0 0'
top_right = '0.8 0.6 0'
block_id = 1
location = OUTSIDE
integer_name = material_id
[]
[]
[Variables]
[u]
family = L2_LAGRANGE
order = FIRST
[]
[]
[Kernels]
[diff]
type = MatDiffusion
variable = u
diffusivity = dc
[]
[timederivative]
type = TimeDerivative
variable = u
[]
[sourceterm]
type = BodyForce
variable = u
function = 1
[]
[]
[DGKernels]
[dg_diff]
type = DGDiffusion
variable = u
diff = dc
epsilon = -1
sigma = 6
[]
[]
[AuxVariables]
[id]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[id]
type = ElementIntegerAux
variable = id
integer_names = material_id
[]
[]
[BCs]
[vacuum]
type = VacuumBC
variable = u
boundary = 'right left top bottom'
[]
[]
[Materials]
[dc]
type = ConstantIDMaterial
prop_name = dc
prop_values = '1 2'
id_name = material_id
[]
[]
[Postprocessors]
[unorm]
type = ElementL2Norm
variable = u
[]
[]
[Executioner]
type = Transient
end_time = 0.1
dt = 0.01
nl_abs_tol = 1.e-15
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(test/tests/dgkernels/advection_diffusion_mixed_bcs_test_resid_jac/dg_advection_diffusion_test.i)
[Mesh]
type = GeneratedMesh
nx = 2
dim = 1
[]
[Kernels]
[./source]
type = BodyForce
variable = u
function = 'forcing_func'
[../]
[./convection]
type = ConservativeAdvection
variable = u
velocity = '1 0 0'
[../]
[./diffusion]
type = MatDiffusionTest
variable = u
prop_name = 'k'
[../]
[]
[DGKernels]
[./convection]
type = DGConvection
variable = u
velocity = '1 0 0'
[../]
[./diffusion]
type = DGDiffusion
variable = u
diff = 'k'
sigma = 6
epsilon = -1
[../]
[]
[BCs]
[./advection]
type = OutflowBC
boundary = 'right'
variable = u
velocity = '1 0 0'
[../]
[./diffusion_left]
type = DGFunctionDiffusionDirichletBC
boundary = 'left'
variable = u
sigma = 6
epsilon = -1
function = 'boundary_left_func'
diff = 'k'
[../]
[]
[Variables]
[./u]
family = MONOMIAL
order = THIRD
[../]
[]
[Materials]
[./test]
block = 0
type = GenericFunctionMaterial
prop_names = 'k'
prop_values = 'k_func'
[../]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Functions]
[./forcing_func]
type = ParsedFunction
expression = '1'
[../]
[./boundary_left_func]
type = ParsedFunction
expression = '0'
[../]
[./k_func]
type = ParsedFunction
expression = '1 + x'
[../]
[]
[Outputs]
exodus = true
execute_on = 'timestep_end'
[]
(test/tests/adaptivity/dont-p-refine/test.i)
[Mesh]
[cmg]
type = CartesianMeshGenerator
dim = 2
dx = '1 1'
dy = '1 1'
ix = '2 2'
iy = '2 2'
subdomain_id = '0 0
0 1'
[]
[]
[Adaptivity]
switch_h_to_p_refinement = true
initial_marker = uniform
initial_steps = 1
disable_p_refinement_for_families = 'lagrange'
[Markers/uniform]
type = UniformMarker
mark = REFINE
block = 1
[]
[]
[Variables]
[u]
family = MONOMIAL
order = FIRST
[]
[]
[AuxVariables]
[test][]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[src]
type = BodyForce
variable = u
value = 1
[]
[]
[DGKernels]
[dg_diff]
type = DGDiffusion
variable = u
epsilon = -1
sigma = 6
[]
[]
[BCs]
[left_u]
type = DGFunctionDiffusionDirichletBC
variable = u
boundary = '0 1 2 3'
function = 0
epsilon = -1
sigma = 6
[]
[]
[Postprocessors]
[avg]
type = ElementAverageValue
variable = u
[]
[]
[Executioner]
type = Steady
[]
[Outputs]
csv = true
[]
(test/tests/postprocessors/internal_side_jump/internal_side_jump.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 4
ny = 4
[]
[./box]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '0 0 0'
top_right = '0.5 0.5 0'
block_id = 1
[../]
[]
[Variables]
[./u]
family = L2_LAGRANGE
order = FIRST
[../]
[]
[ICs]
[./ic0]
type = ConstantIC
variable = u
block = 0
value = 4
[../]
[./ic1]
type = ConstantIC
variable = u
block = 1
value = 6
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./time]
type = TimeDerivative
variable = u
[../]
[]
[DGKernels]
[./dgdiff]
type = DGDiffusion
variable = u
sigma = 4
epsilon = 1
[../]
[]
[BCs]
[./all]
type = VacuumBC
variable = u
boundary = '0 1 2 3'
[../]
[]
[Postprocessors]
[./L2_norm]
type = ElementL2Norm
variable = u
[../]
[./jump]
type = InternalSideJump
variable = u
execute_on = 'initial timestep_end'
[../]
[./jumpold]
type = InternalSideJump
variable = u
implicit = false
[../]
[]
[Executioner]
type = Transient
num_steps = 3
nl_abs_tol = 1e-12
[]
[Outputs]
csv = true
[]
(test/tests/outputs/debug/show_execution_kernels_bcs.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 10
ny = 10
elem_type = QUAD9
[]
[left]
type = ParsedSubdomainMeshGenerator
input = 'gmg'
combinatorial_geometry = 'x < 0.5'
block_id = '2'
[]
[middle_boundary]
type = SideSetsBetweenSubdomainsGenerator
input = 'left'
primary_block = '0'
paired_block = '2'
new_boundary = 'middle'
[]
[]
[Functions]
[forcing_fnu]
type = ParsedFunction
expression = -5.8*(x+y)+x*x*x-x+y*y*y-y
[]
[forcing_fnv]
type = ParsedFunction
expression = -4
[]
[slnu]
type = ParsedGradFunction
expression = x*x*x-x+y*y*y-y
grad_x = 3*x*x-1
grad_y = 3*y*y-1
[]
[slnv]
type = ParsedGradFunction
expression = x*x+y*y
grad_x = 2*x
grad_y = 2*y
[]
# NeumannBC functions
[bc_fnut]
type = ParsedFunction
expression = 3*y*y-1
[]
[bc_fnub]
type = ParsedFunction
expression = -3*y*y+1
[]
[bc_fnul]
type = ParsedFunction
expression = -3*x*x+1
[]
[bc_fnur]
type = ParsedFunction
expression = 3*x*x-1
[]
[]
[Variables]
[u]
order = THIRD
family = HIERARCHIC
[]
[v]
order = SECOND
family = LAGRANGE
[]
[]
[Kernels]
[diff1]
type = Diffusion
variable = u
[]
[test1]
type = CoupledConvection
variable = u
velocity_vector = v
[]
[diff2]
type = Diffusion
variable = v
[]
[react]
type = Reaction
variable = u
[]
[forceu]
type = BodyForce
variable = u
function = forcing_fnu
[]
[forcev]
type = BodyForce
variable = v
function = forcing_fnv
[]
[]
[BCs]
[bc_v]
type = FunctionDirichletBC
variable = v
function = slnv
boundary = 'left right top bottom'
[]
[bc_u_tb]
type = CoupledKernelGradBC
variable = u
var2 = v
vel = '0.1 0.1'
boundary = 'top bottom left right'
[]
[bc_ul]
type = FunctionNeumannBC
variable = u
function = bc_fnul
boundary = 'left'
[]
[bc_ur]
type = FunctionNeumannBC
variable = u
function = bc_fnur
boundary = 'right'
[]
[bc_ut]
type = FunctionNeumannBC
variable = u
function = bc_fnut
boundary = 'top'
[]
[bc_ub]
type = FunctionNeumannBC
variable = u
function = bc_fnub
boundary = 'bottom'
[]
[]
[Dampers]
active = ''
[limit_v]
type = BoundingValueElementDamper
variable = v
max_value = 1.5
min_value = -20
[]
[limit_u]
type = BoundingValueElementDamper
variable = u
max_value = 1.5
min_value = -20
[]
[]
[InterfaceKernels]
[diff_ik_2]
type = InterfaceDiffusion
variable = 'u'
neighbor_var = 'v'
boundary = 'middle'
[]
[diff_ik_1]
type = InterfaceDiffusion
variable = 'v'
neighbor_var = 'u'
boundary = 'middle'
[]
[]
[DGKernels]
[diff_dg_2]
type = DGDiffusion
variable = 'u'
epsilon = -1
sigma = 6
[]
[diff_dg_1]
type = DGDiffusion
variable = 'u'
epsilon = -1
sigma = 6
[]
[]
[DiracKernels]
[source_2]
type = FunctionDiracSource
variable = 'u'
point = '0.1 0.1 0'
function = 'x + y'
[]
[source_1]
type = FunctionDiracSource
variable = 'u'
point = '0.1 0.1 0'
function = 'x + y'
block = '2'
[]
[source_0]
type = FunctionDiracSource
variable = 'u'
# in block 0, but since it's not block restricted it shows up as active in
# block 2 as well
point = '0.6 0.5 0'
function = 'x + y'
[]
[]
[Materials]
[diff]
type = GenericConstantMaterial
prop_names = 'D D_neighbor'
prop_values = '0 0'
[]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
nl_rel_tol = 1e-15
nl_abs_tol = 1e-13
[]
[Debug]
show_execution_order = 'NONE ALWAYS INITIAL NONLINEAR LINEAR TIMESTEP_BEGIN TIMESTEP_END FINAL'
[]
(test/tests/interfacekernels/1d_interface/mixed_shapes.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 1
nx = 10
xmax = 2
[]
[./subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '1.0 0 0'
block_id = 1
top_right = '2.0 1.0 0'
[../]
[./interface]
input = subdomain1
type = SideSetsBetweenSubdomainsGenerator
primary_block = '0'
paired_block = '1'
new_boundary = 'primary0_interface'
[../]
[./interface_again]
input = interface
type = SideSetsBetweenSubdomainsGenerator
primary_block = '1'
paired_block = '0'
new_boundary = 'primary1_interface'
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
block = '0'
[../]
[./v]
order = FIRST
family = MONOMIAL
block = '1'
[../]
[]
[Kernels]
[./diff_u]
type = CoeffParamDiffusion
variable = u
D = 4
block = 0
[../]
[./diff_v]
type = CoeffParamDiffusion
variable = v
D = 2
block = 1
[../]
[./body_u]
type = BodyForce
variable = u
block = 0
function = 'x^3+x^2+x+1'
[../]
[./body_v]
type = BodyForce
variable = v
block = 1
function = 'x^3+x^2+x+1'
[../]
[]
[DGKernels]
[./dg_diff_v]
type = DGDiffusion
variable = v
block = 1
diff = 2
sigma = 6
epsilon = -1
[../]
[]
[InterfaceKernels]
[./interface]
type = OneSideDiffusion
variable = u
neighbor_var = v
boundary = primary0_interface
D = 4
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = 'left'
value = 1
[../]
# [./right]
# type = DirichletBC
# variable = v
# boundary = 'right'
# value = 0
# [../]
[./right]
type = DGFunctionDiffusionDirichletBC
variable = v
boundary = 'right'
function = 0
epsilon = -1
sigma = 6
[../]
[./middle]
type = NeumannBC
variable = u
boundary = 'primary0_interface'
value = '.5'
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
exodus = true
print_linear_residuals = true
[]
[Debug]
show_var_residual_norms = true
[]
(test/tests/dgkernels/3d_diffusion_dg/3d_diffusion_dg_test.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 5
ny = 5
nz = 5
xmin = 0
xmax = 1
ymin = 0
ymax = 1
zmin = 0
zmax = 1
elem_type = HEX8
[]
[Variables]
active = 'u'
[u]
order = FIRST
family = MONOMIAL
[InitialCondition]
type = ConstantIC
value = 0.5
[]
[]
[]
[Functions]
active = 'forcing_fn exact_fn'
[forcing_fn]
type = ParsedFunction
expression = 2*pow(e,-x-(y*y))*(1-2*y*y)
[]
[exact_fn]
type = ParsedGradFunction
expression = pow(e,-x-(y*y))
grad_x = -pow(e,-x-(y*y))
grad_y = -2*y*pow(e,-x-(y*y))
[]
[]
[Kernels]
active = 'diff abs forcing'
[diff]
type = Diffusion
variable = u
[]
[abs] # u * v
type = Reaction
variable = u
[]
[forcing]
type = BodyForce
variable = u
function = forcing_fn
[]
[]
[DGKernels]
active = 'dg_diff'
[dg_diff]
type = DGDiffusion
variable = u
epsilon = -1
sigma = 6
[]
[]
[BCs]
active = 'all'
[all]
type = DGFunctionDiffusionDirichletBC
variable = u
boundary = '0 1 2 3 4 5'
function = exact_fn
epsilon = -1
sigma = 6
[]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Postprocessors]
active = 'h dofs l2_err'
[h]
type = AverageElementSize
execute_on = 'initial timestep_end'
[]
[dofs]
type = NumDOFs
execute_on = 'initial timestep_end'
[]
[l2_err]
type = ElementL2Error
variable = u
function = exact_fn
execute_on = 'initial timestep_end'
[]
[]
[Outputs]
file_base = out
exodus = true
[]
(test/tests/dgkernels/adaptivity/adaptivity.i)
# This input file is used for two tests:
# 1) Check that DGKernels work with mesh adaptivity
# 2) Error out when DGKernels are used with adaptivity
# and stateful material prpoerties
[Mesh]
type = GeneratedMesh
dim = 3
nx = 2
ny = 2
nz = 2
parallel_type = 'replicated'
[]
[Variables]
[./u]
order = FIRST
family = MONOMIAL
[./InitialCondition]
type = ConstantIC
value = 1
[../]
[../]
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
expression = (x*x*x)-6.0*x
[../]
[./bc_fn]
type = ParsedFunction
expression = (x*x*x)
[../]
[]
[Kernels]
[./diff]
type = MatDiffusionTest
variable = u
prop_name = diffusivity
[../]
[./abs]
type = Reaction
variable = u
[../]
[./forcing]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[DGKernels]
[./dgdiff]
type = DGDiffusion
variable = u
sigma = 6
epsilon = -1.0
diff = diffusivity
[../]
[]
[BCs]
active = 'all'
[./all]
type = DGMDDBC
variable = u
boundary = '1 2 3 4'
function = bc_fn
prop_name = diffusivity
sigma = 6
epsilon = -1.0
[../]
[]
[Materials]
active = 'constant'
[./stateful]
type = StatefulTest
prop_names = 'diffusivity'
prop_values = '1'
[../]
[./constant]
type = GenericConstantMaterial
prop_names = 'diffusivity'
prop_values = '1'
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Adaptivity]
marker = 'marker'
steps = 1
[./Indicators]
[./error]
type = GradientJumpIndicator
variable = u
[../]
[../]
[./Markers]
[./marker]
type = ErrorFractionMarker
coarsen = 0.5
indicator = error
refine = 0.5
[../]
[../]
[]
[Outputs]
exodus = true
[]
(test/tests/problems/eigen_problem/eigensolvers/dg_krylovschur.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 10
ny = 10
elem_type = QUAD4
[]
[Variables]
[./u]
order = FIRST
family = MONOMIAL
[../]
[]
[DGKernels]
[./dg_diff]
type = DGDiffusion
variable = u
sigma = 6
epsilon = -1
[]
[]
[Kernels]
[./rhs]
type = Reaction
variable = u
extra_vector_tags = 'eigen'
[../]
[]
[Executioner]
type = Eigenvalue
solve_type = KRYLOVSCHUR
eigen_problem_type = HERMITIAN
which_eigen_pairs = LARGEST_MAGNITUDE
[]
[VectorPostprocessors]
[./eigenvalues]
type = Eigenvalues
execute_on = 'timestep_end'
[../]
[]
[Outputs]
csv = true
execute_on = 'timestep_end'
[]
(test/tests/dgkernels/dg_block_restrict/2d_dg_diffusion_block_restrict.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmax = 2
nx = 10
ymax = 2
ny = 10
[]
[subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '0 0 0'
block_id = 1
top_right = '1 1 0'
[]
[interface]
input = subdomain1
type = SideSetsBetweenSubdomainsGenerator
primary_block = '1'
paired_block = '0'
new_boundary = 'primary1_interface'
[]
[boundaries]
input = interface
type = BreakBoundaryOnSubdomainGenerator
boundaries = 'left bottom'
[]
[]
[Variables]
[u]
order = FIRST
family = L2_LAGRANGE
block = 1
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[source]
type = BodyForce
variable = u
[]
[]
[DGKernels]
[dg_diffusion]
type = DGDiffusion
variable = u
sigma = 4
epsilon = 1
[]
[]
[BCs]
[vacuum]
type = VacuumBC
variable = u
boundary = 'left_to_1 bottom_to_1'
[]
[primary1_inteface]
type = VacuumBC
variable = u
boundary = 'primary1_interface'
[]
[]
[Postprocessors]
[norm]
type = ElementL2Norm
variable = u
block = 1
[]
[]
[Executioner]
type = Steady
nl_abs_tol = 1e-12
[]
[Problem]
kernel_coverage_check = false
[]
[Outputs]
exodus = true
[]
(test/tests/dgkernels/2d_diffusion_dg/dg_stateful.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
elem_type = QUAD4
[]
[Variables]
[./u]
order = FIRST
family = MONOMIAL
[./InitialCondition]
type = ConstantIC
value = 1
[../]
[../]
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
expression = 2*pow(e,-x-(y*y))*(1-2*y*y)
[../]
[./exact_fn]
type = ParsedGradFunction
expression = pow(e,-x-(y*y))
grad_x = -pow(e,-x-(y*y))
grad_y = -2*y*pow(e,-x-(y*y))
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./abs]
type = Reaction
variable = u
[../]
[./forcing]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[DGKernels]
[./dg_diff]
type = DGDiffusion
variable = u
epsilon = -1
sigma = 6
[../]
[]
[BCs]
[./all]
type = DGFunctionDiffusionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
epsilon = -1
sigma = 6
[../]
[]
[Materials]
[./stateful]
type = StatefulMaterial
initial_diffusivity = 1
boundary = 'left'
[../]
[./general]
type = GenericConstantMaterial
block = '0'
prop_names = 'dummy'
prop_values = '1'
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
nl_rel_tol = 1e-10
[]