- pressureThe pressureC++ Type:std::vector<VariableName> Unit:(no unit assumed) Controllable:No Description:The pressure 
- velocityThe velocityC++ Type:std::vector<VariableName> Unit:(no unit assumed) Controllable:No Description:The velocity 
INSADTauMaterial
This object computes the stabilization parameter for use in pressure-stabilized and streamline-upwind kernels.
This is the material class used to compute the stabilization parameter tau.
Input Parameters
- alpha1Multiplicative factor on the stabilization parameter tau.Default:1 C++ Type:double Unit:(no unit assumed) Controllable:No Description:Multiplicative factor on the stabilization parameter tau. 
- blockThe list of blocks (ids or names) that this object will be appliedC++ Type:std::vector<SubdomainName> Controllable:No Description:The list of blocks (ids or names) that this object will be applied 
- boundaryThe list of boundaries (ids or names) from the mesh where this object appliesC++ Type:std::vector<BoundaryName> Controllable:No Description:The list of boundaries (ids or names) from the mesh where this object applies 
- computeTrueWhen false, MOOSE will not call compute methods on this material. The user must call computeProperties() after retrieving the MaterialBase via MaterialBasePropertyInterface::getMaterialBase(). Non-computed MaterialBases are not sorted for dependencies.Default:True C++ Type:bool Controllable:No Description:When false, MOOSE will not call compute methods on this material. The user must call computeProperties() after retrieving the MaterialBase via MaterialBasePropertyInterface::getMaterialBase(). Non-computed MaterialBases are not sorted for dependencies. 
- constant_onNONEWhen ELEMENT, MOOSE will only call computeQpProperties() for the 0th quadrature point, and then copy that value to the other qps.When SUBDOMAIN, MOOSE will only call computeQpProperties() for the 0th quadrature point, and then copy that value to the other qps. Evaluations on element qps will be skippedDefault:NONE C++ Type:MooseEnum Options:NONE, ELEMENT, SUBDOMAIN Controllable:No Description:When ELEMENT, MOOSE will only call computeQpProperties() for the 0th quadrature point, and then copy that value to the other qps.When SUBDOMAIN, MOOSE will only call computeQpProperties() for the 0th quadrature point, and then copy that value to the other qps. Evaluations on element qps will be skipped 
- declare_suffixAn optional suffix parameter that can be appended to any declared properties. The suffix will be prepended with a '_' character.C++ Type:MaterialPropertyName Unit:(no unit assumed) Controllable:No Description:An optional suffix parameter that can be appended to any declared properties. The suffix will be prepended with a '_' character. 
- mu_namemuThe name of the dynamic viscosityDefault:mu C++ Type:MaterialPropertyName Unit:(no unit assumed) Controllable:No Description:The name of the dynamic viscosity 
- rho_namerhoThe name of the densityDefault:rho C++ Type:MaterialPropertyName Unit:(no unit assumed) Controllable:No Description:The name of the density 
Optional Parameters
- control_tagsAdds user-defined labels for accessing object parameters via control logic.C++ Type:std::vector<std::string> Controllable:No Description:Adds user-defined labels for accessing object parameters via control logic. 
- enableTrueSet the enabled status of the MooseObject.Default:True C++ Type:bool Controllable:Yes Description:Set the enabled status of the MooseObject. 
- implicitTrueDetermines whether this object is calculated using an implicit or explicit formDefault:True C++ Type:bool Controllable:No Description:Determines whether this object is calculated using an implicit or explicit form 
- search_methodnearest_node_connected_sidesChoice of search algorithm. All options begin by finding the nearest node in the primary boundary to a query point in the secondary boundary. In the default nearest_node_connected_sides algorithm, primary boundary elements are searched iff that nearest node is one of their nodes. This is fast to determine via a pregenerated node-to-elem map and is robust on conforming meshes. In the optional all_proximate_sides algorithm, primary boundary elements are searched iff they touch that nearest node, even if they are not topologically connected to it. This is more CPU-intensive but is necessary for robustness on any boundary surfaces which has disconnections (such as Flex IGA meshes) or non-conformity (such as hanging nodes in adaptively h-refined meshes).Default:nearest_node_connected_sides C++ Type:MooseEnum Options:nearest_node_connected_sides, all_proximate_sides Controllable:No Description:Choice of search algorithm. All options begin by finding the nearest node in the primary boundary to a query point in the secondary boundary. In the default nearest_node_connected_sides algorithm, primary boundary elements are searched iff that nearest node is one of their nodes. This is fast to determine via a pregenerated node-to-elem map and is robust on conforming meshes. In the optional all_proximate_sides algorithm, primary boundary elements are searched iff they touch that nearest node, even if they are not topologically connected to it. This is more CPU-intensive but is necessary for robustness on any boundary surfaces which has disconnections (such as Flex IGA meshes) or non-conformity (such as hanging nodes in adaptively h-refined meshes). 
- seed0The seed for the master random number generatorDefault:0 C++ Type:unsigned int Controllable:No Description:The seed for the master random number generator 
- use_displaced_meshFalseWhether or not this object should use the displaced mesh for computation. Note that in the case this is true but no displacements are provided in the Mesh block the undisplaced mesh will still be used.Default:False C++ Type:bool Controllable:No Description:Whether or not this object should use the displaced mesh for computation. Note that in the case this is true but no displacements are provided in the Mesh block the undisplaced mesh will still be used. 
Advanced Parameters
- output_propertiesList of material properties, from this material, to output (outputs must also be defined to an output type)C++ Type:std::vector<std::string> Controllable:No Description:List of material properties, from this material, to output (outputs must also be defined to an output type) 
- outputsnone Vector of output names where you would like to restrict the output of variables(s) associated with this objectDefault:none 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 
Outputs Parameters
- prop_getter_suffixAn optional suffix parameter that can be appended to any attempt to retrieve/get material properties. The suffix will be prepended with a '_' character.C++ Type:MaterialPropertyName Unit:(no unit assumed) Controllable:No Description:An optional suffix parameter that can be appended to any attempt to retrieve/get material properties. The suffix will be prepended with a '_' character. 
- use_interpolated_stateFalseFor the old and older state use projected material properties interpolated at the quadrature points. To set up projection use the ProjectedStatefulMaterialStorageAction.Default:False C++ Type:bool Controllable:No Description:For the old and older state use projected material properties interpolated at the quadrature points. To set up projection use the ProjectedStatefulMaterialStorageAction. 
Material Property Retrieval Parameters
Input Files
- (modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/ad-rz-displacements.i)
- (modules/navier_stokes/test/tests/finite_element/ins/rz-x-axial-coord/pipe-flow.i)
- (modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/ad_rz_cone_stab_jac_test.i)
- (modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/ad_rz_cone_no_parts_steady_stabilized_second_order.i)
- (modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/ad_rz_cone_by_parts_traction_steady_stabilized.i)
- (modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/ad_rz_cone_by_parts_steady_stabilized_second_order.i)
- (modules/navier_stokes/test/tests/finite_element/ins/lid_driven/ad_lid_driven_stabilized.i)
- (modules/navier_stokes/test/tests/finite_element/ins/rz-x-axial-coord/pipe-flow-natural-bc.i)
- (modules/navier_stokes/test/tests/finite_element/ins/coupled-force/gravity-object.i)
- (modules/fsi/test/tests/newmark-beta/test_ALE.i)
- (modules/navier_stokes/test/tests/finite_element/ins/velocity_channel/ad-traction-supg.i)
- (modules/fsi/test/tests/2d-small-strain-transient/ad-fsi-flat-channel.i)
- (modules/navier_stokes/test/tests/finite_element/ins/coupled-force/gravity-through-coupled-force.i)
- (modules/navier_stokes/test/tests/finite_element/ins/coupled-force/steady.i)
- (modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/ad_rz_cone_no_parts_steady_stabilized.i)
- (modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/ad_rz_cone_by_parts_steady_stabilized.i)
- (modules/navier_stokes/test/tests/finite_element/ins/lid_driven/steady_vector_fsp_al.i)
- (modules/combined/test/tests/phase_field_contact_angle/contact_angle.i)
- (modules/navier_stokes/test/tests/finite_element/ins/coupled-force/steady-function.i)
(modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/ad-rz-displacements.i)
[GlobalParams]
  order = FIRST
  integrate_p_by_parts = true
  use_displaced_mesh = true
[]
[Mesh]
  file = '2d_cone.msh'
  displacements = 'disp_x disp_y'
  coord_type = RZ
[]
[AuxVariables]
  [vel_x][]
  [vel_y][]
  [disp_x]
    order = SECOND
  []
  [disp_y]
    order = SECOND
  []
[]
[AuxKernels]
  [vel_x]
    type = VectorVariableComponentAux
    variable = vel_x
    vector_variable = velocity
    component = 'x'
  []
  [vel_y]
    type = VectorVariableComponentAux
    variable = vel_y
    vector_variable = velocity
    component = 'y'
  []
[]
[Variables]
  [velocity]
    family = LAGRANGE_VEC
  []
  [p]
  []
[]
# Need to set a non-zero initial condition because we have a velocity norm in
# the denominator for the tau coefficient of the stabilization term
[ICs]
  [velocity]
    type = VectorConstantIC
    x_value = 1e-15
    y_value = 1e-15
    variable = velocity
  []
[]
[Kernels]
  [mass]
    type = INSADMass
    variable = p
  []
  [mass_pspg]
    type = INSADMassPSPG
    variable = p
  []
  [momentum_advection]
    type = INSADMomentumAdvection
    variable = velocity
  []
  [momentum_viscous]
    type = INSADMomentumViscous
    variable = velocity
  []
  [momentum_pressure]
    type = INSADMomentumPressure
    variable = velocity
    pressure = p
  []
  [momentum_supg]
    type = INSADMomentumSUPG
    variable = velocity
    velocity = velocity
  []
[]
[BCs]
  [inlet]
    type = VectorFunctionDirichletBC
    variable = velocity
    boundary = 'bottom'
    function_x = 0
    function_y = 'inlet_func'
  []
  [wall]
    type = VectorFunctionDirichletBC
    variable = velocity
    boundary = 'right'
    function_x = 0
    function_y = 0
  []
  [axis]
    type = ADVectorFunctionDirichletBC
    variable = velocity
    boundary = 'left'
    set_y_comp = false
    function_x = 0
  []
[]
[Functions]
  [inlet_func]
    type = ParsedFunction
    expression = '-4 * x^2 + 1'
  []
[]
[Materials]
  [const]
    type = ADGenericConstantMaterial
    prop_names = 'rho mu'
    prop_values = '1  1'
  []
  [ins_mat]
    type = INSADTauMaterial
    velocity = velocity
    pressure = p
  []
[]
[Preconditioning]
  [SMP]
    type = SMP
    full = true
    solve_type = 'NEWTON'
  []
[]
[Executioner]
  type = Steady
  petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_levels'
  petsc_options_value = 'bjacobi  ilu          4'
  nl_rel_tol = 1e-12
  nl_max_its = 6
[]
[Outputs]
  csv = true
  [out]
    type = Exodus
    hide = 'disp_x disp_y'
  []
[]
[Postprocessors]
  [flow_in]
    type = VolumetricFlowRate
    vel_x = vel_x
    vel_y = vel_y
    boundary = 'bottom'
    execute_on = 'timestep_end'
  []
  [flow_out]
    type = VolumetricFlowRate
    vel_x = vel_x
    vel_y = vel_y
    boundary = 'top'
    execute_on = 'timestep_end'
  []
[]
(modules/navier_stokes/test/tests/finite_element/ins/rz-x-axial-coord/pipe-flow.i)
mu=1
rho=1
pipe_length=10 # m
pipe_radius=1 # m
u_inlet=1
[GlobalParams]
  integrate_p_by_parts = false
[]
[Mesh]
  [gen]
    type = GeneratedMeshGenerator
    dim = 2
    xmin = 0
    xmax = ${pipe_length}
    ymin = 0
    ymax = ${pipe_radius}
    nx = 50
    ny = 5
  []
  coord_type = 'RZ'
  rz_coord_axis = x
[]
[Variables]
  [velocity]
    family = LAGRANGE_VEC
  []
  [p][]
[]
[Kernels]
  [mass]
    type = INSADMass
    variable = p
  []
  [mass_pspg]
    type = INSADMassPSPG
    variable = p
  []
  [momentum_convection]
    type = INSADMomentumAdvection
    variable = velocity
  []
  [momentum_viscous]
    type = INSADMomentumViscous
    variable = velocity
  []
  [momentum_pressure]
    type = INSADMomentumPressure
    variable = velocity
    pressure = p
  []
  [momentum_supg]
    type = INSADMomentumSUPG
    variable = velocity
    velocity = velocity
  []
[]
[Functions]
  [vel_x_inlet]
    type = ParsedFunction
    expression = '${u_inlet} * (${pipe_radius}^2 - y^2)'
  []
[]
[BCs]
  [inlet]
    type = VectorFunctionDirichletBC
    variable = velocity
    boundary = 'left'
    function_x = vel_x_inlet
    function_y = 0
  [../]
  [wall]
    type = VectorFunctionDirichletBC
    variable = velocity
    boundary = 'top'
    function_x = 0
    function_y = 0
  []
  [axis]
    type = ADVectorFunctionDirichletBC
    variable = velocity
    boundary = 'bottom'
    set_x_comp = false
    function_y = 0
  []
  # pressure is not integrated by parts so we cannot remove the nullspace through a natural condition
  [p_corner]
    type = DirichletBC
    boundary = 'right'
    value = 0
    variable = p
  []
[]
[Materials]
  [const]
    type = ADGenericConstantMaterial
    prop_names = 'rho mu'
    prop_values = '${rho} ${mu}'
  []
  [ins_mat]
    type = INSADTauMaterial
    velocity = velocity
    pressure = p
  []
[]
[Executioner]
  type = Steady
  solve_type = 'NEWTON'
  petsc_options_iname = '-pc_type'
  petsc_options_value = 'lu'
  nl_rel_tol = 1e-12
  nl_abs_tol = 1e-12
  line_search = 'none'
[]
[Outputs]
  exodus = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/ad_rz_cone_stab_jac_test.i)
[GlobalParams]
  order = SECOND
  integrate_p_by_parts = true
[]
[Mesh]
  [gen]
    type = GeneratedMeshGenerator
    dim = 2
    nx = 2
    ny = 2
    xmin = 0
    xmax = 1.1
    ymin = -1.1
    ymax = 1.1
    elem_type = QUAD9
  []
  [./corner_node]
    type = ExtraNodesetGenerator
    new_boundary = 'pinned_node'
    nodes = '0'
    input = gen
  [../]
  coord_type = RZ
[]
[Preconditioning]
  [./SMP_PJFNK]
    type = SMP
    full = true
    solve_type = NEWTON
  [../]
[]
[Executioner]
  type = Transient
  num_steps = 1
  dt = 1.1
[]
[Variables]
  [./velocity]
    family = LAGRANGE_VEC
  [../]
  [./p]
    order = FIRST
  [../]
[]
# Need to set a non-zero initial condition because we have a velocity norm in
# the denominator for the tau coefficient of the stabilization term
[ICs]
  [velocity]
    type = VectorConstantIC
    x_value = 1e-15
    y_value = 1e-15
    variable = velocity
  []
[]
[Kernels]
  [./mass]
    type = INSADMass
    variable = p
  [../]
  [mass_pspg]
    type = INSADMassPSPG
    variable = p
  []
  [momentum_time]
    type = INSADMomentumTimeDerivative
    variable = velocity
  []
  [momentum_advection]
    type = INSADMomentumAdvection
    variable = velocity
  []
  [./momentum_viscous]
    type = INSADMomentumViscous
    variable = velocity
  [../]
  [./momentum_pressure]
    type = INSADMomentumPressure
    variable = velocity
    pressure = p
  [../]
  [momentum_supg]
    type = INSADMomentumSUPG
    variable = velocity
    velocity = velocity
  []
[]
[BCs]
  [inlet]
    type = VectorFunctionDirichletBC
    variable = velocity
    boundary = 'bottom'
    function_x = 0
    function_y = 1
  [../]
  [wall]
    type = VectorFunctionDirichletBC
    variable = velocity
    boundary = 'right'
    function_x = 0
    function_y = 0
  []
  [axis]
    type = ADVectorFunctionDirichletBC
    variable = velocity
    boundary = 'left'
    set_y_comp = false
    function_x = 0
  []
  [outlet]
    type = INSADMomentumNoBCBC
    variable = velocity
    pressure = p
    boundary = 'top'
  []
  # When the NoBCBC is applied on the outlet boundary then there is nothing
  # constraining the pressure. Thus we must pin the pressure somewhere to ensure
  # that the problem is not singular. If the below BC is not applied then
  # -pc_type svd -pc_svd_monitor reveals a singular value
  [p_corner]
    type = DirichletBC
    boundary = pinned_node
    value = 0
    variable = p
  []
[]
[Materials]
  [./const]
    type = ADGenericConstantMaterial
    prop_names = 'rho mu'
    prop_values = '1.1 1.1'
  [../]
  [ins_mat]
    type = INSADTauMaterial
    velocity = velocity
    pressure = p
  []
[]
(modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/ad_rz_cone_no_parts_steady_stabilized_second_order.i)
[GlobalParams]
  order = SECOND
  integrate_p_by_parts = false
[]
[Mesh]
  file = '2d_cone.msh'
  coord_type = RZ
[]
[AuxVariables]
  [vel_x]
  []
  [vel_y]
  []
[]
[AuxKernels]
  [vel_x]
    type = VectorVariableComponentAux
    variable = vel_x
    vector_variable = velocity
    component = 'x'
  []
  [vel_y]
    type = VectorVariableComponentAux
    variable = vel_y
    vector_variable = velocity
    component = 'y'
  []
[]
[Variables]
  [./velocity]
    family = LAGRANGE_VEC
  [../]
  [./p]
    order = FIRST
  [../]
[]
# Need to set a non-zero initial condition because we have a velocity norm in
# the denominator for the tau coefficient of the stabilization term
[ICs]
  [velocity]
    type = VectorConstantIC
    x_value = 1e-15
    y_value = 1e-15
    variable = velocity
  []
[]
[Kernels]
  [./mass]
    type = INSADMass
    variable = p
  [../]
  [mass_pspg]
    type = INSADMassPSPG
    variable = p
  []
  [momentum_advection]
    type = INSADMomentumAdvection
    variable = velocity
  []
  [./momentum_viscous]
    type = INSADMomentumViscous
    variable = velocity
  [../]
  [./momentum_pressure]
    type = INSADMomentumPressure
    variable = velocity
    pressure = p
  [../]
  [momentum_supg]
    type = INSADMomentumSUPG
    variable = velocity
    velocity = velocity
  []
[]
[BCs]
  [p_corner]
    type = DirichletBC
    boundary = top_right
    value = 0
    variable = p
  []
  [inlet]
    type = VectorFunctionDirichletBC
    variable = velocity
    boundary = 'bottom'
    function_x = 0
    function_y = 'inlet_func'
  [../]
  [wall]
    type = VectorFunctionDirichletBC
    variable = velocity
    boundary = 'right'
    function_x = 0
    function_y = 0
  []
  [axis]
    type = ADVectorFunctionDirichletBC
    variable = velocity
    boundary = 'left'
    set_y_comp = false
    function_x = 0
  []
[]
[Functions]
  [./inlet_func]
    type = ParsedFunction
    expression = '-4 * x^2 + 1'
  [../]
[]
[Materials]
  [./const]
    type = ADGenericConstantMaterial
    prop_names = 'rho mu'
    prop_values = '1  1'
  [../]
  [ins_mat]
    type = INSADTauMaterial
    velocity = velocity
    pressure = p
  []
[]
[Preconditioning]
  [./SMP]
    type = SMP
    full = true
    solve_type = 'NEWTON'
  [../]
[]
[Executioner]
  type = Steady
  petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_levels'
  petsc_options_value = 'bjacobi  ilu          4'
  nl_rel_tol = 1e-12
  nl_max_its = 6
[]
[Outputs]
  console = true
  [./out]
    type = Exodus
  [../]
[]
[Postprocessors]
  [./flow_in]
    type = VolumetricFlowRate
    vel_x = vel_x
    vel_y = vel_y
    boundary = 'bottom'
    execute_on = 'timestep_end'
  [../]
  [./flow_out]
    type = VolumetricFlowRate
    vel_x = vel_x
    vel_y = vel_y
    boundary = 'top'
    execute_on = 'timestep_end'
  [../]
[]
(modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/ad_rz_cone_by_parts_traction_steady_stabilized.i)
[GlobalParams]
  order = FIRST
  integrate_p_by_parts = true
  viscous_form = 'traction'
[]
[Mesh]
  file = '2d_cone.msh'
  coord_type = RZ
[]
[AuxVariables]
  [vel_x]
  []
  [vel_y]
  []
[]
[AuxKernels]
  [vel_x]
    type = VectorVariableComponentAux
    variable = vel_x
    vector_variable = velocity
    component = 'x'
  []
  [vel_y]
    type = VectorVariableComponentAux
    variable = vel_y
    vector_variable = velocity
    component = 'y'
  []
[]
[Variables]
  [./velocity]
    family = LAGRANGE_VEC
  [../]
  [./p]
  [../]
[]
# Need to set a non-zero initial condition because we have a velocity norm in
# the denominator for the tau coefficient of the stabilization term
[ICs]
  [velocity]
    type = VectorConstantIC
    x_value = 1e-15
    y_value = 1e-15
    variable = velocity
  []
[]
[Kernels]
  [./mass]
    type = INSADMass
    variable = p
  [../]
  [mass_pspg]
    type = INSADMassPSPG
    variable = p
  []
  [momentum_advection]
    type = INSADMomentumAdvection
    variable = velocity
  []
  [./momentum_viscous]
    type = INSADMomentumViscous
    variable = velocity
  [../]
  [./momentum_pressure]
    type = INSADMomentumPressure
    variable = velocity
    pressure = p
  [../]
  [momentum_supg]
    type = INSADMomentumSUPG
    variable = velocity
    velocity = velocity
  []
[]
[BCs]
  [inlet]
    type = VectorFunctionDirichletBC
    variable = velocity
    boundary = 'bottom'
    function_x = 0
    function_y = 'inlet_func'
  [../]
  [wall]
    type = VectorFunctionDirichletBC
    variable = velocity
    boundary = 'right'
    function_x = 0
    function_y = 0
  []
  [axis]
    type = ADVectorFunctionDirichletBC
    variable = velocity
    boundary = 'left'
    set_y_comp = false
    function_x = 0
  []
[]
[Functions]
  [./inlet_func]
    type = ParsedFunction
    expression = '-4 * x^2 + 1'
  [../]
[]
[Materials]
  [./const]
    type = ADGenericConstantMaterial
    prop_names = 'rho mu'
    prop_values = '1  1'
  [../]
  [ins_mat]
    type = INSADTauMaterial
    velocity = velocity
    pressure = p
  []
[]
[Preconditioning]
  [./SMP]
    type = SMP
    full = true
    solve_type = 'NEWTON'
  [../]
[]
[Executioner]
  type = Steady
  petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_levels'
  petsc_options_value = 'bjacobi  ilu          4'
  nl_rel_tol = 1e-12
  nl_max_its = 6
[]
[Outputs]
  console = true
  [./out]
    type = Exodus
  [../]
[]
[Postprocessors]
  [./flow_in]
    type = VolumetricFlowRate
    vel_x = vel_x
    vel_y = vel_y
    boundary = 'bottom'
    execute_on = 'timestep_end'
  [../]
  [./flow_out]
    type = VolumetricFlowRate
    vel_x = vel_x
    vel_y = vel_y
    boundary = 'top'
    execute_on = 'timestep_end'
  [../]
[]
(modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/ad_rz_cone_by_parts_steady_stabilized_second_order.i)
[GlobalParams]
  order = SECOND
  integrate_p_by_parts = true
[]
[Mesh]
  file = '2d_cone.msh'
  coord_type = RZ
[]
[AuxVariables]
  [vel_x]
  []
  [vel_y]
  []
[]
[AuxKernels]
  [vel_x]
    type = VectorVariableComponentAux
    variable = vel_x
    vector_variable = velocity
    component = 'x'
  []
  [vel_y]
    type = VectorVariableComponentAux
    variable = vel_y
    vector_variable = velocity
    component = 'y'
  []
[]
[Variables]
  [./velocity]
    family = LAGRANGE_VEC
  [../]
  [./p]
    order = FIRST
  [../]
[]
# Need to set a non-zero initial condition because we have a velocity norm in
# the denominator for the tau coefficient of the stabilization term
[ICs]
  [velocity]
    type = VectorConstantIC
    x_value = 1e-15
    y_value = 1e-15
    variable = velocity
  []
[]
[Kernels]
  [./mass]
    type = INSADMass
    variable = p
  [../]
  [mass_pspg]
    type = INSADMassPSPG
    variable = p
  []
  [momentum_advection]
    type = INSADMomentumAdvection
    variable = velocity
  []
  [./momentum_viscous]
    type = INSADMomentumViscous
    variable = velocity
  [../]
  [./momentum_pressure]
    type = INSADMomentumPressure
    variable = velocity
    pressure = p
  [../]
  [momentum_supg]
    type = INSADMomentumSUPG
    variable = velocity
    velocity = velocity
  []
[]
[BCs]
  [inlet]
    type = VectorFunctionDirichletBC
    variable = velocity
    boundary = 'bottom'
    function_x = 0
    function_y = 'inlet_func'
  [../]
  [wall]
    type = VectorFunctionDirichletBC
    variable = velocity
    boundary = 'right'
    function_x = 0
    function_y = 0
  []
  [axis]
    type = ADVectorFunctionDirichletBC
    variable = velocity
    boundary = 'left'
    set_y_comp = false
    function_x = 0
  []
[]
[Functions]
  [./inlet_func]
    type = ParsedFunction
    expression = '-4 * x^2 + 1'
  [../]
[]
[Materials]
  [./const]
    type = ADGenericConstantMaterial
    prop_names = 'rho mu'
    prop_values = '1  1'
  [../]
  [ins_mat]
    type = INSADTauMaterial
    velocity = velocity
    pressure = p
  []
[]
[Preconditioning]
  [./SMP]
    type = SMP
    full = true
    solve_type = 'NEWTON'
  [../]
[]
[Executioner]
  type = Steady
  petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_levels'
  petsc_options_value = 'bjacobi  ilu          4'
  nl_rel_tol = 1e-12
  nl_max_its = 6
[]
[Outputs]
  console = true
  [./out]
    type = Exodus
  [../]
[]
[Postprocessors]
  [./flow_in]
    type = VolumetricFlowRate
    vel_x = vel_x
    vel_y = vel_y
    boundary = 'bottom'
    execute_on = 'timestep_end'
  [../]
  [./flow_out]
    type = VolumetricFlowRate
    vel_x = vel_x
    vel_y = vel_y
    boundary = 'top'
    execute_on = 'timestep_end'
  [../]
[]
(modules/navier_stokes/test/tests/finite_element/ins/lid_driven/ad_lid_driven_stabilized.i)
[Mesh]
  [gen]
    type = GeneratedMeshGenerator
    dim = 2
    xmin = 0
    xmax = 1.0
    ymin = 0
    ymax = 1.0
    nx = 64
    ny = 64
  []
  [./corner_node]
    type = ExtraNodesetGenerator
    new_boundary = 'pinned_node'
    nodes = '0'
    input = gen
  [../]
[]
[AuxVariables]
  [vel_x]
  []
  [vel_y]
  []
[]
[AuxKernels]
  [vel_x]
    type = VectorVariableComponentAux
    variable = vel_x
    vector_variable = velocity
    component = 'x'
  []
  [vel_y]
    type = VectorVariableComponentAux
    variable = vel_y
    vector_variable = velocity
    component = 'y'
  []
[]
[Variables]
  [./velocity]
    family = LAGRANGE_VEC
  [../]
  [./p]
  [../]
[]
[ICs]
  [velocity]
    type = VectorConstantIC
    x_value = 0
    y_value = 0
    variable = velocity
  []
[]
[Kernels]
  [./mass]
    type = INSADMass
    variable = p
  [../]
  [./mass_pspg]
    type = INSADMassPSPG
    variable = p
  [../]
  [./momentum_convection]
    type = INSADMomentumAdvection
    variable = velocity
  [../]
  [./momentum_viscous]
    type = INSADMomentumViscous
    variable = velocity
  [../]
  [./momentum_pressure]
    type = INSADMomentumPressure
    variable = velocity
    pressure = p
    integrate_p_by_parts = true
  [../]
  [./momentum_supg]
    type = INSADMomentumSUPG
    variable = velocity
    velocity = velocity
  [../]
[]
[BCs]
  [./no_slip]
    type = VectorFunctionDirichletBC
    variable = velocity
    boundary = 'bottom right left'
  [../]
  [./lid]
    type = VectorFunctionDirichletBC
    variable = velocity
    boundary = 'top'
    function_x = 'lid_function'
  [../]
  [./pressure_pin]
    type = DirichletBC
    variable = p
    boundary = 'pinned_node'
    value = 0
  [../]
[]
[Materials]
  [./const]
    type = ADGenericConstantMaterial
    prop_names = 'rho mu'
    prop_values = '1  1'
  [../]
  [ins_mat]
    type = INSADTauMaterial
    velocity = velocity
    pressure = p
    alpha = .1
  []
[]
[Functions]
  [./lid_function]
    # We pick a function that is exactly represented in the velocity
    # space so that the Dirichlet conditions are the same regardless
    # of the mesh spacing.
    type = ParsedFunction
    expression = '4*x*(1-x)'
  [../]
[]
[Preconditioning]
  [./SMP]
    type = SMP
    full = true
    solve_type = 'NEWTON'
  [../]
[]
[Executioner]
  type = Steady
  petsc_options_iname = '-pc_type'
  petsc_options_value = 'lu'
  line_search = 'none'
  nl_rel_tol = 1e-12
  nl_abs_tol = 1e-13
  nl_max_its = 6
  l_tol = 1e-6
  l_max_its = 500
[]
[Outputs]
  exodus = true
  file_base = lid_driven_stabilized_out
[]
[Postprocessors]
  [lin]
    type = NumLinearIterations
  []
  [nl]
    type = NumNonlinearIterations
  []
  [lin_tot]
    type = CumulativeValuePostprocessor
    postprocessor = 'lin'
  []
  [nl_tot]
    type = CumulativeValuePostprocessor
    postprocessor = 'nl'
  []
[]
(modules/navier_stokes/test/tests/finite_element/ins/rz-x-axial-coord/pipe-flow-natural-bc.i)
mu=1
rho=1
pipe_length=10 # m
pipe_radius=1 # m
u_inlet=1
[GlobalParams]
  integrate_p_by_parts = true
[]
[Mesh]
  [gen]
    type = GeneratedMeshGenerator
    dim = 2
    xmin = 0
    xmax = ${pipe_length}
    ymin = 0
    ymax = ${pipe_radius}
    nx = 50
    ny = 5
  []
  coord_type = 'RZ'
  rz_coord_axis = x
[]
[Variables]
  [velocity]
    family = LAGRANGE_VEC
  []
  [p][]
[]
[Kernels]
  [mass]
    type = INSADMass
    variable = p
  []
  [mass_pspg]
    type = INSADMassPSPG
    variable = p
  []
  [momentum_convection]
    type = INSADMomentumAdvection
    variable = velocity
  []
  [momentum_viscous]
    type = INSADMomentumViscous
    variable = velocity
  []
  [momentum_pressure]
    type = INSADMomentumPressure
    variable = velocity
    pressure = p
  []
  [momentum_supg]
    type = INSADMomentumSUPG
    variable = velocity
    velocity = velocity
  []
[]
[Functions]
  [vel_x_inlet]
    type = ParsedFunction
    expression = '${u_inlet} * (${pipe_radius}^2 - y^2)'
  []
[]
[BCs]
  [inlet]
    type = VectorFunctionDirichletBC
    variable = velocity
    boundary = 'left'
    function_x = vel_x_inlet
    function_y = 0
  [../]
  [wall]
    type = VectorFunctionDirichletBC
    variable = velocity
    boundary = 'top'
    function_x = 0
    function_y = 0
  []
  [axis]
    type = ADVectorFunctionDirichletBC
    variable = velocity
    boundary = 'bottom'
    set_x_comp = false
    function_y = 0
  []
[]
[Materials]
  [const]
    type = ADGenericConstantMaterial
    prop_names = 'rho mu'
    prop_values = '${rho} ${mu}'
  []
  [ins_mat]
    type = INSADTauMaterial
    velocity = velocity
    pressure = p
  []
[]
[Executioner]
  type = Steady
  solve_type = 'NEWTON'
  petsc_options_iname = '-pc_type'
  petsc_options_value = 'lu'
  nl_rel_tol = 1e-12
  nl_abs_tol = 1e-12
  line_search = 'none'
[]
[Outputs]
  exodus = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/coupled-force/gravity-object.i)
[Mesh]
  [gen]
    type = GeneratedMeshGenerator
    dim = 2
    xmin = 0
    xmax = 1.0
    ymin = 0
    ymax = 1.0
    nx = 16
    ny = 16
  []
  [./corner_node]
    type = ExtraNodesetGenerator
    new_boundary = 'pinned_node'
    nodes = '0'
    input = gen
  [../]
[]
[Variables]
  [./velocity]
    family = LAGRANGE_VEC
  [../]
  [./p]
  [../]
  [u]
    family = LAGRANGE_VEC
  []
[]
[ICs]
  [velocity]
    type = VectorConstantIC
    x_value = 1e-15
    y_value = 1e-15
    variable = velocity
  []
[]
[Kernels]
  [./mass]
    type = INSADMass
    variable = p
  [../]
  [./mass_pspg]
    type = INSADMassPSPG
    variable = p
  [../]
  [./momentum_convection]
    type = INSADMomentumAdvection
    variable = velocity
  [../]
  [./momentum_viscous]
    type = INSADMomentumViscous
    variable = velocity
  [../]
  [./momentum_pressure]
    type = INSADMomentumPressure
    variable = velocity
    pressure = p
    integrate_p_by_parts = true
  [../]
  [momentum_coupled_force]
    type = INSADMomentumCoupledForce
    variable = velocity
    coupled_vector_var = u
  []
  [gravity]
    type = INSADGravityForce
    variable = velocity
    gravity = '0 -9.81 0'
  []
  [./momentum_supg]
    type = INSADMomentumSUPG
    variable = velocity
    velocity = velocity
  [../]
  [u_diff]
    type = VectorDiffusion
    variable = u
  []
[]
[BCs]
  [./no_slip]
    type = VectorFunctionDirichletBC
    variable = velocity
    boundary = 'bottom right left top'
  [../]
  [./pressure_pin]
    type = DirichletBC
    variable = p
    boundary = 'pinned_node'
    value = 0
  [../]
  [u_left]
    type = VectorFunctionDirichletBC
    variable = u
    boundary = 'left'
    function_x = 1
    function_y = 1
  []
  [u_right]
    type = VectorFunctionDirichletBC
    variable = u
    boundary = 'right'
    function_x = -1
    function_y = -1
  []
[]
[Materials]
  [./const]
    type = ADGenericConstantMaterial
    prop_names = 'rho mu'
    prop_values = '1  1'
  [../]
  [ins_mat]
    type = INSADTauMaterial
    velocity = velocity
    pressure = p
  []
[]
[Executioner]
  type = Steady
  solve_type = 'NEWTON'
  petsc_options_iname = '-pc_type -sub_pc_factor_levels -ksp_gmres_restart'
  petsc_options_value = 'asm      6                     200'
  line_search = 'none'
  nl_rel_tol = 1e-12
  nl_max_its = 6
[]
[Outputs]
  exodus = true
[]
(modules/fsi/test/tests/newmark-beta/test_ALE.i)
beta = 0.25
gamma = 0.5
eta = 19.63
zeta = 0.000025
youngs_modulus = 1e8
[GlobalParams]
  displacements = 'disp_x disp_y'
[]
[Mesh]
  [file]
    type = FileMeshGenerator
    file = tmesh_HR.msh
  []
  [convert]
    type = ElementOrderConversionGenerator
    input = file
    conversion_type = FIRST_ORDER
  []
  [matrix_side_interface]
    type = SideSetsBetweenSubdomainsGenerator
    input = convert
    new_boundary = interface_matrix_side
    paired_block = 'inclusion'
    primary_block = 'matrix'
  []
[]
[Variables]
  [disp_x]
    scaling = '${fparse 1/youngs_modulus}'
  []
  [disp_y]
    scaling = '${fparse 1/youngs_modulus}'
  []
  [vel]
    family = LAGRANGE_VEC
    block = 'matrix'
  []
  [p]
    block = 'matrix'
  []
  [lambda]
    family = SCALAR
    block = 'matrix'
  []
[]
[AuxVariables]
  [accel_x]
    block = 'inclusion'
  []
  [accel_y]
    block = 'inclusion'
  []
  [vel_x_solid]
    block = 'inclusion'
  []
  [vel_y_solid]
    block = 'inclusion'
  []
  [vel_x_fluid]
    block = 'matrix'
  []
  [vel_y_fluid]
    block = 'matrix'
  []
[]
[AuxKernels]
  [accel_x] # Calculates and stores acceleration at the end of time step
    type = NewmarkAccelAux
    variable = accel_x
    displacement = disp_x
    velocity = vel_x_solid
    beta = ${beta}
    execute_on = timestep_end
    block = 'inclusion'
  []
  [accel_y] # Calculates and stores acceleration at the end of time step
    type = NewmarkAccelAux
    variable = accel_y
    displacement = disp_y
    velocity = vel_y_solid
    beta = ${beta}
    execute_on = timestep_end
    block = 'inclusion'
  []
  [vel_x_solid]
    type = NewmarkVelAux
    variable = vel_x_solid
    acceleration = accel_x
    gamma = ${gamma}
    execute_on = timestep_end
    block = 'inclusion'
  []
  [vel_y_solid]
    type = NewmarkVelAux
    variable = vel_y_solid
    acceleration = accel_y
    gamma = ${gamma}
    execute_on = timestep_end
    block = 'inclusion'
  []
  [vel_x_fluid]
    type = VectorVariableComponentAux
    variable = vel_x_fluid
    vector_variable = vel
    execute_on = timestep_end
    component = 'x'
  []
  [vel_y_fluid]
    type = VectorVariableComponentAux
    variable = vel_y_fluid
    vector_variable = vel
    execute_on = timestep_end
    component = 'y'
  []
[]
[ScalarKernels]
  [mean_zero_pressure_lm]
    type = AverageValueConstraint
    variable = lambda
    pp_name = pressure_integral
    value = 0
  []
[]
[Kernels]
  [mat_disp_x]
    type = MatDiffusion
    variable = disp_x
    block = 'matrix'
    use_displaced_mesh = false
    diffusivity = ${youngs_modulus}
  []
  [mat_disp_y]
    type = MatDiffusion
    variable = disp_y
    block = 'matrix'
    use_displaced_mesh = false
    diffusivity = ${youngs_modulus}
  []
  [mass]
    type = INSADMass
    variable = p
    use_displaced_mesh = true
    block = 'matrix'
  []
  [mass_pspg]
    type = INSADMassPSPG
    variable = p
    use_displaced_mesh = true
    block = 'matrix'
  []
  [momentum_time]
    type = INSADMomentumTimeDerivative
    variable = vel
    block = 'matrix'
  []
  [momentum_convection]
    type = INSADMomentumAdvection
    variable = vel
    block = 'matrix'
  []
  [momentum_viscous]
    type = INSADMomentumViscous
    variable = vel
    use_displaced_mesh = true
    block = 'matrix'
  []
  [momentum_pressure]
    type = INSADMomentumPressure
    variable = vel
    pressure = p
    integrate_p_by_parts = true
    use_displaced_mesh = true
    block = 'matrix'
  []
  [momentum_supg]
    type = INSADMomentumSUPG
    variable = vel
    material_velocity = relative_velocity
    block = 'matrix'
    use_displaced_mesh = true
  []
  [momentum_mesh_advection]
    type = INSADMomentumMeshAdvection
    variable = vel
    disp_x = 'disp_x'
    disp_y = 'disp_y'
    use_displaced_mesh = true
    block = 'matrix'
  []
  [mean_zero_pressure]
    type = ScalarLagrangeMultiplier
    variable = p
    lambda = lambda
    block = 'matrix'
  []
  # zeta*K*vel + K * disp
  [dynamic_stress_x]
    type = DynamicStressDivergenceTensors
    block = inclusion
    component = 0
    variable = disp_x
    zeta = ${zeta}
  []
  [dynamic_stress_y]
    type = DynamicStressDivergenceTensors
    block = inclusion
    component = 1
    variable = disp_y
    zeta = ${zeta}
  []
  # M*accel + eta*M*vel
  [inertia_x]
    type = InertialForce
    variable = disp_x
    velocity = vel_x_solid
    acceleration = accel_x
    beta = ${beta} # Newmark time integration
    gamma = ${gamma} # Newmark time integration
    eta = ${eta}
    block = 'inclusion'
  []
  [inertia_y]
    type = InertialForce
    variable = disp_y
    velocity = vel_y_solid
    acceleration = accel_y
    beta = ${beta}
    gamma = ${gamma}
    eta = ${eta}
    block = 'inclusion'
  []
[]
[InterfaceKernels]
  [penalty]
    type = ADPenaltyVelocityContinuityNewmarkBeta
    variable = vel
    fluid_velocity = vel
    displacements = 'disp_x disp_y'
    solid_velocities = 'vel_x_solid vel_y_solid'
    solid_accelerations = 'accel_x accel_y'
    boundary = 'interface_matrix_side'
    penalty = ${youngs_modulus}
    beta = ${beta}
    gamma = ${gamma}
  []
[]
[Materials]
  [viscous_mat]
    type = ADGenericConstantMaterial
    block = 'matrix'
    prop_names = 'rho mu'
    prop_values = '1  1'
  []
  [ins_mat]
    type = INSADTauMaterial
    velocity = vel
    pressure = p
    block = 'matrix'
  []
  [elasticity_tensor]
    type = ComputeIsotropicElasticityTensor
    youngs_modulus = ${youngs_modulus}
    poissons_ratio = 0.3
    block = 'inclusion'
  []
  [strain]
    type = ComputeFiniteStrain
    displacements = 'disp_x disp_y'
    block = 'inclusion'
  []
  [small_stress]
    type = ComputeFiniteStrainElasticStress
    block = 'inclusion'
  []
  [density]
    type = GenericConstantMaterial
    block = 'inclusion'
    prop_names = density
    prop_values = 3 # kg/m3
  []
[]
[BCs] # mesh boundaries remain still so I dont think we need to use deformed mesh for vel
  [no_disp_x]
    type = DirichletBC
    variable = disp_x
    boundary = 'bottom top left right'
    value = 0
  []
  [no_disp_y]
    type = DirichletBC
    variable = disp_y
    boundary = 'bottom top left right'
    value = 0
  []
  [shear_top_x]
    type = ADVectorFunctionDirichletBC
    boundary = top
    variable = vel
    function_x = '-0.001'
  []
  [shear_bottom_x]
    type = ADVectorFunctionDirichletBC
    boundary = 'bottom'
    variable = vel
    function_x = '0.001'
  []
  [Periodic]
    [vel]
      variable = vel
      primary = 'left'
      secondary = 'right'
      translation = '1 0 0'
    []
    [x_p]
      variable = p
      primary = 'left'
      secondary = 'right'
      translation = '1 0 0'
    []
  []
[]
[Preconditioning]
  [SMP]
    type = SMP
    full = true
    petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_mat_solver_type'
    petsc_options_value = 'lu       NONZERO               strumpack'
  []
[]
[Executioner]
  type = Transient
  solve_type = 'NEWTON'
  end_time = 100.0
  nl_abs_tol = 1e-12
  [TimeStepper]
    type = IterationAdaptiveDT
    optimal_iterations = 5
    dt = 0.005
    growth_factor = 1.5
    cutback_factor = 0.9
  []
[]
[Postprocessors]
  [pressure_integral]
    type = ElementIntegralVariablePostprocessor
    variable = p
    execute_on = linear
    block = 'matrix'
  []
  [max_vel_y]
    type = ElementExtremeValue
    variable = vel_y_fluid
    block = 'matrix'
    value_type = max
  []
  [min_vel_y]
    type = ElementExtremeValue
    variable = vel_y_fluid
    block = 'matrix'
    value_type = min
  []
[]
[Outputs]
  hide = 'pressure_integral lambda'
  [csv]
    type = CSV
    execute_on = 'final'
  []
[]
(modules/navier_stokes/test/tests/finite_element/ins/velocity_channel/ad-traction-supg.i)
# This input file tests outflow boundary conditions for the incompressible NS equations.
[GlobalParams]
  integrate_p_by_parts = true
  viscous_form = traction
[]
[Mesh]
  type = GeneratedMesh
  dim = 2
  xmin = 0
  xmax = 3.0
  ymin = 0
  ymax = 1.0
  nx = 30
  ny = 10
  elem_type = QUAD9
[]
[Variables]
  [vel]
    order = SECOND
    family = LAGRANGE_VEC
  []
  [p]
    order = FIRST
    family = LAGRANGE
  []
[]
[Kernels]
  [mass]
    type = INSADMass
    variable = p
  []
  [momentum_convection]
    type = INSADMomentumAdvection
    variable = vel
  []
  [momentum_viscous]
    type = INSADMomentumViscous
    variable = vel
  []
  [momentum_pressure]
    type = INSADMomentumPressure
    variable = vel
    pressure = p
  []
  [momentum_supg]
    type = INSADMomentumSUPG
    variable = vel
    velocity = vel
  []
[]
[BCs]
  [wall]
    type = VectorFunctionDirichletBC
    variable = vel
    boundary = 'top bottom'
    function_x = 0
    function_y = 0
  []
  [inlet]
    type = VectorFunctionDirichletBC
    variable = vel
    boundary = 'left'
    function_x = inlet_func
    function_y = 0
  []
[]
[Materials]
  [const]
    type = ADGenericConstantMaterial
    block = 0
    prop_names = 'rho mu'
    prop_values = '1  1'
  []
  [ins_mat]
    type = INSADTauMaterial
    velocity = vel
    pressure = p
  []
[]
[Preconditioning]
  [SMP]
    type = SMP
    full = true
    solve_type = NEWTON
  []
[]
[Executioner]
  type = Steady
  petsc_options_iname = '-pc_type -pc_factor_shift_type'
  petsc_options_value = 'lu       NONZERO'
  line_search = none
  nl_rel_tol = 1e-12
[]
[Outputs]
  [out]
    type = Exodus
  []
[]
[Functions]
  [inlet_func]
    type = ParsedFunction
    expression = '-4 * (y - 0.5)^2 + 1'
  []
[]
(modules/fsi/test/tests/2d-small-strain-transient/ad-fsi-flat-channel.i)
[GlobalParams]
  displacements = 'disp_x disp_y'
  order = FIRST
  preset = false
  use_displaced_mesh = true
[]
[Mesh]
  [gmg]
    type = GeneratedMeshGenerator
    dim = 2
    xmin = 0
    xmax = 3.0
    ymin = 0
    ymax = 1.0
    nx = 10
    ny = 15
    elem_type = QUAD4
  []
  [subdomain1]
    type = SubdomainBoundingBoxGenerator
    bottom_left = '0.0 0.5 0'
    block_id = 1
    top_right = '3.0 1.0 0'
    input = gmg
  []
  [interface]
    type = SideSetsBetweenSubdomainsGenerator
    primary_block = '0'
    paired_block = '1'
    new_boundary = 'master0_interface'
    input = subdomain1
  []
  [break_boundary]
    type = BreakBoundaryOnSubdomainGenerator
    input = interface
  []
[]
[Variables]
  [vel]
    block = 0
    family = LAGRANGE_VEC
  []
  [p]
    block = 0
    order = FIRST
  []
  [disp_x]
  []
  [disp_y]
  []
  [vel_x_solid]
    block = 1
  []
  [vel_y_solid]
    block = 1
  []
[]
[Kernels]
  [mass]
    type = INSADMass
    variable = p
    block = 0
  []
  [mass_pspg]
    type = INSADMassPSPG
    variable = p
    block = 0
  []
  [momentum_time]
    type = INSADMomentumTimeDerivative
    variable = vel
    block = 0
  []
  [momentum_convection]
    type = INSADMomentumAdvection
    variable = vel
    block = 0
  []
  [momentum_viscous]
    type = INSADMomentumViscous
    variable = vel
    block = 0
  []
  [momentum_pressure]
    type = INSADMomentumPressure
    variable = vel
    pressure = p
    integrate_p_by_parts = true
    block = 0
  []
  [momentum_supg]
    type = INSADMomentumSUPG
    variable = vel
    material_velocity = relative_velocity
    block = 0
  []
  [momentum_mesh]
    type = INSADMomentumMeshAdvection
    variable = vel
    disp_x = 'disp_x'
    disp_y = 'disp_y'
    block = 0
  []
  [disp_x_fluid]
    type = Diffusion
    variable = disp_x
    block = 0
    use_displaced_mesh = false
  []
  [disp_y_fluid]
    type = Diffusion
    variable = disp_y
    block = 0
    use_displaced_mesh = false
  []
  [accel_tensor_x]
    type = CoupledTimeDerivative
    variable = disp_x
    v = vel_x_solid
    block = 1
    use_displaced_mesh = false
  []
  [accel_tensor_y]
    type = CoupledTimeDerivative
    variable = disp_y
    v = vel_y_solid
    block = 1
    use_displaced_mesh = false
  []
  [vxs_time_derivative_term]
    type = CoupledTimeDerivative
    variable = vel_x_solid
    v = disp_x
    block = 1
    use_displaced_mesh = false
  []
  [vys_time_derivative_term]
    type = CoupledTimeDerivative
    variable = vel_y_solid
    v = disp_y
    block = 1
    use_displaced_mesh = false
  []
  [source_vxs]
    type = MatReaction
    variable = vel_x_solid
    block = 1
    reaction_rate = 1
    use_displaced_mesh = false
  []
  [source_vys]
    type = MatReaction
    variable = vel_y_solid
    block = 1
    reaction_rate = 1
    use_displaced_mesh = false
  []
[]
[InterfaceKernels]
  [penalty]
    type = ADPenaltyVelocityContinuity
    variable = vel
    fluid_velocity = vel
    displacements = 'disp_x disp_y'
    solid_velocities = 'vel_x_solid vel_y_solid'
    boundary = master0_interface
    penalty = 1e6
  []
[]
[Physics/SolidMechanics/QuasiStatic]
  [solid_domain]
    strain = SMALL
    incremental = false
    # generate_output = 'strain_xx strain_yy strain_zz' ## Not at all necessary, but nice
    block = '1'
  []
[]
[Materials]
  [elasticity_tensor]
    type = ComputeIsotropicElasticityTensor
    youngs_modulus = 1e2
    poissons_ratio = 0.3
    block = '1'
    use_displaced_mesh = false
  []
  [small_stress]
    type = ComputeLinearElasticStress
    block = 1
  []
  [const]
    type = ADGenericConstantMaterial
    block = 0
    prop_names = 'rho mu'
    prop_values = '1  1'
  []
  [ins_mat]
    type = INSADTauMaterial
    velocity = vel
    pressure = p
    block = 0
  []
[]
[BCs]
  [fluid_bottom]
    type = ADVectorFunctionDirichletBC
    variable = vel
    boundary = 'bottom'
    function_x = 0
    function_y = 0
  []
  [fluid_left]
    type = ADVectorFunctionDirichletBC
    variable = vel
    boundary = 'left_to_0'
    function_x = 'inlet_func'
    function_y = 0
    # The displacements actually affect the result of the function evaluation so in order to eliminate the impact
    # on the Jacobian we set 'use_displaced_mesh = false' here
    use_displaced_mesh = false
  []
  [no_disp_x]
    type = DirichletBC
    variable = disp_x
    boundary = 'bottom top left_to_1 right_to_1 left_to_0 right_to_0'
    value = 0
  []
  [no_disp_y]
    type = DirichletBC
    variable = disp_y
    boundary = 'bottom top left_to_1 right_to_1 left_to_0 right_to_0'
    value = 0
  []
  [solid_x_no_slip]
    type = DirichletBC
    variable = vel_x_solid
    boundary = 'top left_to_1 right_to_1'
    value = 0.0
  []
  [solid_y_no_slip]
    type = DirichletBC
    variable = vel_y_solid
    boundary = 'top left_to_1 right_to_1'
    value = 0.0
  []
[]
[Preconditioning]
  [SMP]
    type = SMP
    full = true
  []
[]
[Executioner]
  type = Transient
  num_steps = 5
  # num_steps = 60
  dt = 0.1
  dtmin = 0.1
  solve_type = 'NEWTON'
  petsc_options_iname = '-pc_type -pc_factor_shift_type'
  petsc_options_value = 'lu       NONZERO'
  line_search = none
  nl_rel_tol = 1e-50
  nl_abs_tol = 1e-10
[]
[Outputs]
  exodus = true
[]
[Functions]
  [inlet_func]
    type = ParsedFunction
    expression = '(-16 * (y - 0.25)^2 + 1) * (1 + cos(t))'
  []
[]
(modules/navier_stokes/test/tests/finite_element/ins/coupled-force/gravity-through-coupled-force.i)
[Mesh]
  [gen]
    type = GeneratedMeshGenerator
    dim = 2
    xmin = 0
    xmax = 1.0
    ymin = 0
    ymax = 1.0
    nx = 16
    ny = 16
  []
  [./corner_node]
    type = ExtraNodesetGenerator
    new_boundary = 'pinned_node'
    nodes = '0'
    input = gen
  [../]
[]
[Variables]
  [./velocity]
    family = LAGRANGE_VEC
  [../]
  [./p]
  [../]
  [u]
    family = LAGRANGE_VEC
  []
[]
[AuxVariables]
  [gravity]
    family = LAGRANGE_VEC
  []
[]
[ICs]
  [velocity]
    type = VectorConstantIC
    x_value = 1e-15
    y_value = 1e-15
    variable = velocity
  []
  [gravity]
    type = VectorConstantIC
    x_value = '0'
    y_value = '-9.81'
    variable = gravity
  []
[]
[Kernels]
  inactive = 'momentum_coupled_forces_two_vars momentum_coupled_forces_two_funcs'
  [./mass]
    type = INSADMass
    variable = p
  [../]
  [./mass_pspg]
    type = INSADMassPSPG
    variable = p
  [../]
  [./momentum_convection]
    type = INSADMomentumAdvection
    variable = velocity
  [../]
  [./momentum_viscous]
    type = INSADMomentumViscous
    variable = velocity
  [../]
  [./momentum_pressure]
    type = INSADMomentumPressure
    variable = velocity
    pressure = p
    integrate_p_by_parts = true
  [../]
  [momentum_coupled_forces_var_and_func]
    type = INSADMomentumCoupledForce
    variable = velocity
    coupled_vector_var = u
    vector_function = 'vector_gravity_func'
  []
  [momentum_coupled_forces_two_vars]
    type = INSADMomentumCoupledForce
    variable = velocity
    coupled_vector_var = 'u gravity'
  []
  [momentum_coupled_forces_two_funcs]
    type = INSADMomentumCoupledForce
    variable = velocity
    vector_function = 'vector_func vector_gravity_func'
  []
  [./momentum_supg]
    type = INSADMomentumSUPG
    variable = velocity
    velocity = velocity
  [../]
  [u_diff]
    type = VectorDiffusion
    variable = u
  []
[]
[BCs]
  [./no_slip]
    type = VectorFunctionDirichletBC
    variable = velocity
    boundary = 'bottom right left top'
  [../]
  [./pressure_pin]
    type = DirichletBC
    variable = p
    boundary = 'pinned_node'
    value = 0
  [../]
  [u_left]
    type = VectorFunctionDirichletBC
    variable = u
    boundary = 'left'
    function_x = 1
    function_y = 1
  []
  [u_right]
    type = VectorFunctionDirichletBC
    variable = u
    boundary = 'right'
    function_x = -1
    function_y = -1
  []
[]
[Materials]
  [./const]
    type = ADGenericConstantMaterial
    prop_names = 'rho mu'
    prop_values = '1  1'
  [../]
  [ins_mat]
    type = INSADTauMaterial
    velocity = velocity
    pressure = p
  []
[]
[Executioner]
  type = Steady
  solve_type = 'NEWTON'
  petsc_options_iname = '-pc_type -sub_pc_factor_levels -ksp_gmres_restart'
  petsc_options_value = 'asm      6                     200'
  line_search = 'none'
  nl_rel_tol = 1e-12
  nl_max_its = 6
[]
[Outputs]
  [out]
    type = Exodus
    hide = 'gravity'
  []
[]
[Functions]
  [vector_func]
    type = ParsedVectorFunction
    expression_x = '-2*x + 1'
    expression_y = '-2*x + 1'
  []
  [vector_gravity_func]
    type = ParsedVectorFunction
    expression_x = '0'
    expression_y = '-9.81'
  []
[]
(modules/navier_stokes/test/tests/finite_element/ins/coupled-force/steady.i)
[Mesh]
  [gen]
    type = GeneratedMeshGenerator
    dim = 2
    xmin = 0
    xmax = 1.0
    ymin = 0
    ymax = 1.0
    nx = 16
    ny = 16
  []
  [./corner_node]
    type = ExtraNodesetGenerator
    new_boundary = 'pinned_node'
    nodes = '0'
    input = gen
  [../]
[]
[Variables]
  [./velocity]
    family = LAGRANGE_VEC
  [../]
  [./p]
  [../]
  [u]
    family = LAGRANGE_VEC
  []
[]
[ICs]
  [velocity]
    type = VectorConstantIC
    x_value = 1e-15
    y_value = 1e-15
    variable = velocity
  []
[]
[Kernels]
  [./mass]
    type = INSADMass
    variable = p
  [../]
  [./mass_pspg]
    type = INSADMassPSPG
    variable = p
  [../]
  [./momentum_convection]
    type = INSADMomentumAdvection
    variable = velocity
  [../]
  [./momentum_viscous]
    type = INSADMomentumViscous
    variable = velocity
  [../]
  [./momentum_pressure]
    type = INSADMomentumPressure
    variable = velocity
    pressure = p
    integrate_p_by_parts = true
  [../]
  [momentum_coupled_force]
    type = INSADMomentumCoupledForce
    variable = velocity
    coupled_vector_var = u
  []
  [./momentum_supg]
    type = INSADMomentumSUPG
    variable = velocity
    velocity = velocity
  [../]
  [u_diff]
    type = VectorDiffusion
    variable = u
  []
[]
[BCs]
  [./no_slip]
    type = VectorFunctionDirichletBC
    variable = velocity
    boundary = 'bottom right left top'
  [../]
  [./pressure_pin]
    type = DirichletBC
    variable = p
    boundary = 'pinned_node'
    value = 0
  [../]
  [u_left]
    type = VectorFunctionDirichletBC
    variable = u
    boundary = 'left'
    function_x = 1
    function_y = 1
  []
  [u_right]
    type = VectorFunctionDirichletBC
    variable = u
    boundary = 'right'
    function_x = -1
    function_y = -1
  []
[]
[Materials]
  [./const]
    type = ADGenericConstantMaterial
    prop_names = 'rho mu'
    prop_values = '1  1'
  [../]
  [ins_mat]
    type = INSADTauMaterial
    velocity = velocity
    pressure = p
  []
[]
[Executioner]
  type = Steady
  solve_type = 'NEWTON'
  petsc_options_iname = '-pc_type -sub_pc_factor_levels -ksp_gmres_restart'
  petsc_options_value = 'asm      6                     200'
  line_search = 'none'
  nl_rel_tol = 1e-12
  nl_max_its = 6
[]
[Outputs]
  exodus = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/ad_rz_cone_no_parts_steady_stabilized.i)
[GlobalParams]
  order = FIRST
  integrate_p_by_parts = false
[]
[Mesh]
  file = '2d_cone.msh'
  coord_type = RZ
[]
[AuxVariables]
  [vel_x]
  []
  [vel_y]
  []
[]
[AuxKernels]
  [vel_x]
    type = VectorVariableComponentAux
    variable = vel_x
    vector_variable = velocity
    component = 'x'
  []
  [vel_y]
    type = VectorVariableComponentAux
    variable = vel_y
    vector_variable = velocity
    component = 'y'
  []
[]
[Variables]
  [./velocity]
    family = LAGRANGE_VEC
  [../]
  [./p]
  [../]
[]
# Need to set a non-zero initial condition because we have a velocity norm in
# the denominator for the tau coefficient of the stabilization term
[ICs]
  [velocity]
    type = VectorConstantIC
    x_value = 1e-15
    y_value = 1e-15
    variable = velocity
  []
[]
[Kernels]
  [./mass]
    type = INSADMass
    variable = p
  [../]
  [mass_pspg]
    type = INSADMassPSPG
    variable = p
  []
  [momentum_advection]
    type = INSADMomentumAdvection
    variable = velocity
  []
  [./momentum_viscous]
    type = INSADMomentumViscous
    variable = velocity
  [../]
  [./momentum_pressure]
    type = INSADMomentumPressure
    variable = velocity
    pressure = p
  [../]
  [momentum_supg]
    type = INSADMomentumSUPG
    variable = velocity
    velocity = velocity
  []
[]
[BCs]
  [p_corner]
    type = DirichletBC
    boundary = top_right
    value = 0
    variable = p
  []
  [inlet]
    type = VectorFunctionDirichletBC
    variable = velocity
    boundary = 'bottom'
    function_x = 0
    function_y = 'inlet_func'
  [../]
  [wall]
    type = VectorFunctionDirichletBC
    variable = velocity
    boundary = 'right'
    function_x = 0
    function_y = 0
  []
  [axis]
    type = ADVectorFunctionDirichletBC
    variable = velocity
    boundary = 'left'
    set_y_comp = false
    function_x = 0
  []
[]
[Functions]
  [./inlet_func]
    type = ParsedFunction
    expression = '-4 * x^2 + 1'
  [../]
[]
[Materials]
  [./const]
    type = ADGenericConstantMaterial
    prop_names = 'rho mu'
    prop_values = '1  1'
  [../]
  [ins_mat]
    type = INSADTauMaterial
    velocity = velocity
    pressure = p
  []
[]
[Preconditioning]
  [./SMP]
    type = SMP
    full = true
    solve_type = 'NEWTON'
  [../]
[]
[Executioner]
  type = Steady
  petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_levels'
  petsc_options_value = 'bjacobi  ilu          4'
  nl_rel_tol = 1e-12
  nl_max_its = 6
[]
[Outputs]
  console = true
  [./out]
    type = Exodus
  [../]
[]
[Postprocessors]
  [./flow_in]
    type = VolumetricFlowRate
    vel_x = vel_x
    vel_y = vel_y
    boundary = 'bottom'
    execute_on = 'timestep_end'
  [../]
  [./flow_out]
    type = VolumetricFlowRate
    vel_x = vel_x
    vel_y = vel_y
    boundary = 'top'
    execute_on = 'timestep_end'
  [../]
[]
(modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/ad_rz_cone_by_parts_steady_stabilized.i)
[GlobalParams]
  order = FIRST
  integrate_p_by_parts = true
[]
[Mesh]
  file = '2d_cone.msh'
  coord_type = RZ
[]
[AuxVariables]
  [vel_x]
  []
  [vel_y]
  []
[]
[AuxKernels]
  [vel_x]
    type = VectorVariableComponentAux
    variable = vel_x
    vector_variable = velocity
    component = 'x'
  []
  [vel_y]
    type = VectorVariableComponentAux
    variable = vel_y
    vector_variable = velocity
    component = 'y'
  []
[]
[Variables]
  [./velocity]
    family = LAGRANGE_VEC
  [../]
  [./p]
  [../]
[]
# Need to set a non-zero initial condition because we have a velocity norm in
# the denominator for the tau coefficient of the stabilization term
[ICs]
  [velocity]
    type = VectorConstantIC
    x_value = 1e-15
    y_value = 1e-15
    variable = velocity
  []
[]
[Kernels]
  [./mass]
    type = INSADMass
    variable = p
  [../]
  [mass_pspg]
    type = INSADMassPSPG
    variable = p
  []
  [momentum_advection]
    type = INSADMomentumAdvection
    variable = velocity
  []
  [./momentum_viscous]
    type = INSADMomentumViscous
    variable = velocity
  [../]
  [./momentum_pressure]
    type = INSADMomentumPressure
    variable = velocity
    pressure = p
  [../]
  [momentum_supg]
    type = INSADMomentumSUPG
    variable = velocity
    velocity = velocity
  []
[]
[BCs]
  [inlet]
    type = VectorFunctionDirichletBC
    variable = velocity
    boundary = 'bottom'
    function_x = 0
    function_y = 'inlet_func'
  [../]
  [wall]
    type = VectorFunctionDirichletBC
    variable = velocity
    boundary = 'right'
    function_x = 0
    function_y = 0
  []
  [axis]
    type = ADVectorFunctionDirichletBC
    variable = velocity
    boundary = 'left'
    set_y_comp = false
    function_x = 0
  []
[]
[Functions]
  [./inlet_func]
    type = ParsedFunction
    expression = '-4 * x^2 + 1'
  [../]
[]
[Materials]
  [./const]
    type = ADGenericConstantMaterial
    prop_names = 'rho mu'
    prop_values = '1  1'
  [../]
  [ins_mat]
    type = INSADTauMaterial
    velocity = velocity
    pressure = p
  []
[]
[Preconditioning]
  [./SMP]
    type = SMP
    full = true
    solve_type = 'NEWTON'
  [../]
[]
[Executioner]
  type = Steady
  petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_levels'
  petsc_options_value = 'bjacobi  ilu          4'
  nl_rel_tol = 1e-12
  nl_max_its = 6
[]
[Outputs]
  console = true
  [./out]
    type = Exodus
  [../]
[]
[Postprocessors]
  [./flow_in]
    type = VolumetricFlowRate
    vel_x = vel_x
    vel_y = vel_y
    boundary = 'bottom'
    execute_on = 'timestep_end'
  [../]
  [./flow_out]
    type = VolumetricFlowRate
    vel_x = vel_x
    vel_y = vel_y
    boundary = 'top'
    execute_on = 'timestep_end'
  [../]
[]
(modules/navier_stokes/test/tests/finite_element/ins/lid_driven/steady_vector_fsp_al.i)
rho=1
mu=1e-3
U=1
l=1
prefactor=${fparse 1/(l/2)^2}
n=8
gamma=${U}
[Mesh]
  [gen]
    type = GeneratedMeshGenerator
    dim = 2
    xmin = 0
    xmax = ${l}
    ymin = 0
    ymax = ${l}
    nx = ${n}
    ny = ${n}
    elem_type = QUAD4
  []
  second_order = true
[]
[Variables]
  [vel]
    order = SECOND
    family = LAGRANGE_VEC
  []
  [p]
    order = FIRST
    family = LAGRANGE
  []
[]
[Kernels]
  [mass]
    type = INSADMass
    variable = p
  []
  [mass_kernel]
    type = MassMatrix
    variable = p
    matrix_tags = 'mass'
    density = ${fparse -1/(gamma + mu)}
  []
  [momentum_advection]
    type = INSADMomentumAdvection
    variable = vel
  []
  [momentum_viscous]
    type = INSADMomentumViscous
    variable = vel
  []
  [momentum_pressure]
    type = INSADMomentumPressure
    variable = vel
    pressure = p
    integrate_p_by_parts = true
  []
  [momentum_graddiv]
    type = INSADMomentumGradDiv
    variable = vel
    gamma = ${gamma}
  []
[]
[BCs]
  [no_slip]
    type = ADVectorFunctionDirichletBC
    variable = vel
    boundary = 'bottom right left'
    preset = true
  []
  [lid]
    type = ADVectorFunctionDirichletBC
    variable = vel
    boundary = 'top'
    function_x = 'lid_function'
    preset = true
  []
[]
[Materials]
  [const]
    type = ADGenericConstantMaterial
    prop_names = 'rho mu'
    prop_values = '${rho} ${mu}'
  []
  [insad]
    type = INSADTauMaterial
    velocity = vel
    pressure = p
  []
[]
[Functions]
  [lid_function]
    # We pick a function that is exactly represented in the velocity
    # space so that the Dirichlet conditions are the same regardless
    # of the mesh spacing.
    type = ParsedFunction
    expression = '${prefactor}*${U}*x*(${l}-x)'
  []
[]
[Problem]
  type = NavierStokesProblem
  mass_matrix = 'mass'
  extra_tag_matrices = 'mass'
  use_pressure_mass_matrix = true
[]
[Preconditioning]
  [FSP]
    type = FSP
    topsplit = 'up'
    [up]
      splitting = 'u p'
      splitting_type  = schur
      petsc_options_iname = '-pc_fieldsplit_schur_fact_type  -pc_fieldsplit_schur_precondition -ksp_gmres_restart -ksp_type -ksp_pc_side -ksp_rtol'
      petsc_options_value = 'full                            self                              300                fgmres    right        1e-4'
    []
      [u]
        vars = 'vel'
        petsc_options = '-ksp_converged_reason'
        petsc_options_iname = '-pc_type -ksp_type -ksp_rtol -ksp_gmres_restart -ksp_pc_side -pc_factor_mat_solver_type'
        petsc_options_value = 'ilu      gmres     1e-2      300                right        strumpack'
      []
      [p]
        vars = 'p'
        petsc_options = '-ksp_converged_reason'
        petsc_options_iname = '-ksp_type -ksp_gmres_restart -ksp_rtol -pc_type -ksp_pc_side'
        petsc_options_value = 'gmres     300                1e-2      ilu      right'
      []
  []
[]
[Postprocessors]
  [pavg]
    type = ElementAverageValue
    variable = p
  []
[]
[Correctors]
  [set_pressure]
    type = NSPressurePin
    pin_type = 'average'
    variable = p
    pressure_average = 'pavg'
  []
[]
[Executioner]
  type = Steady
  solve_type = NEWTON
  nl_rel_tol = 1e-12
[]
[Outputs]
  print_linear_residuals = false
  [exo]
    type = Exodus
    execute_on = 'final'
    hide = 'pavg'
  []
[]
(modules/combined/test/tests/phase_field_contact_angle/contact_angle.i)
sigma = 25e-3 #10e-3 #25e-3 #surface tension coefficient
epsilon = 1e-6 #width parameter
nu = 1e-4#mobility parameter
contactangle = 2.61799#0.523599#1.0472
lambda = ${fparse 3*sigma*epsilon/(2*sqrt(2))}
prefactor_phi = ${fparse nu*lambda/(epsilon*epsilon)}
prefactor_psi = ${fparse -epsilon*epsilon}
coeff = ${fparse lambda/(epsilon*epsilon)}
[Mesh]
  [gen]
    type = GeneratedMeshGenerator
    dim = 2
    xmin = 0
    xmax = 0.2e-3
    ymin = 0
    ymax = 0.2e-3
    nx = 20
    ny = 20
    elem_type = QUAD9
  []
[]
[ICs]
  [pf_ic]
    type = BoundingBoxIC
    variable = pf
    x1 = 0.1e-3
    y1 = -0.1e-3
    x2 = 0.3e-03
    y2 = 0.3e-3
    inside = 1
    outside = -1
    int_width = ${fparse 2*sqrt(2)*epsilon}
  []
  [velocity]
    type = VectorConstantIC
    x_value = 0.0
    y_value = 0.0
    variable = velocity
  []
[]
[Variables]
  [pf]
    family = LAGRANGE
    order = second
  []
  [auxpf]
    family = LAGRANGE
    order = second
  []
  [velocity]
    family = LAGRANGE_VEC
  []
  [p]
  []
[]
[Kernels]
  [mass]
    type = INSADMass
    variable = p
  []
  [mass_pspg]
    type = INSADMassPSPG
    variable = p
  []
  [momentum_viscous]
    type = INSADMomentumViscous
    variable = velocity
   viscous_form = 'traction'
    mu_name = 'mu'
  []
  [momentum_pressure]
    type = INSADMomentumPressure
    variable = velocity
    pressure = p
    integrate_p_by_parts = false
  []
  [surface_tension]
    type = ADPhaseFieldTwoPhaseSurfaceTension
    variable = velocity
    pf = pf
    auxpf = auxpf
    coeff = ${coeff}
  []
  [phasefield_timederivative]
    type = ADTimeDerivative
    variable = pf
  []
  [phasefield_supg]
    type = ADPhaseFieldTimeDerivativeSUPG
    velocity = velocity
    variable = pf
  []
  [phasefield_laplacian]
    type=ADPrefactorLaplacianSplit
    variable = pf
    c = auxpf
    prefactor = ${prefactor_phi}
  []
  [Auxphasefield_firstorder]
    type=ADReaction
    variable = auxpf
    rate = 1.0
  []
  [Auxphasefield_laplacian]
    type=ADPrefactorLaplacianSplit
    variable = auxpf
    c = pf
    prefactor=${prefactor_psi}
  []
  [Auxphasefield_doublewell]
    type=ADPhaseFieldCoupledDoubleWellPotential
    variable = auxpf
    c = pf
    prefactor=-1.0
  []
[]
[BCs]
  [no_slip]
    type = VectorFunctionDirichletBC
    variable = velocity
    boundary = 'top bottom'
  []
  [velocity_L]
    type = VectorFunctionDirichletBC
    variable = velocity
    boundary = 'left'
  []
  [velocity_R]
    type = VectorFunctionDirichletBC
    variable = velocity
    boundary = 'right'
  []
  [ContactangleBC]
    type=ADPhaseFieldContactAngleBC
    variable = auxpf
    pf = pf
    epsilon = ${epsilon}
    lambda=${lambda}
    sigma=${sigma}
    contactangle=${contactangle}
    boundary = 'top bottom'
  []
[]
[Materials]
  [rho]
    type = ADPhaseFieldTwoPhaseMaterial
    prop_name = rho
    prop_value_1 = 1000
    prop_value_2 = 840
    pf = pf
   # outputs = exodus
  []
  [mu]
    type = ADPhaseFieldTwoPhaseMaterial
    prop_name = mu
    prop_value_1 = 1e-3
    prop_value_2 = 7.6e-3
    pf = pf
   # outputs = exodus
  []
  [ins_mat]
    type = INSADTauMaterial
    velocity = velocity
    pressure = p
    alpha = .1
  []
[]
[Postprocessors]
  [contact_angle_top]
    type = ObtainAvgContactAngle
    boundary = top
    pf=pf
    execute_on = 'timestep_end'
  []
  [x_position]
    type = FindValueOnLine
    start_point = '0 0.0001 0'
    end_point ='0.0002 0.0001 0'
    v = pf
    target = 0.0
    tol = 1e-6
  []
[]
[Preconditioning]
  [SMP]
    type = SMP
    full = true
  []
[]
[Adaptivity]
  initial_steps = 2
  initial_marker = phase_marker
  marker = phase_marker
  max_h_level = 4
  [Markers]
    [phase_marker]
       type = ValueRangeMarker
       lower_bound = -0.99
       upper_bound = 0.99
      variable = pf
    []
  []
[]
[Executioner]
  type = Transient
  solve_type = NEWTON
  start_time = 0
  num_steps = 5
  dtmax = 0.25
  [TimeStepper]
    type = IterationAdaptiveDT
    dt = 1e-10
    iteration_window = 2
    optimal_iterations = 10
    growth_factor = 2
    cutback_factor = 0.5
  []
  # petsc_options_iname = '-pc_type -ksp_gmres_restart -pc_factor_mat_solver_type -pc_factor_shift_type -pc_factor_shift_amount'
  # petsc_options_value = 'lu       50                  superlu_dist              NONZERO               1e-15'
  #petsc_options_iname = '-pc_type'
  #petsc_options_value = 'lu      '
  petsc_options_iname = '-pc_type        -pc_factor_shift_type     -pc_factor_shift_amount'
  petsc_options_value = 'lu    NONZERO               1e-15  '
  line_search = 'none'
  nl_rel_tol = 1e-6
  nl_abs_tol = 1e-8
  nl_max_its = 20
  nl_forced_its = 3
  l_tol = 1e-6
  l_max_its = 20
[]
[Outputs]
  [csv]
    type = CSV
    time_step_interval = 1
  []
[]
(modules/navier_stokes/test/tests/finite_element/ins/coupled-force/steady-function.i)
[Mesh]
  [gen]
    type = GeneratedMeshGenerator
    dim = 2
    xmin = 0
    xmax = 1.0
    ymin = 0
    ymax = 1.0
    nx = 16
    ny = 16
  []
  [./corner_node]
    type = ExtraNodesetGenerator
    new_boundary = 'pinned_node'
    nodes = '0'
    input = gen
  [../]
[]
[Variables]
  [./velocity]
    family = LAGRANGE_VEC
  [../]
  [./p]
  [../]
  [u]
    family = LAGRANGE_VEC
  []
[]
[ICs]
  [velocity]
    type = VectorConstantIC
    x_value = 1e-15
    y_value = 1e-15
    variable = velocity
  []
[]
[Kernels]
  [./mass]
    type = INSADMass
    variable = p
  [../]
  [./mass_pspg]
    type = INSADMassPSPG
    variable = p
  [../]
  [./momentum_convection]
    type = INSADMomentumAdvection
    variable = velocity
  [../]
  [./momentum_viscous]
    type = INSADMomentumViscous
    variable = velocity
  [../]
  [./momentum_pressure]
    type = INSADMomentumPressure
    variable = velocity
    pressure = p
    integrate_p_by_parts = true
  [../]
  [momentum_coupled_force]
    type = INSADMomentumCoupledForce
    variable = velocity
    vector_function = 'vector_func'
  []
  [./momentum_supg]
    type = INSADMomentumSUPG
    variable = velocity
    velocity = velocity
  [../]
  [u_diff]
    type = VectorDiffusion
    variable = u
  []
[]
[BCs]
  [./no_slip]
    type = VectorFunctionDirichletBC
    variable = velocity
    boundary = 'bottom right left top'
  [../]
  [./pressure_pin]
    type = DirichletBC
    variable = p
    boundary = 'pinned_node'
    value = 0
  [../]
  [u_left]
    type = VectorFunctionDirichletBC
    variable = u
    boundary = 'left'
    function_x = 1
    function_y = 1
  []
  [u_right]
    type = VectorFunctionDirichletBC
    variable = u
    boundary = 'right'
    function_x = -1
    function_y = -1
  []
[]
[Materials]
  [./const]
    type = ADGenericConstantMaterial
    prop_names = 'rho mu'
    prop_values = '1  1'
  [../]
  [ins_mat]
    type = INSADTauMaterial
    velocity = velocity
    pressure = p
  []
[]
[Executioner]
  type = Steady
  solve_type = 'NEWTON'
  petsc_options_iname = '-pc_type -sub_pc_factor_levels -ksp_gmres_restart'
  petsc_options_value = 'asm      6                     200'
  line_search = 'none'
  nl_rel_tol = 1e-12
  nl_max_its = 6
[]
[Outputs]
  exodus = true
[]
[Functions]
  [vector_func]
    type = ParsedVectorFunction
    expression_x = '-2*x + 1'
    expression_y = '-2*x + 1'
  []
[]