- boundaryThe list of boundary IDs from the mesh where this object applies
C++ Type:std::vector<BoundaryName>
Controllable:No
Description:The list of boundary IDs from the mesh where this object applies
- variableThe name of the variable which this postprocessor integrates
C++ Type:std::vector<VariableName>
Controllable:No
Description:The name of the variable which this postprocessor integrates
SideIntegralVariablePostprocessor
Computes a surface integral of the specified variable
The SideIntegralVariablePostprocessor is also an intermediate base class that should be derived from for any calculation involving the integral of a variable quantity over a side.
Example input syntax
In this example, a SideIntegralVariablePostprocessor
is used to compute the integral of variable u
over the sideset of id 0
.
[Postprocessors]
[./integral]
type = SideIntegralVariablePostprocessor
boundary = 0
variable = u
[../]
[]
(test/tests/postprocessors/side_integral/side_integral_test.i)Input Parameters
- execute_onTIMESTEP_ENDThe list of flag(s) indicating when this object should be executed, the available options include FORWARD, ADJOINT, HOMOGENEOUS_FORWARD, ADJOINT_TIMESTEP_BEGIN, ADJOINT_TIMESTEP_END, NONE, INITIAL, LINEAR, NONLINEAR, POSTCHECK, TIMESTEP_END, TIMESTEP_BEGIN, MULTIAPP_FIXED_POINT_END, MULTIAPP_FIXED_POINT_BEGIN, FINAL, CUSTOM.
Default:TIMESTEP_END
C++ Type:ExecFlagEnum
Options:FORWARD, ADJOINT, HOMOGENEOUS_FORWARD, ADJOINT_TIMESTEP_BEGIN, ADJOINT_TIMESTEP_END, NONE, INITIAL, LINEAR, NONLINEAR, POSTCHECK, TIMESTEP_END, TIMESTEP_BEGIN, MULTIAPP_FIXED_POINT_END, MULTIAPP_FIXED_POINT_BEGIN, FINAL, CUSTOM, TRANSFER
Controllable:No
Description:The list of flag(s) indicating when this object should be executed, the available options include FORWARD, ADJOINT, HOMOGENEOUS_FORWARD, ADJOINT_TIMESTEP_BEGIN, ADJOINT_TIMESTEP_END, NONE, INITIAL, LINEAR, NONLINEAR, POSTCHECK, TIMESTEP_END, TIMESTEP_BEGIN, MULTIAPP_FIXED_POINT_END, MULTIAPP_FIXED_POINT_BEGIN, FINAL, CUSTOM.
- 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
- allow_duplicate_execution_on_initialFalseIn the case where this UserObject is depended upon by an initial condition, allow it to be executed twice during the initial setup (once before the IC and again after mesh adaptivity (if applicable).
Default:False
C++ Type:bool
Controllable:No
Description:In the case where this UserObject is depended upon by an initial condition, allow it to be executed twice during the initial setup (once before the IC and again after mesh adaptivity (if applicable).
- 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.
- enableTrueSet the enabled status of the MooseObject.
Default:True
C++ Type:bool
Controllable:Yes
Description:Set the enabled status of the MooseObject.
- execution_order_group0Execution order groups are executed in increasing order (e.g., the lowest number is executed first). Note that negative group numbers may be used to execute groups before the default (0) group. Please refer to the user object documentation for ordering of user object execution within a group.
Default:0
C++ Type:int
Controllable:No
Description:Execution order groups are executed in increasing order (e.g., the lowest number is executed first). Note that negative group numbers may be used to execute groups before the default (0) group. Please refer to the user object documentation for ordering of user object execution within a group.
- force_postauxFalseForces the UserObject to be executed in POSTAUX
Default:False
C++ Type:bool
Controllable:No
Description:Forces the UserObject to be executed in POSTAUX
- force_preauxFalseForces the UserObject to be executed in PREAUX
Default:False
C++ Type:bool
Controllable:No
Description:Forces the UserObject to be executed in PREAUX
- force_preicFalseForces the UserObject to be executed in PREIC during initial setup
Default:False
C++ Type:bool
Controllable:No
Description:Forces the UserObject to be executed in PREIC during initial setup
- outputsVector of output names where you would like to restrict the output of variables(s) associated with this object
C++ Type:std::vector<OutputName>
Controllable:No
Description:Vector of output names where you would like to restrict the output of variables(s) associated with this object
- 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
- (modules/heat_transfer/test/tests/directional_flux_bc/3d_elem.i)
- (modules/navier_stokes/test/tests/finite_volume/pins/channel-flow/2d-rc.i)
- (modules/phase_field/examples/cahn-hilliard/Parsed_CH.i)
- (test/tests/auxkernels/divergence_aux/test_fe.i)
- (modules/navier_stokes/test/tests/finite_volume/pins/channel-flow/porosity_jump/bernoulli-2d-action.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/channel-flow/cylindrical/no-slip-tris.i)
- (modules/navier_stokes/test/tests/finite_volume/pins/channel-flow/porosity_jump/bernoulli-1d-parsed-function.i)
- (modules/navier_stokes/test/tests/finite_volume/pins/channel-flow/porosity_jump/2d-rc-epsjump.i)
- (test/tests/auxkernels/advection_flux/advection_flux_fe.i)
- (test/tests/auxkernels/advection_flux/normal_advection_flux_fe.i)
- (modules/xfem/test/tests/side_integral/side_integral_3d.i)
- (modules/navier_stokes/test/tests/finite_volume/pins/mms/1d-rc.i)
- (modules/phase_field/examples/cahn-hilliard/Math_CH.i)
- (modules/navier_stokes/test/tests/finite_volume/pins/channel-flow/2d-rc-action.i)
- (test/tests/postprocessors/postprocessor_dependency/element_side_pp.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/channel-flow/cylindrical/diverging.i)
- (test/tests/outputs/debug/show_execution_userobjects.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/channel-flow/cylindrical/2d-rc-slip.i)
- (modules/navier_stokes/test/tests/finite_volume/pins/channel-flow/2d-rc-rz-by-parts.i)
- (test/tests/postprocessors/displaced_mesh/side.i)
- (modules/navier_stokes/test/tests/finite_volume/pins/channel-flow/porosity_jump/bernoulli-1d.i)
- (test/tests/postprocessors/side_integral/side_integral_fv_test.i)
- (test/tests/postprocessors/side_advection_flux_integral/side_advection_flux_integral.i)
- (test/tests/postprocessors/side_integral/side_integral_test.i)
- (modules/navier_stokes/test/tests/finite_volume/pins/mms/porosity_change/1d-rc-continuous.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/channel-flow/1d-rc.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/channel-flow/cylindrical/no-slip-tris-action.i)
- (modules/solid_mechanics/test/tests/lagrangian/cartesian/total/special/area.i)
- (modules/solid_mechanics/test/tests/lagrangian/cartesian/updated/special/area.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/channel-flow/cylindrical/2d-average-no-slip.i)
- (modules/navier_stokes/test/tests/finite_volume/pins/channel-flow/porosity_jump/1d-rc-epsjump.i)
- (modules/navier_stokes/test/tests/finite_volume/pins/channel-flow/porosity_jump/bernoulli-2d.i)
- (test/tests/auxkernels/advection_flux/advection_flux_fv.i)
- (modules/xfem/test/tests/side_integral/side_integral.i)
- (modules/navier_stokes/test/tests/finite_volume/pins/channel-flow/2d-rc-friction.i)
- (test/tests/auxkernels/diffusion_flux/normal_diffusion_flux.i)
- (test/tests/postprocessors/side_pps/side_pps_multi_bnd_test.i)
- (modules/phase_field/examples/cahn-hilliard/Parsed_SplitCH.i)
- (modules/navier_stokes/test/tests/finite_volume/pins/channel-flow/porosity_jump/bernoulli-1d-functor-material.i)
- (modules/navier_stokes/test/tests/finite_volume/pins/channel-flow/2d-rc-friction-action.i)
- (modules/heat_transfer/test/tests/directional_flux_bc/2d_elem.i)
Child Objects
- (modules/richards/include/postprocessors/RichardsExcavFlow.h)
- (framework/include/postprocessors/SideAverageValue.h)
- (modules/richards/include/postprocessors/RichardsPiecewiseLinearSinkFlux.h)
- (modules/richards/include/postprocessors/RichardsHalfGaussianSinkFlux.h)
- (framework/include/postprocessors/SideDiffusiveFluxIntegral.h)
(test/tests/postprocessors/side_integral/side_integral_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
xmin = 0
xmax = 4
ymin = 0
ymax = 1
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
active = 'diff'
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
active = 'left right'
[./left]
type = DirichletBC
variable = u
boundary = 3
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = 1
value = 1
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Postprocessors]
[./integral]
type = SideIntegralVariablePostprocessor
boundary = 0
variable = u
[../]
[]
[Outputs]
file_base = out
exodus = true
[]
(modules/heat_transfer/test/tests/directional_flux_bc/3d_elem.i)
[Mesh]
[shade]
type = GeneratedMeshGenerator
dim = 3
nx = 1
ny = 3
nz = 3
xmax = 0.2
ymax = 0.5
zmax = 0.5
[]
[screen]
type = GeneratedMeshGenerator
dim = 3
nx = 1
ny = 20
nz = 20
xmax = 0.05
[]
[screen_block]
type = SubdomainIDGenerator
input = screen
subdomain_id = 1
[]
[combine]
type = CombinerGenerator
inputs = 'shade screen_block'
positions = '0 0 0 1 0 0'
[]
[all_sides]
type = SideSetsAroundSubdomainGenerator
block = '0 1'
new_boundary = 100
input = combine
[]
[shaded_side]
type = SideSetsAroundSubdomainGenerator
normal = '-1 0 0'
block = 1
input = all_sides
new_boundary = 101
[]
[]
[GlobalParams]
illumination_flux = '1 0 0'
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[dt]
type = TimeDerivative
variable = u
[]
[]
[BCs]
[flux]
type = DirectionalFluxBC
variable = u
boundary = 101
self_shadow_uo = shadow
[]
[]
[UserObjects]
[shadow]
type = SelfShadowSideUserObject
boundary = 100
execute_on = INITIAL
[]
[]
[Postprocessors]
[light]
type = SideIntegralVariablePostprocessor
variable = u
boundary = 101
[]
[]
[Executioner]
type = Transient
dt = 0.01
num_steps = 1
[]
[Outputs]
csv = true
[]
(modules/navier_stokes/test/tests/finite_volume/pins/channel-flow/2d-rc.i)
mu = 1.1
rho = 1.1
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 5
ymin = 0
ymax = 1
nx = 20
ny = 10
[]
[]
[GlobalParams]
advected_interp_method = 'average'
velocity_interp_method = 'rc'
rhie_chow_user_object = 'rc'
[]
[UserObjects]
[rc]
type = PINSFVRhieChowInterpolator
u = superficial_vel_x
v = superficial_vel_y
pressure = pressure
porosity = porosity
[]
[]
[Variables]
inactive = 'lambda'
[superficial_vel_x]
type = PINSFVSuperficialVelocityVariable
initial_condition = 1
[]
[superficial_vel_y]
type = PINSFVSuperficialVelocityVariable
initial_condition = 1e-6
[]
[pressure]
type = INSFVPressureVariable
[]
[lambda]
family = SCALAR
order = FIRST
[]
[]
[AuxVariables]
[porosity]
family = MONOMIAL
order = CONSTANT
fv = true
initial_condition = 0.5
[]
[]
[FVKernels]
inactive = 'mean-pressure'
[mass]
type = PINSFVMassAdvection
variable = pressure
rho = ${rho}
[]
[u_advection]
type = PINSFVMomentumAdvection
variable = superficial_vel_x
rho = ${rho}
porosity = porosity
momentum_component = 'x'
[]
[u_viscosity]
type = PINSFVMomentumDiffusion
variable = superficial_vel_x
mu = ${mu}
porosity = porosity
momentum_component = 'x'
[]
[u_pressure]
type = PINSFVMomentumPressure
variable = superficial_vel_x
momentum_component = 'x'
pressure = pressure
porosity = porosity
[]
[v_advection]
type = PINSFVMomentumAdvection
variable = superficial_vel_y
rho = ${rho}
porosity = porosity
momentum_component = 'y'
[]
[v_viscosity]
type = PINSFVMomentumDiffusion
variable = superficial_vel_y
mu = ${mu}
porosity = porosity
momentum_component = 'y'
[]
[v_pressure]
type = PINSFVMomentumPressure
variable = superficial_vel_y
momentum_component = 'y'
pressure = pressure
porosity = porosity
[]
[mean-pressure]
type = FVIntegralValueConstraint
variable = pressure
lambda = lambda
phi0 = 0.01
[]
[]
[FVBCs]
# Select desired boundary conditions
active = 'inlet-u inlet-v outlet-p free-slip-u free-slip-v'
# Possible inlet boundary conditions
[inlet-u]
type = INSFVInletVelocityBC
boundary = 'left'
variable = superficial_vel_x
function = '1'
[]
[inlet-v]
type = INSFVInletVelocityBC
boundary = 'left'
variable = superficial_vel_y
function = 0
[]
[inlet-p]
type = INSFVOutletPressureBC
boundary = 'left'
variable = pressure
function = 1
[]
# Possible wall boundary conditions
[free-slip-u]
type = INSFVNaturalFreeSlipBC
boundary = 'top bottom'
variable = superficial_vel_x
momentum_component = 'x'
[]
[free-slip-v]
type = INSFVNaturalFreeSlipBC
boundary = 'top bottom'
variable = superficial_vel_y
momentum_component = 'y'
[]
[no-slip-u]
type = INSFVNoSlipWallBC
boundary = 'top bottom'
variable = superficial_vel_x
function = 0
[]
[no-slip-v]
type = INSFVNoSlipWallBC
boundary = 'top bottom'
variable = superficial_vel_y
function = 0
[]
[symmetry-u]
type = PINSFVSymmetryVelocityBC
boundary = 'bottom'
variable = superficial_vel_x
u = superficial_vel_x
v = superficial_vel_y
mu = ${mu}
momentum_component = 'x'
[]
[symmetry-v]
type = PINSFVSymmetryVelocityBC
boundary = 'bottom'
variable = superficial_vel_y
u = superficial_vel_x
v = superficial_vel_y
mu = ${mu}
momentum_component = 'y'
[]
[symmetry-p]
type = INSFVSymmetryPressureBC
boundary = 'bottom'
variable = pressure
[]
# Possible outlet boundary conditions
[outlet-p]
type = INSFVOutletPressureBC
boundary = 'right'
variable = pressure
function = 0
[]
[outlet-p-novalue]
type = INSFVMassAdvectionOutflowBC
boundary = 'right'
variable = pressure
u = superficial_vel_x
v = superficial_vel_y
rho = ${rho}
[]
[outlet-u]
type = PINSFVMomentumAdvectionOutflowBC
boundary = 'right'
variable = superficial_vel_x
u = superficial_vel_x
v = superficial_vel_y
porosity = porosity
momentum_component = 'x'
rho = ${rho}
[]
[outlet-v]
type = PINSFVMomentumAdvectionOutflowBC
boundary = 'right'
variable = superficial_vel_y
u = superficial_vel_x
v = superficial_vel_y
porosity = porosity
momentum_component = 'y'
rho = ${rho}
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_pc_type -sub_pc_factor_shift_type'
petsc_options_value = 'asm 300 lu NONZERO'
line_search = 'none'
nl_rel_tol = 1e-11
nl_abs_tol = 1e-14
[]
# Some basic Postprocessors to visually examine the solution
[Postprocessors]
[inlet-p]
type = SideIntegralVariablePostprocessor
variable = pressure
boundary = 'left'
[]
[outlet-u]
type = SideIntegralVariablePostprocessor
variable = superficial_vel_x
boundary = 'right'
[]
[]
[Outputs]
exodus = true
[]
(modules/phase_field/examples/cahn-hilliard/Parsed_CH.i)
#
# Example problem showing how to use the DerivativeParsedMaterial with CahnHilliard.
# The free energy is identical to that from CHMath, f_bulk = 1/4*(1-c)^2*(1+c)^2.
#
[Mesh]
type = GeneratedMesh
dim = 2
nx = 100
ny = 100
xmax = 60
ymax = 60
[]
[Modules]
[./PhaseField]
[./Conserved]
[./c]
free_energy = fbulk
mobility = M
kappa = kappa_c
solve_type = DIRECT
[../]
[../]
[../]
[]
[AuxVariables]
[./local_energy]
order = CONSTANT
family = MONOMIAL
[../]
[]
[ICs]
[./cIC]
type = RandomIC
variable = c
min = -0.1
max = 0.1
[../]
[]
[AuxKernels]
[./local_energy]
type = TotalFreeEnergy
variable = local_energy
f_name = fbulk
interfacial_vars = c
kappa_names = kappa_c
execute_on = timestep_end
[../]
[]
[BCs]
[./Periodic]
[./all]
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
[./mat]
type = GenericConstantMaterial
prop_names = 'M kappa_c'
prop_values = '1.0 0.5'
[../]
[./free_energy]
type = DerivativeParsedMaterial
property_name = fbulk
coupled_variables = c
constant_names = W
constant_expressions = 1.0/2^2
expression = W*(1-c)^2*(1+c)^2
enable_jit = true
[../]
[]
[Postprocessors]
[./top]
type = SideIntegralVariablePostprocessor
variable = c
boundary = top
[../]
[./total_free_energy]
type = ElementIntegralVariablePostprocessor
variable = local_energy
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
scheme = bdf2
# Alternative preconditioning using the additive Schwartz method and LU decomposition
#petsc_options_iname = '-pc_type -sub_ksp_type -sub_pc_type'
#petsc_options_value = 'asm preonly lu '
# Preconditioning options using Hypre (algebraic multi-grid)
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
l_max_its = 30
l_tol = 1e-4
nl_max_its = 20
nl_rel_tol = 1e-9
dt = 2.0
end_time = 20.0
[]
[Outputs]
exodus = true
perf_graph = true
[]
(test/tests/auxkernels/divergence_aux/test_fe.i)
[Mesh]
[cmg]
type = CartesianMeshGenerator
dim = 2
dx = '1.5 1 0.1'
dy = '1.3 1 0.9'
ix = '2 4 1'
iy = '2 3 3'
subdomain_id = '1 1 1
1 2 1
1 1 1'
[]
[add_inner_boundaries_top]
type = SideSetsAroundSubdomainGenerator
input = cmg
new_boundary = 'block_2_top'
block = 2
normal = '0 1 0'
[]
[add_inner_boundaries_bot]
type = SideSetsAroundSubdomainGenerator
input = add_inner_boundaries_top
new_boundary = 'block_2_bot'
block = 2
normal = '0 -1 0'
[]
[add_inner_boundaries_right]
type = SideSetsAroundSubdomainGenerator
input = add_inner_boundaries_bot
new_boundary = 'block_2_right'
block = 2
normal = '1 0 0'
[]
[add_inner_boundaries_left]
type = SideSetsAroundSubdomainGenerator
input = add_inner_boundaries_right
new_boundary = 'block_2_left'
block = 2
normal = '-1 0 0'
[]
[]
[Variables]
[u]
[]
[v]
[]
[]
[Kernels]
[diff_u]
type = Diffusion
variable = u
[]
[reaction_u]
type = Reaction
variable = u
[]
[diff_v]
type = Diffusion
variable = v
[]
[reaction_v]
type = Reaction
variable = v
[]
[]
[AuxVariables]
[div]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[divergence]
type = ADDivergenceAux
variable = div
u = u
v = v
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 1
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[top]
type = DirichletBC
variable = v
boundary = top
value = 1
[]
[bottom]
type = DirichletBC
variable = v
boundary = bottom
value = 1
[]
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Postprocessors]
[int_divergence]
type = ElementL1Error
block = 2
variable = div
function = 0
[]
[sum_surface_current]
type = ParsedPostprocessor
expression = 's1 - s2 + s3 - s4'
pp_names = 's1 s2 s3 s4'
[]
[s1]
type = SideIntegralVariablePostprocessor
boundary = 'block_2_right'
variable = 'u'
[]
[s2]
type = SideIntegralVariablePostprocessor
boundary = 'block_2_left'
variable = 'u'
[]
[s3]
type = SideIntegralVariablePostprocessor
boundary = 'block_2_top'
variable = 'v'
[]
[s4]
type = SideIntegralVariablePostprocessor
boundary = 'block_2_bot'
variable = 'v'
[]
[]
[Outputs]
csv = true
hide = 's1 s2 s3 s4'
[]
(modules/navier_stokes/test/tests/finite_volume/pins/channel-flow/porosity_jump/bernoulli-2d-action.i)
rho=1.1
mu=0
[Mesh]
[mesh]
type = CartesianMeshGenerator
dim = 2
dx = '1 1'
dy = '0.5'
ix = '3 3'
iy = '2'
subdomain_id = '1 2'
[]
[]
[Modules]
[NavierStokesFV]
compressibility = 'incompressible'
porous_medium_treatment = true
density = 'rho'
dynamic_viscosity = 'mu'
porosity = 'porosity'
initial_velocity = '1 1e-6 0'
initial_pressure = 0.0
inlet_boundaries = 'left'
momentum_inlet_types = 'fixed-velocity'
momentum_inlet_function = '1 0'
wall_boundaries = 'top bottom'
momentum_wall_types = 'slip slip'
outlet_boundaries = 'right'
momentum_outlet_types = 'fixed-pressure'
pressure_function = '0.4'
porosity_interface_pressure_treatment = 'bernoulli'
mass_advection_interpolation = 'upwind'
momentum_advection_interpolation = 'upwind'
[]
[]
[FunctorMaterials]
[const]
type = ADGenericFunctorMaterial
prop_names = 'rho mu'
prop_values = '${rho} ${mu}'
[]
[]
[AuxVariables]
[porosity]
type = PiecewiseConstantVariable
[]
[]
[ICs]
[porosity_1]
type = ConstantIC
variable = porosity
block = 1
value = 1
[]
[porosity_2]
type = ConstantIC
variable = porosity
block = 2
value = 0.5
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
line_search = 'none'
nl_rel_tol = 1e-10
[]
[Postprocessors]
[inlet_p]
type = SideAverageValue
variable = 'pressure'
boundary = 'left'
[]
[outlet-u]
type = SideIntegralVariablePostprocessor
variable = superficial_vel_x
boundary = 'right'
[]
[]
[Outputs]
exodus = true
csv = true
[]
(modules/navier_stokes/test/tests/finite_volume/ins/channel-flow/cylindrical/no-slip-tris.i)
mu = 1
rho = 1
advected_interp_method = 'average'
velocity_interp_method = 'rc'
[GlobalParams]
two_term_boundary_expansion = true
rhie_chow_user_object = 'rc'
[]
[UserObjects]
[rc]
type = INSFVRhieChowInterpolator
u = vel_x
v = vel_y
pressure = pressure
[]
[]
[Mesh]
type = GeneratedMesh
nx = 4
ny = 4
xmax = 3.9
ymax = 4.1
elem_type = TRI3
dim = 2
[]
[Problem]
coord_type = 'RZ'
[]
[Variables]
[vel_x]
type = INSFVVelocityVariable
initial_condition = 1e-15
[]
[vel_y]
type = INSFVVelocityVariable
initial_condition = 1e-15
[]
[pressure]
type = INSFVPressureVariable
[]
[]
[FVKernels]
[mass]
type = INSFVMassAdvection
variable = pressure
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
[]
[u_advection]
type = INSFVMomentumAdvection
variable = vel_x
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
momentum_component = 'x'
[]
[u_viscosity]
type = INSFVMomentumDiffusion
variable = vel_x
mu = ${mu}
momentum_component = 'x'
[]
[u_pressure]
type = INSFVMomentumPressure
variable = vel_x
momentum_component = 'x'
pressure = pressure
[]
[v_advection]
type = INSFVMomentumAdvection
variable = vel_y
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
momentum_component = 'y'
# we can think of the axis as a slip wall boundary, no normal velocity and no viscous shear
[]
[v_viscosity]
type = INSFVMomentumDiffusion
variable = vel_y
mu = ${mu}
momentum_component = 'y'
[]
[v_pressure]
type = INSFVMomentumPressure
variable = vel_y
momentum_component = 'y'
pressure = pressure
[]
[]
[FVBCs]
active = 'inlet-u inlet-v free-slip-wall-u free-slip-wall-v outlet-p axis-u axis-v'
[inlet-u]
type = INSFVInletVelocityBC
boundary = 'bottom'
variable = vel_x
function = 0
[]
[inlet-v]
type = INSFVInletVelocityBC
boundary = 'bottom'
variable = vel_y
function = 1
[]
[free-slip-wall-u]
type = INSFVNaturalFreeSlipBC
boundary = 'right'
variable = vel_x
momentum_component = 'x'
[]
[free-slip-wall-v]
type = INSFVNaturalFreeSlipBC
boundary = 'right'
variable = vel_y
momentum_component = 'y'
[]
[no-slip-wall-u]
type = INSFVNoSlipWallBC
boundary = 'right'
variable = vel_x
function = 0
[]
[no-slip-wall-v]
type = INSFVNoSlipWallBC
boundary = 'right'
variable = vel_y
function = 0
[]
[outlet-p]
type = INSFVOutletPressureBC
boundary = 'top'
variable = pressure
function = 0
[]
[axis-u]
type = INSFVSymmetryVelocityBC
boundary = 'left'
variable = vel_x
u = vel_x
v = vel_y
mu = ${mu}
momentum_component = x
[]
[axis-v]
type = INSFVSymmetryVelocityBC
boundary = 'left'
variable = vel_y
u = vel_x
v = vel_y
mu = ${mu}
momentum_component = y
[]
[axis-p]
type = INSFVSymmetryPressureBC
boundary = 'left'
variable = 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
[]
[Debug]
show_var_residual_norms = true
[]
[Postprocessors]
[in]
type = SideIntegralVariablePostprocessor
variable = vel_y
boundary = 'bottom'
[]
[out]
type = SideIntegralVariablePostprocessor
variable = vel_y
boundary = 'top'
[]
[num_lin]
type = NumLinearIterations
outputs = 'console'
[]
[num_nl]
type = NumNonlinearIterations
outputs = 'console'
[]
[cum_lin]
type = CumulativeValuePostprocessor
outputs = 'console'
postprocessor = 'num_lin'
[]
[cum_nl]
type = CumulativeValuePostprocessor
outputs = 'console'
postprocessor = 'num_nl'
[]
[]
[Outputs]
exodus = true
csv = true
[]
(modules/navier_stokes/test/tests/finite_volume/pins/channel-flow/porosity_jump/bernoulli-1d-parsed-function.i)
rho = 1.1
advected_interp_method = 'upwind'
velocity_interp_method = 'rc'
[Mesh]
[mesh]
type = CartesianMeshGenerator
dim = 1
dx = '1 1'
ix = '3 3'
subdomain_id = '1 2'
[]
[]
[GlobalParams]
rhie_chow_user_object = 'rc'
[]
[UserObjects]
[rc]
type = PINSFVRhieChowInterpolator
u = u
pressure = pressure
porosity = porosity
[]
[]
[Variables]
[u]
type = PINSFVSuperficialVelocityVariable
initial_condition = 1
[]
[pressure]
type = BernoulliPressureVariable
u = u
porosity = porosity
rho = ${rho}
[]
[]
[Functions]
[porosity]
type = ParsedFunction
expression = 'if(x > 1, 0.5, 1)'
[]
[]
[AuxVariables]
[has_porosity_jump_face]
type = MooseVariableFVReal
[]
[porosity_out]
type = MooseVariableFVReal
[]
[]
[AuxKernels]
[has_porosity_jump_face]
type = HasPorosityJumpFace
porosity = porosity
execute_on = 'initial timestep_end'
variable = has_porosity_jump_face
[]
[porosity_out]
type = FunctorAux
variable = porosity_out
functor = porosity
execute_on = 'initial timestep_end'
[]
[]
[FVKernels]
[mass]
type = PINSFVMassAdvection
variable = pressure
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
[]
[u_advection]
type = PINSFVMomentumAdvection
variable = u
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
porosity = porosity
momentum_component = 'x'
[]
[u_pressure]
type = PINSFVMomentumPressure
variable = u
pressure = pressure
porosity = porosity
momentum_component = 'x'
[]
[]
[FVBCs]
[inlet-u]
type = INSFVInletVelocityBC
boundary = 'left'
variable = u
function = '1'
[]
[outlet_p]
type = INSFVOutletPressureBC
boundary = 'right'
variable = pressure
function = 1
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
line_search = 'none'
[]
[Postprocessors]
[inlet_p]
type = SideAverageValue
variable = 'pressure'
boundary = 'left'
[]
[outlet-u]
type = SideIntegralVariablePostprocessor
variable = u
boundary = 'right'
[]
[]
[Outputs]
exodus = true
csv = true
[]
(modules/navier_stokes/test/tests/finite_volume/pins/channel-flow/porosity_jump/2d-rc-epsjump.i)
mu=1.1
rho=1.1
advected_interp_method='upwind'
velocity_interp_method='rc'
[Mesh]
[mesh]
type = CartesianMeshGenerator
dim = 2
dx = '1 1'
dy = '0.5'
ix = '30 30'
iy = '20'
subdomain_id = '1 2'
[]
[]
[GlobalParams]
rhie_chow_user_object = 'rc'
porosity = porosity
[]
[UserObjects]
[rc]
type = PINSFVRhieChowInterpolator
u = u
v = v
porosity = porosity
pressure = pressure
[]
[]
[Variables]
[u]
type = PINSFVSuperficialVelocityVariable
initial_condition = 1
[]
[v]
type = PINSFVSuperficialVelocityVariable
initial_condition = 1e-6
[]
[pressure]
type = INSFVPressureVariable
[]
[]
[AuxVariables]
[porosity]
type = MooseVariableFVReal
[]
[]
[ICs]
inactive = 'porosity_continuous'
[porosity_1]
type = ConstantIC
variable = porosity
block = 1
value = 1
[]
[porosity_2]
type = ConstantIC
variable = porosity
block = 2
value = 0.5
[]
[porosity_continuous]
type = FunctionIC
variable = porosity
block = '1 2'
function = smooth_jump
[]
[]
[Functions]
[smooth_jump]
type = ParsedFunction
expression = '1 - 0.5 * 1 / (1 + exp(-30*(x-1)))'
[]
[]
[FVKernels]
[mass]
type = PINSFVMassAdvection
variable = pressure
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
[]
[u_advection]
type = PINSFVMomentumAdvection
variable = u
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
momentum_component = 'x'
[]
[u_viscosity]
type = PINSFVMomentumDiffusion
variable = u
mu = ${mu}
momentum_component = 'x'
[]
[u_pressure]
type = PINSFVMomentumPressure
variable = u
pressure = pressure
momentum_component = 'x'
[]
[v_advection]
type = PINSFVMomentumAdvection
variable = v
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
momentum_component = 'y'
[]
[v_viscosity]
type = PINSFVMomentumDiffusion
variable = v
mu = ${mu}
momentum_component = 'y'
[]
[v_pressure]
type = PINSFVMomentumPressure
variable = v
pressure = pressure
momentum_component = 'y'
[]
[]
[FVBCs]
[inlet-u]
type = INSFVInletVelocityBC
boundary = 'left'
variable = u
function = '1'
[]
[inlet-v]
type = INSFVInletVelocityBC
boundary = 'left'
variable = v
function = 0
[]
[walls-u]
type = INSFVNaturalFreeSlipBC
boundary = 'top bottom'
variable = u
momentum_component = 'x'
[]
[walls-v]
type = INSFVNaturalFreeSlipBC
boundary = 'top bottom'
variable = v
momentum_component = 'y'
[]
[outlet_p]
type = INSFVOutletPressureBC
boundary = 'right'
variable = pressure
function = 0.4
[]
[]
[FunctorMaterials]
inactive = 'smooth'
[jump]
type = ADPiecewiseByBlockFunctorMaterial
prop_name = 'porosity'
subdomain_to_prop_value = '1 1
2 0.5'
[]
[smooth]
type = ADGenericFunctionFunctorMaterial
prop_names = 'porosity'
prop_values = 'smooth_jump'
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
line_search = 'none'
nl_rel_tol = 1e-10
[]
[Postprocessors]
[inlet_p]
type = SideAverageValue
variable = 'pressure'
boundary = 'left'
[]
[outlet-u]
type = SideIntegralVariablePostprocessor
variable = u
boundary = 'right'
[]
[]
[Outputs]
exodus = true
csv = false
[]
(test/tests/auxkernels/advection_flux/advection_flux_fe.i)
[Mesh]
[cmg]
type = CartesianMeshGenerator
dim = 2
dx = '0.75 0.75 0.75'
dy = '0.75 0.75 0.75'
ix = '2 2 2'
iy = '2 2 2'
subdomain_id = '1 1 1
1 2 1
1 1 1'
[]
[add_inner_boundaries_top]
type = SideSetsAroundSubdomainGenerator
input = cmg
new_boundary = 'block_2_top'
block = 2
normal = '0 1 0'
[]
[add_inner_boundaries_bot]
type = SideSetsAroundSubdomainGenerator
input = add_inner_boundaries_top
new_boundary = 'block_2_bot'
block = 2
normal = '0 -1 0'
[]
[add_inner_boundaries_right]
type = SideSetsAroundSubdomainGenerator
input = add_inner_boundaries_bot
new_boundary = 'block_2_right'
block = 2
normal = '1 0 0'
[]
[add_inner_boundaries_left]
type = SideSetsAroundSubdomainGenerator
input = add_inner_boundaries_right
new_boundary = 'block_2_left'
block = 2
normal = '-1 0 0'
[]
[]
[Variables]
[u]
[]
[v]
[]
[]
[ICs]
[u_blob]
type = FunctionIC
variable = u
function = 'if(x<0.75,if(y<0.75,1,0),0)'
[]
[v_blob]
type = FunctionIC
variable = v
function = 'if(x<0.75,if(y<0.75,1,0),0)'
[]
[]
[Kernels]
[udot]
type = MassLumpedTimeDerivative
variable = u
[]
[u_advec]
type = ConservativeAdvection
variable = u
upwinding_type = full
velocity = '2 0 0'
[]
[vdot]
type = MassLumpedTimeDerivative
variable = v
[]
[v_advec]
type = ConservativeAdvection
variable = v
upwinding_type = full
velocity = '0 2 0'
[]
[]
[Materials]
[rho]
type = GenericConstantMaterial
prop_names = 'rho'
prop_values = '1'
[]
[]
[AuxVariables]
[flux_x]
order = FIRST
family = MONOMIAL
[]
[]
[AuxKernels]
[flux_x]
type = AdvectiveFluxAux
variable = flux_x
vel_x = u
vel_y = v
advected_mat_prop = 'rho'
component = x
boundary = 'block_2_right block_2_left'
[]
[]
[Executioner]
type = Transient
solve_type = LINEAR
dt = 0.01
end_time = 0.02
l_tol = 1E-14
[]
[Postprocessors]
[flux_right]
type = SideIntegralVariablePostprocessor
variable = flux_x
boundary = 'block_2_right'
[]
[flux_right_exact]
type = SideAdvectiveFluxIntegral
boundary = 'block_2_right'
vel_x = u
vel_y = v
component = x
advected_mat_prop = 'rho'
[]
[flux_left]
type = SideIntegralVariablePostprocessor
variable = flux_x
boundary = 'block_2_left'
[]
[flux_left_exact]
type = SideAdvectiveFluxIntegral
boundary = 'block_2_left'
vel_x = u
vel_y = v
component = x
advected_mat_prop = 'rho'
[]
[]
[Outputs]
csv = true
[]
(test/tests/auxkernels/advection_flux/normal_advection_flux_fe.i)
[Mesh]
[cmg]
type = CartesianMeshGenerator
dim = 2
dx = '0.75 0.75 0.75'
dy = '0.75 0.75 0.75'
ix = '2 2 2'
iy = '2 2 2'
subdomain_id = '1 1 1
1 2 1
1 1 1'
[]
[add_inner_boundaries_top]
type = SideSetsAroundSubdomainGenerator
input = cmg
new_boundary = 'block_2_top'
block = 2
normal = '0 1 0'
[]
[add_inner_boundaries_bot]
type = SideSetsAroundSubdomainGenerator
input = add_inner_boundaries_top
new_boundary = 'block_2_bot'
block = 2
normal = '0 -1 0'
[]
[add_inner_boundaries_right]
type = SideSetsAroundSubdomainGenerator
input = add_inner_boundaries_bot
new_boundary = 'block_2_right'
block = 2
normal = '1 0 0'
[]
[add_inner_boundaries_left]
type = SideSetsAroundSubdomainGenerator
input = add_inner_boundaries_right
new_boundary = 'block_2_left'
block = 2
normal = '-1 0 0'
[]
[]
[Variables]
[u]
[]
[v]
[]
[]
[ICs]
[u_blob]
type = FunctionIC
variable = u
function = 'if(x<0.75,if(y<0.75,1,0),0)'
[]
[v_blob]
type = FunctionIC
variable = v
function = 'if(x<0.75,if(y<0.75,1,0),0)'
[]
[]
[Kernels]
[udot]
type = MassLumpedTimeDerivative
variable = u
[]
[u_advec]
type = ConservativeAdvection
variable = u
upwinding_type = full
velocity = '2 0 0'
[]
[vdot]
type = MassLumpedTimeDerivative
variable = v
[]
[v_advec]
type = ConservativeAdvection
variable = v
upwinding_type = full
velocity = '0 2 0'
[]
[]
[Materials]
[rho]
type = GenericConstantMaterial
prop_names = 'rho'
prop_values = '1'
[]
[]
[AuxVariables]
[flux_x]
order = FIRST
family = MONOMIAL
[]
[]
[AuxKernels]
[flux_x]
type = AdvectiveFluxAux
variable = flux_x
vel_x = u
vel_y = v
advected_mat_prop = 'rho'
component = normal
boundary = 'block_2_right block_2_left'
[]
[]
[Executioner]
type = Transient
solve_type = LINEAR
dt = 0.01
end_time = 0.02
l_tol = 1E-14
[]
[Postprocessors]
[flux_right]
type = SideIntegralVariablePostprocessor
variable = flux_x
boundary = 'block_2_right'
[]
[flux_right_exact]
type = SideAdvectiveFluxIntegral
boundary = 'block_2_right'
vel_x = u
vel_y = v
component = normal
advected_mat_prop = 'rho'
[]
[flux_left]
type = SideIntegralVariablePostprocessor
variable = flux_x
boundary = 'block_2_left'
[]
[flux_left_exact]
type = SideAdvectiveFluxIntegral
boundary = 'block_2_left'
vel_x = u
vel_y = v
component = normal
advected_mat_prop = 'rho'
[]
[]
[Outputs]
csv = true
[]
(modules/xfem/test/tests/side_integral/side_integral_3d.i)
[GlobalParams]
order = FIRST
family = LAGRANGE
[]
[Mesh]
type = GeneratedMesh
dim = 3
nx = 3
ny = 3
nz = 1
xmin = 0.0
xmax = 1.0
ymin = 0.0
ymax = 1.0
zmin = 0.0
zmax = 0.2
elem_type = HEX8
[]
[XFEM]
qrule = volfrac
output_cut_plane = true
[]
[UserObjects]
[./square_cut_uo]
type = RectangleCutUserObject
cut_data = ' -1.0 -0.1 -1.0
2.0 1.1 -1.0
2.0 1.1 1.0
-1.0 -0.1 1.0'
[../]
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
# Define boundary conditions
[./front]
type = DirichletBC
variable = u
boundary = front
value = 3
[../]
[./back]
type = DirichletBC
variable = u
boundary = back
value = 2
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
line_search = 'none'
l_tol = 1e-3
nl_max_its = 15
nl_rel_tol = 1e-10
nl_abs_tol = 1e-10
start_time = 0.0
dt = 1.0
end_time = 2.0
[]
[Postprocessors]
[./front]
type = SideIntegralVariablePostprocessor
variable = u
boundary = front
[../]
[./back]
type = SideIntegralVariablePostprocessor
variable = u
boundary = back
[../]
[]
[Outputs]
time_step_interval = 1
execute_on = timestep_end
exodus = true
[./console]
type = Console
output_linear = true
[../]
[]
(modules/navier_stokes/test/tests/finite_volume/pins/mms/1d-rc.i)
mu = 1.1
rho = 1.1
advected_interp_method = 'average'
velocity_interp_method = 'rc'
[Mesh]
[mesh]
type = CartesianMeshGenerator
dim = 1
dx = '1 1'
ix = '5 5'
subdomain_id = '1 2'
[]
[]
[GlobalParams]
rhie_chow_user_object = 'rc'
[]
[UserObjects]
[rc]
type = PINSFVRhieChowInterpolator
u = u
pressure = pressure
porosity = porosity
[]
[]
[Variables]
[u]
type = PINSFVSuperficialVelocityVariable
initial_condition = 1
[]
[pressure]
type = INSFVPressureVariable
[]
[]
[AuxVariables]
[porosity]
family = MONOMIAL
order = CONSTANT
fv = true
initial_condition = 0.8
[]
[]
[Problem]
error_on_jacobian_nonzero_reallocation = true
[]
[Functions]
[exact_u]
type = ParsedFunction
expression = 'cos((1/2)*x*pi)'
[]
[forcing_u]
type = ParsedFunction
expression = '0.25*pi^2*mu*cos((1/2)*x*pi) - 1.25*pi*rho*sin((1/2)*x*pi)*cos((1/2)*x*pi) + 0.8*cos(x)'
symbol_names = 'mu rho'
symbol_values = '${mu} ${rho}'
[]
[exact_p]
type = ParsedFunction
expression = 'sin(x)'
[]
[forcing_p]
type = ParsedFunction
expression = '-1/2*pi*rho*sin((1/2)*x*pi)'
symbol_names = 'rho'
symbol_values = '${rho}'
[]
[]
[FVKernels]
[mass]
type = PINSFVMassAdvection
variable = pressure
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
[]
[mass_forcing]
type = FVBodyForce
variable = pressure
function = forcing_p
[]
[u_advection]
type = PINSFVMomentumAdvection
variable = u
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
porosity = porosity
momentum_component = 'x'
[]
[u_viscosity]
type = PINSFVMomentumDiffusion
variable = u
mu = ${mu}
porosity = porosity
momentum_component = 'x'
[]
[u_pressure]
type = PINSFVMomentumPressureFlux
variable = u
pressure = pressure
porosity = porosity
momentum_component = 'x'
[]
[u_forcing]
type = INSFVBodyForce
variable = u
functor = forcing_u
momentum_component = 'x'
[]
[]
[FVBCs]
[inlet-u]
type = INSFVInletVelocityBC
boundary = 'left'
variable = u
functor = 'exact_u'
[]
[outlet_p]
type = INSFVOutletPressureBC
boundary = 'right'
variable = pressure
function = 'exact_p'
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
[]
[Postprocessors]
[inlet_p]
type = SideAverageValue
variable = 'pressure'
boundary = 'left'
[]
[outlet-u]
type = SideIntegralVariablePostprocessor
variable = u
boundary = 'right'
[]
[h]
type = AverageElementSize
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2u]
type = ElementL2FunctorError
approximate = u
exact = exact_u
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2p]
approximate = pressure
exact = exact_p
type = ElementL2FunctorError
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[]
[Outputs]
csv = true
[]
(modules/phase_field/examples/cahn-hilliard/Math_CH.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 100
ny = 100
xmax = 60
ymax = 60
[]
[Variables]
[./c]
order = THIRD
family = HERMITE
[./InitialCondition]
type = RandomIC
min = -0.1
max = 0.1
[../]
[../]
[]
[Kernels]
[./c_dot]
type = TimeDerivative
variable = c
[../]
[./CHbulk]
type = CHMath
variable = c
[../]
[./CHint]
type = CHInterface
variable = c
mob_name = M
kappa_name = kappa_c
[../]
[]
[BCs]
[./Periodic]
[./all]
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
[./mat]
type = GenericConstantMaterial
prop_names = 'M kappa_c'
prop_values = '1.0 0.5'
[../]
[]
[Postprocessors]
[./top]
type = SideIntegralVariablePostprocessor
variable = c
boundary = top
[../]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
scheme = bdf2
# Preconditioning using the additive Schwartz method and LU decomposition
petsc_options_iname = '-pc_type -sub_ksp_type -sub_pc_type'
petsc_options_value = 'asm preonly lu '
# Alternative preconditioning options using Hypre (algebraic multi-grid)
#petsc_options_iname = '-pc_type -pc_hypre_type'
#petsc_options_value = 'hypre boomeramg'
l_tol = 1e-4
l_max_its = 30
dt = 2.0
end_time = 80.0
[]
[Outputs]
exodus = true
perf_graph = true
[]
(modules/navier_stokes/test/tests/finite_volume/pins/channel-flow/2d-rc-action.i)
mu = 1.1
rho = 1.1
[Problem]
error_on_jacobian_nonzero_reallocation = true
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 5
ymin = 0
ymax = 1
nx = 20
ny = 10
[]
[]
[Modules]
[NavierStokesFV]
compressibility = 'incompressible'
porous_medium_treatment = true
density = 'rho'
dynamic_viscosity = 'mu'
porosity = 'porosity'
initial_velocity = '1 1e-6 0'
initial_pressure = 0.0
inlet_boundaries = 'left'
momentum_inlet_types = 'fixed-velocity'
momentum_inlet_function = '1 0'
wall_boundaries = 'top bottom'
momentum_wall_types = 'slip slip'
outlet_boundaries = 'right'
momentum_outlet_types = 'fixed-pressure'
pressure_function = '0'
mass_advection_interpolation = 'average'
momentum_advection_interpolation = 'average'
[]
[]
[FunctorMaterials]
[const]
type = ADGenericFunctorMaterial
prop_names = 'rho mu'
prop_values = '${rho} ${mu}'
[]
[]
[AuxVariables]
[porosity]
family = MONOMIAL
order = CONSTANT
fv = true
initial_condition = 0.5
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
nl_rel_tol = 1e-11
nl_abs_tol = 1e-14
[]
# Some basic Postprocessors to visually examine the solution
[Postprocessors]
[inlet-p]
type = SideIntegralVariablePostprocessor
variable = pressure
boundary = 'left'
[]
[outlet-u]
type = SideIntegralVariablePostprocessor
variable = superficial_vel_x
boundary = 'right'
[]
[]
[Outputs]
exodus = true
[]
(test/tests/postprocessors/postprocessor_dependency/element_side_pp.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 3
ny = 3
elem_type = QUAD9
[]
[Variables]
active = 'u v'
[./u]
order = SECOND
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 2.8
[../]
[../]
[./v]
order = SECOND
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 5.4
[../]
[../]
[]
[Functions]
active = 'force_fn exact_fn left_bc'
[./force_fn]
type = ParsedFunction
expression = '1-x*x+2*t'
[../]
[./exact_fn]
type = ParsedFunction
expression = '(1-x*x)*t'
[../]
[./left_bc]
type = ParsedFunction
expression = t
[../]
[]
[Kernels]
active = '
time_u diff_u ffn_u
time_v diff_v'
[./time_u]
type = TimeDerivative
variable = u
[../]
[./diff_u]
type = Diffusion
variable = u
[../]
[./ffn_u]
type = BodyForce
variable = u
function = force_fn
[../]
[./time_v]
type = TimeDerivative
variable = v
[../]
[./diff_v]
type = Diffusion
variable = v
[../]
[]
[BCs]
active = 'all_u left_v right_v'
[./all_u]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[../]
[./left_v]
type = FunctionDirichletBC
variable = v
boundary = '3'
function = left_bc
[../]
[./right_v]
type = DirichletBC
variable = v
boundary = '1'
value = 0
[../]
[]
[Postprocessors]
[./sidepp]
type = SideIntegralVariablePostprocessor
variable = v
execute_on = timestep_end
boundary = '0 1 2 3'
[../]
[./passsidepp]
type = ElementSidePP
side_pp = sidepp
execute_on = timestep_end
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
dt = 0.1
start_time = 0
end_time = 0.3
[]
[Outputs]
file_base = out
csv = true
[]
(modules/navier_stokes/test/tests/finite_volume/ins/channel-flow/cylindrical/diverging.i)
mu = 1
rho = 1
advected_interp_method = 'average'
velocity_interp_method = 'rc'
[GlobalParams]
rhie_chow_user_object = 'rc'
[]
[UserObjects]
[rc]
type = INSFVRhieChowInterpolator
u = u
v = v
pressure = pressure
[]
[]
[Mesh]
file = diverging.msh
uniform_refine = 2
[]
[Problem]
coord_type = 'RZ'
[]
[Variables]
[u]
type = INSFVVelocityVariable
initial_condition = 1e-15
[]
[v]
type = INSFVVelocityVariable
initial_condition = 1e-15
[]
[pressure]
type = INSFVPressureVariable
[]
[]
[FVKernels]
[mass]
type = INSFVMassAdvection
variable = pressure
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
[]
[u_advection]
type = INSFVMomentumAdvection
variable = u
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
momentum_component = 'x'
[]
[u_viscosity]
type = INSFVMomentumDiffusion
variable = u
mu = ${mu}
momentum_component = 'x'
[]
[u_pressure]
type = INSFVMomentumPressure
variable = u
momentum_component = 'x'
pressure = pressure
[]
[v_advection]
type = INSFVMomentumAdvection
variable = v
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
momentum_component = 'y'
# we can think of the axis as a slip wall boundary, no normal velocity and no viscous shear
[]
[v_viscosity]
type = INSFVMomentumDiffusion
variable = v
mu = ${mu}
momentum_component = 'y'
[]
[v_pressure]
type = INSFVMomentumPressure
variable = v
momentum_component = 'y'
pressure = pressure
[]
[]
[FVBCs]
active = 'inlet-u inlet-v free-slip-wall-u free-slip-wall-v outlet-p axis-u axis-v'
[inlet-u]
type = INSFVInletVelocityBC
boundary = 'bottom'
variable = u
function = 0
[]
[inlet-v]
type = INSFVInletVelocityBC
boundary = 'bottom'
variable = v
function = 1
[]
[free-slip-wall-u]
type = INSFVNaturalFreeSlipBC
boundary = 'right'
variable = u
momentum_component = 'x'
[]
[free-slip-wall-v]
type = INSFVNaturalFreeSlipBC
boundary = 'right'
variable = v
momentum_component = 'y'
[]
[no-slip-wall-u]
type = INSFVNoSlipWallBC
boundary = 'right'
variable = u
function = 0
[]
[no-slip-wall-v]
type = INSFVNoSlipWallBC
boundary = 'right'
variable = v
function = 0
[]
[outlet-p]
type = INSFVOutletPressureBC
boundary = 'top'
variable = pressure
function = 0
[]
[axis-u]
type = INSFVSymmetryVelocityBC
boundary = 'left'
variable = u
u = u
v = v
mu = ${mu}
momentum_component = x
[]
[axis-v]
type = INSFVSymmetryVelocityBC
boundary = 'left'
variable = v
u = u
v = v
mu = ${mu}
momentum_component = y
[]
[axis-p]
type = INSFVSymmetryPressureBC
boundary = 'left'
variable = 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
[]
[Debug]
show_var_residual_norms = true
[]
[Postprocessors]
[in]
type = SideIntegralVariablePostprocessor
variable = v
boundary = 'bottom'
[]
[out]
type = SideIntegralVariablePostprocessor
variable = v
boundary = 'top'
[]
[num_lin]
type = NumLinearIterations
outputs = 'console'
[]
[num_nl]
type = NumNonlinearIterations
outputs = 'console'
[]
[cum_lin]
type = CumulativeValuePostprocessor
outputs = 'console'
postprocessor = 'num_lin'
[]
[cum_nl]
type = CumulativeValuePostprocessor
outputs = 'console'
postprocessor = 'num_nl'
[]
[]
[Outputs]
exodus = true
csv = true
[]
(test/tests/outputs/debug/show_execution_userobjects.i)
[Mesh]
[cmg]
type = CartesianMeshGenerator
dim = 2
dx = '1.5 2.4'
dy = '1.3 0.9'
ix = '3 2'
iy = '2 3'
subdomain_id = '0 1
1 0'
[]
[add_interface]
type = SideSetsBetweenSubdomainsGenerator
input = 'cmg'
primary_block = 0
paired_block = 1
new_boundary = 'interface'
[]
second_order = true
[]
[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 = SECOND
family = HIERARCHIC
[]
[v]
order = SECOND
family = LAGRANGE
initial_condition = 1
[]
[]
[AuxVariables]
[v_elem]
order = CONSTANT
family = MONOMIAL
[]
[]
[Kernels]
active = 'diff1 diff2 test1 forceu forcev react'
[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
[]
[]
[AuxKernels]
[set_v_elem]
type = FunctionAux
variable = v_elem
# selected not to be the solution for no particular reason
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'
[]
[]
[Postprocessors]
# Global user objects
[dofs]
type = NumDOFs
[]
[h]
type = AverageElementSize
[]
# Elemental user objects
[L2u]
type = ElementL2Error
variable = u
function = slnu
# Testing an option
force_preic = true
[]
[L2v]
type = ElementL2Error
variable = v
function = slnv
# Testing an option
force_preaux = true
[]
[H1error]
type = ElementH1Error
variable = u
function = slnu
[]
[H1Semierror]
type = ElementH1SemiError
variable = u
function = slnu
[]
[L2v_elem]
type = ElementL2Error
variable = v_elem
function = slnv
[]
[f_integral]
type = FunctionElementIntegral
function = slnv
[]
[int_v]
type = ElementIntegralVariablePostprocessor
variable = v
block = 1
execute_on = 'TIMESTEP_END transfer'
[]
[int_v_elem]
type = ElementIntegralVariablePostprocessor
variable = v_elem
block = 1
execute_on = 'TIMESTEP_END transfer'
[]
# Side user objects
[integral_v]
type = SideIntegralVariablePostprocessor
variable = v
boundary = 0
[]
[]
[VectorPostprocessors]
# General UOs
[memory]
type = VectorMemoryUsage
[]
[line]
type = LineValueSampler
variable = v
num_points = 10
start_point = '0 0 0'
end_point = '0.5 0.5 0'
sort_by = 'x'
[]
# Nodal UOs
[nodal_sampler_y]
type = NodalValueSampler
variable = v
sort_by = 'y'
[]
[nodal_sampler_x]
type = NodalValueSampler
variable = v
sort_by = 'x'
[]
# Element UO
[elem_sample]
type = ElementValueSampler
variable = v_elem
sort_by = 'x'
[]
[]
[UserObjects]
# Nodal user objects
[find_node]
type = NearestNodeNumberUO
point = '0.5 0.5 0'
[]
# Side user objects
[side_int]
type = LayeredSideIntegral
variable = v
boundary = 0
direction = y
num_layers = 4
[]
[side_int_2]
type = NearestPointLayeredSideIntegral
variable = v
boundary = 0
direction = x
num_layers = 3
points = '1 1 0'
[]
# Interface user objects
[values]
type = InterfaceQpValueUserObject
var = v
boundary = interface
[]
inactive = 'prime_1 prime_2'
# Threaded general user objects
[prime_2]
type = PrimeProductUserObject
[]
[prime_1]
type = PrimeProductUserObject
[]
# Domain user objects
[domain_2]
type = InterfaceDomainUserObject
u = u
v = v
block = '0'
robin_boundaries = 'left'
interface_boundaries = 'interface'
interface_penalty = 1e-10
nl_abs_tol = 1e1
[]
[domain_1]
type = InterfaceDomainUserObject
u = u
v = v
block = '0 1'
robin_boundaries = 'left'
interface_boundaries = 'interface'
interface_penalty = 1e-10
nl_abs_tol = 1e1
[]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
nl_rel_tol = 1e-10
nl_abs_tol = 1e-10
l_tol = 1e-5
[]
[Problem]
kernel_coverage_check = false
[]
[MultiApps]
active = ''
[full_solve]
type = FullSolveMultiApp
execute_on = 'initial timestep_end final'
input_files = show_execution_userobjects.i
cli_args = 'Problem/solve=false'
[]
[]
[Transfers]
active = ''
[conservative]
type = MultiAppNearestNodeTransfer
from_multi_app = full_solve
source_variable = v
variable = v_elem
from_postprocessors_to_be_preserved = int_v
to_postprocessors_to_be_preserved = int_v_elem
[]
[]
[Debug]
show_execution_order = 'ALWAYS INITIAL NONLINEAR LINEAR TIMESTEP_BEGIN TIMESTEP_END FINAL'
[]
(modules/navier_stokes/test/tests/finite_volume/ins/channel-flow/cylindrical/2d-rc-slip.i)
mu = 1.1
rho = 1.1
advected_interp_method = 'average'
velocity_interp_method = 'rc'
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 2
ymin = 0
ymax = 10
nx = 10
ny = 50
[]
[]
[Problem]
coord_type = 'RZ'
[]
[GlobalParams]
rhie_chow_user_object = 'rc'
[]
[UserObjects]
[rc]
type = INSFVRhieChowInterpolator
u = u
v = v
pressure = pressure
[]
[]
[Variables]
[u]
type = INSFVVelocityVariable
initial_condition = 1
[]
[v]
type = INSFVVelocityVariable
initial_condition = 1
[]
[pressure]
type = INSFVPressureVariable
[]
[]
[FVKernels]
[mass]
type = INSFVMassAdvection
variable = pressure
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
[]
[u_advection]
type = INSFVMomentumAdvection
variable = u
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
momentum_component = 'x'
[]
[u_viscosity]
type = INSFVMomentumDiffusion
variable = u
mu = ${mu}
momentum_component = 'x'
[]
[u_pressure]
type = INSFVMomentumPressure
variable = u
momentum_component = 'x'
pressure = pressure
[]
[v_advection]
type = INSFVMomentumAdvection
variable = v
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
momentum_component = 'y'
[]
[v_viscosity]
type = INSFVMomentumDiffusion
variable = v
mu = ${mu}
momentum_component = 'y'
[]
[v_pressure]
type = INSFVMomentumPressure
variable = v
momentum_component = 'y'
pressure = pressure
[]
[]
[FVBCs]
[inlet-u]
type = INSFVInletVelocityBC
boundary = 'bottom'
variable = u
function = 0
[]
[inlet-v]
type = INSFVInletVelocityBC
boundary = 'bottom'
variable = v
function = 1
[]
[free-slip-wall-u]
type = INSFVNaturalFreeSlipBC
boundary = 'right'
variable = u
momentum_component = 'x'
[]
[free-slip-wall-v]
type = INSFVNaturalFreeSlipBC
boundary = 'right'
variable = v
momentum_component = 'y'
[]
[outlet-p]
type = INSFVOutletPressureBC
boundary = 'top'
variable = pressure
function = 0
[]
[axis-u]
type = INSFVSymmetryVelocityBC
boundary = 'left'
variable = u
u = u
v = v
mu = ${mu}
momentum_component = x
[]
[axis-v]
type = INSFVSymmetryVelocityBC
boundary = 'left'
variable = v
u = u
v = v
mu = ${mu}
momentum_component = y
[]
[axis-p]
type = INSFVSymmetryPressureBC
boundary = 'left'
variable = pressure
[]
[]
[Postprocessors]
[in]
type = SideIntegralVariablePostprocessor
variable = v
boundary = 'bottom'
outputs = 'csv'
[]
[out]
type = SideIntegralVariablePostprocessor
variable = v
boundary = 'top'
outputs = 'csv'
[]
[]
[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
csv = true
[]
(modules/navier_stokes/test/tests/finite_volume/pins/channel-flow/2d-rc-rz-by-parts.i)
mu = 1.1
rho = 1
advected_interp_method = 'average'
velocity_interp_method = 'rc'
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 5
ymin = 0
ymax = 1
nx = 40
ny = 10
[]
coord_type = 'RZ'
rz_coord_axis = 'X'
[]
[GlobalParams]
rhie_chow_user_object = 'rc'
[]
[UserObjects]
[rc]
type = PINSFVRhieChowInterpolator
u = u
v = v
pressure = pressure
porosity = porosity
[]
[]
[Variables]
[u]
type = PINSFVSuperficialVelocityVariable
initial_condition = 1
[]
[v]
type = PINSFVSuperficialVelocityVariable
initial_condition = 1e-6
[]
[pressure]
type = INSFVPressureVariable
[]
[]
[AuxVariables]
[porosity]
family = MONOMIAL
order = CONSTANT
fv = true
initial_condition = 0.5
[]
[]
[FVKernels]
inactive = 'v_pressure_volumetric'
[mass]
type = PINSFVMassAdvection
variable = pressure
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
[]
[u_advection]
type = PINSFVMomentumAdvection
variable = u
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
porosity = porosity
momentum_component = 'x'
[]
[u_viscosity]
type = PINSFVMomentumDiffusion
variable = u
mu = ${mu}
porosity = porosity
momentum_component = 'x'
[]
[u_pressure]
type = PINSFVMomentumPressureFlux
variable = u
momentum_component = 'x'
pressure = pressure
porosity = porosity
[]
[u_friction]
type = PINSFVMomentumFriction
variable = u
momentum_component = 'x'
Darcy_name = 'Darcy_coefficient'
Forchheimer_name = 'Forchheimer_coefficient'
rho = ${rho}
speed = speed
mu = ${mu}
[]
[v_advection]
type = PINSFVMomentumAdvection
variable = v
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
porosity = porosity
momentum_component = 'y'
[]
[v_viscosity]
type = PINSFVMomentumDiffusion
variable = v
mu = ${mu}
porosity = porosity
momentum_component = 'y'
[]
[v_pressure_volumetric]
type = PINSFVMomentumPressure
variable = v
momentum_component = 'y'
pressure = pressure
porosity = porosity
[]
[v_pressure_by_parts_flux]
type = PINSFVMomentumPressureFlux
variable = v
momentum_component = 'y'
pressure = pressure
porosity = porosity
[]
[v_pressure_by_parts_volume_term]
type = PNSFVMomentumPressureFluxRZ
variable = v
pressure = pressure
porosity = porosity
momentum_component = 'y'
[]
[v_friction]
type = PINSFVMomentumFriction
variable = v
momentum_component = 'y'
Darcy_name = 'Darcy_coefficient'
Forchheimer_name = 'Forchheimer_coefficient'
rho = ${rho}
speed = speed
mu = ${mu}
[]
[]
[FVBCs]
inactive = 'free-slip-u free-slip-v'
[inlet-u]
type = INSFVInletVelocityBC
boundary = 'left'
variable = u
function = '1'
[]
[inlet-v]
type = INSFVInletVelocityBC
boundary = 'left'
variable = v
function = 0
[]
[no-slip-u]
type = INSFVNoSlipWallBC
boundary = 'top'
variable = u
function = 0
[]
[no-slip-v]
type = INSFVNoSlipWallBC
boundary = 'top'
variable = v
function = 0
[]
[free-slip-u]
type = INSFVNaturalFreeSlipBC
boundary = 'top'
variable = u
momentum_component = 'x'
[]
[free-slip-v]
type = INSFVNaturalFreeSlipBC
boundary = 'top'
variable = v
momentum_component = 'y'
[]
[symmetry-u]
type = PINSFVSymmetryVelocityBC
boundary = 'bottom'
variable = u
u = u
v = v
mu = ${mu}
momentum_component = 'x'
[]
[symmetry-v]
type = PINSFVSymmetryVelocityBC
boundary = 'bottom'
variable = v
u = u
v = v
mu = ${mu}
momentum_component = 'y'
[]
[symmetry-p]
type = INSFVSymmetryPressureBC
boundary = 'bottom'
variable = pressure
[]
[outlet-p]
type = INSFVOutletPressureBC
boundary = 'right'
variable = pressure
function = 0
[]
[]
[FunctorMaterials]
[darcy]
type = ADGenericVectorFunctorMaterial
prop_names = 'Darcy_coefficient Forchheimer_coefficient'
prop_values = '0.1 0.1 0.1 0.1 0.1 0.1'
[]
[speed]
type = PINSFVSpeedFunctorMaterial
superficial_vel_x = u
superficial_vel_y = v
porosity = porosity
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
line_search = 'none'
nl_rel_tol = 1e-11
nl_abs_tol = 1e-14
[]
# Some basic Postprocessors to visually examine the solution
[Postprocessors]
[inlet-p]
type = SideAverageValue
variable = pressure
boundary = 'left'
[]
[outlet-u]
type = SideIntegralVariablePostprocessor
variable = u
boundary = 'right'
[]
[]
[Outputs]
exodus = true
[]
(test/tests/postprocessors/displaced_mesh/side.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
displacements = 'ux uy'
[]
[AuxVariables]
[./ux]
[./InitialCondition]
type = FunctionIC
function = x
[../]
[../]
[./uy]
[./InitialCondition]
type = FunctionIC
function = y
[../]
[../]
[./c]
initial_condition = 1
[../]
[]
[Variables]
[./a]
[../]
[]
[Kernels]
[./a]
type = Diffusion
variable = a
[../]
[]
[Postprocessors]
[./without]
type = SideIntegralVariablePostprocessor
variable = c
execute_on = initial
boundary = left
[../]
[./with]
type = SideIntegralVariablePostprocessor
variable = c
use_displaced_mesh = true
execute_on = initial
boundary = left
[../]
[]
[Problem]
solve = false
[]
[Executioner]
type = Transient
num_steps = 0
[]
[Outputs]
[./out]
type = Exodus
[../]
[]
(modules/navier_stokes/test/tests/finite_volume/pins/channel-flow/porosity_jump/bernoulli-1d.i)
rho = 1.1
advected_interp_method = 'upwind'
velocity_interp_method = 'rc'
[Mesh]
[mesh]
type = CartesianMeshGenerator
dim = 1
dx = '1 1'
ix = '3 3'
subdomain_id = '1 2'
[]
[]
[GlobalParams]
rhie_chow_user_object = 'rc'
[]
[UserObjects]
[rc]
type = PINSFVRhieChowInterpolator
u = u
pressure = pressure
porosity = porosity
[]
[]
[Variables]
[u]
type = PINSFVSuperficialVelocityVariable
initial_condition = 1
[]
[pressure]
type = BernoulliPressureVariable
u = u
porosity = porosity
rho = ${rho}
[]
[]
[AuxVariables]
[porosity]
type = PiecewiseConstantVariable
[]
[has_porosity_jump_face]
type = MooseVariableFVReal
[]
[]
[AuxKernels]
[has_porosity_jump_face]
type = HasPorosityJumpFace
porosity = porosity
execute_on = 'initial timestep_end'
variable = has_porosity_jump_face
[]
[]
[ICs]
[porosity_1]
type = ConstantIC
variable = porosity
block = 1
value = 1
[]
[porosity_2]
type = ConstantIC
variable = porosity
block = 2
value = 0.5
[]
[]
[FVKernels]
[mass]
type = PINSFVMassAdvection
variable = pressure
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
[]
[u_advection]
type = PINSFVMomentumAdvection
variable = u
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
porosity = porosity
momentum_component = 'x'
[]
[u_pressure]
type = PINSFVMomentumPressure
variable = u
pressure = pressure
porosity = porosity
momentum_component = 'x'
[]
[]
[FVBCs]
[inlet-u]
type = INSFVInletVelocityBC
boundary = 'left'
variable = u
function = '1'
[]
[outlet_p]
type = INSFVOutletPressureBC
boundary = 'right'
variable = pressure
function = 1
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
line_search = 'none'
[]
[Postprocessors]
[inlet_p]
type = SideAverageValue
variable = 'pressure'
boundary = 'left'
[]
[outlet-u]
type = SideIntegralVariablePostprocessor
variable = u
boundary = 'right'
[]
[]
[Outputs]
exodus = true
csv = true
[]
(test/tests/postprocessors/side_integral/side_integral_fv_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
xmin = 0
xmax = 4
ymin = 0
ymax = 1
[]
[Variables]
active = 'u'
[./u]
family = MONOMIAL
order = CONSTANT
fv = true
[../]
[]
[FVKernels]
active = 'diff'
[./diff]
type = FVDiffusion
variable = u
coeff = '1'
[../]
[]
[FVBCs]
active = 'left right'
[./left]
type = FVDirichletBC
variable = u
boundary = 3
value = 0
[../]
[./right]
type = FVDirichletBC
variable = u
boundary = 1
value = 1
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Postprocessors]
[./integral]
type = SideIntegralVariablePostprocessor
boundary = 0
variable = u
[../]
[]
[Outputs]
file_base = fv_out
exodus = true
[]
(test/tests/postprocessors/side_advection_flux_integral/side_advection_flux_integral.i)
[Mesh]
[cmg]
type = CartesianMeshGenerator
dim = 2
dx = '0.75 0.75 0.75'
dy = '0.75 0.75 0.75'
ix = '2 2 2'
iy = '2 2 2'
subdomain_id = '1 1 1
1 2 1
1 1 1'
[]
[add_inner_boundaries_top]
type = SideSetsAroundSubdomainGenerator
input = cmg
new_boundary = 'block_2_top'
block = 2
normal = '0 1 0'
[]
[add_inner_boundaries_bot]
type = SideSetsAroundSubdomainGenerator
input = add_inner_boundaries_top
new_boundary = 'block_2_bot'
block = 2
normal = '0 -1 0'
[]
[add_inner_boundaries_right]
type = SideSetsAroundSubdomainGenerator
input = add_inner_boundaries_bot
new_boundary = 'block_2_right'
block = 2
normal = '1 0 0'
[]
[add_inner_boundaries_left]
type = SideSetsAroundSubdomainGenerator
input = add_inner_boundaries_right
new_boundary = 'block_2_left'
block = 2
normal = '-1 0 0'
[]
[]
[Variables]
[u]
[]
[]
[ICs]
[u_blob]
type = FunctionIC
variable = u
function = 'if(x<0.75,if(y<0.75,1,0),0)'
[]
[]
[Kernels]
[udot]
type = MassLumpedTimeDerivative
variable = u
[]
[u_advec]
type = ConservativeAdvection
variable = u
upwinding_type = full
velocity = '2 1.5 0'
[]
[]
[BCs]
[outflow]
type = OutflowBC
boundary = 'right top'
variable = u
velocity = '2 1.5 0'
[]
[]
[AuxVariables]
[flux_x]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[flux_x]
type = AdvectiveFluxAux
variable = flux_x
vel_x = 2
vel_y = 1.5
component = x
advected_variable = u
boundary = 'block_2_right block_2_left'
[]
[]
[Executioner]
type = Transient
solve_type = LINEAR
dt = 0.01
end_time = 0.02
l_tol = 1E-14
[]
[Postprocessors]
[flux_right]
type = SideIntegralVariablePostprocessor
variable = flux_x
boundary = 'block_2_right'
[]
[flux_right_exact]
type = SideAdvectiveFluxIntegral
boundary = 'block_2_right'
vel_x = 2
vel_y = 1.5
component = x
advected_variable = u
[]
[flux_left]
type = SideIntegralVariablePostprocessor
variable = flux_x
boundary = 'block_2_left'
[]
[flux_left_exact]
type = SideAdvectiveFluxIntegral
boundary = 'block_2_left'
vel_x = 2
vel_y = 1.5
component = x
advected_variable = u
[]
[]
[Outputs]
csv = true
[]
(test/tests/postprocessors/side_integral/side_integral_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
xmin = 0
xmax = 4
ymin = 0
ymax = 1
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
active = 'diff'
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
active = 'left right'
[./left]
type = DirichletBC
variable = u
boundary = 3
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = 1
value = 1
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Postprocessors]
[./integral]
type = SideIntegralVariablePostprocessor
boundary = 0
variable = u
[../]
[]
[Outputs]
file_base = out
exodus = true
[]
(modules/navier_stokes/test/tests/finite_volume/pins/mms/porosity_change/1d-rc-continuous.i)
mu = 1.5
rho = 1.1
advected_interp_method = 'average'
velocity_interp_method = 'rc'
[Mesh]
[mesh]
type = CartesianMeshGenerator
dim = 1
dx = '1 1'
ix = '15 15'
[]
[]
[GlobalParams]
rhie_chow_user_object = 'rc'
[]
[UserObjects]
[rc]
type = PINSFVRhieChowInterpolator
u = u
porosity = porosity
pressure = pressure
[]
[]
[Problem]
error_on_jacobian_nonzero_reallocation = true
[]
[Variables]
[u]
type = PINSFVSuperficialVelocityVariable
initial_condition = 1
[]
[pressure]
type = INSFVPressureVariable
[]
[]
[AuxVariables]
[porosity]
family = MONOMIAL
order = CONSTANT
fv = true
[]
[]
[ICs]
[porosity_continuous]
type = FunctionIC
variable = porosity
function = smooth_jump
[]
[]
[Functions]
[smooth_jump]
type = ParsedFunction
expression = '1 - 0.5 * 1 / (1 + exp(-30*(x-1)))'
[]
# Generated by compute-functions-1d.py
[exact_u]
type = ParsedFunction
expression = 'cos((1/2)*x*pi)'
[]
[forcing_u]
type = ParsedFunction
expression = '-mu*(1 - 0.5/(exp(30 - 30*x) + 1))*(-1/4*pi^2*cos((1/2)*x*pi)/(1 - 0.5/(exp(30 - 30*x) + 1)) - 15.0*pi*exp(30 - 30*x)*sin((1/2)*x*pi)/((1 - 0.5/(exp(30 - 30*x) + 1))^2*(exp(30 - 30*x) + 1)^2) - 450.0*exp(30 - 30*x)*cos((1/2)*x*pi)/((1 - 0.5/(exp(30 - 30*x) + 1))^2*(exp(30 - 30*x) + 1)^2) + 900.0*exp(60 - 60*x)*cos((1/2)*x*pi)/((1 - 0.5/(exp(30 - 30*x) + 1))^2*(exp(30 - 30*x) + 1)^3) + 450.0*exp(60 - 60*x)*cos((1/2)*x*pi)/((1 - 0.5/(exp(30 - 30*x) + 1))^3*(exp(30 - 30*x) + 1)^4)) + 15.0*mu*(-1/2*pi*sin((1/2)*x*pi)/(1 - 0.5/(exp(30 - 30*x) + 1)) + 15.0*exp(30 - 30*x)*cos((1/2)*x*pi)/((1 - 0.5/(exp(30 - 30*x) + 1))^2*(exp(30 - 30*x) + 1)^2))*exp(30 - 30*x)/(exp(30 - 30*x) + 1)^2 - pi*rho*sin((1/2)*x*pi)*cos((1/2)*x*pi)/(1 - 0.5/(exp(30 - 30*x) + 1)) + 15.0*rho*exp(30 - 30*x)*cos((1/2)*x*pi)^2/((1 - 0.5/(exp(30 - 30*x) + 1))^2*(exp(30 - 30*x) + 1)^2) + (1 - 0.5/(exp(30 - 30*x) + 1))*cos(x)'
symbol_names = 'mu rho'
symbol_values = '${mu} ${rho}'
[]
[exact_p]
type = ParsedFunction
expression = 'sin(x)'
[]
[forcing_p]
type = ParsedFunction
expression = '-1/2*pi*rho*sin((1/2)*x*pi)'
symbol_names = 'rho'
symbol_values = '${rho}'
[]
[]
[FVKernels]
[mass]
type = PINSFVMassAdvection
variable = pressure
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
[]
[mass_forcing]
type = FVBodyForce
variable = pressure
function = forcing_p
[]
[u_advection]
type = PINSFVMomentumAdvection
variable = u
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
porosity = porosity
momentum_component = 'x'
[]
[u_viscosity]
type = PINSFVMomentumDiffusion
variable = u
mu = ${mu}
porosity = porosity
momentum_component = 'x'
[]
[u_pressure]
type = PINSFVMomentumPressure
variable = u
pressure = pressure
porosity = porosity
momentum_component = 'x'
[]
[u_forcing]
type = INSFVBodyForce
variable = u
functor = forcing_u
momentum_component = 'x'
[]
[]
[FVBCs]
[inlet-u]
type = INSFVInletVelocityBC
boundary = 'left'
variable = u
functor = 'exact_u'
[]
[outlet_p]
type = INSFVOutletPressureBC
boundary = 'right'
variable = pressure
function = 'exact_p'
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_pc_type -sub_pc_factor_shift_type'
petsc_options_value = 'asm 200 lu NONZERO'
line_search = 'none'
# ksp_gmres_restart bumped to 200 for linear convergence
nl_max_its = 100
[]
[Postprocessors]
[inlet_p]
type = SideAverageValue
variable = 'pressure'
boundary = 'left'
[]
[outlet-u]
type = SideIntegralVariablePostprocessor
variable = u
boundary = 'right'
[]
[h]
type = AverageElementSize
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2u]
type = ElementL2FunctorError
approximate = u
exact = exact_u
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2p]
approximate = pressure
exact = exact_p
type = ElementL2FunctorError
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[]
[Outputs]
csv = true
[]
(modules/navier_stokes/test/tests/finite_volume/ins/channel-flow/1d-rc.i)
mu = 1.1
rho = 1.1
advected_interp_method = 'upwind'
velocity_interp_method = 'rc'
[Mesh]
[mesh]
type = CartesianMeshGenerator
dim = 1
dx = '1 1'
ix = '30 30'
subdomain_id = '1 2'
[]
[]
[GlobalParams]
rhie_chow_user_object = 'rc'
[]
[UserObjects]
[rc]
type = INSFVRhieChowInterpolator
u = u
pressure = pressure
[]
[]
[Variables]
[u]
type = INSFVVelocityVariable
initial_condition = 1
[]
[pressure]
type = INSFVPressureVariable
[]
[]
[FVKernels]
[mass]
type = INSFVMassAdvection
variable = pressure
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
[]
[u_advection]
type = INSFVMomentumAdvection
variable = u
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
momentum_component = 'x'
[]
[u_viscosity]
type = INSFVMomentumDiffusion
variable = u
mu = ${mu}
momentum_component = 'x'
[]
[u_pressure]
type = INSFVMomentumPressure
variable = u
momentum_component = 'x'
pressure = pressure
[]
[]
[FVBCs]
[inlet-u]
type = INSFVInletVelocityBC
boundary = 'left'
variable = u
function = '1'
[]
[outlet_p]
type = INSFVOutletPressureBC
boundary = 'right'
variable = pressure
function = 1
[]
[]
[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
[]
[Postprocessors]
[inlet_p]
type = SideAverageValue
variable = 'pressure'
boundary = 'left'
[]
[outlet-u]
type = SideIntegralVariablePostprocessor
variable = u
boundary = 'right'
[]
[]
[Outputs]
exodus = true
csv = true
[]
(modules/navier_stokes/test/tests/finite_volume/ins/channel-flow/cylindrical/no-slip-tris-action.i)
mu = 1
rho = 1
[Mesh]
type = GeneratedMesh
nx = 4
ny = 4
xmax = 3.9
ymax = 4.1
elem_type = TRI3
dim = 2
[]
[Problem]
coord_type = 'RZ'
[]
[Modules]
[NavierStokesFV]
compressibility = 'incompressible'
density = 'rho'
dynamic_viscosity = 'mu'
porosity = 'porosity'
initial_velocity = '1e-15 1e-15 0'
initial_pressure = 0.0
inlet_boundaries = 'bottom'
momentum_inlet_types = 'fixed-velocity'
momentum_inlet_function = '0 1'
wall_boundaries = 'left right'
momentum_wall_types = 'symmetry noslip'
outlet_boundaries = 'top'
momentum_outlet_types = 'fixed-pressure'
pressure_function = '0'
momentum_two_term_bc_expansion = true
pressure_two_term_bc_expansion = true
mass_advection_interpolation = 'average'
momentum_advection_interpolation = 'average'
[]
[]
[FunctorMaterials]
[const]
type = ADGenericFunctorMaterial
prop_names = 'rho mu'
prop_values = '${rho} ${mu}'
[]
[]
[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
[]
[Postprocessors]
[in]
type = SideIntegralVariablePostprocessor
variable = vel_y
boundary = 'bottom'
[]
[out]
type = SideIntegralVariablePostprocessor
variable = vel_y
boundary = 'top'
[]
[num_lin]
type = NumLinearIterations
outputs = 'console'
[]
[num_nl]
type = NumNonlinearIterations
outputs = 'console'
[]
[cum_lin]
type = CumulativeValuePostprocessor
outputs = 'console'
postprocessor = 'num_lin'
[]
[cum_nl]
type = CumulativeValuePostprocessor
outputs = 'console'
postprocessor = 'num_nl'
[]
[]
[Outputs]
exodus = true
csv = true
[]
(modules/solid_mechanics/test/tests/lagrangian/cartesian/total/special/area.i)
# Simple 3D test
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
large_kinematics = true
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[]
[Mesh]
[msh]
type = GeneratedMeshGenerator
dim = 3
nx = 1
ny = 1
nz = 1
[]
[]
[Kernels]
[sdx]
type = TotalLagrangianStressDivergence
variable = disp_x
component = 0
[]
[sdy]
type = TotalLagrangianStressDivergence
variable = disp_y
component = 1
[]
[sdz]
type = TotalLagrangianStressDivergence
variable = disp_z
component = 2
[]
[]
[AuxVariables]
[stress_zz]
order = CONSTANT
family = MONOMIAL
[]
[]
[Functions]
[zstress]
type = PiecewiseLinear
x = '0 1'
y = '0 500'
[]
[constant]
type = ConstantFunction
value = 1.0
[]
[ratio]
type = ParsedFunction
symbol_names = 'sd su'
symbol_values = 's_def s_undef'
expression = 'sd / su'
[]
[]
[BCs]
[leftx]
type = DirichletBC
preset = true
boundary = left
variable = disp_x
value = 0.0
[]
[boty]
type = DirichletBC
preset = true
boundary = bottom
variable = disp_y
value = 0.0
[]
[backz]
type = DirichletBC
preset = true
boundary = back
variable = disp_z
value = 0.0
[]
[pull_z]
type = FunctionNeumannBC
boundary = front
variable = disp_z
function = zstress
[]
[]
[AuxKernels]
[stress_zz]
type = RankTwoAux
rank_two_tensor = cauchy_stress
variable = stress_zz
index_i = 2
index_j = 2
execute_on = timestep_end
[]
[]
[Materials]
[elastic_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1000.0
poissons_ratio = 0.25
[]
[compute_stress]
type = ComputeLagrangianLinearElasticStress
[]
[compute_strain]
type = ComputeLagrangianStrain
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
[s_undef]
type = SideIntegralVariablePostprocessor
variable = stress_zz
boundary = front
[]
[s_def]
type = SideIntegralVariablePostprocessor
variable = stress_zz
boundary = front
use_displaced_mesh = true
[]
[area_calc]
type = FunctionValuePostprocessor
function = ratio
[]
[area]
type = AreaPostprocessor
boundary = front
use_displaced_mesh = true
[]
[]
[Executioner]
type = Transient
solve_type = 'newton'
line_search = none
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
l_max_its = 2
l_tol = 1e-14
nl_max_its = 15
nl_rel_tol = 1e-8
nl_abs_tol = 1e-10
start_time = 0.0
dt = 1.0
dtmin = 1.0
end_time = 1.0
[]
[Outputs]
exodus = false
csv = true
[]
(modules/solid_mechanics/test/tests/lagrangian/cartesian/updated/special/area.i)
# Simple 3D test
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
large_kinematics = true
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[]
[Mesh]
[msh]
type = GeneratedMeshGenerator
dim = 3
nx = 1
ny = 1
nz = 1
[]
[]
[Kernels]
[sdx]
type = UpdatedLagrangianStressDivergence
variable = disp_x
component = 0
use_displaced_mesh = true
[]
[sdy]
type = UpdatedLagrangianStressDivergence
variable = disp_y
component = 1
use_displaced_mesh = true
[]
[sdz]
type = UpdatedLagrangianStressDivergence
variable = disp_z
component = 2
use_displaced_mesh = true
[]
[]
[AuxVariables]
[stress_zz]
order = CONSTANT
family = MONOMIAL
[]
[]
[Functions]
[zstress]
type = PiecewiseLinear
x = '0 1'
y = '0 500'
[]
[constant]
type = ConstantFunction
value = 1.0
[]
[ratio]
type = ParsedFunction
symbol_names = 'sd su'
symbol_values = 's_def s_undef'
expression = 'sd / su'
[]
[]
[BCs]
[leftx]
type = DirichletBC
preset = true
boundary = left
variable = disp_x
value = 0.0
[]
[boty]
type = DirichletBC
preset = true
boundary = bottom
variable = disp_y
value = 0.0
[]
[backz]
type = DirichletBC
preset = true
boundary = back
variable = disp_z
value = 0.0
[]
[pull_z]
type = FunctionNeumannBC
boundary = front
variable = disp_z
function = zstress
[]
[]
[AuxKernels]
[stress_zz]
type = RankTwoAux
rank_two_tensor = cauchy_stress
variable = stress_zz
index_i = 2
index_j = 2
execute_on = timestep_end
[]
[]
[Materials]
[elastic_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1000.0
poissons_ratio = 0.25
[]
[compute_stress]
type = ComputeLagrangianLinearElasticStress
[]
[compute_strain]
type = ComputeLagrangianStrain
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
[s_undef]
type = SideIntegralVariablePostprocessor
variable = stress_zz
boundary = front
[]
[s_def]
type = SideIntegralVariablePostprocessor
variable = stress_zz
boundary = front
use_displaced_mesh = true
[]
[area_calc]
type = FunctionValuePostprocessor
function = ratio
[]
[area]
type = AreaPostprocessor
boundary = front
use_displaced_mesh = true
[]
[]
[Executioner]
type = Transient
solve_type = 'newton'
line_search = none
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
l_max_its = 2
l_tol = 1e-14
nl_max_its = 15
nl_rel_tol = 1e-8
nl_abs_tol = 1e-10
start_time = 0.0
dt = 1.0
dtmin = 1.0
end_time = 1.0
[]
[Outputs]
exodus = false
csv = true
[]
(modules/navier_stokes/test/tests/finite_volume/ins/channel-flow/cylindrical/2d-average-no-slip.i)
mu = 1
rho = 1
advected_interp_method = 'average'
velocity_interp_method = 'average'
[GlobalParams]
rhie_chow_user_object = 'rc'
[]
[UserObjects]
[rc]
type = INSFVRhieChowInterpolator
u = u
v = v
pressure = pressure
[]
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 4
nx = 10
ny = 40
[]
[]
[Problem]
coord_type = 'RZ'
[]
[Variables]
[u]
type = INSFVVelocityVariable
initial_condition = 1
[]
[v]
type = INSFVVelocityVariable
initial_condition = 1
[]
[pressure]
type = INSFVPressureVariable
[]
[]
[FVKernels]
[mass]
type = INSFVMassAdvection
variable = pressure
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
[]
[u_advection]
type = INSFVMomentumAdvection
variable = u
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
momentum_component = 'x'
[]
[u_viscosity]
type = INSFVMomentumDiffusion
variable = u
mu = ${mu}
momentum_component = 'x'
[]
[u_pressure]
type = INSFVMomentumPressure
variable = u
momentum_component = 'x'
pressure = pressure
[]
[v_advection]
type = INSFVMomentumAdvection
variable = v
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
momentum_component = 'y'
[]
[v_viscosity]
type = INSFVMomentumDiffusion
variable = v
mu = ${mu}
momentum_component = 'y'
[]
[v_pressure]
type = INSFVMomentumPressure
variable = v
momentum_component = 'y'
pressure = pressure
[]
[]
[FVBCs]
[inlet-u]
type = INSFVInletVelocityBC
boundary = 'bottom'
variable = u
function = 0
[]
[inlet-v]
type = INSFVInletVelocityBC
boundary = 'bottom'
variable = v
function = 1
[]
[no-slip-wall-u]
type = INSFVNoSlipWallBC
boundary = 'right'
variable = u
function = 0
[]
[no-slip-wall-v]
type = INSFVNoSlipWallBC
boundary = 'right'
variable = v
function = 0
[]
[outlet-p]
type = INSFVOutletPressureBC
boundary = 'top'
variable = pressure
function = 0
[]
[axis-u]
type = INSFVSymmetryVelocityBC
boundary = 'left'
variable = u
u = u
v = v
mu = ${mu}
momentum_component = x
[]
[axis-v]
type = INSFVSymmetryVelocityBC
boundary = 'left'
variable = v
u = u
v = v
mu = ${mu}
momentum_component = y
[]
[axis-p]
type = INSFVSymmetryPressureBC
boundary = 'left'
variable = pressure
[]
[]
[Postprocessors]
[in]
type = SideIntegralVariablePostprocessor
variable = v
boundary = 'bottom'
[]
[out]
type = SideIntegralVariablePostprocessor
variable = v
boundary = 'top'
[]
[]
[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
csv = true
[]
(modules/navier_stokes/test/tests/finite_volume/pins/channel-flow/porosity_jump/1d-rc-epsjump.i)
mu = 1.1
rho = 1.1
advected_interp_method = 'upwind'
velocity_interp_method = 'rc'
[Mesh]
[mesh]
type = CartesianMeshGenerator
dim = 1
dx = '1 1'
ix = '30 30'
subdomain_id = '1 2'
[]
[]
[GlobalParams]
rhie_chow_user_object = 'rc'
[]
[UserObjects]
[rc]
type = PINSFVRhieChowInterpolator
u = u
pressure = pressure
porosity = porosity
[]
[]
[Variables]
[u]
type = PINSFVSuperficialVelocityVariable
initial_condition = 1
[]
[pressure]
type = INSFVPressureVariable
[]
[]
[AuxVariables]
[porosity]
family = MONOMIAL
order = CONSTANT
fv = true
[]
[]
[ICs]
inactive = 'porosity_continuous'
[porosity_1]
type = ConstantIC
variable = porosity
block = 1
value = 1
[]
[porosity_2]
type = ConstantIC
variable = porosity
block = 2
value = 0.5
[]
[porosity_continuous]
type = FunctionIC
variable = porosity
block = '1 2'
function = smooth_jump
[]
[]
[Functions]
[smooth_jump]
type = ParsedFunction
expression = '1 - 0.5 * 1 / (1 + exp(-30*(x-1)))'
[]
[]
[FVKernels]
[mass]
type = PINSFVMassAdvection
variable = pressure
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
[]
[u_advection]
type = PINSFVMomentumAdvection
variable = u
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
porosity = porosity
momentum_component = 'x'
[]
[u_viscosity]
type = PINSFVMomentumDiffusion
variable = u
mu = ${mu}
porosity = porosity
momentum_component = 'x'
[]
[u_pressure]
type = PINSFVMomentumPressure
variable = u
pressure = pressure
porosity = porosity
momentum_component = 'x'
[]
[]
[FVBCs]
[inlet-u]
type = INSFVInletVelocityBC
boundary = 'left'
variable = u
function = '1'
[]
[outlet_p]
type = INSFVOutletPressureBC
boundary = 'right'
variable = pressure
function = 1
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
line_search = 'none'
[]
[Postprocessors]
[inlet_p]
type = SideAverageValue
variable = 'pressure'
boundary = 'left'
[]
[outlet-u]
type = SideIntegralVariablePostprocessor
variable = u
boundary = 'right'
[]
[]
[Outputs]
exodus = true
csv = false
[]
(modules/navier_stokes/test/tests/finite_volume/pins/channel-flow/porosity_jump/bernoulli-2d.i)
rho=1.1
advected_interp_method='upwind'
velocity_interp_method='rc'
[Mesh]
[mesh]
type = CartesianMeshGenerator
dim = 2
dx = '1 1'
dy = '0.5'
ix = '3 3'
iy = '2'
subdomain_id = '1 2'
[]
[]
[GlobalParams]
rhie_chow_user_object = 'rc'
porosity = porosity
[]
[UserObjects]
[rc]
type = PINSFVRhieChowInterpolator
u = u
v = v
porosity = porosity
pressure = pressure
[]
[]
[Variables]
[u]
type = PINSFVSuperficialVelocityVariable
initial_condition = 1
[]
[v]
type = PINSFVSuperficialVelocityVariable
initial_condition = 1e-6
[]
[pressure]
type = BernoulliPressureVariable
u = u
v = v
porosity = porosity
rho = ${rho}
[]
[]
[AuxVariables]
[porosity]
type = PiecewiseConstantVariable
[]
[]
[ICs]
[porosity_1]
type = ConstantIC
variable = porosity
block = 1
value = 1
[]
[porosity_2]
type = ConstantIC
variable = porosity
block = 2
value = 0.5
[]
[]
[FVKernels]
[mass]
type = PINSFVMassAdvection
variable = pressure
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
[]
[u_advection]
type = PINSFVMomentumAdvection
variable = u
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
momentum_component = 'x'
[]
[u_pressure]
type = PINSFVMomentumPressure
variable = u
pressure = pressure
momentum_component = 'x'
[]
[v_advection]
type = PINSFVMomentumAdvection
variable = v
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
momentum_component = 'y'
[]
[v_pressure]
type = PINSFVMomentumPressure
variable = v
pressure = pressure
momentum_component = 'y'
[]
[]
[FVBCs]
[inlet-u]
type = INSFVInletVelocityBC
boundary = 'left'
variable = u
function = '1'
[]
[inlet-v]
type = INSFVInletVelocityBC
boundary = 'left'
variable = v
function = 0
[]
[walls-u]
type = INSFVNaturalFreeSlipBC
boundary = 'top bottom'
variable = u
momentum_component = 'x'
[]
[walls-v]
type = INSFVNaturalFreeSlipBC
boundary = 'top bottom'
variable = v
momentum_component = 'y'
[]
[outlet_p]
type = INSFVOutletPressureBC
boundary = 'right'
variable = pressure
function = 0.4
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
line_search = 'none'
nl_rel_tol = 1e-10
[]
[Postprocessors]
[inlet_p]
type = SideAverageValue
variable = 'pressure'
boundary = 'left'
[]
[outlet-u]
type = SideIntegralVariablePostprocessor
variable = u
boundary = 'right'
[]
[]
[Outputs]
exodus = true
csv = true
[]
(test/tests/auxkernels/advection_flux/advection_flux_fv.i)
[Mesh]
type = GeneratedMesh # Can generate simple lines, rectangles and rectangular prisms
dim = 2 # Dimension of the mesh
nx = 10 # Number of elements in the x direction
ny = 10 # Number of elements in the y direction
xmax = 1.0
ymax = 1.0
[]
[Variables]
[u]
type = MooseVariableFVReal
two_term_boundary_expansion = false
[]
[]
[AuxVariables]
[flux_x]
type = MooseVariableFVReal
order = CONSTANT
family = MONOMIAL
[]
[]
[ICs]
[u_ic]
type = FunctionIC
variable = u
function = 'r2 := (x - 0.5)*(x - 0.5) + (y - 0.3)*(y - 0.3); exp(-r2 * 20)'
[]
[]
[FVKernels]
[advection]
type = FVAdvection
variable = u
velocity = '1 0.5 0'
[]
[time]
type = FVTimeKernel
variable = u
[]
[]
[FVBCs]
[fv_outflow]
type = FVConstantScalarOutflowBC
velocity = '1 0.5 0'
variable = u
boundary = 'right top'
[]
[]
[AuxKernels]
[flux_x]
type = AdvectiveFluxAux
variable = flux_x
vel_x = 1
vel_y = 0.5
advected_variable = u
component = normal
boundary = 'left right'
check_boundary_restricted = false
[]
[]
[Postprocessors]
[flux_right]
type = SideIntegralVariablePostprocessor
variable = flux_x
boundary = 'right'
[]
[flux_right_exact]
type = SideAdvectiveFluxIntegral
vel_x = 1
vel_y = 0.5
component = normal
advected_quantity = u
boundary = 'right'
[]
[flux_left]
type = SideIntegralVariablePostprocessor
variable = flux_x
boundary = 'left'
[]
[flux_left_exact]
type = SideAdvectiveFluxIntegral
vel_x = 1
vel_y = 0.5
component = normal
advected_quantity = u
boundary = 'left'
[]
[]
[Executioner]
type = Transient
petsc_options = '-snes_converged_reason'
num_steps = 10
dt = 0.25
nl_rel_tol = 1e-12
[]
[Outputs]
exodus = true
[]
(modules/xfem/test/tests/side_integral/side_integral.i)
[GlobalParams]
order = FIRST
family = LAGRANGE
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 5
ny = 6
xmin = 0.0
xmax = 1.0
ymin = 0.0
ymax = 1.0
elem_type = QUAD4
[]
[XFEM]
qrule = volfrac
output_cut_plane = true
[]
[UserObjects]
[./line_seg_cut_uo]
type = LineSegmentCutUserObject
cut_data = '0.55 1.0 0.55 0.0'
time_start_cut = 0.0
time_end_cut = 0.0
[../]
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
# Define boundary conditions
[./top]
type = DirichletBC
variable = u
boundary = 2
value = 3
[../]
[./bottom]
type = DirichletBC
variable = u
boundary = 0
value = 2
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
line_search = 'none'
l_tol = 1e-3
nl_max_its = 15
nl_rel_tol = 1e-10
nl_abs_tol = 1e-10
start_time = 0.0
dt = 1.0
end_time = 2.0
[]
[Postprocessors]
[./top_surface]
type = SideIntegralVariablePostprocessor
variable = u
boundary = 2
[../]
[./bottom_surface]
type = SideIntegralVariablePostprocessor
variable = u
boundary = 0
[../]
[]
[Outputs]
time_step_interval = 1
execute_on = timestep_end
exodus = true
[./console]
type = Console
output_linear = true
[../]
[]
(modules/navier_stokes/test/tests/finite_volume/pins/channel-flow/2d-rc-friction.i)
mu = 1.1
rho = 1
advected_interp_method = 'average'
velocity_interp_method = 'rc'
[Mesh]
[mesh]
type = CartesianMeshGenerator
dim = 2
dx = '2.5 2.5'
dy = '1.0'
ix = '20 20'
iy = '20'
subdomain_id = '1 2'
[]
[]
[GlobalParams]
rhie_chow_user_object = 'rc'
[]
[UserObjects]
[rc]
type = PINSFVRhieChowInterpolator
u = superficial_vel_x
v = superficial_vel_y
pressure = pressure
porosity = porosity
[]
[]
[Variables]
inactive = 'lambda'
[superficial_vel_x]
type = PINSFVSuperficialVelocityVariable
initial_condition = 1
[]
[superficial_vel_y]
type = PINSFVSuperficialVelocityVariable
initial_condition = 1e-6
[]
[pressure]
type = INSFVPressureVariable
[]
[lambda]
family = SCALAR
order = FIRST
[]
[]
[AuxVariables]
[porosity]
family = MONOMIAL
order = CONSTANT
fv = true
initial_condition = 0.5
[]
[]
[FVKernels]
inactive = 'mean-pressure'
[mass]
type = PINSFVMassAdvection
variable = pressure
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
[]
[u_advection]
type = PINSFVMomentumAdvection
variable = superficial_vel_x
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
porosity = porosity
momentum_component = 'x'
[]
[u_viscosity]
type = PINSFVMomentumDiffusion
variable = superficial_vel_x
mu = ${mu}
porosity = porosity
momentum_component = 'x'
[]
[u_pressure]
type = PINSFVMomentumPressure
variable = superficial_vel_x
momentum_component = 'x'
pressure = pressure
porosity = porosity
[]
[u_friction]
type = PINSFVMomentumFriction
variable = superficial_vel_x
momentum_component = 'x'
Darcy_name = 'Darcy_coefficient'
Forchheimer_name = 'Forchheimer_coefficient'
mu = ${mu}
rho = ${rho}
speed = speed
[]
[v_advection]
type = PINSFVMomentumAdvection
variable = superficial_vel_y
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
porosity = porosity
momentum_component = 'y'
[]
[v_viscosity]
type = PINSFVMomentumDiffusion
variable = superficial_vel_y
mu = ${mu}
porosity = porosity
momentum_component = 'y'
[]
[v_pressure]
type = PINSFVMomentumPressure
variable = superficial_vel_y
momentum_component = 'y'
pressure = pressure
porosity = porosity
[]
[v_friction]
type = PINSFVMomentumFriction
variable = superficial_vel_y
momentum_component = 'y'
Darcy_name = 'Darcy_coefficient'
Forchheimer_name = 'Forchheimer_coefficient'
rho = ${rho}
speed = speed
mu = ${mu}
[]
[mean-pressure]
type = FVIntegralValueConstraint
variable = pressure
lambda = lambda
phi0 = 0.01
[]
[]
[FVBCs]
inactive = 'free-slip-u free-slip-v'
[inlet-u]
type = INSFVInletVelocityBC
boundary = 'left'
variable = superficial_vel_x
function = '1'
[]
[inlet-v]
type = INSFVInletVelocityBC
boundary = 'left'
variable = superficial_vel_y
function = 0
[]
[no-slip-u]
type = INSFVNoSlipWallBC
boundary = 'top'
variable = superficial_vel_x
function = 0
[]
[no-slip-v]
type = INSFVNoSlipWallBC
boundary = 'top'
variable = superficial_vel_y
function = 0
[]
[free-slip-u]
type = INSFVNaturalFreeSlipBC
boundary = 'top'
variable = superficial_vel_x
momentum_component = 'x'
[]
[free-slip-v]
type = INSFVNaturalFreeSlipBC
boundary = 'top'
variable = superficial_vel_y
momentum_component = 'y'
[]
[symmetry-u]
type = PINSFVSymmetryVelocityBC
boundary = 'bottom'
variable = superficial_vel_x
u = superficial_vel_x
v = superficial_vel_y
mu = ${mu}
momentum_component = 'x'
[]
[symmetry-v]
type = PINSFVSymmetryVelocityBC
boundary = 'bottom'
variable = superficial_vel_y
u = superficial_vel_x
v = superficial_vel_y
mu = ${mu}
momentum_component = 'y'
[]
[symmetry-p]
type = INSFVSymmetryPressureBC
boundary = 'bottom'
variable = pressure
[]
[outlet-p]
type = INSFVOutletPressureBC
boundary = 'right'
variable = pressure
function = 0
[]
[]
[FunctorMaterials]
[darcy]
type = ADGenericVectorFunctorMaterial
prop_names = 'Darcy_coefficient Forchheimer_coefficient'
prop_values = '0.1 0.1 0.1 0.1 0.1 0.1'
[]
[speec]
type = PINSFVSpeedFunctorMaterial
superficial_vel_x = superficial_vel_x
superficial_vel_y = superficial_vel_y
porosity = porosity
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
nl_rel_tol = 1e-11
nl_abs_tol = 1e-14
[]
# Some basic Postprocessors to visually examine the solution
[Postprocessors]
[inlet-p]
type = SideAverageValue
variable = pressure
boundary = 'left'
[]
[outlet-u]
type = SideIntegralVariablePostprocessor
variable = superficial_vel_x
boundary = 'right'
[]
[]
[Outputs]
exodus = true
[]
(test/tests/auxkernels/diffusion_flux/normal_diffusion_flux.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
xmax = 1.0
ymax = 1.0
[]
[Variables]
[./dummy]
[../]
[]
[AuxVariables]
[./T]
[../]
[./flux_n]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Functions]
[./T]
type = ParsedFunction
expression = 'x*x*y*y+1'
[../]
[]
[ICs]
[./T]
type = FunctionIC
variable = T
function = T
[../]
[]
[Kernels]
[./dummy]
type = Diffusion
variable = dummy
[../]
[]
[AuxKernels]
[./flux_n]
type = DiffusionFluxAux
diffusivity = 'thermal_conductivity'
variable = flux_n
diffusion_variable = T
component = normal
boundary = 'left right'
check_boundary_restricted = false
[../]
[]
[Materials]
[./k]
type = GenericConstantMaterial
prop_names = 'thermal_conductivity'
prop_values = '10'
[../]
[]
[Postprocessors]
[flux_right]
type = SideIntegralVariablePostprocessor
variable = flux_n
boundary = 'right'
[]
[flux_right_exact]
type = SideFluxIntegral
variable = T
diffusivity = 'thermal_conductivity'
boundary = 'right'
[]
[flux_left]
type = SideIntegralVariablePostprocessor
variable = flux_n
boundary = 'left'
[]
[flux_left_exact]
type = SideFluxIntegral
variable = T
diffusivity = 'thermal_conductivity'
boundary = 'left'
[]
[]
[Executioner]
type = Steady
solve_type = PJFNK
nl_rel_tol = 1e-12
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
hide = 'dummy'
[]
(test/tests/postprocessors/side_pps/side_pps_multi_bnd_test.i)
#
# Tests elemental PPS running on multiple blocks
#
[Mesh]
type = StripeMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 3
ny = 3
elem_type = QUAD4
stripes = 3
# StripeMesh currently only works correctly with ReplicatedMesh.
parallel_type = replicated
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
expression = x*(y+1)
[../]
[]
[Variables]
[./u]
family = MONOMIAL
order = CONSTANT
[../]
[]
[Kernels]
[./uv]
type = Reaction
variable = u
[../]
[./fv]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[Postprocessors]
[./int_0_1]
type = SideIntegralVariablePostprocessor
variable = u
boundary = '0 1'
[../]
[]
[Executioner]
type = Steady
[]
[Outputs]
execute_on = 'timestep_end'
[./out]
type = Exodus
elemental_as_nodal = true
[../]
[]
(modules/phase_field/examples/cahn-hilliard/Parsed_SplitCH.i)
#
# Example problem showing how to use the DerivativeParsedMaterial with SplitCHParsed.
# The free energy is identical to that from SplitCHMath, f_bulk = 1/4*(1-c)^2*(1+c)^2.
#
[Mesh]
type = GeneratedMesh
dim = 2
nx = 150
ny = 150
xmax = 60
ymax = 60
[]
[Modules]
[./PhaseField]
[./Conserved]
[./c]
free_energy = fbulk
mobility = M
kappa = kappa_c
solve_type = REVERSE_SPLIT
[../]
[../]
[../]
[]
[AuxVariables]
[./local_energy]
order = CONSTANT
family = MONOMIAL
[../]
[]
[ICs]
[./cIC]
type = RandomIC
variable = c
min = -0.1
max = 0.1
[../]
[]
[AuxKernels]
[./local_energy]
type = TotalFreeEnergy
variable = local_energy
f_name = fbulk
interfacial_vars = c
kappa_names = kappa_c
execute_on = timestep_end
[../]
[]
[BCs]
[./Periodic]
[./all]
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
[./mat]
type = GenericConstantMaterial
prop_names = 'M kappa_c'
prop_values = '1.0 0.5'
[../]
[./free_energy]
type = DerivativeParsedMaterial
property_name = fbulk
coupled_variables = c
constant_names = W
constant_expressions = 1.0/2^2
expression = W*(1-c)^2*(1+c)^2
enable_jit = true
outputs = exodus
[../]
[]
[Postprocessors]
[./top]
type = SideIntegralVariablePostprocessor
variable = c
boundary = top
[../]
[./total_free_energy]
type = ElementIntegralVariablePostprocessor
variable = local_energy
[../]
[]
[Preconditioning]
[./cw_coupling]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
scheme = bdf2
petsc_options_iname = '-pc_type -sub_pc_type'
petsc_options_value = 'asm lu '
l_max_its = 30
l_tol = 1e-4
nl_max_its = 20
nl_rel_tol = 1e-9
dt = 2.0
end_time = 20.0
[]
[Outputs]
exodus = true
perf_graph = true
[]
(modules/navier_stokes/test/tests/finite_volume/pins/channel-flow/porosity_jump/bernoulli-1d-functor-material.i)
rho = 1.1
advected_interp_method = 'upwind'
velocity_interp_method = 'rc'
[Mesh]
[mesh]
type = CartesianMeshGenerator
dim = 1
dx = '1 1'
ix = '3 3'
subdomain_id = '1 2'
[]
[]
[GlobalParams]
rhie_chow_user_object = 'rc'
[]
[UserObjects]
[rc]
type = PINSFVRhieChowInterpolator
u = u
pressure = pressure
porosity = porosity
[]
[]
[Variables]
[u]
type = PINSFVSuperficialVelocityVariable
initial_condition = 1
[]
[pressure]
type = BernoulliPressureVariable
u = u
porosity = porosity
rho = ${rho}
[]
[]
[AuxVariables]
[has_porosity_jump_face]
type = MooseVariableFVReal
[]
[porosity_out]
type = MooseVariableFVReal
[]
[]
[AuxKernels]
[has_porosity_jump_face]
type = HasPorosityJumpFace
porosity = porosity
execute_on = 'initial timestep_end'
variable = has_porosity_jump_face
[]
[porosity_out]
type = FunctorAux
variable = porosity_out
functor = porosity
execute_on = 'initial timestep_end'
[]
[]
[FVKernels]
[mass]
type = PINSFVMassAdvection
variable = pressure
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
[]
[u_advection]
type = PINSFVMomentumAdvection
variable = u
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
porosity = porosity
momentum_component = 'x'
[]
[u_pressure]
type = PINSFVMomentumPressure
variable = u
pressure = pressure
porosity = porosity
momentum_component = 'x'
[]
[]
[FVBCs]
[inlet-u]
type = INSFVInletVelocityBC
boundary = 'left'
variable = u
function = '1'
[]
[outlet_p]
type = INSFVOutletPressureBC
boundary = 'right'
variable = pressure
function = 1
[]
[]
[FunctorMaterials]
[porosity]
type = ADPiecewiseByBlockFunctorMaterial
prop_name = 'porosity'
subdomain_to_prop_value = '1 1 2 0.5'
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
line_search = 'none'
[]
[Postprocessors]
[inlet_p]
type = SideAverageValue
variable = 'pressure'
boundary = 'left'
[]
[outlet-u]
type = SideIntegralVariablePostprocessor
variable = u
boundary = 'right'
[]
[]
[Outputs]
exodus = true
csv = true
[]
(modules/navier_stokes/test/tests/finite_volume/pins/channel-flow/2d-rc-friction-action.i)
mu = 1.1
rho = 1
[Mesh]
[mesh]
type = CartesianMeshGenerator
dim = 2
dx = '2.5 2.5'
dy = '1.0'
ix = '20 20'
iy = '20'
subdomain_id = '1 2'
[]
[]
[Modules]
[NavierStokesFV]
compressibility = 'incompressible'
porous_medium_treatment = true
density = 'rho'
dynamic_viscosity = 'mu'
porosity = 'porosity'
initial_velocity = '1 1e-6 0'
initial_pressure = 0.0
inlet_boundaries = 'left'
momentum_inlet_types = 'fixed-velocity'
momentum_inlet_function = '1 0'
wall_boundaries = 'top bottom'
momentum_wall_types = 'noslip symmetry'
outlet_boundaries = 'right'
momentum_outlet_types = 'fixed-pressure'
pressure_function = '0'
friction_types = 'darcy forchheimer'
friction_coeffs = 'Darcy_coefficient Forchheimer_coefficient'
mass_advection_interpolation = 'average'
momentum_advection_interpolation = 'average'
[]
[]
[FunctorMaterials]
[const]
type = ADGenericFunctorMaterial
prop_names = 'rho mu'
prop_values = '${rho} ${mu}'
[]
[friction]
type = ADGenericVectorFunctorMaterial
prop_names = 'Darcy_coefficient Forchheimer_coefficient'
prop_values = '0.1 0.1 0.1 0.1 0.1 0.1'
[]
[]
[AuxVariables]
[porosity]
family = MONOMIAL
order = CONSTANT
fv = true
initial_condition = 0.5
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
nl_rel_tol = 1e-11
nl_abs_tol = 1e-14
[]
# Some basic Postprocessors to visually examine the solution
[Postprocessors]
[inlet-p]
type = SideIntegralVariablePostprocessor
variable = pressure
boundary = 'left'
[]
[outlet-u]
type = SideIntegralVariablePostprocessor
variable = superficial_vel_x
boundary = 'right'
[]
[]
[Outputs]
exodus = true
[]
(modules/heat_transfer/test/tests/directional_flux_bc/2d_elem.i)
[Mesh]
[shade]
type = GeneratedMeshGenerator
dim = 2
nx = 1
ny = 3
xmax = 0.2
ymax = 0.5
[]
[screen]
type = GeneratedMeshGenerator
dim = 2
nx = 1
ny = 20
xmax = 0.05
[]
[screen_block]
type = SubdomainIDGenerator
input = screen
subdomain_id = 1
[]
[combine]
type = CombinerGenerator
inputs = 'shade screen_block'
positions = '0 0 0 1 0 0'
[]
[all_sides]
type = SideSetsAroundSubdomainGenerator
block = '0 1'
new_boundary = 100
input = combine
[]
[shaded_side]
type = SideSetsAroundSubdomainGenerator
normal = '-1 0 0'
block = 1
input = all_sides
new_boundary = 101
[]
[]
[GlobalParams]
illumination_flux = '1 0 0'
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[dt]
type = TimeDerivative
variable = u
[]
[]
[BCs]
[flux]
type = DirectionalFluxBC
variable = u
boundary = 101
self_shadow_uo = shadow
[]
[]
[UserObjects]
[shadow]
type = SelfShadowSideUserObject
boundary = 100
execute_on = INITIAL
[]
[]
[Postprocessors]
[light]
type = SideIntegralVariablePostprocessor
variable = u
boundary = 101
[]
[]
[Executioner]
type = Transient
dt = 0.01
num_steps = 1
[]
[Outputs]
csv = true
[]
(modules/richards/include/postprocessors/RichardsExcavFlow.h)
// This file is part of the MOOSE framework
// https://www.mooseframework.org
//
// All rights reserved, see COPYRIGHT for full restrictions
// https://github.com/idaholab/moose/blob/master/COPYRIGHT
//
// Licensed under LGPL 2.1, please see LICENSE for details
// https://www.gnu.org/licenses/lgpl-2.1.html
#pragma once
#include "SideIntegralVariablePostprocessor.h"
#include "MaterialPropertyInterface.h"
#include "RichardsVarNames.h"
// Forward Declarations
class Function;
/**
* Records total mass flow into an excavation defined by a RichardsExcavGeom function
*/
class RichardsExcavFlow : public SideIntegralVariablePostprocessor
{
public:
static InputParameters validParams();
RichardsExcavFlow(const InputParameters & parameters);
protected:
virtual Real computeQpIntegral();
/// holds info regarding the Richards variables
const RichardsVarNames & _richards_name_UO;
/// the richards variable number for which we want the mass flow
unsigned int _pvar;
/// mass-flux of fluid (a vector in the multicomponent case)
const MaterialProperty<std::vector<RealVectorValue>> & _flux;
/// the RichardsExcavGeom that defines where on the boundary we'll compute the mass flux
const Function & _func;
};
(framework/include/postprocessors/SideAverageValue.h)
// This file is part of the MOOSE framework
// https://www.mooseframework.org
//
// All rights reserved, see COPYRIGHT for full restrictions
// https://github.com/idaholab/moose/blob/master/COPYRIGHT
//
// Licensed under LGPL 2.1, please see LICENSE for details
// https://www.gnu.org/licenses/lgpl-2.1.html
#pragma once
#include "SideIntegralVariablePostprocessor.h"
/**
* This postprocessor computes a volume integral of the specified variable.
*
* Note that specializations of this integral are possible by deriving from this
* class and overriding computeQpIntegral().
*/
class SideAverageValue : public SideIntegralVariablePostprocessor
{
public:
static InputParameters validParams();
SideAverageValue(const InputParameters & parameters);
virtual void initialize() override;
virtual void execute() override;
virtual Real getValue() const override;
virtual void threadJoin(const UserObject & y) override;
virtual void finalize() override;
protected:
/**
* Compute the volume of the current face
* @return volume of the current face
*/
virtual Real volume();
/// Volume of the entire surface to average over
Real _volume;
};
(modules/richards/include/postprocessors/RichardsPiecewiseLinearSinkFlux.h)
// This file is part of the MOOSE framework
// https://www.mooseframework.org
//
// All rights reserved, see COPYRIGHT for full restrictions
// https://github.com/idaholab/moose/blob/master/COPYRIGHT
//
// Licensed under LGPL 2.1, please see LICENSE for details
// https://www.gnu.org/licenses/lgpl-2.1.html
#pragma once
#include "SideIntegralVariablePostprocessor.h"
#include "LinearInterpolation.h"
#include "RichardsVarNames.h"
class Function;
// Forward Declarations
/**
* This postprocessor computes the fluid flux to a RichardsPiecewiseLinearSink.
* The flux is integral_over_boundary of
* _sink_func*_dt (here _sink_func is a function of porepressure)
* and if _use_relperm = true, this integrand is multiplied by _rel_perm
* and if _m_func is entered, this integrand is multiplied by _m_func at the quad point
* and if _use_mobility = true, this integrand is multiplied by density*knn/viscosity,
* where knn is n.permeability.n where n is the normal to the boundary
*/
class RichardsPiecewiseLinearSinkFlux : public SideIntegralVariablePostprocessor
{
public:
static InputParameters validParams();
RichardsPiecewiseLinearSinkFlux(const InputParameters & parameters);
protected:
virtual Real computeQpIntegral();
/// the sink function, which is a piecewise linear function of porepressure values
LinearInterpolation _sink_func;
/// whether to include density*permeability_nn/viscosity in the flux
bool _use_mobility;
/// whether to include relative permeability in the flux
bool _use_relperm;
/// the multiplier function
const Function & _m_func;
/// holds info regarding the Richards variable names, and their values in the simulation
const RichardsVarNames & _richards_name_UO;
/**
* the index into _richards_name_UO corresponding to this Postprocessor's variable
* eg, if the richards names are 'pwater pgas poil pplasma'
* and the variable of this Postprocessor is pgas, then _pvar=1
*/
unsigned int _pvar;
/// porepressure values (only the _pvar component is used)
const MaterialProperty<std::vector<Real>> & _pp;
/// fluid viscosity
const MaterialProperty<std::vector<Real>> & _viscosity;
/// medium permeability
const MaterialProperty<RealTensorValue> & _permeability;
/// fluid relative permeability
const MaterialProperty<std::vector<Real>> & _rel_perm;
/// fluid density
const MaterialProperty<std::vector<Real>> & _density;
};
(modules/richards/include/postprocessors/RichardsHalfGaussianSinkFlux.h)
// This file is part of the MOOSE framework
// https://www.mooseframework.org
//
// All rights reserved, see COPYRIGHT for full restrictions
// https://github.com/idaholab/moose/blob/master/COPYRIGHT
//
// Licensed under LGPL 2.1, please see LICENSE for details
// https://www.gnu.org/licenses/lgpl-2.1.html
#pragma once
#include "SideIntegralVariablePostprocessor.h"
#include "RichardsVarNames.h"
class Function;
// Forward Declarations
/**
* Postprocessor that records the mass flux from porespace to
* a half-gaussian sink. (Positive if fluid is being removed from porespace.)
* flux out = max*exp((-0.5*(p - centre)/sd)^2) for p<centre, and flux out = max otherwise
* If a function, _m_func, is used then the flux is multiplied by _m_func.
* The result is the flux integrated over the specified sideset.
*/
class RichardsHalfGaussianSinkFlux : public SideIntegralVariablePostprocessor
{
public:
static InputParameters validParams();
RichardsHalfGaussianSinkFlux(const InputParameters & parameters);
protected:
virtual Real computeQpIntegral();
FEProblemBase & _feproblem;
/// flux out = max*exp((-0.5*(p - centre)/sd)^2) for p<centre, and flux out = max otherwise
Real _maximum;
/// flux out = max*exp((-0.5*(p - centre)/sd)^2) for p<centre, and flux out = max otherwise
Real _sd;
/// flux out = max*exp((-0.5*(p - centre)/sd)^2) for p<centre, and flux out = max otherwise
Real _centre;
/**
* holds info regarding the names of the Richards variables
* and methods for extracting values of these variables
*/
const RichardsVarNames & _richards_name_UO;
/**
* the index of this variable in the list of Richards variables
* held by _richards_name_UO. Eg
* if richards_vars = 'pwater pgas poil' in the _richards_name_UO
* and this kernel has variable = pgas, then _pvar = 1
* This is used to index correctly into _viscosity, _seff, etc
*/
unsigned int _pvar;
/// the multiplier function
const Function & _m_func;
/// porepressure (or porepressure vector for multiphase problems)
const MaterialProperty<std::vector<Real>> & _pp;
};
(framework/include/postprocessors/SideDiffusiveFluxIntegral.h)
// This file is part of the MOOSE framework
// https://www.mooseframework.org
//
// All rights reserved, see COPYRIGHT for full restrictions
// https://github.com/idaholab/moose/blob/master/COPYRIGHT
//
// Licensed under LGPL 2.1, please see LICENSE for details
// https://www.gnu.org/licenses/lgpl-2.1.html
#pragma once
// MOOSE includes
#include "SideIntegralVariablePostprocessor.h"
// Forward Declarations
template <bool, typename>
class SideDiffusiveFluxIntegralTempl;
typedef SideDiffusiveFluxIntegralTempl<false, Real> SideDiffusiveFluxIntegral;
typedef SideDiffusiveFluxIntegralTempl<true, Real> ADSideDiffusiveFluxIntegral;
typedef SideDiffusiveFluxIntegralTempl<false, RealVectorValue> SideVectorDiffusivityFluxIntegral;
typedef SideDiffusiveFluxIntegralTempl<true, RealVectorValue> ADSideVectorDiffusivityFluxIntegral;
/**
* This postprocessor computes a side integral of the mass flux.
*/
template <bool is_ad, typename T>
class SideDiffusiveFluxIntegralTempl : public SideIntegralVariablePostprocessor
{
public:
static InputParameters validParams();
SideDiffusiveFluxIntegralTempl(const InputParameters & parameters);
protected:
Real computeQpIntegral() override;
Real computeFaceInfoIntegral(const FaceInfo * fi) override;
const GenericMaterialProperty<T, is_ad> * const _diffusion_coef;
const Moose::Functor<Moose::GenericType<T, is_ad>> * const _functor_diffusion_coef;
private:
/// Routine to get the diffusive flux with a Real diffusivity
RealVectorValue diffusivityGradientProduct(const RealVectorValue & grad_u, Real diffusivity);
/// Routine to get the diffusive flux with a RealVectorValue diffusivity
RealVectorValue diffusivityGradientProduct(const RealVectorValue & grad_u,
const RealVectorValue & diffusivity);
};