- T_c0Critical temperature, K
Default:0
C++ Type:double
Unit:(no unit assumed)
Controllable:No
Description:Critical temperature, K
 - e_c0Internal energy at the critical point, J/kg
Default:0
C++ Type:double
Unit:(no unit assumed)
Controllable:No
Description:Internal energy at the critical point, J/kg
 - e_ref0Reference specific internal energy [J/kg]
Default:0
C++ Type:double
Unit:(no unit assumed)
Controllable:No
Description:Reference specific internal energy [J/kg]
 - emit_on_nannoneWhether to raise a warning, an exception (usually triggering a retry with a smaller time step) or an error (ending the simulation)
Default:none
C++ Type:MooseEnum
Controllable:No
Description:Whether to raise a warning, an exception (usually triggering a retry with a smaller time step) or an error (ending the simulation)
 - gamma1.4gamma value (cp/cv)
Default:1.4
C++ Type:double
Unit:(no unit assumed)
Controllable:No
Description:gamma value (cp/cv)
 - k0.02568Thermal conductivity, W/(m-K)
Default:0.02568
C++ Type:double
Unit:(no unit assumed)
Controllable:No
Description:Thermal conductivity, W/(m-K)
 - molar_mass0.029Constant molar mass of the fluid (kg/mol)
Default:0.029
C++ Type:double
Unit:(no unit assumed)
Controllable:No
Description:Constant molar mass of the fluid (kg/mol)
 - mu1.823e-05Dynamic viscosity, Pa.s
Default:1.823e-05
C++ Type:double
Unit:(no unit assumed)
Controllable:No
Description:Dynamic viscosity, Pa.s
 - rho_c0Critical density, kg/m3
Default:0
C++ Type:double
Unit:(no unit assumed)
Controllable:No
Description:Critical density, kg/m3
 
IdealGasFluidProperties
These fluid properties implement the ideal gas law:
where
is pressure,
is specific volume,
is the universal gas constant,
is the temperature (in absolute units), and
is the molar mass.
The specific heats (isobaric, , and isochoric, ) are assumed constant, and thus their ratio is constant as well:
The specific internal energy is computed as
where is a reference specific internal energy value (corresponding to ).
The dynamic viscosity and thermal conductivity are assumed constant, though this assumption could later be dropped.
Input Parameters
- T_initial_guess400Temperature initial guess for Newton Method variable set conversion
Default:400
C++ Type:double
Unit:(no unit assumed)
Controllable:No
Description:Temperature initial guess for Newton Method variable set conversion
 - max_newton_its100Maximum number of Newton iterations for variable set conversions
Default:100
C++ Type:unsigned int
Controllable:No
Description:Maximum number of Newton iterations for variable set conversions
 - p_initial_guess200000Pressure initial guess for Newton Method variable set conversion
Default:200000
C++ Type:double
Unit:(no unit assumed)
Controllable:No
Description:Pressure initial guess for Newton Method variable set conversion
 - tolerance1e-08Tolerance for 2D Newton variable set conversion
Default:1e-08
C++ Type:double
Unit:(no unit assumed)
Controllable:No
Description:Tolerance for 2D Newton variable set conversion
 
Variable Set Conversions Newton Solve Parameters
- allow_imperfect_jacobiansFalsetrue to allow unimplemented property derivative terms to be set to zero for the AD API
Default:False
C++ Type:bool
Controllable:No
Description:true to allow unimplemented property derivative terms to be set to zero for the AD API
 - 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.
 - fp_typesingle-phase-fpType of the fluid property object
Default:single-phase-fp
C++ Type:FPType
Controllable:No
Description:Type of the fluid property object
 
Advanced Parameters
- prop_getter_suffixAn optional suffix parameter that can be appended to any attempt to retrieve/get material properties. The suffix will be prepended with a '_' character.
C++ Type:MaterialPropertyName
Unit:(no unit assumed)
Controllable:No
Description:An optional suffix parameter that can be appended to any attempt to retrieve/get material properties. The suffix will be prepended with a '_' character.
 - use_interpolated_stateFalseFor the old and older state use projected material properties interpolated at the quadrature points. To set up projection use the ProjectedStatefulMaterialStorageAction.
Default:False
C++ Type:bool
Controllable:No
Description:For the old and older state use projected material properties interpolated at the quadrature points. To set up projection use the ProjectedStatefulMaterialStorageAction.
 
Material Property Retrieval Parameters
Input Files
- (modules/navier_stokes/test/tests/finite_volume/cns/straight_channel_porosity_step/hllc.i)
 - (modules/thermal_hydraulics/test/tests/problems/area_constriction/area_constriction.i)
 - (modules/thermal_hydraulics/test/tests/problems/william_louis/3pipes_open.i)
 - (modules/fluid_properties/test/tests/fp_interrogator/1ph.rho_e.i)
 - (modules/thermal_hydraulics/test/tests/output/paraview_component_annotation_map/test.i)
 - (modules/fluid_properties/test/tests/two_phase_ncg_partial_pressure/test.i)
 - (modules/thermal_hydraulics/test/tests/components/shaft_connected_turbine_1phase/shaft_motor_turbine.i)
 - (modules/thermal_hydraulics/tutorials/single_phase_flow/04_loop.i)
 - (modules/thermal_hydraulics/test/tests/problems/super_sonic_tube/test.i)
 - (modules/navier_stokes/test/tests/ics/test_function.i)
 - (modules/navier_stokes/test/tests/finite_volume/cns/heated-channel/transient-porous-kt-primitive.i)
 - (modules/thermal_hydraulics/tutorials/single_phase_flow/03_upper_loop.i)
 - (modules/navier_stokes/test/tests/finite_volume/cns/mms/1d-with-bcs/varying-eps-hllc.i)
 - (modules/fluid_properties/fp_interrogator/fp_interrogator.i)
 - (modules/fluid_properties/test/tests/fp_interrogator/2ph.T.i)
 - (modules/thermal_hydraulics/test/tests/components/junction_parallel_channels_1phase/phy.shower.i)
 - (modules/thermal_hydraulics/test/tests/components/shaft_connected_pump_1phase/shaft_motor_pump.i)
 - (modules/thermal_hydraulics/test/tests/components/junction_one_to_one_1phase/no_junction_1phase.i)
 - (modules/navier_stokes/test/tests/finite_volume/cns/mms/1d-with-bcs/porous-hllc.i)
 - (modules/thermal_hydraulics/test/tests/components/inlet_stagnation_enthalpy_1phase/phy.h_rhou_3eqn.i)
 - (modules/fluid_properties/test/tests/fp_interrogator/2ph.p.i)
 - (modules/porous_flow/test/tests/newton_cooling/nc08.i)
 - (modules/navier_stokes/test/tests/finite_volume/cns/scalar_advection/mass-frac-advection.i)
 - (modules/navier_stokes/test/tests/finite_element/cns/step/step.i)
 - (modules/thermal_hydraulics/test/tests/components/simple_turbine_1phase/phy.conservation.i)
 - (modules/navier_stokes/test/tests/finite_volume/cns/mms/1d-with-bcs/varying-eps-basic-kt-mixed.i)
 - (modules/navier_stokes/test/tests/finite_volume/cns/mms/1d-with-bcs/straight-channel-hllc.i)
 - (modules/navier_stokes/test/tests/finite_volume/cns/userobject/HLLC/hllc_uo_2D_tri.i)
 - (modules/fluid_properties/test/tests/fp_interrogator/vapor_mixture_rho_e.i)
 - (modules/navier_stokes/test/tests/finite_element/cns/bump/bump.i)
 - (modules/thermal_hydraulics/test/tests/components/shaft_connected_compressor_1phase/shaft_motor_compressor.i)
 - (modules/fluid_properties/test/tests/ideal_gas/test.i)
 - (modules/fluid_properties/test/tests/fp_interrogator/2ph.p_T.i)
 - (modules/fluid_properties/test/tests/ideal_gas/test2.i)
 - (modules/navier_stokes/test/tests/finite_volume/materials/ergun/ergun.i)
 - (modules/porous_flow/test/tests/jacobian/esbc01.i)
 - (modules/navier_stokes/test/tests/finite_volume/cns/implicit_bcs/hllc_sod_shocktube.i)
 - (modules/thermal_hydraulics/test/tests/components/flow_channel_1phase/steady.i)
 - (modules/thermal_hydraulics/tutorials/single_phase_flow/01_flow_channel.i)
 - (modules/thermal_hydraulics/test/tests/components/simple_turbine_1phase/phy.test.i)
 - (modules/thermal_hydraulics/test/tests/problems/natural_circulation/base.i)
 - (modules/thermal_hydraulics/test/tests/components/shaft_connected_pump_1phase/pump_coastdown.i)
 - (modules/navier_stokes/test/tests/finite_volume/cns/symmetry_test/2D_symmetry.i)
 - (modules/thermal_hydraulics/test/tests/materials/binary_diffusion_coef/binary_diffusion_coef.i)
 - (modules/navier_stokes/test/tests/finite_volume/two_phase/mixture_interface_area_model/turbulent_driven_growth.i)
 - (modules/navier_stokes/test/tests/finite_volume/cns/stagnation_inlet/supersonic_nozzle_hllc.i)
 - (modules/thermal_hydraulics/test/tests/components/deprecated/gate_valve.i)
 - (modules/fluid_properties/test/tests/fp_interrogator/1ph.rho_p.i)
 - (modules/thermal_hydraulics/test/tests/components/heat_transfer_from_external_app_1phase/phy.q_wall_transfer_3eqn.child.i)
 - (modules/thermal_hydraulics/test/tests/problems/sod_shock_tube/sod_shock_tube.i)
 - (modules/thermal_hydraulics/test/tests/problems/mms/mms_1phase.i)
 - (modules/thermal_hydraulics/tutorials/single_phase_flow/06_custom_closures.i)
 - (modules/thermal_hydraulics/test/tests/materials/fluid_properties_gas_mix_material/fluid_properties_gas_mix_material.i)
 - (modules/thermal_hydraulics/test/tests/components/deprecated/solid_wall.i)
 - (modules/fluid_properties/test/tests/fp_interrogator/2ph_ncg_p_T.i)
 - (modules/porous_flow/test/tests/fluids/ideal_gas.i)
 - (modules/fluid_properties/test/tests/two_phase_fluid_properties_independent/test.i)
 - (modules/navier_stokes/test/tests/finite_volume/two_phase/mixture_interface_area_model/pressure_driven_growth.i)
 - (modules/thermal_hydraulics/test/tests/ics/flow_model_gas_mix_ic/flow_model_gas_mix_ic.i)
 - (modules/thermal_hydraulics/test/tests/components/heat_transfer_from_specified_temperature_1phase/err.no_phf.i)
 - (modules/thermal_hydraulics/test/tests/misc/coupling_mD_flow/thm_non_overlapping.i)
 - (modules/thermal_hydraulics/test/tests/postprocessors/heat_rate_convection_1phase/heat_rate_convection_1phase.i)
 - (modules/thermal_hydraulics/test/tests/components/heat_transfer_from_heat_structure_1phase/err.1phase.i)
 - (modules/thermal_hydraulics/test/tests/problems/pressure_drop/pressure_drop_with_junction.i)
 - (modules/thermal_hydraulics/tutorials/single_phase_flow/02_core.i)
 - (modules/navier_stokes/test/tests/finite_volume/cns/mms/1d-with-bcs/regular-straight-channel.i)
 - (modules/fluid_properties/test/tests/fluid_properties/ideal_gas_mixture/ideal_gas_mixture.i)
 - (modules/navier_stokes/test/tests/finite_volume/cns/straight_channel_porosity_step/rotated-2d-bkt-function-porosity.i)
 - (modules/navier_stokes/test/tests/finite_volume/two_phase/mixture_interface_area_model/pressure_driven_growth_transient.i)
 - (modules/thermal_hydraulics/test/tests/components/heat_transfer_from_heat_structure_1phase/jac.1phase.i)
 - (modules/navier_stokes/test/tests/ics/test.i)
 - (modules/thermal_hydraulics/test/tests/problems/lax_shock_tube/lax_shock_tube.i)
 - (modules/thermal_hydraulics/test/tests/postprocessors/flow_junction_flux_1phase/flow_junction_flux_1phase.i)
 - (modules/thermal_hydraulics/test/tests/components/deprecated/junction_one_to_one.i)
 - (modules/thermal_hydraulics/test/tests/components/supersonic_inlet/err.i)
 - (modules/thermal_hydraulics/test/tests/problems/woodward_colella_blast_wave/woodward_colella_blast_wave.i)
 - (modules/thermal_hydraulics/test/tests/closures/wall_temperature_1phase/base.i)
 - (modules/thermal_hydraulics/test/tests/components/deprecated/free_boundary.i)
 - (modules/navier_stokes/test/tests/finite_volume/wcns/natural_convection/natural_circulation_pipe.i)
 - (modules/navier_stokes/test/tests/finite_volume/ins/boussinesq/wcnsfv.i)
 - (modules/thermal_hydraulics/test/tests/problems/area_constriction/area_constriction_junction.i)
 - (modules/thermal_hydraulics/test/tests/postprocessors/specific_impulse_1phase/Isp_1ph.i)
 - (modules/thermal_hydraulics/test/tests/auxkernels/flow_model_gas_mix_aux/flow_model_gas_mix_aux.i)
 - (modules/thermal_hydraulics/test/tests/materials/ad_wall_htc_gnielinski_annular/ad_wall_htc_gnielinski_annular.i)
 - (modules/navier_stokes/test/tests/finite_volume/cns/mms/1d-with-bcs/basic-conserved-pcnsfv-kt.i)
 - (modules/navier_stokes/test/tests/finite_volume/cns/straight_channel_porosity_step/implicit-euler-basic-kt-primitive.i)
 - (modules/thermal_hydraulics/test/tests/components/junction_one_to_one_1phase/junction_one_to_one_1phase.i)
 - (modules/fluid_properties/test/tests/fp_interrogator/1ph.rho_rhou_rhoE.i)
 - (modules/fluid_properties/test/tests/fp_interrogator/1ph.p_T.i)
 - (modules/thermal_hydraulics/tutorials/single_phase_flow/05_secondary_side.i)
 - (modules/porous_flow/test/tests/jacobian/esbc02.i)
 - (modules/fluid_properties/test/tests/materials/fluid_properties_material/test_ve.i)
 - (modules/thermal_hydraulics/test/tests/problems/square_wave/square_wave.i)
 - (modules/thermal_hydraulics/test/tests/problems/sedov_blast_wave/sedov_blast_wave.i)
 - (modules/navier_stokes/test/tests/finite_volume/cns/pressure_outlet/subsonic_nozzle_fixed_inflow_hllc.i)
 - (modules/thermal_hydraulics/test/tests/components/component/err.nonexisting_component.i)
 - (modules/thermal_hydraulics/test/tests/components/gate_valve_1phase/gate_valve_1phase.i)
 - (modules/fluid_properties/test/tests/tabulated/tabulated_v_e.i)
 - (modules/thermal_hydraulics/test/tests/components/flow_channel_gasmix/flow_channel_gasmix.i)
 - (modules/navier_stokes/test/tests/finite_volume/pwcns/channel-flow/2d-transient-gas.i)
 - (modules/navier_stokes/test/tests/ics/pns_test.i)
 - (modules/fluid_properties/test/tests/functions/saturation_pressure_function/saturation_pressure_function.i)
 - (modules/thermal_hydraulics/test/tests/problems/brayton_cycle/recuperated_brayton_cycle.i)
 - (modules/navier_stokes/test/tests/finite_volume/cns/userobject/HLLC/hllc_uo_1D.i)
 - (modules/thermal_hydraulics/test/tests/components/flow_connection/err.connection_format.i)
 - (modules/thermal_hydraulics/test/tests/problems/brayton_cycle/closed_brayton_cycle.i)
 - (modules/navier_stokes/test/tests/finite_volume/cns/mms/1d-with-bcs/basic-primitive-pcnsfv-kt.i)
 - (modules/thermal_hydraulics/test/tests/problems/double_rarefaction/1phase.i)
 - (modules/thermal_hydraulics/test/tests/components/shaft_connected_turbine_1phase/turbine_startup.i)
 - (modules/navier_stokes/test/tests/finite_volume/cns/straight_channel_porosity_step/rotated-2d-bkt-function-porosity-mixed.i)
 - (modules/fluid_properties/test/tests/fp_interrogator/err.no_params.i)
 - (modules/navier_stokes/test/tests/finite_volume/cns/mms/1d-with-bcs/free-flow-hllc.i)
 - (modules/navier_stokes/test/tests/finite_volume/cns/mms/1d-with-bcs/varying-eps-basic-kt-primitive.i)
 - (modules/thermal_hydraulics/test/tests/components/junction_one_to_one_1phase/constriction_1phase.i)
 - (modules/thermal_hydraulics/test/tests/problems/pressure_drop/pressure_drop.i)
 - (modules/thermal_hydraulics/test/tests/components/heat_transfer_from_heat_structure_1phase/hs_boundary.i)
 - (modules/navier_stokes/test/tests/finite_volume/ins/boussinesq/transient-wcnsfv.i)
 - (modules/navier_stokes/test/tests/finite_volume/cns/benchmark_shock_tube_1D/hllc_sod_shocktube.i)
 - (modules/navier_stokes/test/tests/finite_volume/cns/straight_channel_porosity_step/dc.i)
 - (modules/fluid_properties/test/tests/fp_interrogator/2ph_ncg_partial_pressure_p_T.i)
 - (modules/fluid_properties/test/tests/materials/fluid_properties_material/test_ph.i)
 - (modules/fluid_properties/test/tests/functions/saturation_density_function/saturation_density_function.i)
 - (modules/navier_stokes/test/tests/finite_volume/cns/mms/1d-with-bcs/pwcnsfv.i)
 - (modules/navier_stokes/test/tests/finite_volume/cns/shock_tube_2D_cavity/hllc_sod_shocktube_2D.i)
 - (modules/thermal_hydraulics/test/tests/components/heat_transfer_from_heat_structure_1phase/phy.heat_structure_multiple_3eqn.i)
 - (modules/thermal_hydraulics/test/tests/problems/william_louis/4pipes_closed.i)
 - (modules/thermal_hydraulics/test/tests/functormaterials/conjugate_ht_numbers/conjugate_ht_numbers.i)
 - (modules/thermal_hydraulics/test/tests/output/vector_velocity/test.i)
 - (modules/fluid_properties/test/tests/materials/fluid_properties_material/test_pt.i)
 - (modules/thermal_hydraulics/test/tests/problems/brayton_cycle/open_brayton_cycle.i)
 - (modules/fluid_properties/test/tests/ics/rho_vapor_mixture_from_pressure_temperature/test.i)
 - (modules/fluid_properties/test/tests/functions/saturation_temperature_function/saturation_temperature_function.i)
 
Child Objects
(modules/navier_stokes/test/tests/finite_volume/cns/straight_channel_porosity_step/hllc.i)
p_initial=1.01e5
T=273.15
# u refers to the superficial velocity
u_in=1
[GlobalParams]
  fp = fp
  two_term_boundary_expansion = true
[]
[Mesh]
  [cartesian]
    type = GeneratedMeshGenerator
    dim = 1
    xmin = 0
    xmax = 18
    nx = 180
  []
  [to_pt5]
    input = cartesian
    type = SubdomainBoundingBoxGenerator
    bottom_left = '2 0 0'
    top_right = '4 1 0'
    block_id = 1
  []
  [pt5]
    input = to_pt5
    type = SubdomainBoundingBoxGenerator
    bottom_left = '4 0 0'
    top_right = '6 1 0'
    block_id = 2
  []
  [to_pt25]
    input = pt5
    type = SubdomainBoundingBoxGenerator
    bottom_left = '6 0 0'
    top_right = '8 1 0'
    block_id = 3
  []
  [pt25]
    input = to_pt25
    type = SubdomainBoundingBoxGenerator
    bottom_left = '8 0 0'
    top_right = '10 1 0'
    block_id = 4
  []
  [to_pt5_again]
    input = pt25
    type = SubdomainBoundingBoxGenerator
    bottom_left = '10 0 0'
    top_right = '12 1 0'
    block_id = 5
  []
  [pt5_again]
    input = to_pt5_again
    type = SubdomainBoundingBoxGenerator
    bottom_left = '12 0 0'
    top_right = '14 1 0'
    block_id = 6
  []
  [to_one]
    input = pt5_again
    type = SubdomainBoundingBoxGenerator
    bottom_left = '14 0 0'
    top_right = '16 1 0'
    block_id = 7
  []
  [one]
    input = to_one
    type = SubdomainBoundingBoxGenerator
    bottom_left = '16 0 0'
    top_right = '18 1 0'
    block_id = 8
  []
[]
[FluidProperties]
  [fp]
    type = IdealGasFluidProperties
  []
[]
[Problem]
  fv_bcs_integrity_check = false
[]
[Variables]
  [pressure]
    type = MooseVariableFVReal
    initial_condition = ${p_initial}
  []
  [sup_vel_x]
    type = MooseVariableFVReal
    initial_condition = 1
    scaling = 1e-2
  []
  [T_fluid]
    type = MooseVariableFVReal
    initial_condition = ${T}
    scaling = 1e-5
  []
[]
[AuxVariables]
  [vel_x]
    type = MooseVariableFVReal
  []
  [sup_mom_x]
    type = MooseVariableFVReal
  []
  [rho]
    type = MooseVariableFVReal
  []
  [worst_courant]
    type = MooseVariableFVReal
  []
  [porosity]
    type = MooseVariableFVReal
  []
[]
[AuxKernels]
  [vel_x]
    type = ADMaterialRealAux
    variable = vel_x
    property = vel_x
    execute_on = 'timestep_end'
  []
  [sup_mom_x]
    type = ADMaterialRealAux
    variable = sup_mom_x
    property = superficial_rhou
    execute_on = 'timestep_end'
  []
  [rho]
    type = ADMaterialRealAux
    variable = rho
    property = rho
    execute_on = 'timestep_end'
  []
  [worst_courant]
    type = Courant
    variable = worst_courant
    u = sup_vel_x
    execute_on = 'timestep_end'
  []
  [porosity]
    type = MaterialRealAux
    variable = porosity
    property = porosity
    execute_on = 'timestep_end'
  []
[]
[FVKernels]
  [mass_advection]
    type = PCNSFVMassHLLC
    variable = pressure
  []
  [momentum_advection]
    type = PCNSFVMomentumHLLC
    variable = sup_vel_x
    momentum_component = 'x'
  []
  [eps_grad]
    type = PNSFVPGradEpsilon
    variable = sup_vel_x
    momentum_component = 'x'
    epsilon_function = 'eps'
  []
  [energy_advection]
    type = PCNSFVFluidEnergyHLLC
    variable = T_fluid
  []
[]
[FVBCs]
  [rho_left]
    type = PCNSFVStrongBC
    boundary = 'left'
    variable = pressure
    superficial_velocity = 'ud_in'
    T_fluid = ${T}
    eqn = 'mass'
  []
  [rhou_left]
    type = PCNSFVStrongBC
    boundary = 'left'
    variable = sup_vel_x
    superficial_velocity = 'ud_in'
    T_fluid = ${T}
    eqn = 'momentum'
    momentum_component = 'x'
  []
  [rho_et_left]
    type = PCNSFVStrongBC
    boundary = 'left'
    variable = T_fluid
    superficial_velocity = 'ud_in'
    T_fluid = ${T}
    eqn = 'energy'
  []
  [rho_right]
    type = PCNSFVStrongBC
    boundary = 'right'
    variable = pressure
    pressure = ${p_initial}
    eqn = 'mass'
  []
  [rhou_right]
    type = PCNSFVStrongBC
    boundary = 'right'
    variable = sup_vel_x
    pressure = ${p_initial}
    eqn = 'momentum'
    momentum_component = 'x'
  []
  [rho_et_right]
    type = PCNSFVStrongBC
    boundary = 'right'
    variable = T_fluid
    pressure = ${p_initial}
    eqn = 'energy'
  []
  # Use these to help create more accurate cell centered gradients for cells adjacent to boundaries
  [T_left]
    type = FVDirichletBC
    variable = T_fluid
    value = ${T}
    boundary = 'left'
  []
  [sup_vel_left]
    type = FVDirichletBC
    variable = sup_vel_x
    value = ${u_in}
    boundary = 'left'
  []
  [p_right]
    type = FVDirichletBC
    variable = pressure
    value = ${p_initial}
    boundary = 'right'
  []
[]
[Functions]
  [ud_in]
    type = ParsedVectorFunction
    expression_x = '${u_in}'
  []
  [eps]
    type = ParsedFunction
    expression = 'if(x < 2, 1,
             if(x < 4, 1 - .5 / 2 * (x - 2),
             if(x < 6, .5,
             if(x < 8, .5 - .25 / 2 * (x - 6),
             if(x < 10, .25,
             if(x < 12, .25 + .25 / 2 * (x - 10),
             if(x < 14, .5,
             if(x < 16, .5 + .5 / 2 * (x - 14),
                1))))))))'
  []
[]
[Materials]
  [var_mat]
    type = PorousPrimitiveVarMaterial
    pressure = pressure
    T_fluid = T_fluid
    superficial_vel_x = sup_vel_x
    porosity = porosity
  []
  [porosity]
    type = GenericFunctionMaterial
    prop_names = 'porosity'
    prop_values = 'eps'
  []
[]
[Executioner]
  solve_type = NEWTON
  line_search = 'bt'
  type = Steady
[]
[Outputs]
  [out]
    type = Exodus
    execute_on = 'final'
  []
  checkpoint = true
[]
[Debug]
  show_var_residual_norms = true
[]
(modules/thermal_hydraulics/test/tests/problems/area_constriction/area_constriction.i)
# This test features air flowing through a channel whose cross-sectional area
# shrinks to half its value in the right half. Assuming incompressible flow
# conditions, such as having a low Mach number, the velocity should approximately
# double from inlet to outlet.
p_outlet = 1e5
[GlobalParams]
  gravity_vector = '0 0 0'
  initial_T = 300
  initial_p = ${p_outlet}
  initial_vel = initial_vel_fn
  fp = fp
  closures = simple_closures
  f = 0
  scaling_factor_1phase = '1 1 1e-5'
[]
[FluidProperties]
  [fp]
    type = IdealGasFluidProperties
    gamma = 1.4
  []
[]
[Closures]
  [simple_closures]
    type = Closures1PhaseSimple
  []
[]
[Functions]
  [A_fn]
    type = PiecewiseConstant
    axis = x
    direction = right
    x = '0.5 1.0'
    y = '1.0 0.5'
  []
  [initial_vel_fn]
    type = PiecewiseConstant
    axis = x
    direction = right
    x = '0.5 1.0'
    y = '1.0 2'
  []
[]
[Components]
  [inlet]
    type = InletDensityVelocity1Phase
    input = 'pipe:in'
    rho = 1.16263315948279 # rho @ (p = 1e5 Pa, T = 300 K)
    vel = 1
  []
  [pipe]
    type = FlowChannel1Phase
    position = '0 0 0'
    orientation = '1 0 0'
    length = 1
    n_elems = 100
    A = A_fn
  []
  [outlet]
    type = Outlet1Phase
    input = 'pipe:out'
    p = ${p_outlet}
  []
[]
[Preconditioning]
  [pc]
    type = SMP
    full = true
  []
[]
[Executioner]
  type = Transient
  scheme = 'bdf2'
  end_time = 10
  [TimeStepper]
    type = IterationAdaptiveDT
    dt = 0.001
    optimal_iterations = 5
    iteration_window = 1
    growth_factor = 1.2
  []
  steady_state_detection = true
  solve_type = PJFNK
  nl_rel_tol = 1e-10
  nl_abs_tol = 1e-8
  nl_max_its = 15
  l_tol = 1e-3
  l_max_its = 10
[]
[Outputs]
  exodus = true
  velocity_as_vector = false
  show = 'A rho vel p'
[]
(modules/thermal_hydraulics/test/tests/problems/william_louis/3pipes_open.i)
# Junction of 3 pipes:
#
#   1     3
# -----*-----
#      | 2
#
# The left end of Pipe 1 is a high-pressure region, and the rest of the system
# is at a low pressure.
#
# Pipe 1 is closed, while Pipes 2 and 3 are open.
end_time = 0.07
D_pipe = 0.01
A_pipe = ${fparse 0.25 * pi * D_pipe^2}
length_pipe1_HP = 0.53
length_pipe1_LP = 3.10
length_pipe2 = 2.595
length_pipe3 = 1.725
x_junction = ${fparse length_pipe1_HP + length_pipe1_LP}
# Numbers of elements correspond to dx ~ 1/3 cm
n_elems_pipe1_HP = 159
n_elems_pipe1_LP = 930
n_elems_pipe2 = 779
n_elems_pipe3 = 518
S_junction = ${fparse 3 * A_pipe}
r_junction = ${fparse sqrt(S_junction / (4 * pi))}
V_junction = ${fparse 4/3 * pi * r_junction^3}
p_low = 1e5
p_high = 1.15e5
T_low  = 283.5690633 # at p = 1e5 Pa,    rho = 1.23 kg/m^3
T_high = 283.5690633 # at p = 1.15e5 Pa, rho = 1.4145 kg/m^3
cfl = 0.95
[GlobalParams]
  # common FlowChannel1Phase parameters
  A = ${A_pipe}
  initial_vel = 0
  fp = fp_air
  closures = closures
  f = 0
  gravity_vector = '0 0 0'
  scaling_factor_1phase = '1 1 1e-5'
[]
[FluidProperties]
  [fp_air]
    type = IdealGasFluidProperties
    gamma = 1.4
    molar_mass = 0.029
  []
[]
[Closures]
  [closures]
    type = Closures1PhaseSimple
  []
[]
[Functions]
  [initial_T_pipe1_fn]
    type = PiecewiseConstant
    axis = x
    x = '0 ${length_pipe1_HP}'
    y = '${T_high} ${T_low}'
  []
  [initial_p_pipe1_fn]
    type = PiecewiseConstant
    axis = x
    x = '0 ${length_pipe1_HP}'
    y = '${p_high} ${p_low}'
  []
[]
[Components]
  [pipe1_wall]
    type = SolidWall1Phase
    input = 'pipe1:in'
  []
  [pipe1]
    type = FlowChannel1Phase
    position = '0 0 0'
    orientation = '1 0 0'
    length = '${length_pipe1_HP} ${length_pipe1_LP}'
    n_elems = '${n_elems_pipe1_HP} ${n_elems_pipe1_LP}'
    initial_p = initial_p_pipe1_fn
    initial_T = initial_T_pipe1_fn
  []
  [junction]
    type = VolumeJunction1Phase
    position = '${x_junction} 0 0'
    connections = 'pipe1:out pipe2:in pipe3:in'
    initial_p = ${p_low}
    initial_T = ${T_low}
    initial_vel_x = 0
    initial_vel_y = 0
    initial_vel_z = 0
    volume = ${V_junction}
    scaling_factor_rhoEV = 1e-5
    apply_velocity_scaling = true
  []
  [pipe2]
    type = FlowChannel1Phase
    position = '${x_junction} 0 0'
    orientation = '0 -1 0'
    length = ${length_pipe2}
    n_elems = ${n_elems_pipe2}
    initial_p = ${p_low}
    initial_T = ${T_low}
  []
  [pipe2_outlet]
    type = Outlet1Phase
    input = 'pipe2:out'
    p = ${p_low}
  []
  [pipe3]
    type = FlowChannel1Phase
    position = '${x_junction} 0 0'
    orientation = '1 0 0'
    length = ${length_pipe3}
    n_elems = ${n_elems_pipe3}
    initial_p = ${p_low}
    initial_T = ${T_low}
  []
  [pipe3_outlet]
    type = Outlet1Phase
    input = 'pipe3:out'
    p = ${p_low}
  []
[]
[Postprocessors]
  [cfl_dt]
    type = ADCFLTimeStepSize
    block = 'pipe1 pipe2 pipe3'
    CFL = ${cfl}
    c_names = 'c'
    vel_names = 'vel'
  []
  [p_pipe1_048]
    type = PointValue
    variable = p
    point = '${fparse x_junction - 0.48} 0 0'
    execute_on = 'INITIAL TIMESTEP_END'
  []
  [p_pipe2_052]
    type = PointValue
    variable = p
    point = '${fparse x_junction} -0.52 0'
    execute_on = 'INITIAL TIMESTEP_END'
  []
  [p_pipe3_048]
    type = PointValue
    variable = p
    point = '${fparse x_junction + 0.48} 0 0'
    execute_on = 'INITIAL TIMESTEP_END'
  []
[]
[Preconditioning]
  [pc]
    type = SMP
    full = true
  []
[]
[Executioner]
  type = Transient
  end_time = ${end_time}
  [TimeIntegrator]
    type = ExplicitSSPRungeKutta
    order = 1
  []
  [TimeStepper]
    type = PostprocessorDT
    postprocessor = cfl_dt
  []
  abort_on_solve_fail = true
  solve_type = LINEAR
[]
[Times]
  [output_times]
    type = TimeIntervalTimes
    time_interval = 7e-4
  []
[]
[Outputs]
  file_base = '3pipes_open'
  [csv]
    type = CSV
    show = 'p_pipe1_048 p_pipe2_052 p_pipe3_048'
    sync_only = true
    sync_times_object = output_times
  []
  [console]
    type = Console
    execute_postprocessors_on = 'NONE'
  []
[]
(modules/fluid_properties/test/tests/fp_interrogator/1ph.rho_e.i)
[FluidPropertiesInterrogator]
  fp = fp
  rho = 1
  e = 2.1502500000e+05
[]
[FluidProperties]
  [./fp]
    type = IdealGasFluidProperties
    gamma = 1.4
    molar_mass = 0.02900055737704918
    mu = 1.823e-05
    k = 0.02568
  [../]
[]
(modules/thermal_hydraulics/test/tests/output/paraview_component_annotation_map/test.i)
[GlobalParams]
  initial_p = 1e5
  initial_T = 300
  initial_vel = 0
  closures = simple_closures
  f = 0
  fp = fp
  gravity_vector = '0 0 0'
[]
[FluidProperties]
  [fp]
    type = IdealGasFluidProperties
  []
[]
[Closures]
  [simple_closures]
    type = Closures1PhaseSimple
  []
[]
[SolidProperties]
  [m]
    type = ThermalFunctionSolidProperties
    rho = 1
    cp = 1
    k = 1
  []
[]
[Components]
  [fch1]
    type = FlowChannel1Phase
    position = '-0.1 0 0'
    orientation = '0 0 1'
    length = 1
    A = 1
    n_elems = 10
  []
  [wall1i]
    type = SolidWall1Phase
    input = fch1:in
  []
  [wall1o]
    type = SolidWall1Phase
    input = fch1:out
  []
  [hs1]
    type = HeatStructureCylindrical
    position = '-0.2 0 0'
    orientation = '0 0 1'
    length = 1
    n_elems = 10
    names = '1 2'
    widths = '0.2 0.3'
    solid_properties = 'm m'
    solid_properties_T_ref = '300 300'
    n_part_elems = '1 1'
    rotation = 90
  []
  [fch2]
    type = FlowChannel1Phase
    position = '0.1 0 0'
    orientation = '0 0 1'
    length = '0.6 0.4'
    A = 1
    n_elems = '5 5'
    axial_region_names = 'longer shorter'
  []
  [wall2i]
    type = SolidWall1Phase
    input = fch2:in
  []
  [wall2o]
    type = SolidWall1Phase
    input = fch2:out
  []
  [hs2]
    type = HeatStructureCylindrical
    position = '0.2 0 0'
    orientation = '0 0 1'
    length = '0.6 0.4'
    axial_region_names = 'longer shorter'
    n_elems = '5 5'
    names = '1 2'
    widths = '0.2 0.3'
    solid_properties = 'm m'
    solid_properties_T_ref = '300 300'
    n_part_elems = '1 1'
    rotation = 270
  []
[]
[Executioner]
  type = Transient
  dt = 0.1
  num_steps = 1
  automatic_scaling = true
  nl_abs_tol = 1e-7
[]
[Outputs]
  [map]
    type = ParaviewComponentAnnotationMap
  []
[]
(modules/fluid_properties/test/tests/two_phase_ncg_partial_pressure/test.i)
p = 40e3
T = 300
[Mesh]
  type = GeneratedMesh
  dim = 1
  nx = 1
[]
[FluidProperties]
  [fp_water]
    type = StiffenedGasFluidProperties
    gamma = 2.35
    cv = 1816.0
    q = -1.167e6
    p_inf = 1.0e9
    q_prime = 0
    k = 0.5
    mu = 281.8e-6
    M = 0.01801488
  []
  [fp_steam]
    type = IdealGasFluidProperties
    gamma = 1.43
    molar_mass = 0.01801488
  []
  [fp_air]
    type = IdealGasFluidProperties
  []
  [fp_2phase]
    type = TestTwoPhaseFluidProperties
    fp_liquid = fp_water
    fp_vapor = fp_steam
  []
  [fp_2phase_ncg]
    type = TwoPhaseNCGPartialPressureFluidProperties
    fp_2phase = fp_2phase
    fp_ncg = fp_air
  []
[]
[Functions]
  [p_sat_fn]
    type = TwoPhaseNCGPartialPressureFunction
    fluid_properties = fp_2phase_ncg
    property_call = p_sat
    arg1 = ${T}
  []
  [x_sat_ncg_fn]
    type = TwoPhaseNCGPartialPressureFunction
    fluid_properties = fp_2phase_ncg
    property_call = x_sat_ncg_from_p_T
    arg1 = ${p}
    arg2 = ${T}
  []
[]
[Postprocessors]
  [p_sat]
    type = FunctionValuePostprocessor
    function = p_sat_fn
    execute_on = 'INITIAL'
  []
  [x_sat_ncg]
    type = FunctionValuePostprocessor
    function = x_sat_ncg_fn
    execute_on = 'INITIAL'
  []
[]
[Problem]
  solve = false
[]
[Executioner]
  type = Steady
[]
[Outputs]
  execute_on = 'INITIAL'
  csv = true
[]
(modules/thermal_hydraulics/test/tests/components/shaft_connected_turbine_1phase/shaft_motor_turbine.i)
area = 0.2359
dt = 1.e-3
[GlobalParams]
  initial_p = 2e5
  initial_T = 600
  initial_vel = 100
  initial_vel_x = 100
  initial_vel_y = 0
  initial_vel_z = 0
  A = ${area}
  A_ref = ${area}
  f = 100
  scaling_factor_1phase = '0.04 0.04 0.04e-5'
  closures = simple_closures
  fp = fp
[]
[FluidProperties]
  [fp]
    type = IdealGasFluidProperties
  []
[]
[Closures]
  [simple_closures]
    type = Closures1PhaseSimple
  []
[]
[Components]
  [turbine]
    type = ShaftConnectedTurbine1Phase
    inlet = 'pipe:out'
    outlet = 'pipe:in'
    position = '0 0 0'
    volume = 0.2
    inertia_coeff = '1 1 1 1'
    inertia_const = 1.61397
    speed_cr_I = 1e12
    speed_cr_fr = 0
    tau_fr_coeff = '0 0 0 0'
    tau_fr_const = 0
    omega_rated = 100
    D_wheel = 0.4
    head_coefficient = head
    power_coefficient = power
  []
  [pipe]
    type = FlowChannel1Phase
    position = '0.1 0 0'
    orientation = '1 0 0'
    length = 10
    n_elems = 20
    initial_p = 2e6
  []
  [dyno]
    type = ShaftConnectedMotor
    inertia = 1e2
    torque = -1e3
  []
  [shaft]
    type = Shaft
    connected_components = 'dyno turbine'
    initial_speed = 300
  []
[]
[Functions]
  [head]
    type = PiecewiseLinear
    x = '0 7e-3 1e-2'
    y = '0 15 20'
  []
  [power]
    type = PiecewiseLinear
    x = '0 6e-3 1e-2'
    y = '0 0.05 0.18'
  []
  [S_energy_fcn]
    type = ParsedFunction
    expression = '-(tau_driving+tau_fr)*omega'
    symbol_names = 'tau_driving tau_fr omega'
    symbol_values = 'driving_torque friction_torque shaft:omega'
  []
  [energy_conservation_fcn]
    type = ParsedFunction
    expression = '(E_change - S_energy * dt) / E_tot'
    symbol_names = 'E_change S_energy dt E_tot'
    symbol_values = 'E_change S_energy ${dt} E_tot'
  []
[]
[Postprocessors]
  [driving_torque]
    type = ElementAverageValue
    variable = driving_torque
    block = 'turbine'
    execute_on = 'initial timestep_end'
  []
  [friction_torque]
    type = ElementAverageValue
    variable = friction_torque
    block = 'turbine'
    execute_on = 'initial timestep_end'
  []
  # mass conservation
  [mass_pipes]
    type = ElementIntegralVariablePostprocessor
    variable = rhoA
    block = 'pipe'
    execute_on = 'initial timestep_end'
  []
  [mass_turbine]
    type = ElementAverageValue
    variable = rhoV
    block = 'turbine'
    execute_on = 'initial timestep_end'
  []
  [mass_tot]
    type = SumPostprocessor
    values = 'mass_pipes mass_turbine'
    execute_on = 'initial timestep_end'
  []
  [mass_conservation]
    type = ChangeOverTimePostprocessor
    postprocessor = mass_tot
    change_with_respect_to_initial = true
    compute_relative_change = true
    execute_on = 'initial timestep_end'
  []
  # energy conservation
  [E_pipes]
    type = ElementIntegralVariablePostprocessor
    variable = rhoEA
    block = 'pipe'
    execute_on = 'initial timestep_end'
  []
  [E_turbine]
    type = ElementAverageValue
    variable = rhoEV
    block = 'turbine'
    execute_on = 'initial timestep_end'
  []
  [E_tot]
    type = LinearCombinationPostprocessor
    pp_coefs = '1 1'
    pp_names = 'E_pipes E_turbine'
    execute_on = 'initial timestep_end'
  []
  [S_energy]
    type = FunctionValuePostprocessor
    function = S_energy_fcn
    indirect_dependencies = 'driving_torque friction_torque'
    execute_on = 'initial timestep_end'
  []
  [E_change]
    type = ChangeOverTimePostprocessor
    postprocessor = E_tot
    execute_on = 'initial timestep_end'
  []
  # This should also execute on initial. This value is
  # lagged by one timestep as a workaround to moose issue #13262.
  [energy_conservation]
    type = FunctionValuePostprocessor
    function = energy_conservation_fcn
    execute_on = 'timestep_end'
  []
[]
[Preconditioning]
  [SMP]
    type = SMP
    full = true
  []
[]
[Executioner]
  type = Transient
  scheme = 'implicit-euler'
  dt = ${dt}
  num_steps = 6
  solve_type = NEWTON
  nl_rel_tol = 1e-8
  nl_abs_tol = 1e-6
  nl_max_its = 15
  l_tol = 1e-4
  l_max_its = 10
  petsc_options_iname = '-pc_type'
  petsc_options_value = 'lu'
  [Quadrature]
    type = GAUSS
    order = SECOND
  []
[]
[Outputs]
  velocity_as_vector = false
[]
(modules/thermal_hydraulics/tutorials/single_phase_flow/04_loop.i)
T_in = 300. # K
m_dot_in = 1e-2 # kg/s
press = 10e5 # Pa
# core parameters
core_length = 1. # m
core_n_elems = 25
core_dia = '${units 2. cm -> m}'
core_pitch = '${units 8.7 cm -> m}'
# pipe parameters
pipe_dia = '${units 10. cm -> m}'
A_pipe = '${fparse 0.25 * pi * pipe_dia^2}'
A_core = '${fparse core_pitch^2 - 0.25 *pi * core_dia^2}'
P_wet_core = '${fparse 4*core_pitch + pi * core_dia}'
Dh_core = '${fparse 4 * A_core / P_wet_core}'
tot_power = 2000 # W
[GlobalParams]
  initial_p = ${press}
  initial_vel = 0.0001
  initial_T = ${T_in}
  initial_vel_x = 0
  initial_vel_y = 0
  initial_vel_z = 0
  gravity_vector = '0 0 0'
  rdg_slope_reconstruction = minmod
  scaling_factor_1phase = '1 1e-2 1e-4'
  scaling_factor_rhoV = 1
  scaling_factor_rhouV = 1e-2
  scaling_factor_rhovV = 1e-2
  scaling_factor_rhowV = 1e-2
  scaling_factor_rhoEV = 1e-4
  closures = simple_closures
  fp = he
[]
[FluidProperties]
  [he]
    type = IdealGasFluidProperties
    molar_mass = 4e-3
    gamma = 1.67
    k = 0.2556
    mu = 3.22639e-5
  []
[]
[Closures]
  [simple_closures]
    type = Closures1PhaseTHM
  []
[]
[SolidProperties]
  [steel]
    type = ThermalFunctionSolidProperties
    rho = 8050
    k = 45
    cp = 466
  []
[]
[Components]
  [total_power]
    type = TotalPower
    power = ${tot_power}
  []
  [up_pipe_1]
    type = FlowChannel1Phase
    position = '0 0 0'
    orientation = '0 0 1'
    length = 0.5
    n_elems = 15
    A = ${A_pipe}
    D_h = ${pipe_dia}
  []
  [jct1]
    type = JunctionParallelChannels1Phase
    position = '0 0 0.5'
    connections = 'up_pipe_1:out core_chan:in'
    volume = 1e-5
  []
  [core_chan]
    type = FlowChannel1Phase
    position = '0 0 0.5'
    orientation = '0 0 1'
    length = ${core_length}
    n_elems = ${core_n_elems}
    roughness = .0001
    A = '${A_core}'
    D_h = ${Dh_core}
  []
  [core_hs]
    type = HeatStructureCylindrical
    position = '0 0 0.5'
    orientation = '0 0 1'
    length = ${core_length}
    n_elems = ${core_n_elems}
    names = 'block'
    widths = '${fparse core_dia / 2.}'
    solid_properties = 'steel'
    solid_properties_T_ref = '300'
    n_part_elems = 3
  []
  [core_heating]
    type = HeatSourceFromTotalPower
    hs = core_hs
    regions = block
    power = total_power
  []
  [core_ht]
    type = HeatTransferFromHeatStructure1Phase
    flow_channel = core_chan
    hs = core_hs
    hs_side = outer
    P_hf = '${fparse pi * core_dia}'
  []
  [jct2]
    type = JunctionParallelChannels1Phase
    position = '0 0 1.5'
    connections = 'core_chan:out up_pipe_2:in'
    volume = 1e-5
  []
  [up_pipe_2]
    type = FlowChannel1Phase
    position = '0 0 1.5'
    orientation = '0 0 1'
    length = 0.5
    n_elems = 10
    A = ${A_pipe}
    D_h = ${pipe_dia}
  []
  [jct3]
    type = JunctionOneToOne1Phase
    connections = 'up_pipe_2:out top_pipe_1:in'
  []
  [top_pipe_1]
    type = FlowChannel1Phase
    position = '0 0 2'
    orientation = '1 0 0'
    length = 0.5
    n_elems = 10
    A = ${A_pipe}
    D_h = ${pipe_dia}
  []
  [top_pipe_2]
    type = FlowChannel1Phase
    position = '0.5 0 2'
    orientation = '1 0 0'
    length = 0.5
    n_elems = 10
    A = ${A_pipe}
    D_h = ${pipe_dia}
  []
  [jct4]
    type = VolumeJunction1Phase
    position = '0.5 0 2'
    volume = 1e-5
    connections = 'top_pipe_1:out top_pipe_2:in press_pipe:in'
  []
  [press_pipe]
    type = FlowChannel1Phase
    position = '0.5 0 2'
    orientation = '0 0 1'
    length = 0.2
    n_elems = 5
    A = ${A_pipe}
    D_h = ${pipe_dia}
  []
  [pressurizer]
    type = InletStagnationPressureTemperature1Phase
    p0 = ${press}
    T0 = ${T_in}
    input = press_pipe:out
  []
  [jct5]
    type = JunctionOneToOne1Phase
    connections = 'top_pipe_2:out down_pipe_1:in'
  []
  [down_pipe_1]
    type = FlowChannel1Phase
    position = '1 0 2'
    orientation = '0 0 -1'
    length = 0.25
    A = ${A_pipe}
    n_elems = 5
  []
  [jct6]
    type = JunctionOneToOne1Phase
    connections = 'down_pipe_1:out cooling_pipe:in'
  []
  [cooling_pipe]
    type = FlowChannel1Phase
    position = '1 0 1.75'
    orientation = '0 0 -1'
    length = 1.5
    n_elems = 25
    A = ${A_pipe}
  []
  [cold_wall]
    type = HeatTransferFromSpecifiedTemperature1Phase
    flow_channel = cooling_pipe
    T_wall = 300
    P_hf = '${fparse pi * pipe_dia}'
  []
  [jct7]
    type = JunctionOneToOne1Phase
    connections = 'cooling_pipe:out down_pipe_2:in'
  []
  [down_pipe_2]
    type = FlowChannel1Phase
    position = '1 0 0.25'
    orientation = '0 0 -1'
    length = 0.25
    n_elems = 10
    A = ${A_pipe}
    D_h = ${pipe_dia}
  []
  [jct8]
    type = JunctionOneToOne1Phase
    connections = 'down_pipe_2:out bottom_1:in'
  []
  [bottom_1]
    type = FlowChannel1Phase
    position = '1 0 0'
    orientation = '-1 0 0'
    length = 0.5
    n_elems = 5
    A = ${A_pipe}
    D_h = ${pipe_dia}
  []
  [pump]
    type = Pump1Phase
    position = '0.5 0 0'
    connections = 'bottom_1:out bottom_2:in'
    volume = 1e-4
    A_ref = ${A_pipe}
    head = 0
  []
  [bottom_2]
    type = FlowChannel1Phase
    position = '0.5 0 0'
    orientation = '-1 0 0'
    length = 0.5
    n_elems = 5
    A = ${A_pipe}
    D_h = ${pipe_dia}
  []
  [jct10]
    type = JunctionOneToOne1Phase
    connections = 'bottom_2:out up_pipe_1:in'
  []
[]
[ControlLogic]
  [set_point]
    type = GetFunctionValueControl
    function = ${m_dot_in}
  []
  [pid]
    type = PIDControl
    initial_value = 0
    set_point = set_point:value
    input = m_dot_pump
    K_p = 1.
    K_i = 4.
    K_d = 0
  []
  [set_pump_head]
    type = SetComponentRealValueControl
    component = pump
    parameter = head
    value = pid:output
  []
[]
[Postprocessors]
  [power_to_coolant]
    type = ADHeatRateConvection1Phase
    block = core_chan
    P_hf = '${fparse pi *core_dia}'
  []
  [m_dot_pump]
    type = ADFlowJunctionFlux1Phase
    boundary = core_chan:in
    connection_index = 1
    equation = mass
    junction = jct7
  []
  [core_T_out]
    type = SideAverageValue
    boundary = core_chan:out
    variable = T
  []
  [core_p_in]
    type = SideAverageValue
    boundary = core_chan:in
    variable = p
  []
  [core_p_out]
    type = SideAverageValue
    boundary = core_chan:out
    variable = p
  []
  [core_delta_p]
    type = ParsedPostprocessor
    pp_names = 'core_p_in core_p_out'
    expression = 'core_p_in - core_p_out'
  []
  [hx_pri_T_out]
    type = SideAverageValue
    boundary = cooling_pipe:out
    variable = T
  []
  [pump_head]
    type = RealComponentParameterValuePostprocessor
    component = pump
    parameter = head
  []
[]
[Preconditioning]
  [pc]
    type = SMP
    full = true
  []
[]
[Executioner]
  type = Transient
  start_time = 0
  [TimeStepper]
    type = IterationAdaptiveDT
    dt = 1
  []
  dtmax = 5
  end_time = 500
  line_search = basic
  solve_type = NEWTON
  petsc_options_iname = '-pc_type'
  petsc_options_value = 'lu'
  nl_rel_tol = 0
  nl_abs_tol = 1e-8
  nl_max_its = 25
[]
[Outputs]
  exodus = true
  [console]
    type = Console
    max_rows = 1
    outlier_variable_norms = false
  []
  print_linear_residuals = false
[]
(modules/thermal_hydraulics/test/tests/problems/super_sonic_tube/test.i)
[GlobalParams]
  gravity_vector = '0 0 0'
  scaling_factor_1phase = '1 1e-2 1e-4'
  initial_p = 101325
  initial_T = 300
  initial_vel = 522.676
  closures = simple_closures
  spatial_discretization = cg
[]
[FluidProperties]
  [ig]
    type = IdealGasFluidProperties
    gamma = 1.41
    molar_mass = 0.028966206103678928
  []
[]
[Closures]
  [simple_closures]
    type = Closures1PhaseSimple
  []
[]
[Components]
  [pipe]
    type = FlowChannel1Phase
    fp = ig
    # geometry
    position = '0 0 0'
    orientation = '1 0 0'
    A = 1.
    D_h = 1.12837916709551
    f = 0.0
    length = 1
    n_elems = 100
  []
  [inlet]
    type = SupersonicInlet
    input = 'pipe:in'
    p = 101325
    T = 300.0
    vel = 522.676
  []
  [outlet]
    type = FreeBoundary1Phase
    input = 'pipe:out'
  []
[]
[Preconditioning]
  [SMP_PJFNK]
    type = SMP
    full = true
  []
[]
[Executioner]
  type = Transient
  scheme = 'bdf2'
  start_time = 0
  dt = 1e-5
  num_steps = 10
  abort_on_solve_fail = true
  solve_type = 'PJFNK'
  nl_rel_tol = 1e-9
  nl_abs_tol = 1e-8
  nl_max_its = 30
  l_tol = 1e-3
  l_max_its = 100
  [Quadrature]
    type = TRAP
    order = FIRST
  []
[]
[Outputs]
  [out]
    type = Exodus
  []
[]
(modules/navier_stokes/test/tests/ics/test_function.i)
[Mesh]
  [cartesian]
    type = GeneratedMeshGenerator
    dim = 2
    xmin = 0
    xmax = 1
    ymin = 1
    ymax = 2
    nx = 3
    ny = 3
  []
[]
[FluidProperties]
  [fp]
    type = IdealGasFluidProperties
  []
[]
[Problem]
  kernel_coverage_check = false
  solve = false
  skip_nl_system_check = true
[]
[AuxVariables]
  [pressure]
    type = MooseVariableFVReal
  []
  [vel_x]
    type = MooseVariableFVReal
  []
  [vel_y]
    type = MooseVariableFVReal
  []
  [vel_z]
    type = MooseVariableFVReal
  []
  [temperature]
    type = MooseVariableFVReal
  []
  [ht]
    type = MooseVariableFVReal
  []
  [e]
    type = MooseVariableFVReal
  []
  [Mach]
    type = MooseVariableFVReal
  []
  [rho]
    type = MooseVariableFVReal
  []
  [rhou]
    type = MooseVariableFVReal
  []
  [rhov]
    type = MooseVariableFVReal
  []
  [rhow]
    type = MooseVariableFVReal
  []
  [rho_et]
    type = MooseVariableFVReal
  []
  [specific_volume]
    type = MooseVariableFVReal
  []
  [pressure_2]
  []
  [vel_x_2]
  []
  [vel_y_2]
  []
  [vel_z_2]
  []
  [temperature_2]
  []
  [ht_2]
  []
  [e_2]
  []
  [Mach_2]
  []
  [rho_2]
  []
  [rhou_2]
  []
  [rhov_2]
  []
  [rhow_2]
  []
  [rho_et_2]
  []
  [specific_volume_2]
  []
[]
[GlobalParams]
  fluid_properties = 'fp'
  initial_pressure = p_func
  initial_temperature = T_func
  initial_velocity = 'vx vy vz'
[]
[Functions]
  [p_func]
    type = ParsedFunction
    expression = '3+3+1e5 - x'
  []
  [T_func]
    type = ParsedFunction
    expression = '273.15 + x*y*2'
  []
  [vx]
    type = ParsedFunction
    expression = '14'
  []
  [vy]
    type = ParsedFunction
    expression = '10 + x'
  []
  [vz]
    type = ParsedFunction
    expression = '12 -7*y'
  []
[]
[ICs]
  [p]
    type = NSFunctionInitialCondition
    variable = 'pressure'
  []
  [vel_x]
    type = NSFunctionInitialCondition
    variable = 'vel_x'
  []
  [vel_y]
    type = NSFunctionInitialCondition
    variable = 'vel_y'
  []
  [vel_z]
    type = NSFunctionInitialCondition
    variable = 'vel_z'
  []
  [temperature]
    type = NSFunctionInitialCondition
    variable = 'temperature'
  []
  [ht]
    type = NSFunctionInitialCondition
    variable = 'ht'
  []
  [e]
    type = NSFunctionInitialCondition
    variable = 'e'
  []
  [Mach]
    type = NSFunctionInitialCondition
    variable = 'Mach'
  []
  [rho]
    type = NSFunctionInitialCondition
    fluid_properties = 'fp'
    initial_pressure = p_func
    initial_temperature = T_func
    initial_velocity = 'vx vy vz'
    variable = 'rho'
  []
  [rhou]
    type = NSFunctionInitialCondition
    variable = 'rhou'
  []
  [rhov]
    type = NSFunctionInitialCondition
    variable = 'rhov'
  []
  [rhow]
    type = NSFunctionInitialCondition
    variable = 'rhow'
  []
  [rho_et]
    type = NSFunctionInitialCondition
    variable = 'rho_et'
  []
  [specific_volume]
    type = NSFunctionInitialCondition
    variable = 'specific_volume'
  []
  [p_2]
    type = NSFunctionInitialCondition
    variable = 'pressure_2'
    variable_type = 'pressure'
  []
  [vel_x_2]
    type = NSFunctionInitialCondition
    variable = 'vel_x_2'
    variable_type = 'vel_x'
  []
  [vel_y_2]
    type = NSFunctionInitialCondition
    variable = 'vel_y_2'
      variable_type = 'vel_y'
  []
  [vel_z_2]
    type = NSFunctionInitialCondition
    variable = 'vel_z_2'
      variable_type = 'vel_z'
  []
  [temperature_2]
    type = NSFunctionInitialCondition
    variable = 'temperature_2'
    variable_type = 'temperature'
  []
  [ht_2]
    type = NSFunctionInitialCondition
    variable = 'ht_2'
    variable_type = 'ht'
  []
  [e_2]
    type = NSFunctionInitialCondition
    variable = 'e_2'
    variable_type = 'e'
  []
  [Mach_2]
    type = NSFunctionInitialCondition
    variable = 'Mach_2'
    variable_type = 'Mach'
  []
  [rho_2]
    type = NSFunctionInitialCondition
    variable = 'rho_2'
    variable_type = 'rho'
  []
  [rhou_2]
    type = NSFunctionInitialCondition
    variable = 'rhou_2'
    variable_type = 'rhou'
  []
  [rhov_2]
    type = NSFunctionInitialCondition
    variable = 'rhov_2'
    variable_type = 'rhov'
  []
  [rhow_2]
    type = NSFunctionInitialCondition
    variable = 'rhow_2'
    variable_type = 'rhow'
  []
  [rho_et_2]
    type = NSFunctionInitialCondition
    variable = 'rho_et_2'
    variable_type = 'rho_et'
  []
  [specific_volume_2]
    type = NSFunctionInitialCondition
    variable = 'specific_volume_2'
    variable_type = 'specific_volume'
  []
[]
[Executioner]
  type = Steady
[]
[Debug]
  show_actions = true
[]
[Outputs]
  exodus = true
[]
(modules/navier_stokes/test/tests/finite_volume/cns/heated-channel/transient-porous-kt-primitive.i)
p_initial=1.01e5
T=273.15
u_in=10
eps=1
superficial_vel_in=${fparse u_in * eps}
[GlobalParams]
  fp = fp
  limiter = 'vanLeer'
  two_term_boundary_expansion = true
[]
[Mesh]
  [cartesian]
    type = GeneratedMeshGenerator
    dim = 1
    xmin = 0
    xmax = 10
    nx = 100
  []
[]
[FluidProperties]
  [fp]
    type = IdealGasFluidProperties
  []
[]
[Problem]
  fv_bcs_integrity_check = false
[]
[Variables]
  [pressure]
    type = MooseVariableFVReal
    initial_condition = ${p_initial}
  []
  [superficial_vel_x]
    type = MooseVariableFVReal
    initial_condition = ${superficial_vel_in}
  []
  [temperature]
    type = MooseVariableFVReal
    initial_condition = ${T}
  []
[]
[AuxVariables]
  [rho]
    type = MooseVariableFVReal
  []
  [superficial_rhou]
    type = MooseVariableFVReal
  []
[]
[AuxKernels]
  [rho]
    type = ADMaterialRealAux
    variable = rho
    property = rho
    execute_on = 'timestep_end'
  []
  [superficial_rhou]
    type = ADMaterialRealAux
    variable = superficial_rhou
    property = superficial_rhou
    execute_on = 'timestep_end'
  []
[]
[FVKernels]
  [mass_time]
    type = FVMatPropTimeKernel
    mat_prop_time_derivative = 'dsuperficial_rho_dt'
    variable = pressure
  []
  [mass_advection]
    type = PCNSFVKT
    variable = pressure
    eqn = "mass"
  []
  [momentum_time]
    type = FVMatPropTimeKernel
    mat_prop_time_derivative = 'dsuperficial_rhou_dt'
    variable = superficial_vel_x
  []
  [momentum_advection]
    type = PCNSFVKT
    variable = superficial_vel_x
    eqn = "momentum"
    momentum_component = 'x'
  []
  [energy_time]
    type = FVMatPropTimeKernel
    mat_prop_time_derivative = 'dsuperficial_rho_et_dt'
    variable = temperature
  []
  [energy_advection]
    type = PCNSFVKT
    variable = temperature
    eqn = "energy"
  []
  [heat]
    type = FVBodyForce
    variable = temperature
    value = 1e6
  []
[]
[FVBCs]
  [rho_left]
    type = PCNSFVStrongBC
    boundary = 'left'
    variable = pressure
    superficial_velocity = 'superficial_vel_in'
    T_fluid = ${T}
    eqn = 'mass'
  []
  [rhou_left]
    type = PCNSFVStrongBC
    boundary = 'left'
    variable = superficial_vel_x
    superficial_velocity = 'superficial_vel_in'
    T_fluid = ${T}
    eqn = 'momentum'
    momentum_component = 'x'
  []
  [rho_et_left]
    type = PCNSFVStrongBC
    boundary = 'left'
    variable = temperature
    superficial_velocity = 'superficial_vel_in'
    T_fluid = ${T}
    eqn = 'energy'
  []
  [rho_right]
    type = PCNSFVStrongBC
    boundary = 'right'
    variable = pressure
    pressure = ${p_initial}
    eqn = 'mass'
  []
  [rhou_right]
    type = PCNSFVStrongBC
    boundary = 'right'
    variable = superficial_vel_x
    pressure = ${p_initial}
    eqn = 'momentum'
    momentum_component = 'x'
  []
  [rho_et_right]
    type = PCNSFVStrongBC
    boundary = 'right'
    variable = temperature
    pressure = ${p_initial}
    eqn = 'energy'
  []
  # Use these to help create more accurate cell centered gradients for cells adjacent to boundaries
  [T_left]
    type = FVDirichletBC
    variable = temperature
    value = ${T}
    boundary = 'left'
  []
  [sup_vel_left]
    type = FVDirichletBC
    variable = superficial_vel_x
    value = ${superficial_vel_in}
    boundary = 'left'
  []
  [p_right]
    type = FVDirichletBC
    variable = pressure
    value = ${p_initial}
    boundary = 'right'
  []
[]
[Functions]
  [superficial_vel_in]
    type = ParsedVectorFunction
    expression_x = '${superficial_vel_in}'
  []
[]
[Materials]
  [var_mat]
    type = PorousPrimitiveVarMaterial
    pressure = pressure
    T_fluid = temperature
    superficial_vel_x = superficial_vel_x
    fp = fp
    porosity = porosity
  []
  [fluid_only]
    type = GenericConstantMaterial
    prop_names = 'porosity'
    prop_values = '${eps}'
  []
[]
[Executioner]
  solve_type = NEWTON
  type = Transient
  nl_max_its = 20
  [TimeStepper]
    type = IterationAdaptiveDT
    dt = 5e-5
    optimal_iterations = 10
  []
  steady_state_detection = false
  steady_state_tolerance = 1e-12
  abort_on_solve_fail = false
  end_time = 100
  nl_abs_tol = 1e-8
  dtmin = 5e-5
  automatic_scaling = true
  compute_scaling_once = false
  verbose = true
  petsc_options_iname = '-pc_type -pc_factor_mat_solver_type -pc_factor_shift_type -snes_linesearch_minlambda'
  petsc_options_value = 'lu       mumps                      NONZERO               1e-3 '
[]
[Outputs]
  [exo]
    type = Exodus
    execute_on = 'final'
  []
  [dof]
    type = DOFMap
    execute_on = 'initial'
  []
  checkpoint = true
[]
[Debug]
  show_var_residual_norms = true
[]
(modules/thermal_hydraulics/tutorials/single_phase_flow/03_upper_loop.i)
T_in = 300. # K
m_dot_in = 1e-2 # kg/s
press = 10e5 # Pa
# core parameters
core_length = 1. # m
core_n_elems = 25
core_dia = '${units 2. cm -> m}'
core_pitch = '${units 8.7 cm -> m}'
A_core = '${fparse core_pitch^2 - 0.25 *pi * core_dia^2}'
P_wet_core = '${fparse 4*core_pitch + pi * core_dia}'
Dh_core = '${fparse 4 * A_core / P_wet_core}'
# pipe parameters
pipe_dia = '${units 10. cm -> m}'
A_pipe = '${fparse 0.25 * pi * pipe_dia^2}'
tot_power = 2000 # W
[GlobalParams]
  initial_p = ${press}
  initial_vel = 0.0001
  initial_T = ${T_in}
  initial_vel_x = 0
  initial_vel_y = 0
  initial_vel_z = 0
  gravity_vector = '0 0 0'
  rdg_slope_reconstruction = minmod
  scaling_factor_1phase = '1 1e-2 1e-4'
  scaling_factor_rhoV = 1
  scaling_factor_rhouV = 1e-2
  scaling_factor_rhovV = 1e-2
  scaling_factor_rhowV = 1e-2
  scaling_factor_rhoEV = 1e-4
  closures = thm_closures
  fp = he
[]
[FluidProperties]
  [he]
    type = IdealGasFluidProperties
    molar_mass = 4e-3
    gamma = 1.67
    k = 0.2556
    mu = 3.22639e-5
  []
[]
[Closures]
  [thm_closures]
    type = Closures1PhaseTHM
  []
[]
[SolidProperties]
  [steel]
    type = ThermalFunctionSolidProperties
    rho = 8050
    k = 45
    cp = 466
  []
[]
[Components]
  [total_power]
    type = TotalPower
    power = ${tot_power}
  []
  [inlet]
    type = InletMassFlowRateTemperature1Phase
    input = 'up_pipe_1:in'
    m_dot = ${m_dot_in}
    T = ${T_in}
  []
  [up_pipe_1]
    type = FlowChannel1Phase
    position = '0 0 0'
    orientation = '0 0 1'
    length = 0.5
    n_elems = 15
    A = ${A_pipe}
    D_h = ${pipe_dia}
  []
  [jct1]
    type = JunctionParallelChannels1Phase
    position = '0 0 0.5'
    connections = 'up_pipe_1:out core_chan:in'
    volume = 1e-5
  []
  [core_chan]
    type = FlowChannel1Phase
    position = '0 0 0.5'
    orientation = '0 0 1'
    length = ${core_length}
    n_elems = ${core_n_elems}
    roughness = .0001
    A = '${A_core}'
    D_h = ${Dh_core}
  []
  [core_hs]
    type = HeatStructureCylindrical
    position = '0 0 0.5'
    orientation = '0 0 1'
    length = ${core_length}
    n_elems = ${core_n_elems}
    names = 'block'
    widths = '${fparse core_dia / 2.}'
    solid_properties = 'steel'
    solid_properties_T_ref = '300'
    n_part_elems = 3
  []
  [core_heating]
    type = HeatSourceFromTotalPower
    hs = core_hs
    regions = block
    power = total_power
  []
  [core_ht]
    type = HeatTransferFromHeatStructure1Phase
    flow_channel = core_chan
    hs = core_hs
    hs_side = outer
    P_hf = '${fparse pi * core_dia}'
  []
  [jct2]
    type = JunctionParallelChannels1Phase
    position = '0 0 1.5'
    connections = 'core_chan:out up_pipe_2:in'
    volume = 1e-5
  []
  [up_pipe_2]
    type = FlowChannel1Phase
    position = '0 0 1.5'
    orientation = '0 0 1'
    length = 0.5
    n_elems = 10
    A = ${A_pipe}
    D_h = ${pipe_dia}
  []
  [jct3]
    type = JunctionOneToOne1Phase
    connections = 'up_pipe_2:out top_pipe:in'
  []
  [top_pipe]
    type = FlowChannel1Phase
    position = '0 0 2'
    orientation = '1 0 0'
    length = 1
    n_elems = 10
    A = ${A_pipe}
    D_h = ${pipe_dia}
  []
  [jct4]
    type = JunctionOneToOne1Phase
    connections = 'top_pipe:out down_pipe_1:in'
  []
  [down_pipe_1]
    type = FlowChannel1Phase
    position = '1 0 2'
    orientation = '0 0 -1'
    length = 0.25
    A = ${A_pipe}
    n_elems = 5
  []
  [jct5]
    type = JunctionOneToOne1Phase
    connections = 'down_pipe_1:out cooling_pipe:in'
  []
  [cooling_pipe]
    type = FlowChannel1Phase
    position = '1 0 1.75'
    orientation = '0 0 -1'
    length = 1.5
    n_elems = 25
    A = ${A_pipe}
  []
  [cold_wall]
    type = HeatTransferFromSpecifiedTemperature1Phase
    flow_channel = cooling_pipe
    T_wall = 300
    P_hf = '${fparse pi * pipe_dia}'
  []
  [jct6]
    type = JunctionOneToOne1Phase
    connections = 'cooling_pipe:out down_pipe_2:in'
  []
  [down_pipe_2]
    type = FlowChannel1Phase
    position = '1 0 0.25'
    orientation = '0 0 -1'
    length = 0.25
    n_elems = 10
    A = ${A_pipe}
    D_h = ${pipe_dia}
  []
  [outlet]
    type = Outlet1Phase
    input = 'down_pipe_2:out'
    p = ${press}
  []
[]
[Postprocessors]
  [power_to_coolant]
    type = ADHeatRateConvection1Phase
    block = core_chan
    P_hf = '${fparse pi *core_dia}'
  []
  [core_T_out]
    type = SideAverageValue
    boundary = core_chan:out
    variable = T
  []
  [core_p_in]
    type = SideAverageValue
    boundary = core_chan:in
    variable = p
  []
  [core_p_out]
    type = SideAverageValue
    boundary = core_chan:out
    variable = p
  []
  [core_delta_p]
    type = ParsedPostprocessor
    pp_names = 'core_p_in core_p_out'
    expression = 'core_p_in - core_p_out'
  []
  [hx_pri_T_out]
    type = SideAverageValue
    boundary = cooling_pipe:out
    variable = T
  []
[]
[Preconditioning]
  [pc]
    type = SMP
    full = true
  []
[]
[Executioner]
  type = Transient
  start_time = 0
  [TimeStepper]
    type = IterationAdaptiveDT
    dt = 1
  []
  end_time = 500
  line_search = basic
  solve_type = NEWTON
  petsc_options_iname = '-pc_type'
  petsc_options_value = 'lu'
  nl_rel_tol = 1e-8
  nl_abs_tol = 1e-8
  nl_max_its = 25
[]
[Outputs]
  exodus = true
  [console]
    type = Console
    max_rows = 1
    outlier_variable_norms = false
  []
  print_linear_residuals = false
[]
(modules/navier_stokes/test/tests/finite_volume/cns/mms/1d-with-bcs/varying-eps-hllc.i)
[GlobalParams]
  fp = fp
[]
[Mesh]
  [cartesian]
    type = GeneratedMeshGenerator
    dim = 1
    xmin = .1
    xmax = .6
    nx = 2
  []
[]
[FluidProperties]
  [fp]
    type = IdealGasFluidProperties
  []
[]
[Problem]
  fv_bcs_integrity_check = false
[]
[Variables]
  [pressure]
    type = MooseVariableFVReal
  []
  [sup_mom_x]
    type = MooseVariableFVReal
  []
  [T_fluid]
    type = MooseVariableFVReal
  []
[]
[ICs]
  [pressure]
    type = FunctionIC
    variable = pressure
    function = 'exact_p'
  []
  [sup_mom_x]
    type = FunctionIC
    variable = sup_mom_x
    function = 'exact_rho_ud'
  []
  [T_fluid]
    type = FunctionIC
    variable = T_fluid
    function = 'exact_T'
  []
[]
[FVKernels]
  [mass_advection]
    type = PCNSFVMassHLLC
    variable = pressure
  []
  [mass_fn]
    type = FVBodyForce
    variable = pressure
    function = 'forcing_rho'
  []
  [momentum_x_advection]
    type = PCNSFVMomentumHLLC
    variable = sup_mom_x
    momentum_component = x
  []
  [eps_grad]
    type = PNSFVPGradEpsilon
    variable = sup_mom_x
    momentum_component = 'x'
    epsilon_function = 'eps'
  []
  [momentum_fn]
    type = FVBodyForce
    variable = sup_mom_x
    function = 'forcing_rho_ud'
  []
  [fluid_energy_advection]
    type = PCNSFVFluidEnergyHLLC
    variable = T_fluid
  []
  [energy_fn]
    type = FVBodyForce
    variable = T_fluid
    function = 'forcing_rho_et'
  []
[]
[FVBCs]
  [mass_left]
    variable = pressure
    type = PCNSFVStrongBC
    boundary = left
    T_fluid = 'exact_T'
    superficial_velocity = 'exact_superficial_velocity'
    eqn = 'mass'
  []
  [momentum_left]
    variable = sup_mom_x
    type = PCNSFVStrongBC
    boundary = left
    T_fluid = 'exact_T'
    superficial_velocity = 'exact_superficial_velocity'
    eqn = 'momentum'
    momentum_component = 'x'
  []
  [energy_left]
    variable = T_fluid
    type = PCNSFVStrongBC
    boundary = left
    T_fluid = 'exact_T'
    superficial_velocity = 'exact_superficial_velocity'
    eqn = 'energy'
  []
  [mass_right]
    variable = pressure
    type = PCNSFVStrongBC
    boundary = right
    eqn = 'mass'
    pressure = 'exact_p'
  []
  [momentum_right]
    variable = sup_mom_x
    type = PCNSFVStrongBC
    boundary = right
    eqn = 'momentum'
    momentum_component = 'x'
    pressure = 'exact_p'
  []
  [energy_right]
    variable = T_fluid
    type = PCNSFVStrongBC
    boundary = right
    eqn = 'energy'
    pressure = 'exact_p'
  []
[]
[Materials]
  [var_mat]
    type = PorousMixedVarMaterial
    pressure = pressure
    superficial_rhou = sup_mom_x
    T_fluid = T_fluid
    porosity = porosity
  []
  [porosity]
    type = GenericFunctionMaterial
    prop_names = 'porosity'
    prop_values = 'eps'
  []
[]
[Functions]
[exact_rho]
  type = ParsedFunction
  expression = '3.48788261470924*cos(x)'
[]
[forcing_rho]
  type = ParsedFunction
  expression = '-3.83667087618017*sin(1.1*x)*cos(1.3*x) - 4.53424739912202*sin(1.3*x)*cos(1.1*x)'
[]
[exact_rho_ud]
  type = ParsedFunction
  expression = '3.48788261470924*cos(1.1*x)*cos(1.3*x)'
[]
[forcing_rho_ud]
  type = ParsedFunction
  expression = '(-(10.6975765229419*cos(1.5*x)/cos(x) - 0.697576522941849*cos(1.1*x)^2/cos(x)^2)*sin(x) + (10.6975765229419*sin(x)*cos(1.5*x)/cos(x)^2 - 1.3951530458837*sin(x)*cos(1.1*x)^2/cos(x)^3 + 1.53466835047207*sin(1.1*x)*cos(1.1*x)/cos(x)^2 - 16.0463647844128*sin(1.5*x)/cos(x))*cos(x))*cos(1.3*x) + 3.48788261470924*sin(x)*cos(1.1*x)^2*cos(1.3*x)/cos(x)^2 - 7.67334175236034*sin(1.1*x)*cos(1.1*x)*cos(1.3*x)/cos(x) - 4.53424739912202*sin(1.3*x)*cos(1.1*x)^2/cos(x)'
[]
[exact_rho_et]
  type = ParsedFunction
  expression = '26.7439413073546*cos(1.5*x)'
[]
[forcing_rho_et]
  type = ParsedFunction
  expression = '1.0*(3.48788261470924*(3.06706896551724*cos(1.5*x)/cos(x) - 0.2*cos(1.1*x)^2/cos(x)^2)*cos(x) + 26.7439413073546*cos(1.5*x))*sin(x)*cos(1.1*x)*cos(1.3*x)/cos(x)^2 - 1.1*(3.48788261470924*(3.06706896551724*cos(1.5*x)/cos(x) - 0.2*cos(1.1*x)^2/cos(x)^2)*cos(x) + 26.7439413073546*cos(1.5*x))*sin(1.1*x)*cos(1.3*x)/cos(x) - 1.3*(3.48788261470924*(3.06706896551724*cos(1.5*x)/cos(x) - 0.2*cos(1.1*x)^2/cos(x)^2)*cos(x) + 26.7439413073546*cos(1.5*x))*sin(1.3*x)*cos(1.1*x)/cos(x) + 1.0*(-(10.6975765229419*cos(1.5*x)/cos(x) - 0.697576522941849*cos(1.1*x)^2/cos(x)^2)*sin(x) + (10.6975765229419*sin(x)*cos(1.5*x)/cos(x)^2 - 1.3951530458837*sin(x)*cos(1.1*x)^2/cos(x)^3 + 1.53466835047207*sin(1.1*x)*cos(1.1*x)/cos(x)^2 - 16.0463647844128*sin(1.5*x)/cos(x))*cos(x) - 40.1159119610319*sin(1.5*x))*cos(1.1*x)*cos(1.3*x)/cos(x)'
[]
[exact_T]
  type = ParsedFunction
  expression = '0.0106975765229418*cos(1.5*x)/cos(x) - 0.000697576522941848*cos(1.1*x)^2/cos(x)^2'
[]
[exact_eps_p]
  type = ParsedFunction
  expression = '3.48788261470924*(3.06706896551724*cos(1.5*x)/cos(x) - 0.2*cos(1.1*x)^2/cos(x)^2)*cos(x)*cos(1.3*x)'
[]
[exact_p]
  type = ParsedFunction
  expression = '3.48788261470924*(3.06706896551724*cos(1.5*x)/cos(x) - 0.2*cos(1.1*x)^2/cos(x)^2)*cos(x)'
[]
[exact_sup_vel_x]
  type = ParsedFunction
  expression = '1.0*cos(1.1*x)*cos(1.3*x)/cos(x)'
[]
[eps]
  type = ParsedFunction
  expression = 'cos(1.3*x)'
[]
[exact_superficial_velocity]
  type = ParsedVectorFunction
  expression_x = '1.0*cos(1.1*x)*cos(1.3*x)/cos(x)'
[]
[]
[Executioner]
  solve_type = NEWTON
  type = Steady
  petsc_options_iname = '-pc_type'
  petsc_options_value = 'lu'
  nl_max_its = 50
  line_search = bt
  nl_rel_tol = 1e-12
  nl_abs_tol = 1e-12
[]
[Outputs]
  exodus = true
  csv = true
[]
[Debug]
  show_var_residual_norms = true
[]
[Postprocessors]
  [h]
    type = AverageElementSize
    outputs = 'console csv'
    execute_on = 'timestep_end'
  []
  [L2pressure]
    type = ElementL2Error
    variable = pressure
    function = exact_p
    outputs = 'console csv'
    execute_on = 'timestep_end'
  []
  [L2sup_mom_x]
    variable = sup_mom_x
    function = exact_rho_ud
    type = ElementL2Error
    outputs = 'console csv'
    execute_on = 'timestep_end'
  []
  [L2T_fluid]
    variable = T_fluid
    function = exact_T
    type = ElementL2Error
    outputs = 'console csv'
    execute_on = 'timestep_end'
  []
[]
(modules/fluid_properties/fp_interrogator/fp_interrogator.i)
# The parameters in this block are used to specify the thermodynamic state
# at which to query the fluid properties package
[FluidPropertiesInterrogator]
  fp = fp
  p = 1e5
  T = 300
  vel = 10
[]
# The fluid properties (equation of state) to query is defined here
[FluidProperties]
  [fp]
    type = IdealGasFluidProperties
  []
[]
(modules/fluid_properties/test/tests/fp_interrogator/2ph.T.i)
[FluidPropertiesInterrogator]
  fp = fp
  T = 300
[]
[FluidProperties]
  [./fp_liquid]
    type = IdealGasFluidProperties
    gamma = 1.4
    molar_mass = 0.02900055737704918
    mu = 1.823e-05
    k = 0.02568
  [../]
  [./fp_vapor]
    type = IdealGasFluidProperties
    gamma = 1.1
    molar_mass = 0.027714866
    mu = 1.7e-05
    k = 0.05
  [../]
  [./fp]
    type = TestTwoPhaseFluidProperties
    fp_liquid = fp_liquid
    fp_vapor = fp_vapor
  [../]
[]
(modules/thermal_hydraulics/test/tests/components/junction_parallel_channels_1phase/phy.shower.i)
# This problem models a "shower": water from two pipes, one hot and one cold,
# mixes together to produce a temperature between the two.
[GlobalParams]
  gravity_vector = '0 0 0'
  initial_T = 300
  initial_p = 1e5
  initial_vel = 1
  initial_vel_x = 1
  initial_vel_y = 0
  initial_vel_z = 0
  # global parameters for pipes
  fp = eos
  orientation = '1 0 0'
  length = 1
  n_elems = 20
  f = 0
  scaling_factor_1phase = '1 1 1e-6'
  closures = simple_closures
[]
[FluidProperties]
  [eos]
    type = IdealGasFluidProperties
  []
[]
[Closures]
  [simple_closures]
    type = Closures1PhaseSimple
  []
[]
[Components]
  [inlet_hot]
    type = InletDensityVelocity1Phase
    input = 'pipe_hot:in'
    # rho @ (p = 1e5, T = 310 K)
    rho = 1315.9279785683
    vel = 1
  []
  [inlet_cold]
    type = InletDensityVelocity1Phase
    input = 'pipe_cold:in'
    # rho @ (p = 1e5, T = 280 K)
    rho = 1456.9202619863
    vel = 1
  []
  [outlet]
    type = Outlet1Phase
    input = 'pipe_warm:out'
    p = 1e5
  []
  [pipe_hot]
    type = FlowChannel1Phase
    position = '0 1 0'
    A = 1
  []
  [pipe_cold]
    type = FlowChannel1Phase
    position = '0 0 0'
    A = 1
  []
  [pipe_warm]
    type = FlowChannel1Phase
    position = '1 0.5 0'
    A = 2
    initial_vel = 0.5
  []
  [junction]
    type = JunctionParallelChannels1Phase
    connections = 'pipe_cold:out pipe_hot:out pipe_warm:in'
    position = '1 0.5 0'
    volume = 1e-8
  []
[]
[Preconditioning]
  [pc]
    type = SMP
    full = true
  []
[]
[Executioner]
  type = Transient
  scheme = 'bdf2'
  solve_type = 'NEWTON'
  line_search = 'basic'
  nl_rel_tol = 1e-8
  nl_abs_tol = 1e-5
  nl_max_its = 10
  l_tol = 1e-2
  l_max_its = 10
  start_time = 0
  end_time = 5
  dt = 0.05
  abort_on_solve_fail = true
[]
[Postprocessors]
  # These post-processors are used to test that the energy flux on
  # the warm side of the junction is equal to the sum of the energy
  # fluxes of the hot and cold inlets to the junction.
  [energy_flux_hot]
    type = EnergyFluxIntegral
    boundary = pipe_hot:out
    arhouA = rhouA
    H = H
  []
  [energy_flux_cold]
    type = EnergyFluxIntegral
    boundary = pipe_cold:out
    arhouA = rhouA
    H = H
  []
  [energy_flux_warm]
    type = EnergyFluxIntegral
    boundary = pipe_warm:in
    arhouA = rhouA
    H = H
  []
  [energy_flux_inlet_sum]
    type = SumPostprocessor
    values = 'energy_flux_hot energy_flux_cold'
  []
  [test_rel_err]
    type = RelativeDifferencePostprocessor
    value1 = energy_flux_warm
    value2 = energy_flux_inlet_sum
  []
[]
[Outputs]
  [out]
    type = CSV
    show = test_rel_err
    sync_only = true
    sync_times = '3 4 5'
  []
[]
(modules/thermal_hydraulics/test/tests/components/shaft_connected_pump_1phase/shaft_motor_pump.i)
# Pump data used in this test comes from the Semiscale Program, summarized in NUREG/CR-4945
initial_T = 393.15
area = 1e-2
dt = 1.e-2
[GlobalParams]
  initial_p = 1.4E+07
  initial_T = ${initial_T}
  initial_vel = 10
  initial_vel_x = 10
  initial_vel_y = 0
  initial_vel_z = 0
  A = ${area}
  A_ref = ${area}
  f = 100
  scaling_factor_1phase = '0.04 0.04 0.04e-5'
  closures = simple_closures
  fp = fp
[]
[FluidProperties]
  [fp]
    type = IdealGasFluidProperties
  []
[]
[Closures]
  [simple_closures]
    type = Closures1PhaseSimple
  []
[]
[Components]
  [pump]
    type = ShaftConnectedPump1Phase
    inlet = 'pipe:out'
    outlet = 'pipe:in'
    position = '0 0 0'
    scaling_factor_rhoEV = 1e-5
    volume = 0.3
    inertia_coeff = '1 1 1 1'
    inertia_const = 1.61397
    omega_rated = 314
    speed_cr_I = 1e12
    speed_cr_fr = 0
    torque_rated = 47.1825
    volumetric_rated = 1
    head_rated = 58.52
    tau_fr_coeff = '0 0 9.084 0'
    tau_fr_const = 0
    head = head_fcn
    torque_hydraulic = torque_fcn
    density_rated = 124.2046
  []
  [pipe]
    type = FlowChannel1Phase
    position = '0.6096 0 0'
    orientation = '1 0 0'
    length = 10
    n_elems = 20
  []
  [motor]
    type = ShaftConnectedMotor
    inertia = 2
    torque = 47
  []
  [shaft]
    type = Shaft
    connected_components = 'motor pump'
    initial_speed = 30
  []
[]
[Functions]
  [head_fcn]
    type = PiecewiseLinear
    data_file = semiscale_head_data.csv
    format = columns
  []
  [torque_fcn]
    type = PiecewiseLinear
    data_file = semiscale_torque_data.csv
    format = columns
  []
  [S_energy_fcn]
    type = ParsedFunction
    expression = '-tau_hyd * omega'
    symbol_names = 'tau_hyd  omega'
    symbol_values = 'hydraulic_torque shaft:omega'
  []
  [energy_conservation_fcn]
    type = ParsedFunction
    expression = '(E_change - S_energy * dt) / E_tot'
    symbol_names = 'E_change S_energy dt E_tot'
    symbol_values = 'E_change S_energy ${dt} E_tot'
  []
[]
[Postprocessors]
  [hydraulic_torque]
    type = ElementAverageValue
    variable = hydraulic_torque
    block = 'pump'
    execute_on = 'initial timestep_end'
  []
  # mass conservation
  [mass_pipes]
    type = ElementIntegralVariablePostprocessor
    variable = rhoA
    block = 'pipe'
    execute_on = 'initial timestep_end'
  []
  [mass_pump]
    type = ElementAverageValue
    variable = rhoV
    block = 'pump'
    execute_on = 'initial timestep_end'
  []
  [mass_tot]
    type = SumPostprocessor
    values = 'mass_pipes mass_pump'
    execute_on = 'initial timestep_end'
  []
  [mass_conservation]
    type = ChangeOverTimePostprocessor
    postprocessor = mass_tot
    change_with_respect_to_initial = true
    compute_relative_change = true
    execute_on = 'initial timestep_end'
  []
  # energy conservation
  [E_pipes]
    type = ElementIntegralVariablePostprocessor
    variable = rhoEA
    block = 'pipe'
    execute_on = 'initial timestep_end'
  []
  [E_pump]
    type = ElementAverageValue
    variable = rhoEV
    block = 'pump'
    execute_on = 'initial timestep_end'
  []
  [E_tot]
    type = LinearCombinationPostprocessor
    pp_coefs = '1 1'
    pp_names = 'E_pipes E_pump'
    execute_on = 'initial timestep_end'
  []
  [S_energy]
    type = FunctionValuePostprocessor
    function = S_energy_fcn
    indirect_dependencies = 'hydraulic_torque'
    execute_on = 'initial timestep_end'
  []
  [E_change]
    type = ChangeOverTimePostprocessor
    postprocessor = E_tot
    execute_on = 'initial timestep_end'
  []
  # This should also execute on initial. This value is
  # lagged by one timestep as a workaround to moose issue #13262.
  [energy_conservation]
    type = FunctionValuePostprocessor
    function = energy_conservation_fcn
    execute_on = 'timestep_end'
    indirect_dependencies = 'E_tot E_change S_energy'
  []
[]
[Preconditioning]
  [SMP_PJFNK]
    type = SMP
    full = true
  []
[]
[Executioner]
  type = Transient
  scheme = 'implicit-euler'
  dt = ${dt}
  num_steps = 6
  solve_type = 'NEWTON'
  line_search = 'basic'
  petsc_options_iname = '-pc_type'
  petsc_options_value = ' lu'
  nl_rel_tol = 1e-8
  nl_abs_tol = 1e-6
  nl_max_its = 15
  l_tol = 1e-4
  l_max_its = 10
  [Quadrature]
    type = GAUSS
    order = SECOND
  []
[]
[Outputs]
  velocity_as_vector = false
[]
(modules/thermal_hydraulics/test/tests/components/junction_one_to_one_1phase/no_junction_1phase.i)
# This input file is used to generate gold values for the junction_one_to_one_1phase.i
# test. Unlike junction_one_to_one_1phase.i, this file has no junction in the
# middle of the domain. In junction_one_to_one_1phase.i, the post-processors are
# side post-processors, but in this input file, side post-processors cannot be
# used to obtain the solution at these positions since there are no sides there.
# Therefore, the solution is sampled at points just to the left and right of
# the middle to obtain the piecewise constant solution values to either side of
# the interface.
[GlobalParams]
  gravity_vector = '0 0 0'
  closures = simple_closures
[]
[Functions]
  [p_ic_fn]
    type = PiecewiseConstant
    axis = x
    direction = right
    x = '0.5 1.0'
    y = '1.0 0.1'
  []
  [T_ic_fn]
    type = PiecewiseConstant
    axis = x
    direction = right
    x = '0.5 1.0'
    y = '1.4 1.12'
  []
[]
[FluidProperties]
  [fp]
    type = IdealGasFluidProperties
    gamma = 1.4
    molar_mass = 11.64024372
  []
[]
[Closures]
  [simple_closures]
    type = Closures1PhaseSimple
  []
[]
[Components]
  [left_boundary]
    type = FreeBoundary1Phase
    input = 'channel:in'
  []
  [channel]
    type = FlowChannel1Phase
    fp = fp
    position = '0 0 0'
    orientation = '1 0 0'
    length = 1.0
    n_elems = 100
    A = 1.0
    initial_T = T_ic_fn
    initial_p = p_ic_fn
    initial_vel = 0
    f = 0
  []
  [right_boundary]
    type = FreeBoundary1Phase
    input = 'channel:out'
  []
[]
[Preconditioning]
  [smp]
    type = SMP
    full = true
  []
[]
[Executioner]
  type = Transient
  scheme = bdf2
  solve_type = NEWTON
  nl_rel_tol = 1e-10
  nl_abs_tol = 1e-8
  nl_max_its = 60
  l_tol = 1e-4
  start_time = 0.0
  dt = 1e-3
  num_steps = 5
  abort_on_solve_fail = true
[]
[Postprocessors]
  [rhoA_left]
    type = PointValue
    variable = rhoA
    point = '0.4999 0 0'
    execute_on = 'initial timestep_end'
  []
  [rhouA_left]
    type = PointValue
    variable = rhouA
    point = '0.4999 0 0'
    execute_on = 'initial timestep_end'
  []
  [rhoEA_left]
    type = PointValue
    variable = rhoEA
    point = '0.4999 0 0'
    execute_on = 'initial timestep_end'
  []
  [rhoA_right]
    type = PointValue
    variable = rhoA
    point = '0.5001 0 0'
    execute_on = 'initial timestep_end'
  []
  [rhouA_right]
    type = PointValue
    variable = rhouA
    point = '0.5001 0 0'
    execute_on = 'initial timestep_end'
  []
  [rhoEA_right]
    type = PointValue
    variable = rhoEA
    point = '0.5001 0 0'
    execute_on = 'initial timestep_end'
  []
[]
[Outputs]
  csv = true
  file_base = 'junction_one_to_one_1phase_out'
  execute_on = 'initial timestep_end'
[]
(modules/navier_stokes/test/tests/finite_volume/cns/mms/1d-with-bcs/porous-hllc.i)
eps=0.9
[GlobalParams]
  fp = fp
[]
[Mesh]
  [cartesian]
    type = GeneratedMeshGenerator
    dim = 1
    xmin = .1
    xmax = 1.1
    nx = 2
  []
[]
[FluidProperties]
  [fp]
    type = IdealGasFluidProperties
  []
[]
[Variables]
  [rho]
    type = MooseVariableFVReal
  []
  [rho_ud]
    type = MooseVariableFVReal
  []
  [rho_et]
    type = MooseVariableFVReal
  []
[]
[ICs]
  [rho]
    type = FunctionIC
    variable = rho
    function = 'exact_rho'
  []
  [rho_ud]
    type = FunctionIC
    variable = rho_ud
    function = 'exact_rho_ud'
  []
  [rho_et]
    type = FunctionIC
    variable = rho_et
    function = 'exact_rho_et'
  []
[]
[FVKernels]
  [mass_advection]
    type = PCNSFVMassHLLC
    variable = rho
    fp = fp
  []
  [mass_fn]
    type = FVBodyForce
    variable = rho
    function = 'forcing_rho'
  []
  [momentum_x_advection]
    type = PCNSFVMomentumHLLC
    variable = rho_ud
    momentum_component = x
    fp = fp
  []
  [momentum_fn]
    type = FVBodyForce
    variable = rho_ud
    function = 'forcing_rho_ud'
  []
  [fluid_energy_advection]
    type = PCNSFVFluidEnergyHLLC
    variable = rho_et
    fp = fp
  []
  [energy_fn]
    type = FVBodyForce
    variable = rho_et
    function = 'forcing_rho_et'
  []
[]
[FVBCs]
  [mass_in]
    variable = rho
    type = PCNSFVHLLCSpecifiedMassFluxAndTemperatureMassBC
    boundary = left
    temperature = 'exact_T'
    superficial_rhou = 'exact_rho_ud'
  []
  [momentum_in]
    variable = rho_ud
    type = PCNSFVHLLCSpecifiedMassFluxAndTemperatureMomentumBC
    boundary = left
    temperature = 'exact_T'
    superficial_rhou = 'exact_rho_ud'
    momentum_component = 'x'
  []
  [energy_in]
    variable = rho_et
    type = PCNSFVHLLCSpecifiedMassFluxAndTemperatureFluidEnergyBC
    boundary = left
    temperature = 'exact_T'
    superficial_rhou = 'exact_rho_ud'
  []
  [mass_out]
    variable = rho
    type = PCNSFVHLLCSpecifiedPressureMassBC
    boundary = right
    pressure = 'exact_p'
  []
  [momentum_out]
    variable = rho_ud
    type = PCNSFVHLLCSpecifiedPressureMomentumBC
    boundary = right
    pressure = 'exact_p'
    momentum_component = 'x'
  []
  [energy_out]
    variable = rho_et
    type = PCNSFVHLLCSpecifiedPressureFluidEnergyBC
    boundary = right
    pressure = 'exact_p'
  []
[]
[Materials]
  [var_mat]
    type = PorousConservedVarMaterial
    rho = rho
    superficial_rhou = rho_ud
    rho_et = rho_et
    porosity = porosity
  []
  [porosity]
    type = GenericConstantMaterial
    prop_names = 'porosity'
    prop_values = '${eps}'
  []
[]
[Functions]
[exact_rho]
  type = ParsedFunction
  expression = '3.48788261470924*cos(x)'
[]
[forcing_rho]
  type = ParsedFunction
  expression = '-3.83667087618017*eps*sin(1.1*x)'
  symbol_names = 'eps'
  symbol_values = '${eps}'
[]
[exact_rho_ud]
  type = ParsedFunction
  expression = '3.48788261470924*eps*cos(1.1*x)'
  symbol_names = 'eps'
  symbol_values = '${eps}'
[]
[forcing_rho_ud]
  type = ParsedFunction
  expression = 'eps*(-(10.6975765229419*cos(1.2*x)/cos(x) - 0.697576522941849*cos(1.1*x)^2/cos(x)^2)*sin(x) + (10.6975765229419*sin(x)*cos(1.2*x)/cos(x)^2 - 1.3951530458837*sin(x)*cos(1.1*x)^2/cos(x)^3 + 1.53466835047207*sin(1.1*x)*cos(1.1*x)/cos(x)^2 - 12.8370918275302*sin(1.2*x)/cos(x))*cos(x)) + 3.48788261470924*eps*sin(x)*cos(1.1*x)^2/cos(x)^2 - 7.67334175236034*eps*sin(1.1*x)*cos(1.1*x)/cos(x)'
  symbol_names = 'eps'
  symbol_values = '${eps}'
[]
[exact_rho_et]
  type = ParsedFunction
  expression = '26.7439413073546*cos(1.2*x)'
[]
[forcing_rho_et]
  type = ParsedFunction
  expression = '1.0*eps*(3.48788261470924*(3.06706896551724*cos(1.2*x)/cos(x) - 0.2*cos(1.1*x)^2/cos(x)^2)*cos(x) + 26.7439413073546*cos(1.2*x))*sin(x)*cos(1.1*x)/cos(x)^2 - 1.1*eps*(3.48788261470924*(3.06706896551724*cos(1.2*x)/cos(x) - 0.2*cos(1.1*x)^2/cos(x)^2)*cos(x) + 26.7439413073546*cos(1.2*x))*sin(1.1*x)/cos(x) + 1.0*eps*(-(10.6975765229419*cos(1.2*x)/cos(x) - 0.697576522941849*cos(1.1*x)^2/cos(x)^2)*sin(x) + (10.6975765229419*sin(x)*cos(1.2*x)/cos(x)^2 - 1.3951530458837*sin(x)*cos(1.1*x)^2/cos(x)^3 + 1.53466835047207*sin(1.1*x)*cos(1.1*x)/cos(x)^2 - 12.8370918275302*sin(1.2*x)/cos(x))*cos(x) - 32.0927295688256*sin(1.2*x))*cos(1.1*x)/cos(x)'
  symbol_names = 'eps'
  symbol_values = '${eps}'
[]
[exact_T]
  type = ParsedFunction
  expression = '0.0106975765229418*cos(1.2*x)/cos(x) - 0.000697576522941848*cos(1.1*x)^2/cos(x)^2'
  symbol_names = 'eps'
  symbol_values = '${eps}'
[]
[exact_p]
  type = ParsedFunction
  expression = '3.48788261470924*(3.06706896551724*cos(1.2*x)/cos(x) - 0.2*cos(1.1*x)^2/cos(x)^2)*cos(x)'
  symbol_names = 'eps'
  symbol_values = '${eps}'
[]
[]
[Executioner]
  solve_type = NEWTON
  type = Steady
  petsc_options_iname = '-pc_type'
  petsc_options_value = 'lu'
  nl_max_its = 50
  line_search = none
  nl_rel_tol = 1e-12
  nl_abs_tol = 1e-12
[]
[Outputs]
  exodus = true
  csv = true
[]
[Debug]
  show_var_residual_norms = true
[]
[Postprocessors]
  [h]
    type = AverageElementSize
    outputs = 'console csv'
    execute_on = 'timestep_end'
  []
  [L2rho]
    type = ElementL2Error
    variable = rho
    function = exact_rho
    outputs = 'console csv'
    execute_on = 'timestep_end'
  []
  [L2rho_ud]
    variable = rho_ud
    function = exact_rho_ud
    type = ElementL2Error
    outputs = 'console csv'
    execute_on = 'timestep_end'
  []
  [L2rho_et]
    variable = rho_et
    function = exact_rho_et
    type = ElementL2Error
    outputs = 'console csv'
    execute_on = 'timestep_end'
  []
[]
(modules/thermal_hydraulics/test/tests/components/inlet_stagnation_enthalpy_1phase/phy.h_rhou_3eqn.i)
[GlobalParams]
  gravity_vector = '0 0 0'
  initial_p = 101325
  initial_T = 300
  initial_vel = 0
  scaling_factor_1phase = '1.e2 1. 1.e-3'
  closures = simple_closures
[]
[FluidProperties]
  [eos]
    type = IdealGasFluidProperties
    gamma = 1.41
    molar_mass = 28.9662e-3
  []
[]
[Closures]
  [simple_closures]
    type = Closures1PhaseSimple
  []
[]
[Components]
  [pipe]
    type = FlowChannel1Phase
    fp = eos
    # geometry
    position = '0 0 0'
    orientation = '1 0 0'
    A = 1e-4
    D_h  = 1.1283791671e-02
    f = 0.0
    length = 1
    n_elems = 100
  []
  [inlet]
    type = InletStagnationEnthalpyMomentum1Phase
    input = 'pipe:in'
    H    = 296748.357480000
    rhou = 41.0009888754850
  []
  [outlet]
    type = Outlet1Phase
    input = 'pipe:out'
    p = 101325
  []
[]
[Preconditioning]
  [SMP_PJFNK]
    type = SMP
    full = true
  []
[]
[Executioner]
  type = Transient
  scheme = 'bdf2'
  dt = 1.e-2
  abort_on_solve_fail = true
  solve_type = 'PJFNK'
  nl_rel_tol = 1e-14
  nl_abs_tol = 5e-8
  nl_max_its = 30
  l_tol = 1e-3
  l_max_its = 100
  start_time = 0.0
  end_time = 0.2
[]
(modules/fluid_properties/test/tests/fp_interrogator/2ph.p.i)
[FluidPropertiesInterrogator]
  fp = fp
  p = 1e5
[]
[FluidProperties]
  [./fp_liquid]
    type = IdealGasFluidProperties
    gamma = 1.4
    molar_mass = 0.02900055737704918
    mu = 1.823e-05
    k = 0.02568
  [../]
  [./fp_vapor]
    type = IdealGasFluidProperties
    gamma = 1.1
    molar_mass = 0.027714866
    mu = 1.7e-05
    k = 0.05
  [../]
  [./fp]
    type = TestTwoPhaseFluidProperties
    fp_liquid = fp_liquid
    fp_vapor = fp_vapor
  [../]
[]
(modules/porous_flow/test/tests/newton_cooling/nc08.i)
# Newton cooling from a bar.  1-phase ideal fluid and heat, steady
[Mesh]
  type = GeneratedMesh
  dim = 2
  nx = 100
  ny = 1
  xmin = 0
  xmax = 100
  ymin = 0
  ymax = 1
[]
[GlobalParams]
  PorousFlowDictator = dictator
[]
[UserObjects]
  [dictator]
    type = PorousFlowDictator
    porous_flow_vars = 'pressure temp'
    number_fluid_phases = 1
    number_fluid_components = 1
  []
  [pc]
    type = PorousFlowCapillaryPressureVG
    m = 0.8
    alpha = 1e-5
  []
[]
[Variables]
  [pressure]
  []
  [temp]
  []
[]
[ICs]
  # have to start these reasonably close to their steady-state values
  [pressure]
    type = FunctionIC
    variable = pressure
    function = '200-0.5*x'
  []
  [temperature]
    type = FunctionIC
    variable = temp
    function = 180+0.1*x
  []
[]
[Kernels]
  [flux]
    type = PorousFlowAdvectiveFlux
    fluid_component = 0
    gravity = '0 0 0'
    variable = pressure
  []
  [heat_advection]
    type = PorousFlowHeatAdvection
    gravity = '0 0 0'
    variable = temp
  []
[]
[FluidProperties]
  [idealgas]
    type = IdealGasFluidProperties
    molar_mass = 1.4
    gamma = 1.2
    mu = 1.2
  []
[]
[Materials]
  [temperature]
    type = PorousFlowTemperature
    temperature = temp
  []
  [ppss]
    type = PorousFlow1PhaseP
    porepressure = pressure
    capillary_pressure = pc
  []
  [massfrac]
    type = PorousFlowMassFraction
  []
  [dens0]
    type = PorousFlowSingleComponentFluid
    fp = idealgas
    phase = 0
  []
  [permeability]
    type = PorousFlowPermeabilityConst
    permeability = '1.1 0 0 0 1.1 0 0 0 1.1'
  []
  [relperm]
    type = PorousFlowRelativePermeabilityCorey # irrelevant in this fully-saturated situation
    n = 2
    phase = 0
  []
[]
[BCs]
  [leftp]
    type = DirichletBC
    variable = pressure
    boundary = left
    value = 200
  []
  [leftt]
    type = DirichletBC
    variable = temp
    boundary = left
    value = 180
  []
  [newtonp]
    type = PorousFlowPiecewiseLinearSink
    variable = pressure
    boundary = right
    pt_vals = '-200 0 200'
    multipliers = '-200 0 200'
    use_mobility = true
    use_relperm = true
    fluid_phase = 0
    flux_function = 0.005 # 1/2/L
  []
  [newtont]
    type = PorousFlowPiecewiseLinearSink
    variable = temp
    boundary = right
    pt_vals = '-200 0 200'
    multipliers = '-200 0 200'
    use_mobility = true
    use_relperm = true
    use_enthalpy = true
    fluid_phase = 0
    flux_function = 0.005 # 1/2/L
  []
[]
[VectorPostprocessors]
  [porepressure]
    type = LineValueSampler
    variable = pressure
    start_point = '0 0.5 0'
    end_point = '100 0.5 0'
    sort_by = x
    num_points = 11
    execute_on = timestep_end
  []
  [temperature]
    type = LineValueSampler
    variable = temp
    start_point = '0 0.5 0'
    end_point = '100 0.5 0'
    sort_by = x
    num_points = 11
    execute_on = timestep_end
  []
[]
[Preconditioning]
  [andy]
    type = SMP
    full = true
  []
[]
[Executioner]
  type = Steady
  solve_type = Newton
  nl_rel_tol = 1E-10
  nl_abs_tol = 1E-15
[]
[Outputs]
  file_base = nc08
  execute_on = timestep_end
  [along_line]
    type = CSV
    execute_vector_postprocessors_on = timestep_end
  []
[]
(modules/navier_stokes/test/tests/finite_volume/cns/scalar_advection/mass-frac-advection.i)
rho_initial=1.29
p_initial=1.01e5
T=273.15
gamma=1.4
e_initial=${fparse p_initial / (gamma - 1) / rho_initial}
et_initial=${e_initial}
rho_et_initial=${fparse rho_initial * et_initial}
v_in=1
[GlobalParams]
  fp = fp
  # retain behavior at time of test creation
  two_term_boundary_expansion = false
[]
[Mesh]
  [cartesian]
    type = GeneratedMeshGenerator
    dim = 2
    xmin = 0
    xmax = 1
    nx = 2
    ymin = 0
    ymax = 10
    ny = 20
  []
[]
[FluidProperties]
  [fp]
    type = IdealGasFluidProperties
  []
[]
[Variables]
  [rho]
    type = MooseVariableFVReal
    initial_condition = ${rho_initial}
  []
  [rho_u]
    type = MooseVariableFVReal
    initial_condition = 1e-15
  []
  [rho_v]
    type = MooseVariableFVReal
    initial_condition = 1e-15
  []
  [rho_et]
    type = MooseVariableFVReal
    initial_condition = ${rho_et_initial}
    scaling = 1e-5
  []
  [mass_frac]
    type = MooseVariableFVReal
    initial_condition = 1e-15
  []
[]
[AuxVariables]
  [U_x]
    type = MooseVariableFVReal
  []
  [U_y]
    type = MooseVariableFVReal
  []
  [pressure]
    type = MooseVariableFVReal
  []
  [temperature]
    type = MooseVariableFVReal
  []
  [courant]
    type = MooseVariableFVReal
  []
[]
[AuxKernels]
  [U_x]
    type = ADMaterialRealAux
    variable = U_x
    property = vel_x
    execute_on = 'timestep_end'
  []
  [U_y]
    type = ADMaterialRealAux
    variable = U_y
    property = vel_y
    execute_on = 'timestep_end'
  []
  [pressure]
    type = ADMaterialRealAux
    variable = pressure
    property = pressure
    execute_on = 'timestep_end'
  []
  [temperature]
    type = ADMaterialRealAux
    variable = temperature
    property = T_fluid
    execute_on = 'timestep_end'
  []
  [courant]
    type = Courant
    variable = courant
    u = U_x
    v = U_y
  []
[]
[FVKernels]
  [mass_time]
    type = FVPorosityTimeDerivative
    variable = rho
  []
  [mass_advection]
    type = PCNSFVKT
    variable = rho
    eqn = "mass"
  []
  [momentum_time_x]
    type = FVTimeKernel
    variable = rho_u
  []
  [momentum_advection_and_pressure_x]
    type = PCNSFVKT
    variable = rho_u
    eqn = "momentum"
    momentum_component = 'x'
  []
  [momentum_time_y]
    type = FVTimeKernel
    variable = rho_v
  []
  [momentum_advection_and_pressure_y]
    type = PCNSFVKT
    variable = rho_v
    eqn = "momentum"
    momentum_component = 'y'
  []
  [energy_time]
    type = FVPorosityTimeDerivative
    variable = rho_et
  []
  [energy_advection]
    type = PCNSFVKT
    variable = rho_et
    eqn = "energy"
  []
  [mass_frac_time]
    type = PCNSFVDensityTimeDerivative
    variable = mass_frac
    rho = rho
  []
  [mass_frac_advection]
    type = PCNSFVKT
    variable = mass_frac
    eqn = "scalar"
  []
[]
[Functions]
  [ud_in]
    type = ParsedVectorFunction
    expression_x = '0'
    expression_y = '${v_in}'
  []
[]
[FVBCs]
  [rho_bottom]
    type = PCNSFVStrongBC
    boundary = 'bottom'
    variable = rho
    superficial_velocity = 'ud_in'
    T_fluid = ${T}
    eqn = 'mass'
  []
  [rho_u_bottom]
    type = PCNSFVStrongBC
    boundary = 'bottom'
    variable = rho_u
    superficial_velocity = 'ud_in'
    T_fluid = ${T}
    eqn = 'momentum'
    momentum_component = 'x'
  []
  [rho_v_bottom]
    type = PCNSFVStrongBC
    boundary = 'bottom'
    variable = rho_v
    superficial_velocity = 'ud_in'
    T_fluid = ${T}
    eqn = 'momentum'
    momentum_component = 'y'
  []
  [rho_et_bottom]
    type = PCNSFVStrongBC
    boundary = 'bottom'
    variable = rho_et
    superficial_velocity = 'ud_in'
    T_fluid = ${T}
    eqn = 'energy'
  []
  [mass_frac_bottom]
    type = PCNSFVStrongBC
    boundary = 'bottom'
    variable = mass_frac
    superficial_velocity = 'ud_in'
    T_fluid = ${T}
    scalar = 1
    eqn = 'scalar'
  []
  [rho_top]
    type = PCNSFVStrongBC
    boundary = 'top'
    variable = rho
    pressure = ${p_initial}
    eqn = 'mass'
  []
  [rho_u_top]
    type = PCNSFVStrongBC
    boundary = 'top'
    variable = rho_u
    pressure = ${p_initial}
    eqn = 'momentum'
    momentum_component = 'x'
  []
  [rho_v_top]
    type = PCNSFVStrongBC
    boundary = 'top'
    variable = rho_v
    pressure = ${p_initial}
    eqn = 'momentum'
    momentum_component = 'y'
  []
  [rho_et_top]
    type = PCNSFVStrongBC
    boundary = 'top'
    variable = rho_et
    pressure = ${p_initial}
    eqn = 'energy'
  []
  [mass_frac_top]
    type = PCNSFVStrongBC
    boundary = 'top'
    variable = mass_frac
    pressure = ${p_initial}
    eqn = 'scalar'
  []
  [momentum_x_walls]
    type = PCNSFVImplicitMomentumPressureBC
    variable = rho_u
    boundary = 'left right'
    momentum_component = 'x'
  []
  [momentum_y_walls]
    type = PCNSFVImplicitMomentumPressureBC
    variable = rho_v
    boundary = 'left right'
    momentum_component = 'y'
  []
[]
[Materials]
  [var_mat]
    type = PorousConservedVarMaterial
    rho = rho
    rho_et = rho_et
    superficial_rhou = rho_u
    superficial_rhov = rho_v
    fp = fp
    porosity = porosity
  []
  [porosity]
    type = GenericConstantMaterial
    prop_names = 'porosity'
    prop_values = '1'
  []
[]
[Executioner]
  type = Transient
  [TimeIntegrator]
    type = ActuallyExplicitEuler
  []
  steady_state_detection = true
  steady_state_tolerance = 1e-12
  abort_on_solve_fail = true
  dt = 5e-4
  num_steps = 25
[]
[Outputs]
  [out]
    type = Exodus
    execute_on = 'initial timestep_end'
  []
  [dof]
    type = DOFMap
    execute_on = 'initial'
  []
[]
[Debug]
  show_var_residual_norms = true
[]
(modules/navier_stokes/test/tests/finite_element/cns/step/step.i)
# Navier-Stokes (or Euler) flow of an ideal gas over a step.
#
# Note: this problem is not currently a regression test for the
# Navier-Stokes module since it is in some sense ill-posed.  As
# discussed in [0], the sharp corner of the step (both forward and
# backward-facing) introduces a singularity in the first derivative of
# the velocity and pressure fields, and therefore produces large
# numerical errors in the neighborhood of these points.  Physically,
# this numerical error can be interpreted as causing an artificial
# "boundary layer" to form just above the step, as well as a spurious
# production of entropy even though the flow remains subsonic.
# Nevertheless, the forward-facing step problem in particular remains
# a challenging and well-document test problem for flow solvers, and
# this input file is included to help facilitate its development and
# employment by users of the module.
#
# [0]: Woodward and Colella, "The numerical simulation of
# two-dimenstional fluid flow with strong shocks," Journal of
# Computational Physics 54(1), pp. 115-173, 1984
[Mesh]
  type = FileMesh
  file = step.e
  dim = 2
  # uniform_refine = 3
[]
[FluidProperties]
  [ideal_gas]
    type = IdealGasFluidProperties
    gamma = 1.4
  []
[]
[Modules]
  [CompressibleNavierStokes]
    # steady-state or transient
    equation_type = transient
    # fluid
    fluid_properties = ideal_gas
    # boundary conditions
    stagnation_boundary = left
    stagnation_pressure = 120192.995549849 # Pa, Mach=0.5 at 1 atm
    stagnation_temperature = 315 # K, Mach=0.5 at 1 atm
    stagnation_flow_direction = '1 0'
    no_penetration_boundary = 'top bottom step_top step_left step_right'
    static_pressure_boundary = 'right'
    static_pressure = 101325 # Pa
    # variable types, scalings and initial conditions
    family = LAGRANGE
    order = FIRST
    total_energy_scaling = 9.869232667160121e-6
    initial_pressure = 101325.
    initial_temperature = 300.
    initial_velocity = '173.594354746921 0 0' # Mach 0.5: = 0.5*sqrt(gamma*R*T)
  []
[]
[Materials]
  [fluid]
    type = Air
    block = 1
    rho = rho
    rhou = rhou
    rhov = rhov
    rhoE = rhoE
    vel_x = vel_x
    vel_y = vel_y
    temperature = temperature
    enthalpy = enthalpy
    # This value is not used in the Euler equations, but it *is* used
    # by the stabilization parameter computation, which it decreases
    # the amount of artificial viscosity added, so it's best to use a
    # realistic value.
    dynamic_viscosity = 0.0
    fluid_properties = ideal_gas
  []
[]
[Preconditioning]
  [SMP_PJFNK]
    type = SMP
    full = true
  []
[]
[Executioner]
  type = Transient
  dt = 5.e-5
  dtmin = 1.e-5
  start_time = 0.0
  num_steps = 10000
  nl_rel_tol = 1e-5
  nl_abs_tol = 1e-9
  # nl_abs_step_tol = 1e-15
  nl_max_its = 5
  l_tol = 1e-4 # Relative linear tolerance for each Krylov solve
  l_max_its = 100 # Number of linear iterations for each Krylov solve
  # Specify the order as FIRST, otherwise you will get warnings in DEBUG mode...
  [Quadrature]
    type = TRAP
    order = FIRST
  []
[]
[Outputs]
  file_base = step_out
  time_step_interval = 1
  exodus = true
[]
(modules/thermal_hydraulics/test/tests/components/simple_turbine_1phase/phy.conservation.i)
[GlobalParams]
  initial_p = 1e6
  initial_T = 517
  initial_vel = 4.3
  initial_vel_x = 4.3
  initial_vel_y = 0
  initial_vel_z = 0
  fp = fp
  closures = simple_closures
  f = 0
  rdg_slope_reconstruction = minmod
  gravity_vector = '0 0 0'
  scaling_factor_1phase = '1 1 1e-5'
[]
[FluidProperties]
  [fp]
    type = IdealGasFluidProperties
    gamma = 1.4
    molar_mass = 0.01
  []
[]
[Closures]
  [simple_closures]
    type = Closures1PhaseSimple
  []
[]
[Components]
  [inlet]
    type = InletMassFlowRateTemperature1Phase
    input = 'pipe1:in'
    m_dot = 10
    T = 517
  []
  [pipe1]
    type = FlowChannel1Phase
    position = '0 0 0'
    orientation = '1 0 0'
    length = 1
    n_elems = 10
    A = 1
  []
  [turbine]
    type = SimpleTurbine1Phase
    connections = 'pipe1:out pipe2:in'
    position = '1 0 0'
    volume = 1
    A_ref = 1.0
    K = 0
    on = true
    power = 1000
  []
  [pipe2]
    type = FlowChannel1Phase
    position = '1. 0 0'
    orientation = '1 0 0'
    length = 1
    n_elems = 10
    A = 1
  []
  [outlet]
    type = Outlet1Phase
    input = 'pipe2:out'
    p = 1e6
  []
[]
[Postprocessors]
  [mass_in]
    type = ADFlowBoundaryFlux1Phase
    equation = mass
    boundary = inlet
  []
  [mass_out]
    type = ADFlowBoundaryFlux1Phase
    equation = mass
    boundary = outlet
  []
  [mass_diff]
    type = LinearCombinationPostprocessor
    pp_coefs = '1 -1'
    pp_names = 'mass_in mass_out'
  []
  [p_in]
    type = SideAverageValue
    boundary = pipe1:in
    variable = p
  []
  [vel_in]
    type = SideAverageValue
    boundary = pipe1:in
    variable = vel_x
  []
  [momentum_in]
    type = ADFlowBoundaryFlux1Phase
    equation = momentum
    boundary = inlet
  []
  [momentum_out]
    type = ADFlowBoundaryFlux1Phase
    equation = momentum
    boundary = outlet
  []
  [dP]
    type = ParsedPostprocessor
    pp_names = 'p_in W_dot'
    expression = 'p_in * (1 - (1-W_dot/(10*2910.06*517))^(1.4/0.4))'
  []
  [momentum_diff]
    type = LinearCombinationPostprocessor
    pp_coefs = '1 -1 -1'
    pp_names = 'momentum_in momentum_out dP' # momentum source = -dP * A and A=1
  []
  [energy_in]
    type = ADFlowBoundaryFlux1Phase
    equation = energy
    boundary = inlet
  []
  [energy_out]
    type = ADFlowBoundaryFlux1Phase
    equation = energy
    boundary = outlet
  []
  [W_dot]
    type = ElementAverageValue
    variable = W_dot
    block = 'turbine'
  []
  [energy_diff]
    type = LinearCombinationPostprocessor
    pp_coefs = '1 -1 -1'
    pp_names = 'energy_in energy_out W_dot'
  []
[]
[Preconditioning]
  [pc]
    type = SMP
    full = true
  []
[]
[Executioner]
  type = Transient
  scheme = bdf2
  start_time = 0
  end_time = 10
  dt = 0.5
  abort_on_solve_fail = true
  solve_type = 'newton'
  petsc_options_iname = '-pc_type'
  petsc_options_value = ' lu'
  nl_rel_tol = 0
  nl_abs_tol = 2e-6
  nl_max_its = 10
  l_tol = 1e-3
  # automatic_scaling = true
  # compute_scaling_once = false
  # off_diagonals_in_auto_scaling = true
[]
[Outputs]
  [csv]
    type = CSV
    show = 'mass_diff energy_diff momentum_diff'
    execute_on = 'final'
  []
[]
(modules/navier_stokes/test/tests/finite_volume/cns/mms/1d-with-bcs/varying-eps-basic-kt-mixed.i)
[GlobalParams]
  fp = fp
  limiter = 'central_difference'
  two_term_boundary_expansion = true
[]
[Mesh]
  [cartesian]
    type = GeneratedMeshGenerator
    dim = 1
    xmin = .1
    xmax = .6
    nx = 2
  []
[]
[FluidProperties]
  [fp]
    type = IdealGasFluidProperties
  []
[]
[Problem]
  fv_bcs_integrity_check = false
[]
[Variables]
  [pressure]
    type = MooseVariableFVReal
  []
  [sup_mom_x]
    type = MooseVariableFVReal
  []
  [T_fluid]
    type = MooseVariableFVReal
  []
[]
[ICs]
  [pressure]
    type = FunctionIC
    variable = pressure
    function = 'exact_p'
  []
  [sup_mom_x]
    type = FunctionIC
    variable = sup_mom_x
    function = 'exact_rho_ud'
  []
  [T_fluid]
    type = FunctionIC
    variable = T_fluid
    function = 'exact_T'
  []
[]
[FVKernels]
  [mass_advection]
    type = PCNSFVKT
    variable = pressure
    eqn = "mass"
  []
  [mass_fn]
    type = FVBodyForce
    variable = pressure
    function = 'forcing_rho'
  []
  [momentum_x_advection]
    type = PCNSFVKT
    variable = sup_mom_x
    momentum_component = x
    eqn = "momentum"
  []
  [eps_grad]
    type = PNSFVPGradEpsilon
    variable = sup_mom_x
    momentum_component = 'x'
    epsilon_function = 'eps'
  []
  [momentum_fn]
    type = FVBodyForce
    variable = sup_mom_x
    function = 'forcing_rho_ud'
  []
  [fluid_energy_advection]
    type = PCNSFVKT
    variable = T_fluid
    eqn = "energy"
  []
  [energy_fn]
    type = FVBodyForce
    variable = T_fluid
    function = 'forcing_rho_et'
  []
[]
[FVBCs]
  [mass_left]
    variable = pressure
    type = PCNSFVStrongBC
    boundary = left
    T_fluid = 'exact_T'
    superficial_velocity = 'exact_superficial_velocity'
    eqn = 'mass'
  []
  [momentum_left]
    variable = sup_mom_x
    type = PCNSFVStrongBC
    boundary = left
    T_fluid = 'exact_T'
    superficial_velocity = 'exact_superficial_velocity'
    eqn = 'momentum'
    momentum_component = 'x'
  []
  [energy_left]
    variable = T_fluid
    type = PCNSFVStrongBC
    boundary = left
    T_fluid = 'exact_T'
    superficial_velocity = 'exact_superficial_velocity'
    eqn = 'energy'
  []
  [mass_right]
    variable = pressure
    type = PCNSFVStrongBC
    boundary = right
    eqn = 'mass'
    pressure = 'exact_p'
  []
  [momentum_right]
    variable = sup_mom_x
    type = PCNSFVStrongBC
    boundary = right
    eqn = 'momentum'
    momentum_component = 'x'
    pressure = 'exact_p'
  []
  [energy_right]
    variable = T_fluid
    type = PCNSFVStrongBC
    boundary = right
    eqn = 'energy'
    pressure = 'exact_p'
  []
  # help gradient reconstruction
  [pressure_right]
    type = FVFunctionDirichletBC
    variable = pressure
    function = exact_p
    boundary = 'right'
  []
  [sup_mom_x_left]
    type = FVFunctionDirichletBC
    variable = sup_mom_x
    function = exact_rho_ud
    boundary = 'left'
  []
  [T_fluid_left]
    type = FVFunctionDirichletBC
    variable = T_fluid
    function = exact_T
    boundary = 'left'
  []
[]
[Materials]
  [var_mat]
    type = PorousMixedVarMaterial
    pressure = pressure
    superficial_rhou = sup_mom_x
    T_fluid = T_fluid
    porosity = porosity
  []
  [porosity]
    type = GenericFunctionMaterial
    prop_names = 'porosity'
    prop_values = 'eps'
  []
[]
[Functions]
[exact_rho]
  type = ParsedFunction
  expression = '3.48788261470924*cos(x)'
[]
[forcing_rho]
  type = ParsedFunction
  expression = '-3.83667087618017*sin(1.1*x)*cos(1.3*x) - 4.53424739912202*sin(1.3*x)*cos(1.1*x)'
[]
[exact_rho_ud]
  type = ParsedFunction
  expression = '3.48788261470924*cos(1.1*x)*cos(1.3*x)'
[]
[forcing_rho_ud]
  type = ParsedFunction
  expression = '(-(10.6975765229419*cos(1.5*x)/cos(x) - 0.697576522941849*cos(1.1*x)^2/cos(x)^2)*sin(x) + (10.6975765229419*sin(x)*cos(1.5*x)/cos(x)^2 - 1.3951530458837*sin(x)*cos(1.1*x)^2/cos(x)^3 + 1.53466835047207*sin(1.1*x)*cos(1.1*x)/cos(x)^2 - 16.0463647844128*sin(1.5*x)/cos(x))*cos(x))*cos(1.3*x) + 3.48788261470924*sin(x)*cos(1.1*x)^2*cos(1.3*x)/cos(x)^2 - 7.67334175236034*sin(1.1*x)*cos(1.1*x)*cos(1.3*x)/cos(x) - 4.53424739912202*sin(1.3*x)*cos(1.1*x)^2/cos(x)'
[]
[exact_rho_et]
  type = ParsedFunction
  expression = '26.7439413073546*cos(1.5*x)'
[]
[forcing_rho_et]
  type = ParsedFunction
  expression = '1.0*(3.48788261470924*(3.06706896551724*cos(1.5*x)/cos(x) - 0.2*cos(1.1*x)^2/cos(x)^2)*cos(x) + 26.7439413073546*cos(1.5*x))*sin(x)*cos(1.1*x)*cos(1.3*x)/cos(x)^2 - 1.1*(3.48788261470924*(3.06706896551724*cos(1.5*x)/cos(x) - 0.2*cos(1.1*x)^2/cos(x)^2)*cos(x) + 26.7439413073546*cos(1.5*x))*sin(1.1*x)*cos(1.3*x)/cos(x) - 1.3*(3.48788261470924*(3.06706896551724*cos(1.5*x)/cos(x) - 0.2*cos(1.1*x)^2/cos(x)^2)*cos(x) + 26.7439413073546*cos(1.5*x))*sin(1.3*x)*cos(1.1*x)/cos(x) + 1.0*(-(10.6975765229419*cos(1.5*x)/cos(x) - 0.697576522941849*cos(1.1*x)^2/cos(x)^2)*sin(x) + (10.6975765229419*sin(x)*cos(1.5*x)/cos(x)^2 - 1.3951530458837*sin(x)*cos(1.1*x)^2/cos(x)^3 + 1.53466835047207*sin(1.1*x)*cos(1.1*x)/cos(x)^2 - 16.0463647844128*sin(1.5*x)/cos(x))*cos(x) - 40.1159119610319*sin(1.5*x))*cos(1.1*x)*cos(1.3*x)/cos(x)'
[]
[exact_T]
  type = ParsedFunction
  expression = '0.0106975765229418*cos(1.5*x)/cos(x) - 0.000697576522941848*cos(1.1*x)^2/cos(x)^2'
[]
[exact_eps_p]
  type = ParsedFunction
  expression = '3.48788261470924*(3.06706896551724*cos(1.5*x)/cos(x) - 0.2*cos(1.1*x)^2/cos(x)^2)*cos(x)*cos(1.3*x)'
[]
[exact_p]
  type = ParsedFunction
  expression = '3.48788261470924*(3.06706896551724*cos(1.5*x)/cos(x) - 0.2*cos(1.1*x)^2/cos(x)^2)*cos(x)'
[]
[exact_sup_vel_x]
  type = ParsedFunction
  expression = '1.0*cos(1.1*x)*cos(1.3*x)/cos(x)'
[]
[eps]
  type = ParsedFunction
  expression = 'cos(1.3*x)'
[]
[exact_superficial_velocity]
  type = ParsedVectorFunction
  expression_x = '1.0*cos(1.1*x)*cos(1.3*x)/cos(x)'
[]
[]
[Executioner]
  solve_type = NEWTON
  type = Transient
  num_steps = 1
  dtmin = 1
  petsc_options_iname = '-pc_type'
  petsc_options_value = 'lu'
  nl_max_its = 50
  line_search = bt
  nl_rel_tol = 1e-12
  nl_abs_tol = 1e-12
[]
[Outputs]
  exodus = true
  csv = true
[]
[Debug]
  show_var_residual_norms = true
[]
[Postprocessors]
  [h]
    type = AverageElementSize
    outputs = 'console csv'
    execute_on = 'timestep_end'
  []
  [L2pressure]
    type = ElementL2Error
    variable = pressure
    function = exact_p
    outputs = 'console csv'
    execute_on = 'timestep_end'
  []
  [L2sup_mom_x]
    variable = sup_mom_x
    function = exact_rho_ud
    type = ElementL2Error
    outputs = 'console csv'
    execute_on = 'timestep_end'
  []
  [L2T_fluid]
    variable = T_fluid
    function = exact_T
    type = ElementL2Error
    outputs = 'console csv'
    execute_on = 'timestep_end'
  []
[]
(modules/navier_stokes/test/tests/finite_volume/cns/mms/1d-with-bcs/straight-channel-hllc.i)
[GlobalParams]
  fp = fp
[]
[Mesh]
  [./gen_mesh]
    type = CartesianMeshGenerator
    dim = 1
    dx = '.1 .1 .1 .1 .1 .5 .1 .1 .1 .1 .1'
    # dx = '.1 .1 .1 .1 .1 .1 .1 .1 .1 .1 .1 .1 .1 .1 .1'
  [../]
[]
[FluidProperties]
  [fp]
    type = IdealGasFluidProperties
  []
[]
[Variables]
  [rho]
    type = MooseVariableFVReal
    initial_condition = 1.28969
    scaling = 1e3
  []
  [rho_u]
    type = MooseVariableFVReal
    initial_condition = 1.28969
  []
  [rho_et]
    type = MooseVariableFVReal
    initial_condition = 2.525e5
    scaling = 1e-2
  []
[]
[FVKernels]
  [mass_advection]
    type = CNSFVMassHLLC
    variable = rho
    fp = fp
  []
  [momentum_x_advection]
    type = CNSFVMomentumHLLC
    variable = rho_u
    momentum_component = x
    fp = fp
  []
  [drag]
    type = FVReaction
    variable = rho_u
    rate = 1000
  []
  [fluid_energy_advection]
    type = CNSFVFluidEnergyHLLC
    variable = rho_et
    fp = fp
  []
[]
[FVBCs]
  [mass_in]
    variable = rho
    type = CNSFVHLLCSpecifiedMassFluxAndTemperatureMassBC
    boundary = left
    temperature = 273.15
    rhou = 1.28969
  []
  [momentum_in]
    variable = rho_u
    type = CNSFVHLLCSpecifiedMassFluxAndTemperatureMomentumBC
    boundary = left
    temperature = 273.15
    rhou = 1.28969
    momentum_component = 'x'
  []
  [energy_in]
    variable = rho_et
    type = CNSFVHLLCSpecifiedMassFluxAndTemperatureFluidEnergyBC
    boundary = left
    temperature = 273.15
    rhou = 1.28969
  []
  [mass_out]
    variable = rho
    type = CNSFVHLLCSpecifiedPressureMassBC
    boundary = right
    pressure = 1.01e5
  []
  [momentum_out]
    variable = rho_u
    type = CNSFVHLLCSpecifiedPressureMomentumBC
    boundary = right
    pressure = 1.01e5
    momentum_component = 'x'
  []
  [energy_out]
    variable = rho_et
    type = CNSFVHLLCSpecifiedPressureFluidEnergyBC
    boundary = right
    pressure = 1.01e5
  []
[]
[Materials]
  [var_mat]
    type = ConservedVarValuesMaterial
    rho = rho
    rhou = rho_u
    rho_et = rho_et
  []
[]
[Executioner]
  solve_type = NEWTON
  type = Steady
  petsc_options_iname = '-pc_type'
  petsc_options_value = 'lu'
  nl_max_its = 50
  line_search = none
[]
[Outputs]
  exodus = true
  csv = true
[]
[Debug]
  show_var_residual_norms = true
[]
(modules/navier_stokes/test/tests/finite_volume/cns/userobject/HLLC/hllc_uo_2D_tri.i)
rho_left = 1.162633159
E_left = 2.1502913276e+05
v_left = 40
rho_right = 1.116127833
E_right = 1.7919094397e+05
v_right = 50
[Mesh]
  [./cartesian]
    type = GeneratedMeshGenerator
    dim = 2
    xmin = 0
    xmax = 1
    ymin = 0
    ymax = 2
    nx = 1
    ny = 1
    elem_type = 'TRI3'
  [../]
[]
[FluidProperties]
  [./fp]
    type = IdealGasFluidProperties
    allow_imperfect_jacobians = true
  [../]
[]
[Problem]
  kernel_coverage_check = false
[]
[Variables]
  [./rho]
    order = CONSTANT
    family = MONOMIAL
  [../]
  [./rho_v]
    order = CONSTANT
    family = MONOMIAL
  [../]
  [./rho_E]
    order = CONSTANT
    family = MONOMIAL
  [../]
[]
[ICs]
  [./rho_ic]
    type = FunctionIC
    variable = rho
    function = 'if (y / (2 * x) < 0.5, ${rho_left}, ${rho_right})'
  [../]
  [./rho_v_ic]
    type = FunctionIC
    variable = rho_v
    function = 'if (y / (2 * x) < 0.5, ${fparse rho_left * v_left}, ${fparse rho_right * v_right})'
  [../]
  [./rho_E_ic]
    type = FunctionIC
    variable = rho_E
    function = 'if (y / (2 * x) < 0.5, ${fparse E_left * rho_left}, ${fparse E_right * rho_right})'
  [../]
[]
[Materials]
  [./var_mat]
    type = ConservedVarValuesMaterial
    rho = rho
    rhou = 0
    rhov = rho_v
    rho_et = rho_E
    fp = fp
  [../]
[]
[UserObjects]
  [./hllc]
    type = HLLCUserObject
    fp = fp
  [../]
[]
[VectorPostprocessors]
  [./wave_speeds]
    type = WaveSpeedVPP
    hllc_uo = hllc
    elem_id = 0
    side_id = 2
  [../]
[]
[Executioner]
  type = Steady
[]
[Outputs]
  csv = true
[]
(modules/fluid_properties/test/tests/fp_interrogator/vapor_mixture_rho_e.i)
[FluidPropertiesInterrogator]
  fp = fp_vapor_mix
  rho = 1.1870052372064208
  e = 2477165.9033225174
  x_ncg = '0.1'
[]
[FluidProperties]
  [./fp_nitrogen]
    type = IdealGasFluidProperties
    gamma = 1.4
    molar_mass = 0.02867055103448276
  [../]
  [./fp_primary]
    type = IdealGasFluidProperties
    gamma = 1.3
    molar_mass = 0.027714866
    T_c = 126.19
    rho_c = 313.189812
  [../]
  [./fp_vapor_mix]
    type = IdealRealGasMixtureFluidProperties
    fp_primary = fp_primary
    fp_secondary = 'fp_nitrogen'
  [../]
[]
(modules/navier_stokes/test/tests/finite_element/cns/bump/bump.i)
# Euler flow of an ideal gas over a Gaussian "bump".
#
# The inlet is a stagnation pressure and temperature BC which
# corresponds to subsonic (M=0.5) flow with a static pressure of 1 atm
# and static temperature of 300K.  The outlet consists of a
# weakly-imposed static pressure BC of 1 atm.  The top and bottom
# walls of the channel weakly impose the "no normal flow" BC. The
# problem is initialized with freestream flow throughout the domain.
# Although this initial condition is less physically realistic, it
# helps the problem reach steady state more quickly.
#
# There is a sequence of uniformly-refined, geometry-fitted meshes
# from Yidong Xia available for solving this classical subsonic test
# problem (see the Mesh block below).  A coarse grid is used for the
# actual regression test, but changing one line in the Mesh block is
# sufficient to run this problem with different meshes.  An
# entropy-based error estimate is also provided, and can be used to
# demonstrate convergence of the numerical solution (since the true
# solution should produce zero entropy).  The error should converge at
# second-order in this norm.
[Mesh]
  # Bi-Linear elements
  # file = SmoothBump_quad_ref1_Q1.msh # 84 elems, 65 nodes
  # file = SmoothBump_quad_ref2_Q1.msh # 192 elems, 225 nodes
  # file = SmoothBump_quad_ref3_Q1.msh # 768 elems, 833 nodes
  # file = SmoothBump_quad_ref4_Q1.msh # 3072 elems, 3201 nodes
  # file = SmoothBump_quad_ref5_Q1.msh # 12288 elems, 12545 nodes
  # Bi-Quadratic elements
  # file = SmoothBump_quad_ref0_Q2.msh # 32 elems, 65 nodes
  # file = SmoothBump_quad_ref1_Q2.msh # 84 elems, 225 nodes
  file = SmoothBump_quad_ref2_Q2.msh # 260 elems, 833 nodes
  # file = SmoothBump_quad_ref3_Q2.msh # 900 elems, 3201 nodes
  # file = SmoothBump_quad_ref4_Q2.msh # 3332 elems, 12545 nodes
  # file = SmoothBump_quad_ref5_Q2.msh # 12804 elems, 49665 nodes
[]
[FluidProperties]
  [ideal_gas]
    type = IdealGasFluidProperties
    gamma = 1.4
    molar_mass = 0.02897024320557491
  []
[]
[Modules]
  [CompressibleNavierStokes]
    # steady-state or transient
    equation_type = transient
    # fluid
    fluid_properties = ideal_gas
    # boundary conditions
    stagnation_boundary = 1
    stagnation_pressure = 120192.995549849 # Pa, Mach=0.5 at 1 atm
    stagnation_temperature = 315 # K, Mach=0.5 at 1 atm
    stagnation_flow_direction = '1 0'
    no_penetration_boundary = '3 4'
    static_pressure_boundary = 2
    static_pressure = 101325 # Pa
    # variable types, scalings and initial conditions
    family = LAGRANGE
    order = FIRST
    total_energy_density_scaling = 9.869232667160121e-6
    initial_pressure = 101325.
    initial_temperature = 300.
    initial_velocity = '173.594354746921 0 0' # Mach 0.5: = 0.5*sqrt(gamma*R*T)
    pressure_variable_name = "p"
  []
[]
[Materials]
  [fluid]
    type = Air
    block = 0 # 'MeshInterior'
    rho = rho
    rhou = rhou
    rhov = rhov
    rho_et = rho_et
    vel_x = vel_x
    vel_y = vel_y
    temperature = temperature
    ht = ht
    # This value is not used in the Euler equations, but it *is* used
    # by the stabilization parameter computation, which it decreases
    # the amount of artificial viscosity added, so it's best to use a
    # realistic value.
    dynamic_viscosity = 0.0
    fluid_properties = ideal_gas
  []
[]
[Postprocessors]
  [entropy_error]
    type = NSEntropyError
    execute_on = 'initial timestep_end'
    block = 0
    rho_infty = 1.1768292682926829
    p_infty = 101325
    rho = rho
    pressure = p
    fluid_properties = ideal_gas
  []
[]
[Preconditioning]
  [SMP_PJFNK]
    type = SMP
    full = true
  []
[]
[Executioner]
  type = Transient
  dt = 5.e-5
  dtmin = 1.e-5
  start_time = 0.0
  num_steps = 10
  nl_rel_tol = 1e-9
  nl_max_its = 5
  l_tol = 1e-4
  l_max_its = 100
  # We use trapezoidal quadrature.  This improves stability by
  # mimicking the "group variable" discretization approach.
  [Quadrature]
    type = TRAP
    order = FIRST
  []
[]
[Outputs]
  time_step_interval = 1
  exodus = true
[]
[AuxVariables]
  [rhoe][]
  [enthalpy][]
[]
[AuxKernels]
  [rhoe]
    variable = rhoe
    type = ParsedAux
    expression = 'rho_et'
    coupled_variables = 'rho_et'
    execute_on = 'initial timestep_end'
  []
  [enthalpy]
    variable = enthalpy
    type = ParsedAux
    expression = 'ht'
    coupled_variables = 'ht'
    execute_on = 'initial timestep_end'
  []
[]
(modules/thermal_hydraulics/test/tests/components/shaft_connected_compressor_1phase/shaft_motor_compressor.i)
area = 0.2359
dt = 1.e-3
[GlobalParams]
  initial_p = 1e5
  initial_T = 288
  initial_vel = 60
  initial_vel_x = 60
  initial_vel_y = 0
  initial_vel_z = 0
  A = ${area}
  A_ref = ${area}
  f = 100
  scaling_factor_1phase = '0.04 0.04 0.04e-5'
  closures = simple_closures
  fp = fp
[]
[FluidProperties]
  [fp]
    type = IdealGasFluidProperties
  []
[]
[Closures]
  [simple_closures]
    type = Closures1PhaseSimple
  []
[]
[Components]
  [compressor]
    type = ShaftConnectedCompressor1Phase
    inlet = 'pipe:out'
    outlet = 'pipe:in'
    position = '0 0 0'
    scaling_factor_rhoEV = 1e-5
    volume = ${fparse area*0.45}
    inertia_coeff = '1 1 1 1'
    inertia_const = 1.61397
    speed_cr_I = 1e12
    speed_cr_fr = 0
    tau_fr_coeff = '0 0 0 0'
    tau_fr_const = 0
    omega_rated = 200
    mdot_rated = 21.74
    rho0_rated = 1.1812
    c0_rated = 340
    speeds = '0.0 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1.1 2'
    Rp_functions = 'Rp00 Rp04 Rp05 Rp06 Rp07 Rp08 Rp09 Rp10 Rp11 Rp11'
    eff_functions = 'eff00 eff04 eff05 eff06 eff07 eff08 eff09 eff10 eff11 eff11'
  []
  [pipe]
    type = FlowChannel1Phase
    position = '0.1 0 0'
    orientation = '1 0 0'
    length = 10
    n_elems = 20
  []
  [motor]
    type = ShaftConnectedMotor
    inertia = 1e2
    torque = 100
  []
  [shaft]
    type = Shaft
    connected_components = 'motor compressor'
    initial_speed = 100
  []
[]
[Functions]
  [Rp00]
    type = PiecewiseLinear
    x = '0 0.3736 0.4216'
    y = '1 0.9701 0.9619'
  []
  [eff00]
    type = PiecewiseLinear
    x = '0 0.3736 0.4216'
    y = '0.001 0.8941 0.6641'
  []
  [Rp04]
    type = PiecewiseLinear
    x = '0.3736 0.3745 0.3753 0.3762 0.3770 0.3919 0.4067 0.4216 0.4826'
    y = '1.0789 1.0779 1.0771 1.0759 1.0749 1.0570 1.0388 1.0204 0.9450'
  []
  [eff04]
    type = PiecewiseLinear
    x = '0.3736 0.3745 0.3753 0.3762 0.3770 0.3919 0.4067 0.4216 0.4826'
    y = '0.8941 0.8929 0.8925 0.8915 0.8901 0.8601 0.7986 0.6641 0.1115'
  []
  [Rp05]
    type = PiecewiseLinear
    x = '0.3736 0.4026 0.4106 0.4186 0.4266 0.4346 0.4426 0.4506 0.4586 0.4666 0.4746 0.4826 0.5941'
    y = '1.2898 1.2442 1.2316 1.2189 1.2066 1.1930 1.1804 1.1677 1.1542 1.1413 1.1279 1.1150 0.9357'
  []
  [eff05]
    type = PiecewiseLinear
    x = '0.3736 0.4026 0.4106 0.4186 0.4266 0.4346 0.4426 0.4506 0.4586 0.4666 0.4746 0.4826 0.5941'
    y = '0.9281 0.9263 0.9258 0.9244 0.9226 0.9211 0.9195 0.9162 0.9116 0.9062 0.8995 0.8914 0.7793'
  []
  [Rp06]
    type = PiecewiseLinear
    x = '0.4026 0.4613 0.4723 0.4834 0.4945 0.5055 0.5166 0.5277 0.5387 0.5609 0.5719 0.583 0.5941 0.7124'
    y = '1.5533 1.4438 1.4232 1.4011 1.3793 1.3589 1.3354 1.3100 1.2867 1.2376 1.2131 1.1887 1.1636 0.896'
  []
  [eff06]
    type = PiecewiseLinear
    x = '0.4026 0.4613 0.4723 0.4834 0.4945 0.5055 0.5166 0.5277 0.5387 0.5609 0.5719 0.583 0.5941 0.7124'
    y = '0.9148 0.9255 0.9275 0.9277 0.9282 0.9295 0.9290 0.9269 0.9242 0.9146 0.9080 0.900 0.8920 0.8061'
  []
  [Rp07]
    type = PiecewiseLinear
    x = '0.4613 0.5447 0.5587 0.5726 0.5866 0.6006 0.6145 0.6285 0.6425 0.6565 0.6704 0.6844 0.6984 0.7124 0.8358'
    y = '1.8740 1.6857 1.6541 1.6168 1.5811 1.5430 1.5067 1.4684 1.4292 1.3891 1.3479 1.3061 1.2628 1.2208 0.8498'
  []
  [eff07]
    type = PiecewiseLinear
    x = '0.4613 0.5447 0.5587 0.5726 0.5866 0.6006 0.6145 0.6285 0.6425 0.6565 0.6704 0.6844 0.6984 0.7124 0.8358'
    y = '0.9004 0.9232 0.9270 0.9294 0.9298 0.9312 0.9310 0.9290 0.9264 0.9225 0.9191 0.9128 0.9030 0.8904 0.7789'
  []
  [Rp08]
    type = PiecewiseLinear
    x = '0.5447 0.6638 0.6810 0.6982 0.7154 0.7326 0.7498 0.7670 0.7842 0.8014 0.8186 0.8358 0.9702'
    y = '2.3005 1.9270 1.8732 1.8195 1.7600 1.7010 1.6357 1.5697 1.5019 1.4327 1.3638 1.2925 0.7347'
  []
  [eff08]
    type = PiecewiseLinear
    x = '0.5447 0.6638 0.6810 0.6982 0.7154 0.7326 0.7498 0.7670 0.7842 0.8014 0.8186 0.8358 0.9702'
    y = '0.9102 0.9276 0.9301 0.9313 0.9319 0.9318 0.9293 0.9256 0.9231 0.9153 0.9040 0.8933 0.8098'
  []
  [Rp09]
    type = PiecewiseLinear
    x = '0.6638 0.7762 0.7938 0.8115 0.8291 0.8467 0.8644 0.8820 0.8997 0.9173 0.9349 0.9526 0.9702 1.1107 1.25120'
    y = '2.6895 2.2892 2.2263 2.1611 2.0887 2.0061 1.9211 1.8302 1.7409 1.6482 1.5593 1.4612 1.3586 0.5422 -0.2742'
  []
  [eff09]
    type = PiecewiseLinear
    x = '0.6638 0.7762 0.7938 0.8115 0.8291 0.8467 0.8644 0.8820 0.8997 0.9173 0.9349 0.9526 0.9702 1.1107 1.2512'
    y = '0.8961 0.9243 0.9288 0.9323 0.9330 0.9325 0.9319 0.9284 0.9254 0.9215 0.9134 0.9051 0.8864 0.7380 0.5896'
  []
  [Rp10]
    type = PiecewiseLinear
    x = '0.7762 0.9255 0.9284 0.9461 0.9546 0.9816 0.9968 1.0170 1.039 1.0525 1.0812 1.0880 1.1056 1.1107 1.2511'
    y = '3.3162 2.6391 2.6261 2.5425 2.5000 2.3469 2.2521 2.1211 1.974 1.8806 1.6701 1.6169 1.4710 1.4257 0.1817'
  []
  [eff10]
    type = PiecewiseLinear
    x = '0.7762 0.9255 0.9284 0.9461 0.9546 0.9816 0.9968 1.0170 1.0390 1.0525 1.0812 1.0880 1.1056 1.1107 1.2511'
    y = '0.8991 0.9276 0.9281 0.9308 0.9317 0.9329 0.9318 0.9291 0.9252 0.9223 0.9116 0.9072 0.8913 0.8844 0.6937'
  []
  [Rp11]
    type = PiecewiseLinear
    x = '0.9255 1.0749 1.134 1.2511'
    y = '3.9586 2.9889 2.605 1.4928'
  []
  [eff11]
    type = PiecewiseLinear
    x = '0.9255 1.0749 1.1340 1.2511'
    y = '0.9257 0.9308 0.9328 0.8823'
  []
  [S_energy_fcn]
    type = ParsedFunction
    expression = '-(tau_isen+tau_diss)*omega'
    symbol_names = 'tau_isen tau_diss omega'
    symbol_values = 'isentropic_torque dissipation_torque shaft:omega'
  []
  [energy_conservation_fcn]
    type = ParsedFunction
    expression = '(E_change - S_energy * dt) / E_tot'
    symbol_names = 'E_change S_energy dt E_tot'
    symbol_values = 'E_change S_energy ${dt} E_tot'
  []
[]
[Postprocessors]
  [isentropic_torque]
    type = ElementAverageValue
    variable = isentropic_torque
    block = 'compressor'
    execute_on = 'initial timestep_end'
  []
  [dissipation_torque]
    type = ElementAverageValue
    variable = dissipation_torque
    block = 'compressor'
    execute_on = 'initial timestep_end'
  []
  # mass conservation
  [mass_pipes]
    type = ElementIntegralVariablePostprocessor
    variable = rhoA
    block = 'pipe'
    execute_on = 'initial timestep_end'
  []
  [mass_compressor]
    type = ElementAverageValue
    variable = rhoV
    block = 'compressor'
    execute_on = 'initial timestep_end'
  []
  [mass_tot]
    type = SumPostprocessor
    values = 'mass_pipes mass_compressor'
    execute_on = 'initial timestep_end'
  []
  [mass_conservation]
    type = ChangeOverTimePostprocessor
    postprocessor = mass_tot
    change_with_respect_to_initial = true
    compute_relative_change = true
    execute_on = 'initial timestep_end'
  []
  # energy conservation
  [E_pipes]
    type = ElementIntegralVariablePostprocessor
    variable = rhoEA
    block = 'pipe'
    execute_on = 'initial timestep_end'
  []
  [E_compressor]
    type = ElementAverageValue
    variable = rhoEV
    block = 'compressor'
    execute_on = 'initial timestep_end'
  []
  [E_tot]
    type = LinearCombinationPostprocessor
    pp_coefs = '1 1'
    pp_names = 'E_pipes E_compressor'
    execute_on = 'initial timestep_end'
  []
  [S_energy]
    type = FunctionValuePostprocessor
    function = S_energy_fcn
    indirect_dependencies = 'isentropic_torque dissipation_torque'
    execute_on = 'initial timestep_end'
  []
  [E_change]
    type = ChangeOverTimePostprocessor
    postprocessor = E_tot
    execute_on = 'initial timestep_end'
  []
  # This should also execute on initial. This value is
  # lagged by one timestep as a workaround to moose issue #13262.
  [energy_conservation]
    type = FunctionValuePostprocessor
    function = energy_conservation_fcn
    execute_on = 'timestep_end'
    indirect_dependencies = 'E_tot E_change S_energy'
  []
[]
[Preconditioning]
  [SMP_PJFNK]
    type = SMP
    full = true
  []
[]
[Executioner]
  type = Transient
  scheme = 'implicit-euler'
  dt = ${dt}
  num_steps = 6
  solve_type = 'NEWTON'
  line_search = 'basic'
  petsc_options_iname = '-pc_type'
  petsc_options_value = ' lu'
  nl_rel_tol = 1e-8
  nl_abs_tol = 1e-6
  nl_max_its = 15
  l_tol = 1e-4
  l_max_its = 10
  [Quadrature]
    type = GAUSS
    order = SECOND
  []
[]
[Outputs]
  velocity_as_vector = false
[]
(modules/fluid_properties/test/tests/ideal_gas/test.i)
[Mesh]
  type = GeneratedMesh
  dim = 2
  nx = 2
  ny = 2
  elem_type = QUAD4
[]
[Functions]
  [./f_fn]
    type = ParsedFunction
    expression = -4
  [../]
  [./bc_fn]
    type = ParsedFunction
    expression = 'x*x+y*y'
  [../]
[]
[Variables]
  [./u]
  [../]
[]
[AuxVariables]
  [./e]
    initial_condition = 6232.5
  [../]
  [./v]
    initial_condition = 0.02493
  [../]
  [./p]
    family = MONOMIAL
    order = CONSTANT
  [../]
  [./T]
    family = MONOMIAL
    order = CONSTANT
  [../]
  [./cp]
    family = MONOMIAL
    order = CONSTANT
  [../]
  [./cv]
    family = MONOMIAL
    order = CONSTANT
  [../]
  [./c]
    family = MONOMIAL
    order = CONSTANT
  [../]
  [./mu]
    family = MONOMIAL
    order = CONSTANT
  [../]
  [./k]
    family = MONOMIAL
    order = CONSTANT
  [../]
  [./g]
    family = MONOMIAL
    order = CONSTANT
  [../]
[]
[AuxKernels]
  [./p]
    type = MaterialRealAux
     variable = p
     property = pressure
  [../]
  [./T]
    type = MaterialRealAux
     variable = T
     property = temperature
  [../]
  [./cp]
    type = MaterialRealAux
     variable = cp
     property = cp
  [../]
  [./cv]
    type = MaterialRealAux
     variable = cv
     property = cv
  [../]
  [./c]
    type = MaterialRealAux
     variable = c
     property = c
  [../]
  [./mu]
    type = MaterialRealAux
     variable = mu
     property = mu
  [../]
  [./k]
    type = MaterialRealAux
     variable = k
     property = k
  [../]
  [./g]
    type = MaterialRealAux
     variable = g
     property = g
  [../]
[]
[FluidProperties]
  [./ideal_gas]
    type = IdealGasFluidProperties
    gamma = 1.4
    molar_mass = 1.000536678700361
  [../]
[]
[Materials]
  [./fp_mat]
    type = FluidPropertiesMaterialVE
    e = e
    v = v
    fp = ideal_gas
  [../]
[]
[Kernels]
  [./diff]
    type = Diffusion
    variable = u
  [../]
  [./ffn]
    type = BodyForce
    variable = u
    function = f_fn
  [../]
[]
[BCs]
  [./all]
    type = FunctionDirichletBC
    variable = u
    boundary = 'left right top bottom'
    function = bc_fn
  [../]
[]
[Executioner]
  type = Steady
  solve_type = NEWTON
[]
[Outputs]
  exodus = true
[]
(modules/fluid_properties/test/tests/fp_interrogator/2ph.p_T.i)
[FluidPropertiesInterrogator]
  fp = fp
  p = 1e5
  T = 300
[]
[FluidProperties]
  [./fp_liquid]
    type = IdealGasFluidProperties
    gamma = 1.4
    molar_mass = 0.02900055737704918
    mu = 1.823e-05
    k = 0.02568
  [../]
  [./fp_vapor]
    type = IdealGasFluidProperties
    gamma = 1.1
    molar_mass = 0.027714866
    mu = 1.7e-05
    k = 0.05
  [../]
  [./fp]
    type = TestTwoPhaseFluidProperties
    fp_liquid = fp_liquid
    fp_vapor = fp_vapor
  [../]
[]
(modules/fluid_properties/test/tests/ideal_gas/test2.i)
# Test IdealGasFluidPropertiesFluidProperties using pressure and temperature
# Use values for Oxygen at 1 MPa and 350 K from NIST chemistry webook
#
# Input values:
# Cv = 669.8e J/kg/K
# Cp = 938.75 J/kg/K
# M = 31.9988e-3 kg/mol
#
# Expected output:
# density = 10.99591793 kg/m^3
# internal energy = 234.43e3 J/kg
# enthalpy = 328.5625e3 J/kg
# speed of sound = 357.0151605 m/s
[Mesh]
  type = GeneratedMesh
  dim = 2
  nx = 1
  ny = 1
[]
[Variables]
  [./dummy]
  [../]
[]
[AuxVariables]
  [./pressure]
    family = MONOMIAL
    order = CONSTANT
    initial_condition = 1e6
  [../]
  [./temperature]
    family = MONOMIAL
    order = CONSTANT
    initial_condition = 350
  [../]
  [./density]
    family = MONOMIAL
    order = CONSTANT
  [../]
  [./viscosity]
    family = MONOMIAL
    order = CONSTANT
  [../]
  [./cp]
    family = MONOMIAL
    order = CONSTANT
  [../]
  [./cv]
    family = MONOMIAL
    order = CONSTANT
  [../]
  [./internal_energy]
    family = MONOMIAL
    order = CONSTANT
  [../]
  [./enthalpy]
    family = MONOMIAL
    order = CONSTANT
  [../]
  [./entropy]
    family = MONOMIAL
    order = CONSTANT
  [../]
  [./thermal_cond]
    family = MONOMIAL
    order = CONSTANT
  [../]
  [./c]
    family = MONOMIAL
    order = CONSTANT
  [../]
[]
[AuxKernels]
  [./density]
    type = MaterialRealAux
     variable = density
     property = density
  [../]
  [./viscosity]
    type = MaterialRealAux
     variable = viscosity
     property = viscosity
  [../]
  [./cp]
    type = MaterialRealAux
     variable = cp
     property = cp
  [../]
  [./cv]
    type = MaterialRealAux
     variable = cv
     property = cv
  [../]
  [./e]
    type = MaterialRealAux
     variable = internal_energy
     property = e
  [../]
  [./enthalpy]
    type = MaterialRealAux
     variable = enthalpy
     property = h
  [../]
  [./entropy]
    type = MaterialRealAux
     variable = entropy
     property = s
  [../]
  [./thermal_cond]
    type = MaterialRealAux
     variable = thermal_cond
     property = k
  [../]
  [./c]
    type = MaterialRealAux
     variable = c
     property = c
  [../]
[]
[FluidProperties]
  [./idealgas]
    type = IdealGasFluidProperties
    gamma = 1.401537772469394
    molar_mass = 0.0319988
  [../]
[]
[Materials]
  [./fp_mat]
    type = FluidPropertiesMaterialPT
    pressure = pressure
    temperature = temperature
    fp = idealgas
  [../]
[]
[Kernels]
  [./diff]
    type = Diffusion
    variable = dummy
  [../]
[]
[Executioner]
  type = Steady
  solve_type = NEWTON
[]
[Outputs]
  exodus = true
[]
(modules/navier_stokes/test/tests/finite_volume/materials/ergun/ergun.i)
# This file simulates flow of fluid in a porous elbow for the purpose of verifying
# correct implementation of the various different solution variable sets. This input
# tests correct implementation of the primitive superficial variable set. Flow enters on the top
# and exits on the right. Because the purpose is only to test the equivalence of
# different equation sets, no solid energy equation is included.
porosity_left = 0.4
porosity_right = 0.6
pebble_diameter = 0.06
mu = 1.81e-5 # This has been increased to avoid refining the mesh
M = 28.97e-3
R = 8.3144598
# inlet mass flowrate, kg/s
mdot = -10.0
# inlet mass flux (superficial)
mflux_in_superficial = ${fparse mdot / (pi * 0.5 * 0.5)}
# inlet mass flux (interstitial)
mflux_in_interstitial = ${fparse mflux_in_superficial / porosity_left}
p_initial = 201325.0
T_initial = 300.0
rho_initial = ${fparse p_initial / T_initial * M / R}
vel_y_initial = ${fparse mflux_in_interstitial / rho_initial}
vel_x_initial = 0.0
superficial_vel_y_initial = ${fparse mflux_in_superficial / rho_initial}
superficial_vel_x_initial = 1e-12
# Computation parameters
velocity_interp_method = 'rc'
advected_interp_method = 'upwind'
# ==============================================================================
# GEOMETRY AND MESH
# ==============================================================================
[Mesh]
  [fmg]
    type = FileMeshGenerator
    file = 'ergun_in.e'
  []
  coord_type = RZ
[]
[UserObjects]
  [rc]
    type = PINSFVRhieChowInterpolator
    u = superficial_vel_x
    v = superficial_vel_y
    pressure = pressure
    porosity = porosity
  []
[]
[GlobalParams]
  porosity = porosity
  pebble_diameter = ${pebble_diameter}
  fp = fp
  # rho for the kernels. Must match fluid property!
  rho = ${rho_initial}
  fv = true
  velocity_interp_method = ${velocity_interp_method}
  advected_interp_method = ${advected_interp_method}
  # behavior at time of test creation
  two_term_boundary_expansion = false
  rhie_chow_user_object = 'rc'
[]
# ==============================================================================
# VARIABLES AND KERNELS
# ==============================================================================
[Variables]
  [pressure]
    type = INSFVPressureVariable
    initial_condition = ${p_initial}
  []
  [superficial_vel_x]
    type = PINSFVSuperficialVelocityVariable
    initial_condition = ${superficial_vel_x_initial}
  []
  [superficial_vel_y]
    type = PINSFVSuperficialVelocityVariable
    initial_condition = ${superficial_vel_y_initial}
  []
[]
[FVKernels]
  # Mass Equation.
  [mass]
    type = PINSFVMassAdvection
    variable = 'pressure'
  []
  # Momentum x component equation.
  [vel_x_time]
    type = PINSFVMomentumTimeDerivative
    variable = 'superficial_vel_x'
    momentum_component = 'x'
  []
  [vel_x_advection]
    type = PINSFVMomentumAdvection
    variable = 'superficial_vel_x'
    momentum_component = 'x'
  []
  [vel_x_viscosity]
    type = PINSFVMomentumDiffusion
    variable = 'superficial_vel_x'
    momentum_component = 'x'
    mu = 'mu'
  []
  [u_pressure]
    type = PINSFVMomentumPressure
    variable = 'superficial_vel_x'
    pressure = pressure
    momentum_component = 'x'
  []
  [u_friction]
    type = PINSFVMomentumFriction
    variable = 'superficial_vel_x'
    Darcy_name = 'Darcy_coefficient'
    Forchheimer_name = 'Forchheimer_coefficient'
    momentum_component = 'x'
    speed = speed
    mu = 'mu'
  []
  # Momentum y component equation.
  [vel_y_time]
    type = PINSFVMomentumTimeDerivative
    variable = 'superficial_vel_y'
    momentum_component = 'y'
  []
  [vel_y_advection]
    type = PINSFVMomentumAdvection
    variable = 'superficial_vel_y'
    momentum_component = 'y'
  []
  [vel_y_viscosity]
    type = PINSFVMomentumDiffusion
    variable = 'superficial_vel_y'
    momentum_component = 'y'
    mu = 'mu'
  []
  [v_pressure]
    type = PINSFVMomentumPressure
    variable = 'superficial_vel_y'
    pressure = pressure
    momentum_component = 'y'
  []
  [v_friction]
    type = PINSFVMomentumFriction
    variable = 'superficial_vel_y'
    Darcy_name = 'Darcy_coefficient'
    Forchheimer_name = 'Forchheimer_coefficient'
    momentum_component = 'y'
    mu = 'mu'
    speed = speed
  []
  [gravity]
    type = PINSFVMomentumGravity
    variable = 'superficial_vel_y'
    gravity = '0 -9.81 0'
    momentum_component = 'y'
  []
[]
# ==============================================================================
# AUXVARIABLES AND AUXKERNELS
# ==============================================================================
[AuxVariables]
  [T_fluid]
    initial_condition = ${T_initial}
    order = CONSTANT
    family = MONOMIAL
  []
  [vel_x]
    initial_condition = ${fparse vel_x_initial}
    order = CONSTANT
    family = MONOMIAL
  []
  [vel_y]
    initial_condition = ${fparse vel_y_initial}
    order = CONSTANT
    family = MONOMIAL
  []
  [porosity_out]
    type = MooseVariableFVReal
  []
[]
[AuxKernels]
  [vel_x]
    type = FunctorAux
    variable = vel_x
    functor = vel_x_mat
  []
  [vel_y]
    type = FunctorAux
    variable = vel_y
    functor = vel_y_mat
  []
  [porosity_out]
    type = FunctorAux
    variable = porosity_out
    functor = porosity
  []
[]
# ==============================================================================
# FLUID PROPERTIES, MATERIALS AND USER OBJECTS
# ==============================================================================
[FluidProperties]
  [fp]
    type = IdealGasFluidProperties
    k = 0.0
    mu = ${mu}
    gamma = 1.4
    molar_mass = ${M}
  []
[]
[FunctorMaterials]
  [enthalpy]
    type = INSFVEnthalpyMaterial
    temperature = 'T_fluid'
  []
  [speed]
    type = PINSFVSpeedFunctorMaterial
    superficial_vel_x = 'superficial_vel_x'
    superficial_vel_y = 'superficial_vel_y'
    porosity = porosity
    vel_x = vel_x_mat
    vel_y = vel_y_mat
  []
  [kappa]
    type = FunctorKappaFluid
  []
  [const_Fdrags_mat]
    type = FunctorErgunDragCoefficients
    porosity = porosity
  []
  [fluidprops]
    type = GeneralFunctorFluidProps
    mu_rampdown = mu_func
    porosity = porosity
    characteristic_length = ${pebble_diameter}
    T_fluid = 'T_fluid'
    pressure = 'pressure'
    speed = 'speed'
  []
[]
d = 0.05
[Functions]
  [mu_func]
    type = PiecewiseLinear
    x = '1 3 5 10 15 20'
    y = '1e5 1e4 1e3 1e2 1e1 1'
  []
  [real_porosity_function]
    type = ParsedFunction
    expression = 'if (x < 0.6 - ${d}, ${porosity_left}, if (x > 0.6 + ${d}, ${porosity_right},
        (x-(0.6-${d}))/(2*${d})*(${porosity_right}-${porosity_left}) + ${porosity_left}))'
  []
  [porosity]
    type = ParsedFunction
    expression = 'if (x < 0.6 - ${d}, ${porosity_left}, if (x > 0.6 + ${d}, ${porosity_right},
        (x-(0.6-${d}))/(2*${d})*(${porosity_right}-${porosity_left}) + ${porosity_left}))'
  []
[]
# ==============================================================================
# BOUNDARY CONDITIONS
# ==============================================================================
[FVBCs]
  [outlet_p]
    type = INSFVOutletPressureBC
    variable = 'pressure'
    function = ${p_initial}
    boundary = 'right'
  []
  ## No or Free slip BC
  [free-slip-wall-x]
    type = INSFVNaturalFreeSlipBC
    boundary = 'bottom wall_1 wall_2 left'
    variable = superficial_vel_x
    momentum_component = 'x'
  []
  [free-slip-wall-y]
    type = INSFVNaturalFreeSlipBC
    boundary = 'bottom wall_1 wall_2 left'
    variable = superficial_vel_y
    momentum_component = 'y'
  []
  ## Symmetry
  [symmetry-x]
    type = PINSFVSymmetryVelocityBC
    boundary = 'left'
    variable = superficial_vel_x
    u = superficial_vel_x
    v = superficial_vel_y
    mu = 'mu'
    momentum_component = 'x'
  []
  [symmetry-y]
    type = PINSFVSymmetryVelocityBC
    boundary = 'left'
    variable = superficial_vel_y
    u = superficial_vel_x
    v = superficial_vel_y
    mu = 'mu'
    momentum_component = 'y'
  []
  [symmetry-p]
    type = INSFVSymmetryPressureBC
    boundary = 'left'
    variable = 'pressure'
  []
  ## inlet
  [inlet_vel_x]
    type = INSFVInletVelocityBC
    variable = 'superficial_vel_x'
    functor = ${superficial_vel_x_initial}
    boundary = 'top'
  []
  [inlet_vel_y]
    type = INSFVInletVelocityBC
    variable = 'superficial_vel_y'
    functor = ${superficial_vel_y_initial}
    boundary = 'top'
  []
[]
# ==============================================================================
# EXECUTION PARAMETERS
# ==============================================================================
[Executioner]
  type = Transient
  solve_type = 'NEWTON'
  petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type -ksp_gmres_restart'
  petsc_options_value = 'asm      lu           NONZERO                   200'
  line_search = 'none'
  # Problem time parameters
  dtmin = 0.01
  dtmax = 2000
  end_time = 3000
  # must be the same as the fluid
  # Iterations parameters
  l_max_its = 50
  l_tol     = 1e-8
  nl_max_its = 25
  # nl_rel_tol = 5e-7
  nl_abs_tol = 2e-7
  # Automatic scaling
  automatic_scaling = true
  verbose = true
  [TimeStepper]
    type = IterationAdaptiveDT
    dt                 = 0.025
    cutback_factor     = 0.5
    growth_factor      = 2.0
  []
  # Steady state detection.
  steady_state_detection = true
  steady_state_tolerance = 1e-7
  steady_state_start_time = 400
[]
# ==============================================================================
# POSTPROCESSORS DEBUG AND OUTPUTS
# ==============================================================================
[Postprocessors]
  [mass_flow_in]
    type = VolumetricFlowRate
    boundary = 'top'
    vel_x = 'superficial_vel_x'
    vel_y = 'superficial_vel_y'
    advected_quantity = ${rho_initial}
    execute_on = 'INITIAL TIMESTEP_END'
  []
  [mass_flow_out]
    type = VolumetricFlowRate
    boundary = 'right'
    vel_x = 'superficial_vel_x'
    vel_y = 'superficial_vel_y'
    advected_quantity = ${rho_initial}
    execute_on = 'INITIAL TIMESTEP_END'
  []
  [p_in]
    type = SideAverageValue
    variable = pressure
    boundary = 'top'
  []
  [dP]
    type = LinearCombinationPostprocessor
    pp_names = 'p_in'
    pp_coefs = '1.0'
    b = ${fparse -p_initial}
  []
[]
[Outputs]
  exodus = true
  print_linear_residuals = false
[]
(modules/porous_flow/test/tests/jacobian/esbc01.i)
# Tests the Jacobian of PorousFlowEnthalpySink when pore pressure is specified
[Mesh]
  type = GeneratedMesh
  dim = 2
[]
[GlobalParams]
  PorousFlowDictator = dictator
  at_nodes = true
[]
[UserObjects]
  [dictator]
    type = PorousFlowDictator
    porous_flow_vars = 'pp temp'
    number_fluid_phases = 1
    number_fluid_components = 1
  []
  [pc]
    type = PorousFlowCapillaryPressureConst
    pc = 0.1
  []
[]
[Variables]
  [pp]
    initial_condition = 1
  []
  [temp]
    initial_condition = 2
  []
[]
[Kernels]
  [mass0]
    type = TimeDerivative
    variable = pp
  []
  [heat_conduction]
    type = TimeDerivative
    variable = temp
  []
[]
[FluidProperties]
  [simple_fluid]
    type = IdealGasFluidProperties
  []
[]
[Materials]
  [ppss]
    type = PorousFlow1PhaseFullySaturated
    porepressure = pp
  []
  [simple_fluid]
    type = PorousFlowSingleComponentFluid
    fp = simple_fluid
    phase = 0
  []
  [temperature]
    type = PorousFlowTemperature
    temperature = temp
  []
[]
[BCs]
  [left]
    type = PorousFlowEnthalpySink
    variable = temp
    boundary = left
    fluid_phase = 0
    T_in = 300
    fp = simple_fluid
    flux_function = -23
  []
[]
[Preconditioning]
  [andy]
    type = SMP
    full = true
  []
[]
[Executioner]
  type = Transient
  solve_type = Newton
  dt = 0.1
  num_steps = 1
  nl_rel_tol = 1E-12
  nl_abs_tol = 1E-12
  petsc_options_iname = '-snes_test_err'
  petsc_options_value = '1e-2'
[]
(modules/navier_stokes/test/tests/finite_volume/cns/implicit_bcs/hllc_sod_shocktube.i)
rho_left = 1
E_left = 2.501505578
u_left = 1e-15
rho_right = 0.125
E_right = 1.999770935
u_right = 1e-15
middle = 0.5
[GlobalParams]
  fp = fp
[]
[Mesh]
  [cartesian]
    type = GeneratedMeshGenerator
    dim = 2
    xmin = 0
    xmax = ${fparse 2 * middle}
    nx = 5
    ymin = 0
    ymax = 1
    ny = 2
  []
[]
[FluidProperties]
  [fp]
    type = IdealGasFluidProperties
    allow_imperfect_jacobians = true
  []
[]
[Variables]
  [rho]
    order = CONSTANT
    family = MONOMIAL
    fv = true
  []
  [rho_u]
    order = CONSTANT
    family = MONOMIAL
    fv = true
  []
  [rho_v]
    order = CONSTANT
    family = MONOMIAL
    fv = true
    initial_condition = 1e-10
  []
  [rho_E]
    order = CONSTANT
    family = MONOMIAL
    fv = true
  []
[]
[FVKernels]
  [mass_time]
    type = FVTimeKernel
    variable = rho
  []
  [mass_advection]
    type = CNSFVMassHLLC
    variable = rho
  []
  [momentum_x_time]
    type = FVTimeKernel
    variable = rho_u
  []
  [momentum_x_advection]
    type = CNSFVMomentumHLLC
    variable = rho_u
    momentum_component = x
  []
  [momentum_y_time]
    type = FVTimeKernel
    variable = rho_v
  []
  [momentum_y_advection]
    type = CNSFVMomentumHLLC
    variable = rho_v
    momentum_component = y
  []
  [fluid_energy_time]
    type = FVTimeKernel
    variable = rho_E
  []
  [fluid_energy_advection]
    type = CNSFVFluidEnergyHLLC
    variable = rho_E
  []
[]
[FVBCs]
  [mass_implicit]
    type = CNSFVHLLCMassImplicitBC
    variable = rho
    fp = fp
    boundary = 'left right'
  []
  [mom_x_implicit]
    type = CNSFVHLLCMomentumImplicitBC
    variable = rho_u
    momentum_component = x
    fp = fp
    boundary = 'left right'
  []
  [wall]
    type = CNSFVMomImplicitPressureBC
    variable = rho_v
    momentum_component = y
    boundary = 'top bottom'
  []
  [fluid_energy_implicit]
    type = CNSFVHLLCFluidEnergyImplicitBC
    variable = rho_E
    fp = fp
    boundary = 'left right'
  []
[]
[ICs]
  [rho_ic]
    type = FunctionIC
    variable = rho
    function = 'if (x < ${middle}, ${rho_left}, ${rho_right})'
  []
  [rho_u_ic]
    type = FunctionIC
    variable = rho_u
    function = 'if (x < ${middle}, ${fparse rho_left * u_left}, ${fparse rho_right * u_right})'
  []
  [rho_E_ic]
    type = FunctionIC
    variable = rho_E
    function = 'if (x < ${middle}, ${fparse E_left * rho_left}, ${fparse E_right * rho_right})'
  []
[]
[Materials]
  [var_mat]
    type = ConservedVarValuesMaterial
    rho = rho
    rhou = rho_u
    rhov = rho_v
    rho_et = rho_E
    fp = fp
  []
[]
[Executioner]
  type = Transient
  [TimeIntegrator]
    type = ExplicitSSPRungeKutta
    order = 2
  []
  l_tol = 1e-8
  # run to t = 0.15
  start_time = 0.0
  dt = 1e-1
  end_time = 10
  abort_on_solve_fail = true
[]
[Outputs]
  exodus = true
[]
(modules/thermal_hydraulics/test/tests/components/flow_channel_1phase/steady.i)
# Tests that a flow channel can run with Steady executioner.
#
# Note that this solve may fail to converge based on initial guess. For example,
# having a guess with velocity set to zero will fail to converge.
[FluidProperties]
  [fp]
    type = IdealGasFluidProperties
    gamma = 1.4
  []
[]
[Closures]
  [simple_closures]
    type = Closures1PhaseSimple
  []
[]
[Components]
  [inlet]
    type = InletMassFlowRateTemperature1Phase
    input = 'pipe:in'
    m_dot = 2
    T = 500
  []
  [pipe]
    type = FlowChannel1Phase
    position = '0 0 0'
    orientation = '1 0 0'
    gravity_vector = '0 0 0'
    length = 1.0
    n_elems = 50
    A = 1.0
    initial_T = 300
    initial_p = 1e5
    initial_vel = 1
    f = 10.0
    closures = simple_closures
    fp = fp
    scaling_factor_1phase = '1 1 1e-5'
  []
  [outlet]
    type = Outlet1Phase
    input = 'pipe:out'
    p = 2e5
  []
[]
[Preconditioning]
  [pc]
    type = SMP
    full = true
  []
[]
[Executioner]
  type = Steady
  solve_type = NEWTON
  nl_rel_tol = 1e-7
  nl_abs_tol = 1e-7
  nl_max_its = 15
  l_tol = 1e-3
  l_max_its = 10
  petsc_options_iname = '-pc_type'
  petsc_options_value = 'lu'
  [Quadrature]
    type = GAUSS
    order = SECOND
  []
[]
[Outputs]
  exodus = true
[]
(modules/thermal_hydraulics/tutorials/single_phase_flow/01_flow_channel.i)
T_in = 300. # K
m_dot_in = 1e-2 # kg/s
press = 10e5 # Pa
[GlobalParams]
  initial_p = ${press}
  initial_vel = 0.0001
  initial_T = ${T_in}
  gravity_vector = '0 0 0'
  rdg_slope_reconstruction = minmod
  scaling_factor_1phase = '1 1e-2 1e-4'
  closures = thm_closures
  fp = he
[]
[FluidProperties]
  [he]
    type = IdealGasFluidProperties
    molar_mass = 4e-3
    gamma = 1.67
    k = 0.2556
    mu = 3.22639e-5
  []
[]
[Closures]
  [thm_closures]
    type = Closures1PhaseTHM
  []
[]
[Components]
  [inlet]
    type = InletMassFlowRateTemperature1Phase
    input = 'core_chan:in'
    m_dot = ${m_dot_in}
    T = ${T_in}
  []
  [core_chan]
    type = FlowChannel1Phase
    position = '0 0 0'
    orientation = '0 0 1'
    length = 1
    n_elems = 25
    A = 7.2548e-3
    D_h = 7.0636e-2
  []
  [outlet]
    type = Outlet1Phase
    input = 'core_chan:out'
    p = ${press}
  []
[]
[Postprocessors]
  [core_p_in]
    type = SideAverageValue
    boundary = core_chan:in
    variable = p
  []
  [core_p_out]
    type = SideAverageValue
    boundary = core_chan:out
    variable = p
  []
  [core_delta_p]
    type = ParsedPostprocessor
    pp_names = 'core_p_in core_p_out'
    expression = 'core_p_in - core_p_out'
  []
[]
[Preconditioning]
  [pc]
    type = SMP
    full = true
  []
[]
[Executioner]
  type = Transient
  solve_type = NEWTON
  line_search = basic
  start_time = 0
  end_time = 1000
  dt = 10
  petsc_options_iname = '-pc_type'
  petsc_options_value = 'lu'
  nl_rel_tol = 1e-8
  nl_abs_tol = 1e-8
  nl_max_its = 25
[]
[Outputs]
  exodus = true
  [console]
    type = Console
    max_rows = 1
    outlier_variable_norms = false
  []
  print_linear_residuals = false
[]
(modules/thermal_hydraulics/test/tests/components/simple_turbine_1phase/phy.test.i)
[GlobalParams]
  initial_p = 1e6
  initial_T = 517
  initial_vel = 1.0
  initial_vel_x = 1
  initial_vel_y = 0
  initial_vel_z = 0
  fp = fp
  closures = simple_closures
  f = 0
  gravity_vector = '0 0 0'
[]
[FluidProperties]
  [fp]
    type = IdealGasFluidProperties
    gamma = 1.4
    molar_mass = 0.01
  []
[]
[Closures]
  [simple_closures]
    type = Closures1PhaseSimple
  []
[]
[Components]
  [inlet]
    type = InletMassFlowRateTemperature1Phase
    input = 'pipe1:in'
    m_dot = 10
    T = 517
  []
  [pipe1]
    type = FlowChannel1Phase
    position = '0 0 0'
    orientation = '1 0 0'
    length = 1
    n_elems = 10
    A = 1
  []
  [turbine]
    type = SimpleTurbine1Phase
    connections = 'pipe1:out pipe2:in'
    position = '1 0 0'
    volume = 1
    on = true
    power = 1000
  []
  [pipe2]
    type = FlowChannel1Phase
    position = '1. 0 0'
    orientation = '1 0 0'
    length = 1
    n_elems = 10
    A = 1
  []
  [outlet]
    type = Outlet1Phase
    input = 'pipe2:out'
    p = 1e6
  []
[]
[Preconditioning]
  [pc]
    type = SMP
    full = true
  []
[]
[Executioner]
  type = Transient
  scheme = bdf2
  start_time = 0
  dt = 1
  num_steps = 10
  abort_on_solve_fail = true
  solve_type = 'newton'
  line_search = 'basic'
  petsc_options_iname = '-pc_type'
  petsc_options_value = ' lu'
  nl_rel_tol = 1e-6
  nl_abs_tol = 1e-5
  nl_max_its = 5
  l_tol = 1e-4
[]
[Outputs]
  exodus = true
  show = 'p T vel'
  velocity_as_vector = false
  time_step_interval = 5
[]
(modules/thermal_hydraulics/test/tests/problems/natural_circulation/base.i)
# Natural circulation loop
#
# The setup consists of 4 connected 1-m pipes, forming a square:
#
#                  top_pipe
#              *--------------* (1,1)
#              |              |
#              | <-        <- |                | g
#  heated_pipe | <-        <- | cooled_pipe    V
#              | <-        <- |
#              |              |
#        (0,0) *--------------*
#                 bottom_pipe
#
# Heating and cooling occurs in the range z = (0.2 m, 0.8 m) with uniform heat fluxes.
[GlobalParams]
  gravity_vector = '0 0 -9.81'
  length = ${length}
  n_elems = ${n_elems}
  A = ${area}
  initial_T = ${T_ambient}
  initial_p = ${p_initial}
  initial_vel = 0
  fp = fp
  closures = closures
  f = 0
  Hw = ${htc}
  rdg_slope_reconstruction = full
  scaling_factor_1phase = '1 1 1e-5'
[]
[FluidProperties]
  [fp]
    type = IdealGasFluidProperties
    emit_on_nan = none
  []
[]
[Closures]
  [closures]
    type = Closures1PhaseSimple
  []
[]
[Functions]
  [heating_flux_fn]
    type = PiecewiseConstant
    axis = z
    x = '0 0.2 0.8'
    y = '0 ${fparse power / (S_heated)} 0'
  []
  [cooling_flux_fn]
    type = PiecewiseConstant
    axis = z
    x = '0 0.2 0.8'
    y = '0 ${fparse -power / (S_cooled)} 0'
  []
[]
[Components]
  [heated_pipe]
    type = FlowChannel1Phase
    position = '0 0 0'
    orientation = '0 0 1'
  []
  [top_pipe]
    type = FlowChannel1Phase
    position = '0 0 1'
    orientation = '1 0 0'
  []
  [cooled_pipe]
    type = FlowChannel1Phase
    position = '1 0 1'
    orientation = '0 0 -1'
  []
  [bottom_pipe]
    type = FlowChannel1Phase
    position = '1 0 0'
    orientation = '-1 0 0'
  []
  [heating]
    type = HeatTransferFromHeatFlux1Phase
    flow_channel = 'heated_pipe'
    q_wall = heating_flux_fn
  []
  [cooling]
    type = HeatTransferFromHeatFlux1Phase
    flow_channel = 'cooled_pipe'
    q_wall = cooling_flux_fn
  []
[]
[Preconditioning]
  [pc]
    type = SMP
    full = true
  []
[]
[Executioner]
  type = Transient
  scheme = bdf2
  start_time = 0
  end_time = 50
  [TimeStepper]
    type = IterationAdaptiveDT
    dt = 0.01
    optimal_iterations = 6
    iteration_window = 0
    growth_factor = 1.2
    cutback_factor = 0.8
  []
  steady_state_detection = true
  petsc_options_iname = '-pc_type'
  petsc_options_value = ' lu     '
  nl_rel_tol = 1e-10
  nl_abs_tol = 1e-10
  nl_max_its = 15
  l_tol = 1e-4
  l_max_its = 10
[]
[VectorPostprocessors]
  [heated_pipe_vpp]
    type = ElementValueSampler
    block = 'heated_pipe'
    variable = ${output_variables}
    sort_by = z
    execute_on = 'FINAL'
  []
  [top_pipe_vpp]
    type = ElementValueSampler
    block = 'top_pipe'
    variable = ${output_variables}
    sort_by = x
    execute_on = 'FINAL'
  []
  [cooled_pipe_vpp]
    type = ElementValueSampler
    block = 'cooled_pipe'
    variable = ${output_variables}
    sort_by = z
    execute_on = 'FINAL'
  []
  [bottom_pipe_vpp]
    type = ElementValueSampler
    block = 'bottom_pipe'
    variable = ${output_variables}
    sort_by = x
    execute_on = 'FINAL'
  []
[]
[Outputs]
  xml = true
  velocity_as_vector = false
  execute_on = 'FINAL'
[]
(modules/thermal_hydraulics/test/tests/components/shaft_connected_pump_1phase/pump_coastdown.i)
# Pump data used in this test comes from the Semiscale Program, summarized in NUREG/CR-4945
initial_T = 393.15
area = 1e-2
dt = 0.005
[GlobalParams]
  initial_p = 1.4E+07
  initial_T = ${initial_T}
  initial_vel = 0.01
  initial_vel_x = 0.01
  initial_vel_y = 0
  initial_vel_z = 0
  A = ${area}
  A_ref = ${area}
  f = 100
  scaling_factor_1phase = '1 1 1e-3'
  closures = simple_closures
  rdg_slope_reconstruction = minmod
  fp = fp
[]
[FluidProperties]
  [fp]
    type = IdealGasFluidProperties
  []
[]
[Closures]
  [simple_closures]
    type = Closures1PhaseSimple
  []
[]
[Components]
  [pump]
    type = ShaftConnectedPump1Phase
    inlet = 'pipe:out'
    outlet = 'pipe:in'
    position = '0 0 0'
    scaling_factor_rhoEV = 1e-5
    volume = 0.3
    inertia_coeff = '1 1 1 1'
    inertia_const = 0.5
    omega_rated = 314
    speed_cr_I = 1e12
    speed_cr_fr = 0.001
    torque_rated = 47.1825
    volumetric_rated = 1
    head_rated = 58.52
    tau_fr_coeff = '4 0 80 0'
    tau_fr_const = 8
    head = head_fcn
    torque_hydraulic = torque_fcn
    density_rated = 124.2046
  []
  [pipe]
    type = FlowChannel1Phase
    position = '0.6096 0 0'
    orientation = '1 0 0'
    length = 10
    n_elems = 20
  []
  [shaft]
    type = Shaft
    connected_components = 'pump'
    initial_speed = 1
  []
[]
[Functions]
  [head_fcn]
    type = PiecewiseLinear
    data_file = semiscale_head_data.csv
    format = columns
  []
  [torque_fcn]
    type = PiecewiseLinear
    data_file = semiscale_torque_data.csv
    format = columns
  []
[]
[Postprocessors]
  [vel_avg]
    type = ElementAverageValue
    variable = vel
    block = 'pipe'
    execute_on = 'INITIAL TIMESTEP_END'
  []
  [hydraulic_torque]
    type = ElementAverageValue
    variable = hydraulic_torque
    block = 'pump'
    execute_on = 'initial timestep_end'
  []
[]
[Preconditioning]
  [SMP]
    type = SMP
    full = true
  []
[]
[Executioner]
  type = Transient
  scheme = 'bdf2'
  dt = ${dt}
  num_steps = 40
  solve_type = 'NEWTON'
  line_search = 'basic'
  nl_rel_tol = 1e-8
  nl_abs_tol = 1e-8
  nl_max_its = 15
  l_tol = 1e-4
  l_max_its = 10
  [Quadrature]
    type = GAUSS
    order = SECOND
  []
[]
[Outputs]
  velocity_as_vector = false
  file_base = 'pump_coastdown'
  [csv]
    type = CSV
    show = 'shaft:omega vel_avg'
  []
[]
(modules/navier_stokes/test/tests/finite_volume/cns/symmetry_test/2D_symmetry.i)
rho_inside = 1
E_inside = 2.501505578
rho_outside = 0.125
E_outside = 1.999770935
radius = 0.1
angle = 45
[GlobalParams]
  fp = fp
[]
[Debug]
   show_material_props = true
[]
[Mesh]
  [file]
    type = GeneratedMeshGenerator
    dim = 2
    xmin = -0.5
    xmax = 0.5
    nx = 10
    ymin = -0.5
    ymax = 0.5
    ny = 10
  [../]
  [rotate]
    type = TransformGenerator
    vector_value = '${angle} 0 0'
    transform = ROTATE
    input = file
  []
[]
[FluidProperties]
  [fp]
    type = IdealGasFluidProperties
    allow_imperfect_jacobians = true
  []
[]
[Variables]
  [rho]
    family = MONOMIAL
    order = CONSTANT
    fv = true
  [../]
  [rho_u]
    family = MONOMIAL
    order = CONSTANT
    fv = true
    initial_condition = 1e-15
    outputs = none
  []
  [rho_v]
    family = MONOMIAL
    order = CONSTANT
    fv = true
    initial_condition = 1e-15
    outputs = none
  []
  [rho_E]
    family = MONOMIAL
    order = CONSTANT
    fv = true
  []
[]
[ICs]
  [rho_ic]
    type = FunctionIC
    variable = rho
    function = 'if (abs(x) < ${radius} & abs(y) < ${radius}, ${rho_inside}, ${rho_outside})'
  []
  [rho_E_ic]
    type = FunctionIC
    variable = rho_E
    function = 'if (abs(x) < ${radius} & abs(y) < ${radius}, ${fparse E_inside * rho_inside}, ${fparse E_outside * rho_outside})'
  []
[]
[FVKernels]
  # Mass conservation
  [mass_time]
    type = FVTimeKernel
    variable = rho
  []
  [mass_advection]
    type = CNSFVMassHLLC
    variable = rho
    fp = fp
  []
  # Momentum x conservation
  [momentum_x_time]
    type = FVTimeKernel
    variable = rho_u
  []
  [momentum_x_advection]
    type = CNSFVMomentumHLLC
    variable = rho_u
    momentum_component = x
    fp = fp
  []
  # Momentum y conservation
  [momentum_y_time]
    type = FVTimeKernel
    variable = rho_v
  []
  [./momentum_y_advection]
    type = CNSFVMomentumHLLC
    variable = rho_v
    momentum_component = y
  []
  # Fluid energy conservation
  [./fluid_energy_time]
    type = FVTimeKernel
    variable = rho_E
  []
  [./fluid_energy_advection]
    type = CNSFVFluidEnergyHLLC
    variable = rho_E
    fp = fp
  []
[]
[FVBCs]
  ## outflow implicit conditions
  [mass_outflow]
    type = CNSFVHLLCMassImplicitBC
    variable = rho
    fp = fp
    boundary = 'left right top bottom'
  []
  [./momentum_x_outflow]
    type = CNSFVHLLCMomentumImplicitBC
    variable = rho_u
    momentum_component = x
    fp = fp
    boundary = 'left right top bottom'
  []
  [momentum_y_outflow]
    type = CNSFVHLLCMomentumImplicitBC
    variable = rho_v
    momentum_component = y
    fp = fp
    boundary = 'left right top bottom'
  []
  [fluid_energy_outflow]
    type = CNSFVHLLCFluidEnergyImplicitBC
    variable = rho_E
    fp = fp
    boundary = 'left right top bottom'
  []
[]
[AuxVariables]
  [Ma]
    family = MONOMIAL
    order = CONSTANT
  []
  [p]
    family = MONOMIAL
    order = CONSTANT
  []
[]
[AuxKernels]
  [Ma_aux]
    type = NSMachAux
    variable = Ma
    fluid_properties = fp
    use_material_properties = true
  []
  [p_aux]
    type = ADMaterialRealAux
    variable = p
    property = pressure
  []
[]
[Materials]
  [var_mat]
    type = ConservedVarValuesMaterial
    rho = rho
    rhou = rho_u
    rhov = rho_v
    rho_et = rho_E
  []
  [sound_speed]
    type = SoundspeedMat
    fp = fp
  []
[]
[Postprocessors]
  [cfl_dt]
    type = ADCFLTimeStepSize
    c_names = 'sound_speed'
    vel_names = 'speed'
    CFL = 0.5
  []
[]
[Preconditioning]
  [smp]
    type = SMP
    full = true
    petsc_options_iname = '-pc_type'
    petsc_options_value = 'lu'
  []
[]
[Executioner]
  type = Transient
  end_time = 0.2
  [TimeIntegrator]
    type = ExplicitSSPRungeKutta
    order = 2
  []
  l_tol = 1e-8
  [TimeStepper]
    type = PostprocessorDT
    postprocessor = cfl_dt
  []
[]
(modules/thermal_hydraulics/test/tests/materials/binary_diffusion_coef/binary_diffusion_coef.i)
p = 1e5
T = 300
collision_diam = 0.3e-9
[Mesh]
  type = GeneratedMesh
  dim = 1
  nx = 1
[]
[FluidProperties]
  [fp1]
    type = IdealGasFluidProperties
    gamma = 1.4
    molar_mass = 0.029
  []
  [fp2]
    type = IdealGasFluidProperties
    gamma = 1.5
    molar_mass = 0.04
  []
  [mixture_fp]
    type = IdealGasMixtureFluidProperties
    component_fluid_properties = 'fp1 fp2'
  []
[]
[Materials]
  [pT_mat]
    type = ADGenericConstantMaterial
    prop_names = 'p T'
    prop_values = '${p} ${T}'
  []
  [test_mat]
    type = BinaryDiffusionCoefMaterial
    primary_collision_diameter = ${collision_diam}
    secondary_collision_diameter = ${collision_diam}
    vapor_mixture_fp = mixture_fp
  []
[]
[Postprocessors]
  [diffcoef]
    type = ADElementAverageMaterialProperty
    mat_prop = mass_diffusion_coefficient
    execute_on = 'INITIAL'
  []
[]
[Problem]
  solve = false
[]
[Executioner]
  type = Steady
[]
[Outputs]
  csv = true
  execute_on = 'INITIAL'
[]
(modules/navier_stokes/test/tests/finite_volume/two_phase/mixture_interface_area_model/turbulent_driven_growth.i)
###############################################################################
# Validation test based on Hibiki and Ishii experiment [1] reported in Figure 5
# [1] Hibiki, T., & Ishii, M. (2000). One-group interfacial area transport of
# bubbly flows in vertical round tubes.
# International Journal of Heat and Mass Transfer, 43(15), 2711-2726.
###############################################################################
mu = 1.0
rho = 1000.0
mu_d = 1.0
rho_d = 1.0
l = ${fparse 50.8/1000.0}
U = 5.031429
dp = 0.005
inlet_phase_2 = 0.442
advected_interp_method = 'upwind'
velocity_interp_method = 'rc'
mass_exchange_coeff = 0.0
inlet_interface_area = ${fparse 6.0*inlet_phase_2/dp}
outlet_pressure = 1e5
[GlobalParams]
  rhie_chow_user_object = 'rc'
  density_interp_method = 'average'
  mu_interp_method = 'average'
[]
[Problem]
  identify_variable_groups_in_nl = false
  previous_nl_solution_required = true
[]
[UserObjects]
  [rc]
    type = INSFVRhieChowInterpolator
    u = vel_x
    v = vel_y
    pressure = pressure
  []
[]
[Mesh]
  coord_type = 'RZ'
  rz_coord_axis = 'X'
  [gen]
    type = GeneratedMeshGenerator
    dim = 2
    xmin = 0
    xmax = '${fparse l * 60}'
    ymin = 0
    ymax = '${fparse l / 2}'
    nx = 20
    ny = 5
  []
  uniform_refine = 0
[]
[Variables]
  [vel_x]
    type = INSFVVelocityVariable
    initial_condition = 0
  []
  [vel_y]
    type = INSFVVelocityVariable
    initial_condition = 0
  []
  [pressure]
    type = INSFVPressureVariable
  []
  [phase_2]
    type = INSFVScalarFieldVariable
    initial_condition = ${inlet_phase_2}
  []
  [interface_area]
    type = INSFVScalarFieldVariable
    initial_condition = ${inlet_interface_area}
  []
[]
[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_mixture'
    momentum_component = 'x'
  []
  [u_drift]
    type = WCNSFV2PMomentumDriftFlux
    variable = vel_x
    rho_d = ${rho_d}
    fd = 'rho_mixture_var'
    u_slip = 'vel_slip_x'
    v_slip = 'vel_slip_y'
    momentum_component = 'x'
  []
  [u_viscosity]
    type = INSFVMomentumDiffusion
    variable = vel_x
    mu = 'mu_mixture'
    limit_interpolation = true
    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_mixture'
    momentum_component = 'y'
  []
  [v_drift]
    type = WCNSFV2PMomentumDriftFlux
    variable = vel_y
    rho_d = ${rho_d}
    fd = 'rho_mixture_var'
    u_slip = 'vel_slip_x'
    v_slip = 'vel_slip_y'
    momentum_component = 'y'
  []
  [v_viscosity]
    type = INSFVMomentumDiffusion
    variable = vel_y
    mu = 'mu_mixture'
    limit_interpolation = true
    momentum_component = 'y'
  []
  [v_pressure]
    type = INSFVMomentumPressure
    variable = vel_y
    momentum_component = 'y'
    pressure = pressure
  []
  [phase_2_advection]
    type = INSFVScalarFieldAdvection
    variable = phase_2
    u_slip = 'vel_x'
    v_slip = 'vel_y'
    velocity_interp_method = ${velocity_interp_method}
    advected_interp_method = 'upwind'
  []
  [phase_2_diffusion]
    type = FVDiffusion
    variable = phase_2
    coeff = 1.0
  []
  [phase_2_src]
    type = NSFVMixturePhaseInterface
    variable = phase_2
    phase_coupled = phase_1
    alpha = ${mass_exchange_coeff}
  []
  [interface_area_advection]
    type = INSFVScalarFieldAdvection
    variable = interface_area
    velocity_interp_method = ${velocity_interp_method}
    advected_interp_method = 'upwind'
  []
  [interface_area_diffusion]
    type = FVDiffusion
    variable = interface_area
    coeff = 0.1
  []
  [interface_area_source_sink]
    type = WCNSFV2PInterfaceAreaSourceSink
    variable = interface_area
    u = 'vel_x'
    v = 'vel_y'
    L = ${fparse l/2}
    rho = 'rho_mixture'
    rho_d = 'rho'
    pressure = 'pressure'
    k_c = '${fparse mass_exchange_coeff}'
    fd = 'phase_2'
    sigma = 1e-3
  []
[]
[FVBCs]
  [inlet-u]
    type = INSFVInletVelocityBC
    boundary = 'left'
    variable = vel_x
    functor = '${U}'
  []
  [inlet-v]
    type = INSFVInletVelocityBC
    boundary = 'left'
    variable = vel_y
    functor = '0'
  []
  [walls-u]
    type = INSFVNoSlipWallBC
    boundary = 'top'
    variable = vel_x
    function = 0
  []
  [walls-v]
    type = INSFVNoSlipWallBC
    boundary = 'top'
    variable = vel_y
    function = 0
  []
  [outlet_p]
    type = INSFVOutletPressureBC
    boundary = 'right'
    variable = pressure
    function = '${outlet_pressure}'
  []
  [inlet_phase_2]
    type = FVDirichletBC
    boundary = 'left'
    variable = phase_2
    value = ${inlet_phase_2}
  []
  [inlet_interface_area]
    type = FVDirichletBC
    boundary = 'left'
    variable = interface_area
    value = ${inlet_interface_area}
  []
  [symmetry-u]
    type = PINSFVSymmetryVelocityBC
    boundary = 'bottom'
    variable = vel_x
    u = vel_x
    v = vel_y
    mu = 'mu_mixture'
    momentum_component = 'x'
  []
  [symmetry-v]
    type = PINSFVSymmetryVelocityBC
    boundary = 'bottom'
    variable = vel_y
    u = vel_x
    v = vel_y
    mu = 'mu_mixture'
    momentum_component = 'y'
  []
  [symmetry-p]
    type = INSFVSymmetryPressureBC
    boundary = 'bottom'
    variable = pressure
  []
  [symmetry-phase-2]
    type = INSFVSymmetryScalarBC
    boundary = 'bottom'
    variable = phase_2
  []
  [symmetry-interface-area]
    type = INSFVSymmetryScalarBC
    boundary = 'bottom'
    variable = interface_area
  []
[]
[AuxVariables]
  [drag_coefficient]
    type = MooseVariableFVReal
  []
  [rho_mixture_var]
    type = MooseVariableFVReal
  []
  [mu_mixture_var]
    type = MooseVariableFVReal
  []
[]
[AuxKernels]
  [populate_cd]
    type = FunctorAux
    variable = drag_coefficient
    functor = 'Darcy_coefficient'
  []
  [populate_rho_mixture_var]
    type = FunctorAux
    variable = rho_mixture_var
    functor = 'rho_mixture'
  []
  [populate_mu_mixture_var]
    type = FunctorAux
    variable = mu_mixture_var
    functor = 'mu_mixture'
  []
[]
[FluidProperties]
  [fp]
    type = IdealGasFluidProperties
  []
[]
[FunctorMaterials]
  [bubble_properties]
    type = GeneralFunctorFluidProps
    fp = 'fp'
    pressure = 'pressure'
    T_fluid = 300.0
    speed = 1.0
    characteristic_length = 1.0
    porosity = 1.0
    output_properties = 'rho'
    outputs = 'out'
  []
  [populate_u_slip]
    type = WCNSFV2PSlipVelocityFunctorMaterial
    slip_velocity_name = 'vel_slip_x'
    momentum_component = 'x'
    u = 'vel_x'
    v = 'vel_y'
    rho = ${rho}
    mu = 'mu_mixture'
    rho_d = ${rho_d}
    particle_diameter = ${dp}
    linear_coef_name = 'Darcy_coefficient'
  []
  [populate_v_slip]
    type = WCNSFV2PSlipVelocityFunctorMaterial
    slip_velocity_name = 'vel_slip_y'
    momentum_component = 'y'
    u = 'vel_x'
    v = 'vel_y'
    rho = ${rho}
    mu = 'mu_mixture'
    rho_d = ${rho_d}
    particle_diameter = ${dp}
    linear_coef_name = 'Darcy_coefficient'
  []
  [compute_phase_1]
    type = ADParsedFunctorMaterial
    property_name = phase_1
    functor_names = 'phase_2'
    expression = '1 - phase_2'
  []
  [CD]
    type = NSFVDispersePhaseDragFunctorMaterial
    rho = 'rho_mixture'
    mu = mu_mixture
    u = 'vel_x'
    v = 'vel_y'
    particle_diameter = ${dp}
  []
  [mixing_material]
    type = NSFVMixtureFunctorMaterial
    phase_2_names = '${rho} ${mu}'
    phase_1_names = 'rho ${mu_d}'
    prop_names = 'rho_mixture mu_mixture'
    phase_1_fraction = 'phase_2'
  []
[]
[Executioner]
  type = Steady
  solve_type = 'NEWTON'
  nl_rel_tol = 1e-10
  line_search = 'none'
[]
[Debug]
  show_var_residual_norms = true
[]
[Preconditioning]
  [SMP]
    type = SMP
    full = true
    petsc_options_iname = '-pc_type -pc_factor_shift_type'
    petsc_options_value = 'lu       NONZERO'
  []
[]
[Outputs]
  [out]
    type = Exodus
  []
[]
[Postprocessors]
  [Re]
    type = ParsedPostprocessor
    expression = '${rho} * ${l} * ${U}'
    pp_names = ''
  []
  [rho_outlet]
    type = SideAverageValue
    boundary = 'right'
    variable = 'rho_mixture_var'
  []
[]
(modules/navier_stokes/test/tests/finite_volume/cns/stagnation_inlet/supersonic_nozzle_hllc.i)
stagnation_pressure = 1
stagnation_temperature = 1
[GlobalParams]
  fp = fp
[]
[Debug]
   show_material_props = true
[]
[Mesh]
  [file]
    type = FileMeshGenerator
    file = supersonic_nozzle.e
  []
[]
[FluidProperties]
  [fp]
    type = IdealGasFluidProperties
  []
[]
[Variables]
  [rho]
    family = MONOMIAL
    order = CONSTANT
    fv = true
    initial_condition = 0.0034
  []
  [rho_u]
    family = MONOMIAL
    order = CONSTANT
    fv = true
    initial_condition = 1e-4
    outputs = none
  []
  [rho_v]
    family = MONOMIAL
    order = CONSTANT
    fv = true
    outputs = none
  []
  [rho_E]
    family = MONOMIAL
    order = CONSTANT
    fv = true
    initial_condition = 2.5
  []
[]
[FVKernels]
  # Mass conservation
  [mass_time]
    type = FVTimeKernel
    variable = rho
  []
  [mass_advection]
    type = CNSFVMassHLLC
    variable = rho
  []
  # Momentum x conservation
  [momentum_x_time]
    type = FVTimeKernel
    variable = rho_u
  []
  [momentum_x_advection]
    type = CNSFVMomentumHLLC
    variable = rho_u
    momentum_component = x
  []
  # Momentum y conservation
  [momentum_y_time]
    type = FVTimeKernel
    variable = rho_v
  []
  [momentum_y_advection]
    type = CNSFVMomentumHLLC
    variable = rho_v
    momentum_component = y
  []
  # Fluid energy conservation
  [fluid_energy_time]
    type = FVTimeKernel
    variable = rho_E
  []
  [fluid_energy_advection]
    type = CNSFVFluidEnergyHLLC
    variable = rho_E
  []
[]
[FVBCs]
  ## inflow stagnation boundaries
  [mass_stagnation_inflow]
    type = CNSFVHLLCMassStagnationInletBC
    variable = rho
    stagnation_pressure = ${stagnation_pressure}
    stagnation_temperature = ${stagnation_temperature}
    boundary = left
  []
  [momentum_x_stagnation_inflow]
    type = CNSFVHLLCMomentumStagnationInletBC
    variable = rho_u
    momentum_component = x
    stagnation_pressure = ${stagnation_pressure}
    stagnation_temperature = ${stagnation_temperature}
    boundary = left
  []
  [momentum_y_stagnation_inflow]
    type = CNSFVHLLCMomentumStagnationInletBC
    variable = rho_v
    momentum_component = y
    stagnation_pressure = ${stagnation_pressure}
    stagnation_temperature = ${stagnation_temperature}
    boundary = left
  [../]
  [fluid_energy_stagnation_inflow]
    type = CNSFVHLLCFluidEnergyStagnationInletBC
    variable = rho_E
    stagnation_pressure = ${stagnation_pressure}
    stagnation_temperature = ${stagnation_temperature}
    boundary = left
  []
  ## outflow implicit conditions
  [mass_outflow]
    type = CNSFVHLLCMassImplicitBC
    variable = rho
    boundary = right
  []
  [momentum_x_outflow]
    type = CNSFVHLLCMomentumImplicitBC
    variable = rho_u
    momentum_component = x
    boundary = right
  []
  [momentum_y_outflow]
    type = CNSFVHLLCMomentumImplicitBC
    variable = rho_v
    momentum_component = y
    boundary = right
  []
  [fluid_energy_outflow]
    type = CNSFVHLLCFluidEnergyImplicitBC
    variable = rho_E
    boundary = right
  []
  # wall conditions
  [momentum_x_pressure_wall]
    type = CNSFVMomImplicitPressureBC
    variable = rho_u
    momentum_component = x
    boundary = wall
  []
  [momentum_y_pressure_wall]
    type = CNSFVMomImplicitPressureBC
    variable = rho_v
    momentum_component = y
    boundary = wall
  []
[]
[AuxVariables]
  [Ma]
    family = MONOMIAL
    order = CONSTANT
  []
  [Ma_layered]
    family = MONOMIAL
    order = CONSTANT
  []
[]
[UserObjects]
  [layered_Ma_UO]
    type = LayeredAverage
    variable = Ma
    num_layers = 100
    direction = x
  []
[]
[AuxKernels]
  [Ma_aux]
    type = NSMachAux
    variable = Ma
    fluid_properties = fp
    use_material_properties = true
  []
  [Ma_layered_aux]
    type = SpatialUserObjectAux
    variable = Ma_layered
    user_object = layered_Ma_UO
  []
[]
[Materials]
  [var_mat]
    type = ConservedVarValuesMaterial
    rho = rho
    rhou = rho_u
    rhov = rho_v
    rho_et = rho_E
  []
  [fluid_props]
    type = GeneralFluidProps
    porosity = 1
    characteristic_length = 1
  []
  [sound_speed]
    type = SoundspeedMat
    fp = fp
  []
[]
[Postprocessors]
  [cfl_dt]
    type = ADCFLTimeStepSize
    c_names = 'sound_speed'
    vel_names = 'speed'
    CFL = 0.5
  []
  [outflow_Ma]
    type = SideAverageValue
    variable = Ma
    boundary = right
  []
[]
[Preconditioning]
  [smp]
    type = SMP
    full = true
    petsc_options_iname = '-pc_type'
    petsc_options_value = 'lu'
  []
[]
[Executioner]
  type = Transient
  end_time = 0.1
  [TimeIntegrator]
    type = ExplicitSSPRungeKutta
    order = 2
  []
  l_tol = 1e-8
  [TimeStepper]
    type = PostprocessorDT
    postprocessor = cfl_dt
  []
[]
[VectorPostprocessors]
  [Ma_layered]
    type = LineValueSampler
    variable = Ma_layered
    start_point = '0 0 0'
    end_point = '10 0 0'
    num_points = 100
    sort_by = x
  []
[]
[Outputs]
  exodus = true
[]
(modules/thermal_hydraulics/test/tests/components/deprecated/gate_valve.i)
[GlobalParams]
  gravity_vector = '0 0 0'
  closures = simple_closures
  fp = fp
  f = 0.0
  initial_T = 300
  initial_p = 1e5
  initial_vel = 0
[]
[FluidProperties]
  [fp]
    type = IdealGasFluidProperties
    gamma = 1.4
    molar_mass = 0.02897
  []
[]
[Closures]
  [simple_closures]
    type = Closures1PhaseSimple
  []
[]
[Components]
  [inlet]
    type = InletMassFlowRateTemperature1Phase
    input = 'pipe1:in'
    m_dot = 1
    T = 300
  []
  [pipe1]
    type = FlowChannel1Phase
    position = '0 0 0'
    orientation = '1 0 0'
    length = 0.5
    n_elems = 2
    A = 0.1
  []
  [valve]
    type = GateValve
    connections = 'pipe1:out pipe2:in'
    open_area_fraction = 1
  []
  [pipe2]
    type = FlowChannel1Phase
    position = '0.5 0 0'
    orientation = '1 0 0'
    length = 0.5
    n_elems = 2
    A = 0.1
  []
  [outlet]
    type = Outlet1Phase
    input = 'pipe2:out'
    p = 1e5
  []
[]
[Preconditioning]
  [smp]
    type = SMP
    full = true
  []
[]
[Executioner]
  type = Transient
  scheme = bdf2
  solve_type = NEWTON
  nl_rel_tol = 1e-8
  nl_abs_tol = 1e-8
  nl_max_its = 20
  l_tol = 1e-4
  start_time = 0.0
  end_time = 1.0
  dt = 0.01
  abort_on_solve_fail = true
[]
(modules/fluid_properties/test/tests/fp_interrogator/1ph.rho_p.i)
[FluidPropertiesInterrogator]
  fp = fp
  rho = 1
  p = 1e5
[]
[FluidProperties]
  [./fp]
    type = IdealGasFluidProperties
    gamma = 1.4
    molar_mass = 0.02900055737704918
    mu = 1.823e-05
    k = 0.02568
  [../]
[]
(modules/thermal_hydraulics/test/tests/components/heat_transfer_from_external_app_1phase/phy.q_wall_transfer_3eqn.child.i)
# This is a part of phy.q_wall_transfer_3eqn test. See the master file for details.
[GlobalParams]
  initial_p = 1.e5
  initial_vel = 0.
  initial_T = 300.
  closures = simple_closures
[]
[FluidProperties]
  [eos]
    type = IdealGasFluidProperties
  []
[]
[Closures]
  [simple_closures]
    type = Closures1PhaseSimple
  []
[]
[Components]
  [pipe1]
    type = FlowChannel1Phase
    position = '0 0 0'
    orientation = '1 0 0'
    length = 1
    n_elems = 10
    A   = 9.6858407346e-01
    D_h = 6.1661977237e+00
    f = 0.01
    fp = eos
  []
  [hxconn]
    type = HeatTransferFromExternalAppHeatFlux1Phase
    flow_channel = pipe1
    Hw = 1e3
  []
  [inlet]
    type = SolidWall1Phase
    input = 'pipe1:in'
  []
  [outlet]
    type = SolidWall1Phase
    input = 'pipe1:out'
  []
[]
[Preconditioning]
  [SMP_PJFNK]
    type = SMP
    full = true
  []
[]
[Executioner]
  type = Transient
  scheme = 'bdf2'
  dt = 0.5
  dtmin = 1e-7
  abort_on_solve_fail = true
  solve_type = 'PJFNK'
  line_search = 'basic'
  nl_rel_tol = 1e-8
  nl_abs_tol = 1e-6
  nl_max_its = 20
  l_tol = 1e-3
  l_max_its = 300
  start_time = 0.0
  end_time = 5
  [Quadrature]
    type = GAUSS
    order = SECOND
  []
[]
[Outputs]
  exodus = true
  show = 'q_wall'
[]
(modules/thermal_hydraulics/test/tests/problems/sod_shock_tube/sod_shock_tube.i)
# This test problem is the classic Sod shock tube test problem,
# which is a Riemann problem with the following parameters:
#   * domain = (0,1)
#   * gravity = 0
#   * EoS: Ideal gas EoS with gamma = 1.4, R = 0.71428571428571428571
#   * interface: x = 0.5
#   * typical end time: 0.2
# Left initial values:
#   * rho = 1
#   * vel = 0
#   * p = 1
# Right initial values:
#   * rho = 0.125
#   * vel = 0
#   * p = 0.1
#
# The output can be viewed by opening Paraview with the state file `plot.pvsm`:
#   paraview --state=plot.pvsm
# This will plot the numerical solution against the analytical solution
[Functions]
  [p_ic_fn]
    type = PiecewiseConstant
    axis = x
    direction = right
    x = '0.5 1.0'
    y = '1.0 0.1'
  []
  [T_ic_fn]
    type = PiecewiseConstant
    axis = x
    direction = right
    x = '0.5 1.0'
    y = '1.4 1.12'
  []
[]
[FluidProperties]
  [fp]
    type = IdealGasFluidProperties
    gamma = 1.4
    molar_mass = 11.64024372
  []
[]
[Closures]
  [simple_closures]
    type = Closures1PhaseSimple
  []
[]
[Components]
  [pipe]
    type = FlowChannel1Phase
    fp = fp
    # geometry
    position = '0 0 0'
    orientation = '1 0 0'
    length = 1.0
    n_elems = 100
    A = 1.0
    gravity_vector = '0 0 0'
    # IC
    initial_T = T_ic_fn
    initial_p = p_ic_fn
    initial_vel = 0
    f = 0
    closures = simple_closures
    rdg_slope_reconstruction = minmod
  []
  [left_boundary]
    type = FreeBoundary1Phase
    input = 'pipe:in'
  []
  [right_boundary]
    type = FreeBoundary1Phase
    input = 'pipe:out'
  []
[]
[Executioner]
  type = Transient
  [TimeIntegrator]
    type = ExplicitSSPRungeKutta
  []
  solve_type = LINEAR
  l_tol = 1e-4
  nl_rel_tol = 1e-20
  nl_abs_tol = 1e-8
  nl_max_its = 60
  # run to t = 0.2
  start_time = 0.0
  dt = 1e-3
  num_steps = 200
  abort_on_solve_fail = true
[]
[Outputs]
  file_base = 'sod_shock_tube'
  velocity_as_vector = false
  execute_on = 'initial timestep_end'
  [out]
    type = Exodus
    show = 'rho p vel'
  []
[]
(modules/thermal_hydraulics/test/tests/problems/mms/mms_1phase.i)
# Method of manufactured solutions (MMS) problem for 1-phase flow model.
#
# The python script mms_derivation.py derives the MMS sources used in this
# input file.
#
# To perform a convergence study, run this input file with different values of
# 'refinement_level', starting with 0. Manually create a CSV file (call it the
# "convergence CSV file") to store the error vs. mesh size data. It should have
# the columns specified in the plot script plot_convergence_1phase.py. Copy the
# CSV output from each run into the convergence CSV file. After all of the runs,
# run the plot script using python.
refinement_level = 0 # 0 is initial
n_elems_coarse = 10
n_elems = ${fparse int(n_elems_coarse * 2^refinement_level)}
dt = 1e-6
t_end = ${fparse dt * 10}
area = 1.0
gamma = 2.0
M = 0.05
A = 1
B = 1
C = 1
aA = ${fparse area}
R_univ = 8.3144598
R = ${fparse R_univ / M}
cp = ${fparse gamma * R / (gamma - 1.0)}
cv = ${fparse cp / gamma}
[GlobalParams]
  gravity_vector = '0 0 0'
  closures = simple_closures
[]
[Functions]
  # solutions
  [rho_fn]
    type = ParsedFunction
    expression = 'A * (sin(B*x + C*t) + 2)'
    symbol_names = 'A B C'
    symbol_values = '${A} ${B} ${C}'
  []
  [vel_fn]
    type = ParsedFunction
    expression = 'A * t * sin(pi * x)'
    symbol_names = 'A'
    symbol_values = '${A}'
  []
  [p_fn]
    type = ParsedFunction
    expression = 'A * (cos(B*x + C*t) + 2)'
    symbol_names = 'A B C'
    symbol_values = '${A} ${B} ${C}'
  []
  [T_fn]
    type = ParsedFunction
    expression = '(cos(B*x + C*t) + 2)/(cv*(gamma - 1)*(sin(B*x + C*t) + 2))'
    symbol_names = 'B C gamma cv'
    symbol_values = '${B} ${C} ${gamma} ${cv}'
  []
  # MMS sources
  [rho_src_fn]
    type = ParsedFunction
    expression = 'A^2*B*t*sin(pi*x)*cos(B*x + C*t) + pi*A^2*t*(sin(B*x + C*t) + 2)*cos(pi*x) + A*C*cos(B*x + C*t)'
    symbol_names = 'A B C'
    symbol_values = '${A} ${B} ${C}'
  []
  [rhou_src_fn]
    type = ParsedFunction
    expression = 'A^3*B*t^2*sin(pi*x)^2*cos(B*x + C*t) + 2*pi*A^3*t^2*(sin(B*x + C*t) + 2)*sin(pi*x)*cos(pi*x) + A^2*C*t*sin(pi*x)*cos(B*x + C*t) + A^2*(sin(B*x + C*t) + 2)*sin(pi*x) - A*B*sin(B*x + C*t)'
    symbol_names = 'A B C'
    symbol_values = '${A} ${B} ${C}'
  []
  [rhoE_src_fn]
    type = ParsedFunction
    expression = 'A*C*(A^2*t^2*sin(pi*x)^2/2 + (cos(B*x + C*t) + 2)/((gamma - 1)*(sin(B*x + C*t) + 2)))*cos(B*x + C*t) + pi*A*t*(A*(A^2*t^2*sin(pi*x)^2/2 + (cos(B*x + C*t) + 2)/((gamma - 1)*(sin(B*x + C*t) + 2)))*(sin(B*x + C*t) + 2) + A*(cos(B*x + C*t) + 2))*cos(pi*x) + A*t*(A*B*(A^2*t^2*sin(pi*x)^2/2 + (cos(B*x + C*t) + 2)/((gamma - 1)*(sin(B*x + C*t) + 2)))*cos(B*x + C*t) - A*B*sin(B*x + C*t) + A*(sin(B*x + C*t) + 2)*(pi*A^2*t^2*sin(pi*x)*cos(pi*x) - B*sin(B*x + C*t)/((gamma - 1)*(sin(B*x + C*t) + 2)) - B*(cos(B*x + C*t) + 2)*cos(B*x + C*t)/((gamma - 1)*(sin(B*x + C*t) + 2)^2)))*sin(pi*x) + A*(sin(B*x + C*t) + 2)*(A^2*t*sin(pi*x)^2 - C*sin(B*x + C*t)/((gamma - 1)*(sin(B*x + C*t) + 2)) - C*(cos(B*x + C*t) + 2)*cos(B*x + C*t)/((gamma - 1)*(sin(B*x + C*t) + 2)^2))'
    symbol_names = 'A B C gamma'
    symbol_values = '${A} ${B} ${C} ${gamma}'
  []
[]
[FluidProperties]
  [fp]
    type = IdealGasFluidProperties
    gamma = ${gamma}
    molar_mass = ${M}
  []
[]
[Closures]
  [simple_closures]
    type = Closures1PhaseSimple
  []
[]
[Components]
  [pipe]
    type = FlowChannel1Phase
    fp = fp
    # geometry
    position = '0 0 0'
    orientation = '1 0 0'
    length = 1.0
    n_elems = ${n_elems}
    A = ${area}
    # IC
    initial_p = p_fn
    initial_T = T_fn
    initial_vel = 0
    f = 0
  []
  [left_boundary]
    type = InletFunction1Phase
    input = 'pipe:in'
    p = p_fn
    rho = rho_fn
    vel = vel_fn
  []
  [right_boundary]
    type = InletFunction1Phase
    input = 'pipe:out'
    p = p_fn
    rho = rho_fn
    vel = vel_fn
  []
[]
[Kernels]
  [rho_src]
    type = BodyForce
    variable = rhoA
    function = rho_src_fn
    value = ${aA}
  []
  [rhou_src]
    type = BodyForce
    variable = rhouA
    function = rhou_src_fn
    value = ${aA}
  []
  [rhoE_src]
    type = BodyForce
    variable = rhoEA
    function = rhoE_src_fn
    value = ${aA}
  []
[]
[Postprocessors]
  [rho_err]
    type = ElementL1Error
    variable = rho
    function = rho_fn
    execute_on = 'INITIAL TIMESTEP_END'
  []
  [vel_err]
    type = ElementL1Error
    variable = vel
    function = vel_fn
    execute_on = 'INITIAL TIMESTEP_END'
  []
  [p_err]
    type = ElementL1Error
    variable = p
    function = p_fn
    execute_on = 'INITIAL TIMESTEP_END'
  []
[]
[Executioner]
  type = Transient
  [TimeIntegrator]
    type = ExplicitSSPRungeKutta
    order = 3
  []
  start_time = 0
  dt = ${dt}
  end_time = ${t_end}
  abort_on_solve_fail = true
  [Quadrature]
    type = GAUSS
    order = FIRST
  []
[]
[Outputs]
  csv = true
  execute_on = 'FINAL'
  velocity_as_vector = false
[]
(modules/thermal_hydraulics/tutorials/single_phase_flow/06_custom_closures.i)
T_in = 300. # K
m_dot_in = 1e-2 # kg/s
press = 10e5 # Pa
# core parameters
core_length = 1. # m
core_n_elems = 25
core_dia = '${units 2. cm -> m}'
core_pitch = '${units 8.7 cm -> m}'
A_core = '${fparse core_pitch^2 - 0.25 *pi * core_dia^2}'
P_wet_core = '${fparse 4*core_pitch + pi * core_dia}'
Dh_core = '${fparse 4 * A_core / P_wet_core}'
# pipe parameters
pipe_dia = '${units 10. cm -> m}'
A_pipe = '${fparse 0.25 * pi * pipe_dia^2}'
tot_power = 2000 # W
# heat exchanger parameters
hx_dia_inner = '${units 12. cm -> m}'
hx_wall_thickness = '${units 5. mm -> m}'
hx_dia_outer = '${units 50. cm -> m}'
hx_radius_wall = '${fparse hx_dia_inner / 2. + hx_wall_thickness}'
hx_length = 1.5 # m
hx_n_elems = 25
m_dot_sec_in = 1. # kg/s
[GlobalParams]
  initial_p = ${press}
  initial_vel = 0.0001
  initial_T = ${T_in}
  initial_vel_x = 0
  initial_vel_y = 0
  initial_vel_z = 0
  gravity_vector = '0 0 0'
  rdg_slope_reconstruction = minmod
  scaling_factor_1phase = '1 1e-2 1e-4'
  scaling_factor_rhoV = 1
  scaling_factor_rhouV = 1e-2
  scaling_factor_rhovV = 1e-2
  scaling_factor_rhowV = 1e-2
  scaling_factor_rhoEV = 1e-4
  closures = thm_closures
  fp = he
[]
[Functions]
  [m_dot_sec_fn]
    type = PiecewiseLinear
    xy_data = '
      0    0
      10 ${m_dot_sec_in}'
  []
[]
[FluidProperties]
  [he]
    type = IdealGasFluidProperties
    molar_mass = 4e-3
    gamma = 1.67
    k = 0.2556
    mu = 3.22639e-5
  []
  [water]
    type = StiffenedGasFluidProperties
    gamma = 2.35
    cv = 1816.0
    q = -1.167e6
    p_inf = 1.0e9
    q_prime = 0
  []
[]
[Closures]
  [thm_closures]
    type = Closures1PhaseTHM
  []
[]
[Materials]
  [Re_mat]
    type = ADReynoldsNumberMaterial
    Re = Re
    rho = rho
    vel = vel
    D_h = D_h
    mu = mu
    block = hx/pri
  []
  [f_mat]
    type = ADParsedMaterial
    property_name = f_D
    constant_names = 'a b c'
    constant_expressions = '1 0.1 -0.5'
    material_property_names = 'Re'
    expression = 'a + b * Re^c'
    block = hx/pri
  []
  [Pr_mat]
    type = ADPrandtlNumberMaterial
    Pr = Pr
    cp = cp
    mu = mu
    k = k
    block = hx/pri
  []
  [Nu_mat]
    type = ADParsedMaterial
    property_name = 'Nu'
    constant_names = 'a b c'
    constant_expressions = '0.03 0.9 0.5'
    material_property_names = 'Re Pr'
    expression = 'a * Re ^b * Pr^c'
    block = hx/pri
  []
  [Hw_mat]
    type = ADConvectiveHeatTransferCoefficientMaterial
    D_h = D_h
    k = k
    Nu = Nu
    Hw = Hw
    block = hx/pri
  []
[]
[SolidProperties]
  [steel]
    type = ThermalFunctionSolidProperties
    rho = 8050
    k = 45
    cp = 466
  []
[]
[Components]
  [total_power]
    type = TotalPower
    power = ${tot_power}
  []
  [up_pipe_1]
    type = FlowChannel1Phase
    position = '0 0 0'
    orientation = '0 0 1'
    length = 0.5
    n_elems = 15
    A = ${A_pipe}
    D_h = ${pipe_dia}
  []
  [jct1]
    type = JunctionParallelChannels1Phase
    position = '0 0 0.5'
    connections = 'up_pipe_1:out core_chan:in'
    volume = 1e-5
  []
  [core_chan]
    type = FlowChannel1Phase
    position = '0 0 0.5'
    orientation = '0 0 1'
    length = ${core_length}
    n_elems = ${core_n_elems}
    roughness = .0001
    A = ${A_core}
    D_h = ${Dh_core}
  []
  [core_hs]
    type = HeatStructureCylindrical
    position = '0 0 0.5'
    orientation = '0 0 1'
    length = ${core_length}
    n_elems = ${core_n_elems}
    names = 'block'
    widths = '${fparse core_dia / 2.}'
    solid_properties = 'steel'
    solid_properties_T_ref = '300'
    n_part_elems = 3
  []
  [core_heating]
    type = HeatSourceFromTotalPower
    hs = core_hs
    regions = block
    power = total_power
  []
  [core_ht]
    type = HeatTransferFromHeatStructure1Phase
    flow_channel = core_chan
    hs = core_hs
    hs_side = outer
    P_hf = '${fparse pi * core_dia}'
  []
  [jct2]
    type = JunctionParallelChannels1Phase
    position = '0 0 1.5'
    connections = 'core_chan:out up_pipe_2:in'
    volume = 1e-5
  []
  [up_pipe_2]
    type = FlowChannel1Phase
    position = '0 0 1.5'
    orientation = '0 0 1'
    length = 0.5
    n_elems = 10
    A = ${A_pipe}
    D_h = ${pipe_dia}
  []
  [jct3]
    type = JunctionOneToOne1Phase
    connections = 'up_pipe_2:out top_pipe_1:in'
  []
  [top_pipe_1]
    type = FlowChannel1Phase
    position = '0 0 2'
    orientation = '1 0 0'
    length = 0.5
    n_elems = 10
    A = ${A_pipe}
    D_h = ${pipe_dia}
  []
  [top_pipe_2]
    type = FlowChannel1Phase
    position = '0.5 0 2'
    orientation = '1 0 0'
    length = 0.5
    n_elems = 10
    A = ${A_pipe}
    D_h = ${pipe_dia}
  []
  [jct4]
    type = VolumeJunction1Phase
    position = '0.5 0 2'
    volume = 1e-5
    connections = 'top_pipe_1:out top_pipe_2:in press_pipe:in'
  []
  [press_pipe]
    type = FlowChannel1Phase
    position = '0.5 0 2'
    orientation = '0 1 0'
    length = 0.2
    n_elems = 5
    A = ${A_pipe}
    D_h = ${pipe_dia}
  []
  [pressurizer]
    type = InletStagnationPressureTemperature1Phase
    p0 = ${press}
    T0 = ${T_in}
    input = press_pipe:out
  []
  [jct5]
    type = JunctionOneToOne1Phase
    connections = 'top_pipe_2:out down_pipe_1:in'
  []
  [down_pipe_1]
    type = FlowChannel1Phase
    position = '1 0 2'
    orientation = '0 0 -1'
    length = 0.25
    A = ${A_pipe}
    n_elems = 5
  []
  [jct6]
    type = JunctionParallelChannels1Phase
    position = '1 0 1.75'
    connections = 'down_pipe_1:out hx/pri:in'
    volume = 1e-5
  []
  [hx]
    [pri]
      type = FlowChannel1Phase
      position = '1 0 1.75'
      orientation = '0 0 -1'
      length = ${hx_length}
      n_elems = ${hx_n_elems}
      roughness = 1e-5
      A = '${fparse pi * hx_dia_inner * hx_dia_inner / 4.}'
      D_h = ${hx_dia_inner}
      closures = ''
    []
    [ht_pri]
      type = HeatTransferFromHeatStructure1Phase
      hs = hx/wall
      hs_side = inner
      flow_channel = hx/pri
      P_hf = '${fparse pi * hx_dia_inner}'
    []
    [wall]
      type = HeatStructureCylindrical
      position = '1 0 1.75'
      orientation = '0 0 -1'
      length = ${hx_length}
      n_elems = ${hx_n_elems}
      widths = '${hx_wall_thickness}'
      n_part_elems = '3'
      solid_properties = 'steel'
      solid_properties_T_ref = '300'
      names = '0'
      inner_radius = '${fparse hx_dia_inner / 2.}'
    []
    [ht_sec]
      type = HeatTransferFromHeatStructure1Phase
      hs = hx/wall
      hs_side = outer
      flow_channel = hx/sec
      P_hf = '${fparse 2 * pi * hx_radius_wall}'
    []
    [sec]
      type = FlowChannel1Phase
      position = '${fparse 1 + hx_wall_thickness} 0 0.25'
      orientation = '0 0 1'
      length = ${hx_length}
      n_elems = ${hx_n_elems}
      A = '${fparse pi * (hx_dia_outer * hx_dia_outer / 4. - hx_radius_wall * hx_radius_wall)}'
      D_h = '${fparse hx_dia_outer - (2 * hx_radius_wall)}'
      fp = water
      initial_T = 300
    []
  []
  [jct7]
    type = JunctionParallelChannels1Phase
    position = '1 0 0.5'
    connections = 'hx/pri:out down_pipe_2:in'
    volume = 1e-5
  []
  [down_pipe_2]
    type = FlowChannel1Phase
    position = '1 0 0.25'
    orientation = '0 0 -1'
    length = 0.25
    n_elems = 10
    A = ${A_pipe}
    D_h = ${pipe_dia}
  []
  [jct8]
    type = JunctionOneToOne1Phase
    connections = 'down_pipe_2:out bottom_1:in'
  []
  [bottom_1]
    type = FlowChannel1Phase
    position = '1 0 0'
    orientation = '-1 0 0'
    length = 0.5
    n_elems = 5
    A = ${A_pipe}
    D_h = ${pipe_dia}
  []
  [pump]
    type = Pump1Phase
    position = '0.5 0 0'
    connections = 'bottom_1:out bottom_2:in'
    volume = 1e-4
    A_ref = ${A_pipe}
    head = 0
  []
  [bottom_2]
    type = FlowChannel1Phase
    position = '0.5 0 0'
    orientation = '-1 0 0'
    length = 0.5
    n_elems = 5
    A = ${A_pipe}
    D_h = ${pipe_dia}
  []
  [jct9]
    type = JunctionOneToOne1Phase
    connections = 'bottom_2:out up_pipe_1:in'
  []
  [inlet_sec]
    type = InletMassFlowRateTemperature1Phase
    input = 'hx/sec:in'
    m_dot = 0
    T = 300
  []
  [outlet_sec]
    type = Outlet1Phase
    input = 'hx/sec:out'
    p = 1e5
  []
[]
[ControlLogic]
  [set_point]
    type = GetFunctionValueControl
    function = ${m_dot_in}
  []
  [pid]
    type = PIDControl
    initial_value = 0.0
    set_point = set_point:value
    input = m_dot_pump
    K_p = 1.
    K_i = 4.
    K_d = 0
  []
  [set_pump_head]
    type = SetComponentRealValueControl
    component = pump
    parameter = head
    value = pid:output
  []
  [m_dot_sec_inlet_ctrl]
    type = GetFunctionValueControl
    function = m_dot_sec_fn
  []
  [set_m_dot_sec_ctrl]
    type = SetComponentRealValueControl
    component = inlet_sec
    parameter = m_dot
    value = m_dot_sec_inlet_ctrl:value
  []
[]
[Postprocessors]
  [power_to_coolant]
    type = ADHeatRateConvection1Phase
    block = core_chan
    P_hf = '${fparse pi *core_dia}'
  []
  [m_dot_pump]
    type = ADFlowJunctionFlux1Phase
    boundary = core_chan:in
    connection_index = 1
    equation = mass
    junction = jct7
  []
  [core_T_out]
    type = SideAverageValue
    boundary = core_chan:out
    variable = T
  []
  [core_p_in]
    type = SideAverageValue
    boundary = core_chan:in
    variable = p
  []
  [core_p_out]
    type = SideAverageValue
    boundary = core_chan:out
    variable = p
  []
  [core_delta_p]
    type = ParsedPostprocessor
    pp_names = 'core_p_in core_p_out'
    expression = 'core_p_in - core_p_out'
  []
  [hx_pri_T_out]
    type = SideAverageValue
    boundary = hx/pri:out
    variable = T
  []
  [hx_sec_T_in]
    type = SideAverageValue
    boundary = inlet_sec
    variable = T
  []
  [hx_sec_T_out]
    type = SideAverageValue
    boundary = outlet_sec
    variable = T
  []
  [m_dot_sec]
    type = ADFlowBoundaryFlux1Phase
    boundary = inlet_sec
    equation = mass
  []
  [Hw_hx_pri]
    type = ADElementAverageMaterialProperty
    mat_prop = Hw
    block = hx/pri
  []
  [fD_hx_pri]
    type = ADElementAverageMaterialProperty
    mat_prop = f_D
    block = hx/pri
  []
[]
[Preconditioning]
  [pc]
    type = SMP
    full = true
  []
[]
[Executioner]
  type = Transient
  start_time = 0
  [TimeStepper]
    type = IterationAdaptiveDT
    dt = 1
  []
  dtmax = 5
  end_time = 500
  line_search = basic
  solve_type = NEWTON
  petsc_options_iname = '-pc_type'
  petsc_options_value = 'lu'
  nl_rel_tol = 1e-8
  nl_abs_tol = 1e-8
  nl_max_its = 25
[]
[Outputs]
  exodus = true
  [console]
    type = Console
    max_rows = 1
    outlier_variable_norms = false
  []
  print_linear_residuals = false
[]
(modules/thermal_hydraulics/test/tests/materials/fluid_properties_gas_mix_material/fluid_properties_gas_mix_material.i)
mass_fraction = 0.4
vel = 10
area = 0.2
# computed at p = 1e5 Pa, T = 300 K:
rho = 1.30632939267729
e_value = 1.789042384551724e+05
E = ${fparse e_value + 0.5 * vel * vel}
rhoA = ${fparse rho * area}
xirhoA = ${fparse mass_fraction * rhoA}
rhouA = ${fparse rhoA * vel}
rhoEA = ${fparse rhoA * E}
[Mesh]
  type = GeneratedMesh
  dim = 1
  nx = 1
[]
[FluidProperties]
  [fp1]
    type = IdealGasFluidProperties
    gamma = 1.4
    molar_mass = 0.029
  []
  [fp2]
    type = IdealGasFluidProperties
    gamma = 1.5
    molar_mass = 0.04
  []
  [mixture_fp]
    type = IdealGasMixtureFluidProperties
    component_fluid_properties = 'fp1 fp2'
  []
[]
[Materials]
  [fp_mat]
    type = FluidPropertiesGasMixMaterial
    xirhoA = xirhoA
    rhoA = rhoA
    rhouA = rhouA
    rhoEA = rhoEA
    area = A
    fluid_properties = mixture_fp
  []
[]
[AuxVariables]
  [A]
    initial_condition = ${area}
  []
  [xirhoA]
    initial_condition = ${xirhoA}
  []
  [rhoA]
    initial_condition = ${rhoA}
  []
  [rhouA]
    initial_condition = ${rhouA}
  []
  [rhoEA]
    initial_condition = ${rhoEA}
  []
  [mass_fraction]
    family = MONOMIAL
    order = CONSTANT
  []
  [rho]
    family = MONOMIAL
    order = CONSTANT
  []
  [v]
    family = MONOMIAL
    order = CONSTANT
  []
  [vel]
    family = MONOMIAL
    order = CONSTANT
  []
  [e]
    family = MONOMIAL
    order = CONSTANT
  []
  [p]
    family = MONOMIAL
    order = CONSTANT
  []
  [T]
    family = MONOMIAL
    order = CONSTANT
  []
  [h]
    family = MONOMIAL
    order = CONSTANT
  []
  [H]
    family = MONOMIAL
    order = CONSTANT
  []
  [c]
    family = MONOMIAL
    order = CONSTANT
  []
  [cp]
    family = MONOMIAL
    order = CONSTANT
  []
  [cv]
    family = MONOMIAL
    order = CONSTANT
  []
  [k]
    family = MONOMIAL
    order = CONSTANT
  []
  [mu]
    family = MONOMIAL
    order = CONSTANT
  []
[]
[AuxKernels]
  [mass_fraction_aux]
    type = ADMaterialRealAux
    variable = mass_fraction
    property = mass_fraction
    execute_on = 'INITIAL'
  []
  [rho_aux]
    type = ADMaterialRealAux
    variable = rho
    property = rho
    execute_on = 'INITIAL'
  []
  [v_aux]
    type = ADMaterialRealAux
    variable = v
    property = v
    execute_on = 'INITIAL'
  []
  [vel_aux]
    type = ADMaterialRealAux
    variable = vel
    property = vel
    execute_on = 'INITIAL'
  []
  [e_aux]
    type = ADMaterialRealAux
    variable = e
    property = e
    execute_on = 'INITIAL'
  []
  [p_aux]
    type = ADMaterialRealAux
    variable = p
    property = p
    execute_on = 'INITIAL'
  []
  [T_aux]
    type = ADMaterialRealAux
    variable = T
    property = T
    execute_on = 'INITIAL'
  []
  [h_aux]
    type = ADMaterialRealAux
    variable = h
    property = h
    execute_on = 'INITIAL'
  []
  [H_aux]
    type = ADMaterialRealAux
    variable = H
    property = H
    execute_on = 'INITIAL'
  []
  [c_aux]
    type = ADMaterialRealAux
    variable = c
    property = c
    execute_on = 'INITIAL'
  []
  [cp_aux]
    type = ADMaterialRealAux
    variable = cp
    property = cp
    execute_on = 'INITIAL'
  []
  [cv_aux]
    type = ADMaterialRealAux
    variable = cv
    property = cv
    execute_on = 'INITIAL'
  []
  [k_aux]
    type = ADMaterialRealAux
    variable = k
    property = k
    execute_on = 'INITIAL'
  []
  [mu_aux]
    type = ADMaterialRealAux
    variable = mu
    property = mu
    execute_on = 'INITIAL'
  []
[]
[Postprocessors]
  [mass_fraction]
    type = ElementAverageValue
    variable = mass_fraction
    execute_on = 'INITIAL'
  []
  [rho]
    type = ElementAverageValue
    variable = rho
    execute_on = 'INITIAL'
  []
  [v]
    type = ElementAverageValue
    variable = v
    execute_on = 'INITIAL'
  []
  [vel]
    type = ElementAverageValue
    variable = vel
    execute_on = 'INITIAL'
  []
  [e]
    type = ElementAverageValue
    variable = e
    execute_on = 'INITIAL'
  []
  [p]
    type = ElementAverageValue
    variable = p
    execute_on = 'INITIAL'
  []
  [T]
    type = ElementAverageValue
    variable = T
    execute_on = 'INITIAL'
  []
  [h]
    type = ElementAverageValue
    variable = h
    execute_on = 'INITIAL'
  []
  [H]
    type = ElementAverageValue
    variable = H
    execute_on = 'INITIAL'
  []
  [c]
    type = ElementAverageValue
    variable = c
    execute_on = 'INITIAL'
  []
  [cp]
    type = ElementAverageValue
    variable = cp
    execute_on = 'INITIAL'
  []
  [cv]
    type = ElementAverageValue
    variable = cv
    execute_on = 'INITIAL'
  []
  [k]
    type = ElementAverageValue
    variable = k
    execute_on = 'INITIAL'
  []
  [mu]
    type = ElementAverageValue
    variable = mu
    execute_on = 'INITIAL'
  []
[]
[Problem]
  solve = false
[]
[Executioner]
  type = Steady
[]
[Outputs]
  csv = true
  execute_on = 'INITIAL'
[]
(modules/thermal_hydraulics/test/tests/components/deprecated/solid_wall.i)
[GlobalParams]
  gravity_vector = '0 0 0'
  closures = simple_closures
  fp = fp
  f = 0.0
  initial_T = 300
  initial_p = 1e5
  initial_vel = 0
[]
[FluidProperties]
  [fp]
    type = IdealGasFluidProperties
    gamma = 1.4
    molar_mass = 0.02897
  []
[]
[Closures]
  [simple_closures]
    type = Closures1PhaseSimple
  []
[]
[Components]
  [in]
    type = SolidWall
    input = 'pipe:in'
  []
  [pipe]
    type = FlowChannel1Phase
    position = '0 0 0'
    orientation = '1 0 0'
    length = 0.5
    n_elems = 2
    A = 0.1
  []
  [out]
    type = SolidWall
    input = 'pipe:out'
  []
[]
[Preconditioning]
  [smp]
    type = SMP
    full = true
  []
[]
[Executioner]
  type = Transient
  scheme = bdf2
  solve_type = NEWTON
  nl_rel_tol = 1e-8
  nl_abs_tol = 1e-8
  nl_max_its = 20
  l_tol = 1e-4
  start_time = 0.0
  end_time = 1.0
  dt = 0.01
  abort_on_solve_fail = true
[]
(modules/fluid_properties/test/tests/fp_interrogator/2ph_ncg_p_T.i)
[FluidPropertiesInterrogator]
  fp = fp_2phase_ncg
  p = 1e5
  T = 372.7559289
[]
[FluidProperties]
  [fp_nitrogen]
    type = IdealGasFluidProperties
    gamma = 1.4
    molar_mass = 0.02867055103448276
  []
  [fp_2phase_ncg]
    type = TestTwoPhaseNCGFluidProperties
    fp_ncgs = 'fp_nitrogen'
  []
[]
(modules/porous_flow/test/tests/fluids/ideal_gas.i)
# Example of using the IdealGasFluidProperties userobject to provide fluid
# properties for an ideal gas. Use values for hydrogen (H2) at 1 MPa and 50 C.
#
# Input values:
# M = 2.01588e-3 kg/mol
# gamma = 1.4
# viscosity = 9.4393e-6 Pa.s
#
# Expected output:
# density = 750.2854 kg/m^3
# internal energy = 3.33 MJ/kg
# enthalpy = 4.66 MJ/kg
[Mesh]
  type = GeneratedMesh
  dim = 1
  nx = 1
[]
[GlobalParams]
  PorousFlowDictator = dictator
[]
[UserObjects]
  [dictator]
    type = PorousFlowDictator
    porous_flow_vars = 'pp'
    number_fluid_phases = 1
    number_fluid_components = 1
  []
[]
[Variables]
  [pp]
    initial_condition = 1e6
  []
[]
[Kernels]
  [dummy]
    type = Diffusion
    variable = pp
  []
[]
[AuxVariables]
  [temp]
    initial_condition = 50.0
  []
[]
[FluidProperties]
  [idealgas]
    type = IdealGasFluidProperties
    molar_mass = 2.01588e-3
    gamma = 1.4
    mu = 9.4393e-6
  []
[]
[Materials]
  [temperature]
    type = PorousFlowTemperature
    temperature = temp
  []
  [ppss]
    type = PorousFlow1PhaseFullySaturated
    porepressure = pp
  []
  [idealgass]
    type = PorousFlowSingleComponentFluid
    temperature_unit = Celsius
    fp = idealgas
    phase = 0
  []
[]
[Executioner]
  type = Steady
  solve_type = Newton
[]
[Postprocessors]
  [pressure]
    type = ElementIntegralVariablePostprocessor
    variable = pp
  []
  [temperature]
    type = ElementIntegralVariablePostprocessor
    variable = temp
  []
  [density]
    type = ElementIntegralMaterialProperty
    mat_prop = 'PorousFlow_fluid_phase_density_qp0'
  []
  [viscosity]
    type = ElementIntegralMaterialProperty
    mat_prop = 'PorousFlow_viscosity_qp0'
  []
  [internal_energy]
    type = ElementIntegralMaterialProperty
    mat_prop = 'PorousFlow_fluid_phase_internal_energy_qp0'
  []
  [enthalpy]
    type = ElementIntegralMaterialProperty
    mat_prop = 'PorousFlow_fluid_phase_enthalpy_qp0'
  []
[]
[Outputs]
  execute_on = 'timestep_end'
  file_base = ideal_gas
  csv = true
[]
(modules/fluid_properties/test/tests/two_phase_fluid_properties_independent/test.i)
# Tests the TwoPhaseFluidPropertiesIndependent class, which takes the names
# of 2 single-phase fluid properties independently. This test uses a dummy
# aux to make sure that the single-phase fluid properties can be recovered
# from the 2-phase fluid properties. A modification to this test checks that
# an error results if one tries to call a 2-phase fluid properties interface
# using this class, which is designed to ensure that the 2 phases are independent.
[Mesh]
  type = GeneratedMesh
  dim = 1
  nx = 1
  # Required for NodalVariableValue on distributed mesh
  allow_renumbering = false
[]
[Problem]
  solve = false
[]
[AuxVariables]
  [./p]
    initial_condition = 1e5
  [../]
  [./T]
    initial_condition = 300
  [../]
  [./rho_avg]
  [../]
[]
[FluidProperties]
  # rho1 = 1.149425287 kg/m^3
  [./fp1]
    type = IdealGasFluidProperties
    gamma = 1.4
    molar_mass = 0.02867055103448276
  [../]
  # rho2 = 0.6666666667 kg/m^3
  [./fp2]
    type = IdealGasFluidProperties
    gamma = 1.2
    molar_mass = 0.0166289196
  [../]
  [./fp_2phase]
    type = TwoPhaseFluidPropertiesIndependent
    fp_liquid = fp1
    fp_vapor = fp2
  [../]
[]
[AuxKernels]
  # correct value (0.5*(rho1 + rho2)) should be: 0.90804597685 kg/m^3
  [./rho_avg_aux]
    type = TwoPhaseAverageDensityAux
    variable = rho_avg
    p = p
    T = T
    fp_2phase = fp_2phase
    execute_on = 'initial'
  [../]
[]
[Postprocessors]
  [./rho_avg_value]
    type = NodalVariableValue
    variable = rho_avg
    nodeid = 0
  [../]
[]
[Executioner]
  type = Steady
[]
[Outputs]
  execute_on = 'timestep_end'
  csv = true
[]
(modules/navier_stokes/test/tests/finite_volume/two_phase/mixture_interface_area_model/pressure_driven_growth.i)
###############################################################################
# Validation test based on Hibiki and Ishii experiment [1] reported in Figure 3
# [1] Hibiki, T., & Ishii, M. (2000). One-group interfacial area transport of bubbly flows in vertical round tubes.
# International Journal of Heat and Mass Transfer, 43(15), 2711-2726.
###############################################################################
mu = 1.0
rho = 1000.0
mu_d = 1.0
rho_d = 1.0
l = ${fparse 50.8/1000.0}
U = 0.491230114
dp = 0.001
inlet_phase_2 = 0.049
advected_interp_method = 'upwind'
velocity_interp_method = 'rc'
mass_exchange_coeff = 0.0
inlet_interface_area = ${fparse 6.0*inlet_phase_2/dp}
outlet_pressure = 1e5
[GlobalParams]
  rhie_chow_user_object = 'rc'
  density_interp_method = 'average'
  mu_interp_method = 'average'
[]
[Problem]
  identify_variable_groups_in_nl = false
  previous_nl_solution_required = true
[]
[UserObjects]
  [rc]
    type = INSFVRhieChowInterpolator
    u = vel_x
    v = vel_y
    pressure = pressure
  []
[]
[Mesh]
  coord_type = 'RZ'
  rz_coord_axis = 'X'
  [gen]
    type = GeneratedMeshGenerator
    dim = 2
    xmin = 0
    xmax = '${fparse l * 60}'
    ymin = 0
    ymax = '${fparse l / 2}'
    nx = 20
    ny = 5
  []
  uniform_refine = 0
[]
[Variables]
  [vel_x]
    type = INSFVVelocityVariable
    initial_condition = 0
  []
  [vel_y]
    type = INSFVVelocityVariable
    initial_condition = 0
  []
  [pressure]
    type = INSFVPressureVariable
  []
  [phase_2]
    type = INSFVScalarFieldVariable
    initial_condition = ${inlet_phase_2}
  []
  [interface_area]
    type = INSFVScalarFieldVariable
    initial_condition = ${inlet_interface_area}
  []
[]
[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_mixture'
    momentum_component = 'x'
  []
  [u_drift]
    type = WCNSFV2PMomentumDriftFlux
    variable = vel_x
    rho_d = ${rho_d}
    fd = 'rho_mixture_var'
    u_slip = 'vel_slip_x'
    v_slip = 'vel_slip_y'
    momentum_component = 'x'
  []
  [u_viscosity]
    type = INSFVMomentumDiffusion
    variable = vel_x
    mu = 'mu_mixture'
    limit_interpolation = true
    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_mixture'
    momentum_component = 'y'
  []
  [v_drift]
    type = WCNSFV2PMomentumDriftFlux
    variable = vel_y
    rho_d = ${rho_d}
    fd = 'rho_mixture_var'
    u_slip = 'vel_slip_x'
    v_slip = 'vel_slip_y'
    momentum_component = 'y'
  []
  [v_viscosity]
    type = INSFVMomentumDiffusion
    variable = vel_y
    mu = 'mu_mixture'
    limit_interpolation = true
    momentum_component = 'y'
  []
  [v_pressure]
    type = INSFVMomentumPressure
    variable = vel_y
    momentum_component = 'y'
    pressure = pressure
  []
  [phase_2_advection]
    type = INSFVScalarFieldAdvection
    variable = phase_2
    u_slip = 'vel_x'
    v_slip = 'vel_y'
    velocity_interp_method = ${velocity_interp_method}
    advected_interp_method = 'upwind'
  []
  [phase_2_diffusion]
    type = FVDiffusion
    variable = phase_2
    coeff = 1.0
  []
  [phase_2_src]
    type = NSFVMixturePhaseInterface
    variable = phase_2
    phase_coupled = phase_1
    alpha = ${mass_exchange_coeff}
  []
  [interface_area_advection]
    type = INSFVScalarFieldAdvection
    variable = interface_area
    velocity_interp_method = ${velocity_interp_method}
    advected_interp_method = 'upwind'
  []
  [interface_area_diffusion]
    type = FVDiffusion
    variable = interface_area
    coeff = 0.1
  []
  [interface_area_source_sink]
    type = WCNSFV2PInterfaceAreaSourceSink
    variable = interface_area
    u = 'vel_x'
    v = 'vel_y'
    L = ${fparse l/2}
    rho = 'rho_mixture'
    rho_d = 'rho'
    pressure = 'pressure'
    k_c = '${fparse mass_exchange_coeff}'
    fd = 'phase_2'
    sigma = 1e-3
    cutoff_fraction = 0.0
  []
[]
[FVBCs]
  [inlet-u]
    type = INSFVInletVelocityBC
    boundary = 'left'
    variable = vel_x
    functor = '${U}'
  []
  [inlet-v]
    type = INSFVInletVelocityBC
    boundary = 'left'
    variable = vel_y
    functor = '0'
  []
  [walls-u]
    type = INSFVNoSlipWallBC
    boundary = 'top'
    variable = vel_x
    function = 0
  []
  [walls-v]
    type = INSFVNoSlipWallBC
    boundary = 'top'
    variable = vel_y
    function = 0
  []
  [outlet_p]
    type = INSFVOutletPressureBC
    boundary = 'right'
    variable = pressure
    function = '${outlet_pressure}'
  []
  [inlet_phase_2]
    type = FVDirichletBC
    boundary = 'left'
    variable = phase_2
    value = ${inlet_phase_2}
  []
  [inlet_interface_area]
    type = FVDirichletBC
    boundary = 'left'
    variable = interface_area
    value = ${inlet_interface_area}
  []
  [symmetry-u]
    type = PINSFVSymmetryVelocityBC
    boundary = 'bottom'
    variable = vel_x
    u = vel_x
    v = vel_y
    mu = 'mu_mixture'
    momentum_component = 'x'
  []
  [symmetry-v]
    type = PINSFVSymmetryVelocityBC
    boundary = 'bottom'
    variable = vel_y
    u = vel_x
    v = vel_y
    mu = 'mu_mixture'
    momentum_component = 'y'
  []
  [symmetry-p]
    type = INSFVSymmetryPressureBC
    boundary = 'bottom'
    variable = pressure
  []
  [symmetry-phase-2]
    type = INSFVSymmetryScalarBC
    boundary = 'bottom'
    variable = phase_2
  []
  [symmetry-interface-area]
    type = INSFVSymmetryScalarBC
    boundary = 'bottom'
    variable = interface_area
  []
[]
[AuxVariables]
  [drag_coefficient]
    type = MooseVariableFVReal
  []
  [rho_mixture_var]
    type = MooseVariableFVReal
  []
  [mu_mixture_var]
    type = MooseVariableFVReal
  []
[]
[AuxKernels]
  [populate_cd]
    type = FunctorAux
    variable = drag_coefficient
    functor = 'Darcy_coefficient'
  []
  [populate_rho_mixture_var]
    type = FunctorAux
    variable = rho_mixture_var
    functor = 'rho_mixture'
  []
  [populate_mu_mixture_var]
    type = FunctorAux
    variable = mu_mixture_var
    functor = 'mu_mixture'
  []
[]
[FluidProperties]
  [fp]
    type = IdealGasFluidProperties
  []
[]
[FunctorMaterials]
  [bubble_properties]
    type = GeneralFunctorFluidProps
    fp = 'fp'
    pressure = 'pressure'
    T_fluid = 300.0
    speed = 1.0
    characteristic_length = 1.0
    porosity = 1.0
    output_properties = 'rho'
    outputs = 'out'
  []
  [populate_u_slip]
    type = WCNSFV2PSlipVelocityFunctorMaterial
    slip_velocity_name = 'vel_slip_x'
    momentum_component = 'x'
    u = 'vel_x'
    v = 'vel_y'
    rho = ${rho}
    mu = 'mu_mixture'
    rho_d = ${rho_d}
    particle_diameter = ${dp}
    linear_coef_name = 'Darcy_coefficient'
  []
  [populate_v_slip]
    type = WCNSFV2PSlipVelocityFunctorMaterial
    slip_velocity_name = 'vel_slip_y'
    momentum_component = 'y'
    u = 'vel_x'
    v = 'vel_y'
    rho = ${rho}
    mu = 'mu_mixture'
    rho_d = ${rho_d}
    particle_diameter = ${dp}
    linear_coef_name = 'Darcy_coefficient'
  []
  [compute_phase_1]
    type = ADParsedFunctorMaterial
    property_name = phase_1
    functor_names = 'phase_2'
    expression = '1 - phase_2'
  []
  [CD]
    type = NSFVDispersePhaseDragFunctorMaterial
    rho = 'rho_mixture'
    mu = mu_mixture
    u = 'vel_x'
    v = 'vel_y'
    particle_diameter = ${dp}
  []
  [mixing_material]
    type = NSFVMixtureFunctorMaterial
    phase_2_names = '${rho} ${mu}'
    phase_1_names = 'rho ${mu_d}'
    prop_names = 'rho_mixture mu_mixture'
    phase_1_fraction = 'phase_2'
  []
[]
[Executioner]
  type = Steady
  solve_type = 'NEWTON'
  nl_rel_tol = 1e-10
  line_search = 'none'
[]
[Debug]
  show_var_residual_norms = true
[]
[Preconditioning]
  [SMP]
    type = SMP
    full = true
    petsc_options_iname = '-pc_type -pc_factor_shift_type'
    petsc_options_value = 'lu       NONZERO'
  []
[]
[Outputs]
  [out]
    type = Exodus
  []
[]
[Postprocessors]
  [Re]
    type = ParsedPostprocessor
    expression = '${rho} * ${l} * ${U}'
    pp_names = ''
  []
  [rho_outlet]
    type = SideAverageValue
    boundary = 'right'
    variable = 'rho_mixture_var'
  []
[]
(modules/thermal_hydraulics/test/tests/ics/flow_model_gas_mix_ic/flow_model_gas_mix_ic.i)
mass_fraction = 0.4
pressure = 1e5
temperature = 300
velocity = 10
area = 0.2
[GlobalParams]
  fluid_properties = mixture_fp
  mass_fraction = mass_frac_fn
  pressure = pressure_fn
  temperature = temperature_fn
  velocity = velocity_fn
  area = A
[]
[Mesh]
  type = GeneratedMesh
  dim = 1
  nx = 5
[]
[FluidProperties]
  [fp1]
    type = IdealGasFluidProperties
    gamma = 1.4
    molar_mass = 0.029
  []
  [fp2]
    type = IdealGasFluidProperties
    gamma = 1.5
    molar_mass = 0.04
  []
  [mixture_fp]
    type = IdealGasMixtureFluidProperties
    component_fluid_properties = 'fp1 fp2'
  []
[]
[Functions]
  [mass_frac_fn]
    type = ConstantFunction
    value = ${mass_fraction}
  []
  [pressure_fn]
    type = ConstantFunction
    value = ${pressure}
  []
  [temperature_fn]
    type = ConstantFunction
    value = ${temperature}
  []
  [velocity_fn]
    type = ConstantFunction
    value = ${velocity}
  []
[]
[AuxVariables]
  [A]
    initial_condition = ${area}
  []
  [rho]
  []
  [rhoEA]
  []
[]
[ICs]
  [rho_ic]
    type = FlowModelGasMixIC
    variable = rho
    quantity = rho
  []
  [rhoEA_ic]
    type = FlowModelGasMixIC
    variable = rhoEA
    quantity = rhoEA
  []
[]
[Postprocessors]
  [rho]
    type = AverageNodalVariableValue
    variable = rho
    execute_on = 'INITIAL'
  []
  [rhoEA]
    type = AverageNodalVariableValue
    variable = rhoEA
    execute_on = 'INITIAL'
  []
[]
[Problem]
  solve = false
[]
[Executioner]
  type = Steady
[]
[Outputs]
  csv = true
  execute_on = 'INITIAL'
[]
(modules/thermal_hydraulics/test/tests/components/heat_transfer_from_specified_temperature_1phase/err.no_phf.i)
[FluidProperties]
  [fp]
    type = IdealGasFluidProperties
  []
[]
[Closures]
  [simple_closures]
    type = Closures1PhaseSimple
  []
[]
[SolidProperties]
  [mat]
    type = ThermalFunctionSolidProperties
    k = 1
    cp = 2
    rho = 3
  []
[]
[Components]
  [fch1]
    type = FlowChannel1Phase
    position = '0 0 0'
    orientation = '0 1 0'
    length = 1
    n_elems = 2
    A = 1
    closures = simple_closures
    fp = fp
    f = 0.01
    initial_p = 1e5
    initial_T = 300
    initial_vel = 0
  []
  [hs]
    type = HeatStructureCylindrical
    position = '0 0 0'
    orientation = '1 0 0'
    length = 1
    n_elems = 2
    names = 'blk'
    widths = '0.1'
    n_part_elems = '1'
    solid_properties = 'mat'
    solid_properties_T_ref = '300'
    initial_T = 300
  []
  [hx]
    type = HeatTransferFromHeatStructure1Phase
    hs = hs
    hs_side = START
    flow_channel = fch1
    Hw = 0
  []
  [inlet]
    type = InletMassFlowRateTemperature1Phase
    input = 'fch1:in'
    m_dot = 1
    T = 300
  []
  [outlet]
    type = Outlet1Phase
    input = 'fch1:out'
    p = 1e5
  []
[]
[Preconditioning]
  [SMP_PJFNK]
    type = SMP
    full = true
  []
[]
[Executioner]
  type = Transient
  scheme = 'bdf2'
  start_time = 0
  dt = 0.1
  num_steps = 1
[]
(modules/thermal_hydraulics/test/tests/misc/coupling_mD_flow/thm_non_overlapping.i)
T_in = 523.0
mdot = 10
pout = 7e6
[GlobalParams]
  initial_p = ${pout}
  initial_vel = 1
  initial_T = ${T_in}
  gravity_vector = '0 0 0'
  closures = simple_closures
  n_elems = 5
  scaling_factor_1phase = '1 1e-2 1e-5'
  f = 1
[]
[FluidProperties]
  [fp]
    type = IdealGasFluidProperties
    gamma = 1.66
    molar_mass = 0.004
  []
[]
[Closures]
  [simple_closures]
    type = Closures1PhaseSimple
  []
[]
[Components]
  [inlet_bc]
    type = InletMassFlowRateTemperature1Phase
    input = 'inlet:in'
    m_dot = ${mdot}
    T = ${T_in}
  []
  [inlet]
    type = FlowChannel1Phase
    fp = fp
    position = '0 0 11'
    orientation = '0 0 -1'
    length = 1
    A = 1
  []
  [inlet_plenum]
    type = VolumeJunction1Phase
    position = '0 0 10'
    initial_vel_x = 0
    initial_vel_y = 0
    initial_vel_z = 1
    connections = 'inlet:out bypass:in core_top:in'
    volume = 1
  []
  [bypass]
    type = FlowChannel1Phase
    fp = fp
    position = '2 0 10'
    orientation = '0 0 -1'
    length = 10
    A = 0.01
  []
  [core_top]
    type = FlowChannel1Phase
    fp = fp
    position = '0 0 10'
    orientation = '0 0 -1'
    length = 0.1
    A = 9
  []
  [core_top_bc]
    type = Outlet1Phase
    p = ${pout}
    input = 'core_top:out'
  []
  [core_bottom_bc]
    type = InletMassFlowRateTemperature1Phase
    input = 'core_bottom:in'
    m_dot = ${mdot}
    T = ${T_in}
  []
  [core_bottom]
    type = FlowChannel1Phase
    fp = fp
    position = '0 0 0.1'
    orientation = '0 0 -1'
    length = 0.1
    A = 9
  []
  [outlet_plenum]
    type = VolumeJunction1Phase
    position = '0 0 0'
    initial_vel_x = 1
    initial_vel_y = 0
    initial_vel_z = 1
    connections = 'bypass:out core_bottom:out outlet:in'
    volume = 1
  []
  [outlet]
    type = FlowChannel1Phase
    fp = fp
    position = '0 0 0'
    orientation = '0 0 -1'
    length = 1
    A = 1
  []
  [outlet_bc]
    type = Outlet1Phase
    p = ${pout}
    input = 'outlet:out'
  []
[]
[ControlLogic]
  [set_core_inlet_pressure]
    type = SetComponentRealValueControl
    component = core_top_bc
    parameter = p
    value = core_inlet_pressure
  []
  [set_core_outlet_mdot]
    type = SetComponentRealValueControl
    component = core_bottom_bc
    parameter = m_dot
    value = core_outlet_mdot
  []
  [set_core_outlet_temperature]
    type = SetComponentRealValueControl
    component = core_bottom_bc
    parameter = T
    value = core_outlet_temperature
  []
[]
[Postprocessors]
  [core_inlet_pressure]
    type = Receiver
    default = ${pout}
  []
  [core_outlet_mdot]
    type = Receiver
    default = ${mdot}
  []
  [core_outlet_temperature]
    type = Receiver
    default = ${T_in}
  []
  [core_outlet_pressure]
    type = SideAverageValue
    variable = p
    boundary = 'core_bottom:in'
    execute_on = 'INITIAL LINEAR TIMESTEP_END'
  []
  [core_inlet_mdot]
    type = SideAverageValue
    variable = rhouA
    boundary = 'core_top:out'
    execute_on = 'INITIAL LINEAR TIMESTEP_END'
  []
  [core_inlet_temperature]
    type = SideAverageValue
    variable = T
    boundary = 'core_top:out'
    execute_on = 'INITIAL LINEAR TIMESTEP_END'
  []
  [bypass_inlet_pressure]
    type = SideAverageValue
    variable = p
    boundary = 'bypass:in'
  []
  [bypass_outlet_pressure]
    type = SideAverageValue
    variable = p
    boundary = 'bypass:out'
  []
  [bypass_pressure_drop]
    type = DifferencePostprocessor
    value1 = bypass_inlet_pressure
    value2 = bypass_outlet_pressure
  []
  [bypass_mdot]
    type = SideAverageValue
    variable = rhouA
    boundary = 'bypass:out'
    execute_on = 'INITIAL LINEAR TIMESTEP_END'
  []
  [inlet_mdot]
    type = SideAverageValue
    variable = rhouA
    boundary = 'inlet:in'
    execute_on = 'INITIAL LINEAR TIMESTEP_END'
  []
  [outlet_mdot]
    type = SideAverageValue
    variable = rhouA
    boundary = 'outlet:out'
    execute_on = 'INITIAL LINEAR TIMESTEP_END'
  []
[]
[Preconditioning]
  [smp]
    type = SMP
    full = true
  []
[]
[Executioner]
  type = Transient
  timestep_tolerance = 1e-6
  start_time = 0
  end_time = 100
  dt = 0.01
  line_search = l2
  nl_rel_tol = 1e-6
  nl_abs_tol = 1e-4
  nl_max_its = 25
  l_tol = 1e-3
  l_max_its = 20
  petsc_options = '-snes_converged_reason'
  petsc_options_iname = '-pc_type'
  petsc_options_value = ' lu     '
[]
[Outputs]
  exodus = true
[]
(modules/thermal_hydraulics/test/tests/postprocessors/heat_rate_convection_1phase/heat_rate_convection_1phase.i)
# Gold value should be the following:
#  htc * (T_wall - T) * P_hf * L
T_wall = 350
T = 300
htc = 50
P_hf = 0.3
L = 2.0
[GlobalParams]
  gravity_vector = '0 0 0'
  closures = simple_closures
[]
[FluidProperties]
  [fp]
    type = IdealGasFluidProperties
  []
[]
[Closures]
  [simple_closures]
    type = Closures1PhaseSimple
  []
[]
[Components]
  [left_wall]
    type = SolidWall1Phase
    input = 'pipe:in'
  []
  [pipe]
    type = FlowChannel1Phase
    fp = fp
    position = '0 0 0'
    orientation = '1 0 0'
    length = ${L}
    n_elems = 10
    A = 1
    f = 0.
    initial_p = 1e6
    initial_T = ${T}
    initial_vel = 0
  []
  [right_wall]
    type = SolidWall1Phase
    input = 'pipe:out'
  []
  [heat_flux]
    type = HeatTransferFromSpecifiedTemperature1Phase
    flow_channel = pipe
    Hw = ${htc}
    T_wall = ${T_wall}
    P_hf = ${P_hf}
  []
[]
[Preconditioning]
  [pc]
    type = SMP
    full = true
  []
[]
[Executioner]
  type = Transient
  scheme = bdf2
  start_time = 0.0
  dt = 0.01
  num_steps = 0
  abort_on_solve_fail = true
  solve_type = 'PJFNK'
  line_search = 'basic'
  nl_rel_tol = 1e-6
  nl_abs_tol = 1e-6
  nl_max_its = 10
  l_tol = 1e-3
  l_max_its = 10
[]
[Postprocessors]
  [heat_rate]
    type = ADHeatRateConvection1Phase
    P_hf = P_hf
    execute_on = 'INITIAL'
  []
[]
[Outputs]
  csv = true
[]
(modules/thermal_hydraulics/test/tests/components/heat_transfer_from_heat_structure_1phase/err.1phase.i)
[GlobalParams]
  initial_p = 1e5
  initial_vel = 0
  initial_T = 300
  closures = simple_closures
[]
[FluidProperties]
  [fp]
    type = IdealGasFluidProperties
  []
[]
[Closures]
  [simple_closures]
    type = Closures1PhaseSimple
  []
[]
[SolidProperties]
  [fuel-mat]
    type = ThermalFunctionSolidProperties
    k = 2.5
    cp = 300.
    rho = 1.032e4
  []
[]
[Components]
  [pipe]
    type = FlowChannel1Phase
    position = '0 0.1 0'
    orientation = '0 0 1'
    length = 4
    n_elems = 2
    A = 8.78882e-5
    D_h = 0.01179
    f = 0.01
    fp = fp
  []
  [hs]
    type = HeatStructureCylindrical
    position = '0 0 0'
    orientation = '0 0 1'
    length = 4
    n_elems = 2
    names = 'fuel'
    widths = '0.1'
    n_part_elems = '1'
    solid_properties = 'fuel-mat'
    solid_properties_T_ref = '300'
    initial_T = 300
  []
  [hx]
    type = HeatTransferFromHeatStructure1Phase
    hs = hs
    hs_side = outer
    flow_channel = pipe
    P_hf = 0.029832559676
  []
  [inlet]
    type = InletStagnationPressureTemperature1Phase
    input = 'pipe:in'
    p0 = 1e5
    T0 = 300
  []
  [outlet]
    type = Outlet1Phase
    input = 'pipe:out'
    p = 1e5
  []
[]
[Preconditioning]
  [pc]
    type = SMP
    full = true
  []
[]
[Executioner]
  type = Transient
  dt = 1.e-5
  solve_type = 'NEWTON'
  num_steps = 1
  abort_on_solve_fail = true
[]
(modules/thermal_hydraulics/test/tests/problems/pressure_drop/pressure_drop_with_junction.i)
nelem = 50
friction_factor = 1e4
area = 0.176752
mfr_final = 1.0
p_out = 7e6
T_in = 300
ramp_time = 5.0
[GlobalParams]
  gravity_vector = '0 0 0'
  initial_T = ${T_in}
  initial_p = ${p_out}
  initial_vel = 0
  closures = closures
  rdg_slope_reconstruction = full
  scaling_factor_1phase = '1 1 1e-5'
[]
[FluidProperties]
  [h2]
    type = IdealGasFluidProperties
    gamma = 1.3066
    molar_mass = 2.016e-3
    k = 0.437
    mu = 3e-5
  []
[]
[Closures]
  [closures]
    type = Closures1PhaseSimple
  []
[]
[Components]
  [bc_inlet]
    type = InletMassFlowRateTemperature1Phase
    input = 'ch_1:in'
    m_dot = 0 # This value is controlled by 'mfr_ctrl'
    T = ${T_in}
  []
  [ch_1]
    type = FlowChannel1Phase
    position = '0 0 0'
    orientation = '1 0 0'
    length = 0.5
    n_elems = ${nelem}
    A = ${area}
    f = ${friction_factor}
    fp = h2
  []
  [junction]
    type = JunctionOneToOne1Phase
    connections = 'ch_1:out ch_2:in'
  []
  [ch_2]
    type = FlowChannel1Phase
    position = '0.5 0 0'
    orientation = '1 0 0'
    length = 0.5
    n_elems = ${nelem}
    A = ${area}
    f = ${friction_factor}
    fp = h2
  []
  [bc_outlet]
    type = Outlet1Phase
    input = 'ch_2:out'
    p = ${p_out}
  []
[]
[Functions]
  [mfr_fn]
    type = PiecewiseLinear
    x = '0 ${ramp_time}'
    y = '0 ${mfr_final}'
  []
[]
[ControlLogic]
  [mfr_cntrl]
    type = TimeFunctionComponentControl
    component = bc_inlet
    parameter = m_dot
    function = mfr_fn
  []
[]
[Preconditioning]
  [pc]
    type = SMP
    full = true
  []
[]
[VectorPostprocessors]
  [pressure_vpp]
    type = ADSampler1DReal
    block = 'ch_1 ch_2'
    property = 'p'
    sort_by = x
    execute_on = 'FINAL'
  []
[]
[Executioner]
  type = Transient
  scheme = bdf2
  start_time = 0
  end_time = 50
  dt = 1
  steady_state_detection = true
  steady_state_start_time = ${ramp_time}
  petsc_options_iname = '-pc_type'
  petsc_options_value = ' lu     '
  nl_rel_tol = 1e-6
  nl_abs_tol = 1e-6
  nl_max_its = 15
  l_tol = 1e-4
  l_max_its = 10
[]
[Outputs]
  [csv]
    type = CSV
    create_final_symlink = true
    execute_on = 'FINAL'
  []
[]
(modules/thermal_hydraulics/tutorials/single_phase_flow/02_core.i)
T_in = 300. # K
m_dot_in = 1e-2 # kg/s
press = 10e5 # Pa
# core parameters
core_length = 1. # m
core_n_elems = 25
core_dia = '${units 2. cm -> m}'
core_pitch = '${units 8.7 cm -> m}'
A_core = '${fparse core_pitch^2 - 0.25 *pi * core_dia^2}'
P_wet_core = '${fparse 4*core_pitch + pi * core_dia}'
Dh_core = '${fparse 4 * A_core / P_wet_core}'
tot_power = 2000 # W
[GlobalParams]
  initial_p = ${press}
  initial_vel = 0.0001
  initial_T = ${T_in}
  gravity_vector = '0 0 0'
  rdg_slope_reconstruction = minmod
  scaling_factor_1phase = '1 1e-2 1e-4'
  closures = thm_closures
  fp = he
[]
[FluidProperties]
  [he]
    type = IdealGasFluidProperties
    molar_mass = 4e-3
    gamma = 1.67
    k = 0.2556
    mu = 3.22639e-5
  []
[]
[Closures]
  [thm_closures]
    type = Closures1PhaseTHM
  []
[]
[SolidProperties]
  [steel]
    type = ThermalFunctionSolidProperties
    rho = 8050
    k = 45
    cp = 466
  []
[]
[Components]
  [total_power]
    type = TotalPower
    power = ${tot_power}
  []
  [inlet]
    type = InletMassFlowRateTemperature1Phase
    input = 'core_chan:in'
    m_dot = ${m_dot_in}
    T = ${T_in}
  []
  [core_chan]
    type = FlowChannel1Phase
    position = '0 0 0'
    orientation = '0 0 1'
    length = ${core_length}
    n_elems = ${core_n_elems}
    roughness = .0001
    A = '${A_core}'
    D_h = ${Dh_core}
  []
  [core_hs]
    type = HeatStructureCylindrical
    position = '0 0 0'
    orientation = '0 0 1'
    length = ${core_length}
    n_elems = ${core_n_elems}
    names = 'block'
    widths = '${fparse core_dia / 2.}'
    solid_properties = 'steel'
    solid_properties_T_ref = '300'
    n_part_elems = 3
  []
  [core_heating]
    type = HeatSourceFromTotalPower
    hs = core_hs
    regions = block
    power = total_power
  []
  [core_ht]
    type = HeatTransferFromHeatStructure1Phase
    flow_channel = core_chan
    hs = core_hs
    hs_side = outer
    P_hf = '${fparse pi * core_dia}'
  []
  [outlet]
    type = Outlet1Phase
    input = 'core_chan:out'
    p = ${press}
  []
[]
[Postprocessors]
  [power_to_coolant]
    type = ADHeatRateConvection1Phase
    block = core_chan
    P_hf = '${fparse pi *core_dia}'
  []
  [core_T_out]
    type = SideAverageValue
    boundary = core_chan:out
    variable = T
  []
  [core_p_in]
    type = SideAverageValue
    boundary = core_chan:in
    variable = p
  []
  [core_p_out]
    type = SideAverageValue
    boundary = core_chan:out
    variable = p
  []
  [core_delta_p]
    type = ParsedPostprocessor
    pp_names = 'core_p_in core_p_out'
    expression = 'core_p_in - core_p_out'
  []
[]
[Preconditioning]
  [pc]
    type = SMP
    full = true
  []
[]
[Executioner]
  type = Transient
  start_time = 0
  [TimeStepper]
    type = IterationAdaptiveDT
    dt = 10
  []
  end_time = 5000
  line_search = basic
  solve_type = NEWTON
  petsc_options_iname = '-pc_type'
  petsc_options_value = 'lu'
  nl_rel_tol = 1e-8
  nl_abs_tol = 1e-8
  nl_max_its = 25
[]
[Outputs]
  exodus = true
  [console]
    type = Console
    max_rows = 1
    outlier_variable_norms = false
  []
  print_linear_residuals = false
[]
(modules/navier_stokes/test/tests/finite_volume/cns/mms/1d-with-bcs/regular-straight-channel.i)
[GlobalParams]
  fp = fp
[]
[Mesh]
  [./gen_mesh]
    type = GeneratedMeshGenerator
    dim = 1
    xmax = 1.5
    nx = 15
  [../]
[]
[FluidProperties]
  [fp]
    type = IdealGasFluidProperties
  []
[]
[Variables]
  [rho]
    type = MooseVariableFVReal
    initial_condition = 1.28969
    scaling = 1e3
  []
  [rho_u]
    type = MooseVariableFVReal
    initial_condition = 1.28969
  []
  [rho_et]
    type = MooseVariableFVReal
    initial_condition = 2.525e5
    scaling = 1e-2
  []
[]
[FVKernels]
  [mass_advection]
    type = CNSFVMassHLLC
    variable = rho
    fp = fp
  []
  [momentum_x_advection]
    type = CNSFVMomentumHLLC
    variable = rho_u
    momentum_component = x
    fp = fp
  []
  [drag]
    type = FVReaction
    variable = rho_u
    rate = 1000
  []
  [fluid_energy_advection]
    type = CNSFVFluidEnergyHLLC
    variable = rho_et
    fp = fp
  []
[]
[FVBCs]
  [mass_in]
    variable = rho
    type = CNSFVHLLCSpecifiedMassFluxAndTemperatureMassBC
    boundary = left
    temperature = 273.15
    rhou = 1.28969
  []
  [momentum_in]
    variable = rho_u
    type = CNSFVHLLCSpecifiedMassFluxAndTemperatureMomentumBC
    boundary = left
    temperature = 273.15
    rhou = 1.28969
    momentum_component = 'x'
  []
  [energy_in]
    variable = rho_et
    type = CNSFVHLLCSpecifiedMassFluxAndTemperatureFluidEnergyBC
    boundary = left
    temperature = 273.15
    rhou = 1.28969
  []
  [mass_out]
    variable = rho
    type = CNSFVHLLCSpecifiedPressureMassBC
    boundary = right
    pressure = 1.01e5
  []
  [momentum_out]
    variable = rho_u
    type = CNSFVHLLCSpecifiedPressureMomentumBC
    boundary = right
    pressure = 1.01e5
    momentum_component = 'x'
  []
  [energy_out]
    variable = rho_et
    type = CNSFVHLLCSpecifiedPressureFluidEnergyBC
    boundary = right
    pressure = 1.01e5
  []
[]
[Materials]
  [var_mat]
    type = ConservedVarValuesMaterial
    rho = rho
    rhou = rho_u
    rho_et = rho_et
  []
[]
[Executioner]
  solve_type = NEWTON
  type = Steady
  petsc_options_iname = '-pc_type'
  petsc_options_value = 'lu'
  nl_max_its = 50
  line_search = none
[]
[Outputs]
  exodus = true
  csv = true
[]
[Debug]
  show_var_residual_norms = true
[]
(modules/fluid_properties/test/tests/fluid_properties/ideal_gas_mixture/ideal_gas_mixture.i)
[Mesh]
  type = GeneratedMesh
  dim = 1
  nx = 1
[]
[FluidProperties]
  [fp1]
    type = IdealGasFluidProperties
  []
  [fp2]
    type = StiffenedGasFluidProperties
    gamma = 1.4
    cv = 1000
    p_inf = 0
    q = 0
  []
  [fpmix]
    type = IdealGasMixtureFluidProperties
    component_fluid_properties = 'fp1 fp2'
  []
[]
[Problem]
  solve = false
[]
[Executioner]
  type = Steady
[]
(modules/navier_stokes/test/tests/finite_volume/cns/straight_channel_porosity_step/rotated-2d-bkt-function-porosity.i)
p_initial=1.01e5
T=273.15
# u refers to the superficial velocity
u_in=1
user_limiter='upwind'
friction_coeff=10
[GlobalParams]
  fp = fp
  two_term_boundary_expansion = true
  limiter = ${user_limiter}
[]
[Mesh]
  [cartesian]
    type = GeneratedMeshGenerator
    dim = 2
    xmin = 0
    xmax = 1
    nx = 3
    ymin = 0
    ymax = 18
    ny = 90
  []
[]
[FluidProperties]
  [fp]
    type = IdealGasFluidProperties
  []
[]
[Problem]
  fv_bcs_integrity_check = false
[]
[Variables]
  [pressure]
    type = MooseVariableFVReal
    initial_condition = ${p_initial}
  []
  [sup_vel_x]
    type = MooseVariableFVReal
    initial_condition = 1e-15
    scaling = 1e-2
  []
  [sup_vel_y]
    type = MooseVariableFVReal
    initial_condition = 1e-15
    scaling = 1e-2
  []
  [T_fluid]
    type = MooseVariableFVReal
    initial_condition = ${T}
    scaling = 1e-5
  []
[]
[AuxVariables]
  [vel_y]
    type = MooseVariableFVReal
  []
  [sup_mom_y]
    type = MooseVariableFVReal
  []
  [rho]
    type = MooseVariableFVReal
  []
  [eps]
    type = MooseVariableFVReal
  []
[]
[AuxKernels]
  [vel_y]
    type = ADMaterialRealAux
    variable = vel_y
    property = vel_y
    execute_on = 'timestep_end'
  []
  [sup_mom_y]
    type = ADMaterialRealAux
    variable = sup_mom_y
    property = superficial_rhov
    execute_on = 'timestep_end'
  []
  [rho]
    type = ADMaterialRealAux
    variable = rho
    property = rho
    execute_on = 'timestep_end'
  []
  [eps]
    type = MaterialRealAux
    variable = eps
    property = porosity
    execute_on = 'timestep_end'
  []
[]
[FVKernels]
  [mass_time]
    type = FVMatPropTimeKernel
    mat_prop_time_derivative = 'dsuperficial_rho_dt'
    variable = pressure
  []
  [mass_advection]
    type = PCNSFVKT
    variable = pressure
    eqn = "mass"
  []
  [momentum_time]
    type = FVMatPropTimeKernel
    mat_prop_time_derivative = 'dsuperficial_rhou_dt'
    variable = sup_vel_x
  []
  [momentum_advection]
    type = PCNSFVKT
    variable = sup_vel_x
    eqn = "momentum"
    momentum_component = 'x'
  []
  [eps_grad]
    type = PNSFVPGradEpsilon
    variable = sup_vel_x
    momentum_component = 'x'
    epsilon_function = 'eps'
  []
  [drag]
    type = PCNSFVMomentumFriction
    variable = sup_vel_x
    momentum_component = 'x'
    Darcy_name = 'cl'
    momentum_name = superficial_rhou
  []
  [momentum_time_y]
    type = FVMatPropTimeKernel
    mat_prop_time_derivative = 'dsuperficial_rhov_dt'
    variable = sup_vel_y
  []
  [momentum_advection_y]
    type = PCNSFVKT
    variable = sup_vel_y
    eqn = "momentum"
    momentum_component = 'y'
  []
  [eps_grad_y]
    type = PNSFVPGradEpsilon
    variable = sup_vel_y
    momentum_component = 'y'
    epsilon_function = 'eps'
  []
  [drag_y]
    type = PCNSFVMomentumFriction
    variable = sup_vel_y
    momentum_component = 'y'
    Darcy_name = 'cl'
    momentum_name = superficial_rhov
  []
  [energy_time]
    type = FVMatPropTimeKernel
    mat_prop_time_derivative = 'dsuperficial_rho_et_dt'
    variable = T_fluid
  []
  [energy_advection]
    type = PCNSFVKT
    variable = T_fluid
    eqn = "energy"
  []
[]
[FVBCs]
  [rho_bottom]
    type = PCNSFVStrongBC
    boundary = 'bottom'
    variable = pressure
    superficial_velocity = 'ud_in'
    T_fluid = ${T}
    eqn = 'mass'
  []
  [rhou_bottom]
    type = PCNSFVStrongBC
    boundary = 'bottom'
    variable = sup_vel_x
    superficial_velocity = 'ud_in'
    T_fluid = ${T}
    eqn = 'momentum'
    momentum_component = 'x'
  []
  [rhov_bottom]
    type = PCNSFVStrongBC
    boundary = 'bottom'
    variable = sup_vel_y
    superficial_velocity = 'ud_in'
    T_fluid = ${T}
    eqn = 'momentum'
    momentum_component = 'y'
  []
  [rho_et_bottom]
    type = PCNSFVStrongBC
    boundary = 'bottom'
    variable = T_fluid
    superficial_velocity = 'ud_in'
    T_fluid = ${T}
    eqn = 'energy'
  []
  [rho_top]
    type = PCNSFVStrongBC
    boundary = 'top'
    variable = pressure
    pressure = ${p_initial}
    eqn = 'mass'
  []
  [rhou_top]
    type = PCNSFVStrongBC
    boundary = 'top'
    variable = sup_vel_x
    pressure = ${p_initial}
    eqn = 'momentum'
    momentum_component = 'x'
  []
  [rhov_top]
    type = PCNSFVStrongBC
    boundary = 'top'
    variable = sup_vel_y
    pressure = ${p_initial}
    eqn = 'momentum'
    momentum_component = 'y'
  []
  [rho_et_top]
    type = PCNSFVStrongBC
    boundary = 'top'
    variable = T_fluid
    pressure = ${p_initial}
    eqn = 'energy'
  []
  [wall_pressure_x]
    type = PCNSFVImplicitMomentumPressureBC
    momentum_component = 'x'
    boundary = 'left right'
    variable = sup_vel_x
  []
  [wall_pressure_y]
    type = PCNSFVImplicitMomentumPressureBC
    momentum_component = 'y'
    boundary = 'left right'
    variable = sup_vel_y
  []
  # Use these to help create more accurate cell centered gradients for cells adjacent to boundaries
  [T_bottom]
    type = FVDirichletBC
    variable = T_fluid
    value = ${T}
    boundary = 'bottom'
  []
  [sup_vel_x_bottom_and_walls]
    type = FVDirichletBC
    variable = sup_vel_x
    value = 0
    boundary = 'bottom left right'
  []
  [sup_vel_y_walls]
    type = FVDirichletBC
    variable = sup_vel_y
    value = 0
    boundary = 'left right'
  []
  [sup_vel_y_bottom]
    type = FVDirichletBC
    variable = sup_vel_y
    value = ${u_in}
    boundary = 'bottom'
  []
  [p_top]
    type = FVDirichletBC
    variable = pressure
    value = ${p_initial}
    boundary = 'top'
  []
[]
[Functions]
  [ud_in]
    type = ParsedVectorFunction
    expression_x = '0'
    expression_y = '${u_in}'
  []
  [eps]
    type = ParsedFunction
    expression = 'if(y < 2.8, 1,
             if(y < 3.2, 1 - .5 / .4 * (y - 2.8),
             if(y < 6.8, .5,
             if(y < 7.2, .5 - .25 / .4 * (y - 6.8),
             if(y < 10.8, .25,
             if(y < 11.2, .25 + .25 / .4 * (y - 10.8),
             if(y < 14.8, .5,
             if(y < 15.2, .5 + .5 / .4 * (y - 14.8),
                1))))))))'
  []
[]
[Materials]
  [var_mat]
    type = PorousPrimitiveVarMaterial
    pressure = pressure
    T_fluid = T_fluid
    superficial_vel_x = sup_vel_x
    superficial_vel_y = sup_vel_y
    fp = fp
    porosity = porosity
  []
  [porosity]
    type = GenericFunctionMaterial
    prop_names = 'porosity'
    prop_values = 'eps'
  []
  [ad_generic]
    type = ADGenericConstantVectorMaterial
    prop_names = 'cl'
    prop_values = '${friction_coeff} ${friction_coeff} ${friction_coeff}'
  []
[]
[Preconditioning]
  [smp]
    type = SMP
    full = true
  []
[]
[Executioner]
  solve_type = NEWTON
  line_search = 'bt'
  type = Transient
  nl_max_its = 20
  [TimeStepper]
    type = IterationAdaptiveDT
    dt = 5e-5
    optimal_iterations = 6
    growth_factor = 1.2
  []
  num_steps = 10000
  end_time = 500
  nl_abs_tol = 1e-7
  petsc_options_iname = '-pc_type -pc_factor_mat_solver_type'
  petsc_options_value = 'lu       mumps'
[]
[Outputs]
  [out]
    type = Exodus
    execute_on = 'final'
  []
  checkpoint = true
[]
[Debug]
  show_var_residual_norms = true
[]
(modules/navier_stokes/test/tests/finite_volume/two_phase/mixture_interface_area_model/pressure_driven_growth_transient.i)
###############################################################################
# Validation test based on Hibiki and Ishii experiment [1] reported in Figure 3
# [1] Hibiki, T., & Ishii, M. (2000). One-group interfacial area transport of bubbly flows in vertical round tubes.
# International Journal of Heat and Mass Transfer, 43(15), 2711-2726.
###############################################################################
mu = 1.0
rho = 1000.0
mu_d = 1.0
rho_d = 1.0
l = ${fparse 50.8/1000.0}
U = 0.491230114
dp = 0.001
inlet_phase_2 = 0.049
advected_interp_method = 'upwind'
velocity_interp_method = 'rc'
mass_exchange_coeff = 0.0
inlet_interface_area = ${fparse 6.0*inlet_phase_2/dp}
outlet_pressure = 1e6
[GlobalParams]
  rhie_chow_user_object = 'rc'
  density_interp_method = 'average'
  mu_interp_method = 'average'
[]
[Problem]
  identify_variable_groups_in_nl = false
[]
[UserObjects]
  [rc]
    type = INSFVRhieChowInterpolator
    u = vel_x
    v = vel_y
    pressure = pressure
  []
[]
[Mesh]
  coord_type = 'RZ'
  rz_coord_axis = 'X'
  [gen]
    type = GeneratedMeshGenerator
    dim = 2
    xmin = 0
    xmax = '${fparse l * 60}'
    ymin = 0
    ymax = '${fparse l / 2}'
    nx = 20
    ny = 5
  []
  uniform_refine = 0
[]
[Variables]
  [vel_x]
    type = INSFVVelocityVariable
    initial_condition = 0
  []
  [vel_y]
    type = INSFVVelocityVariable
    initial_condition = 0
  []
  [pressure]
    type = INSFVPressureVariable
  []
  [phase_2]
    type = INSFVScalarFieldVariable
    initial_condition = ${inlet_phase_2}
  []
  [interface_area]
    type = INSFVScalarFieldVariable
    initial_condition = ${inlet_interface_area}
  []
[]
[FVKernels]
  [mass]
    type = INSFVMassAdvection
    variable = pressure
    advected_interp_method = ${advected_interp_method}
    velocity_interp_method = ${velocity_interp_method}
    rho = ${rho}
  []
  [u_time]
    type = INSFVMomentumTimeDerivative
    variable = vel_x
    rho = 'rho_mixture'
    momentum_component = 'x'
  []
  [u_advection]
    type = INSFVMomentumAdvection
    variable = vel_x
    advected_interp_method = ${advected_interp_method}
    velocity_interp_method = ${velocity_interp_method}
    rho = 'rho_mixture'
    momentum_component = 'x'
  []
  [u_drift]
    type = WCNSFV2PMomentumDriftFlux
    variable = vel_x
    rho_d = ${rho_d}
    fd = 'rho_mixture_var'
    u_slip = 'vel_slip_x'
    v_slip = 'vel_slip_y'
    momentum_component = 'x'
  []
  [u_viscosity]
    type = INSFVMomentumDiffusion
    variable = vel_x
    mu = 'mu_mixture'
    limit_interpolation = true
    momentum_component = 'x'
  []
  [u_pressure]
    type = INSFVMomentumPressure
    variable = vel_x
    momentum_component = 'x'
    pressure = pressure
  []
  [v_time]
    type = INSFVMomentumTimeDerivative
    variable = vel_y
    rho = 'rho_mixture'
    momentum_component = 'y'
  []
  [v_advection]
    type = INSFVMomentumAdvection
    variable = vel_y
    advected_interp_method = ${advected_interp_method}
    velocity_interp_method = ${velocity_interp_method}
    rho = 'rho_mixture'
    momentum_component = 'y'
  []
  [v_drift]
    type = WCNSFV2PMomentumDriftFlux
    variable = vel_y
    rho_d = ${rho_d}
    fd = 'rho_mixture_var'
    u_slip = 'vel_slip_x'
    v_slip = 'vel_slip_y'
    momentum_component = 'y'
  []
  [v_viscosity]
    type = INSFVMomentumDiffusion
    variable = vel_y
    mu = 'mu_mixture'
    limit_interpolation = true
    momentum_component = 'y'
  []
  [v_pressure]
    type = INSFVMomentumPressure
    variable = vel_y
    momentum_component = 'y'
    pressure = pressure
  []
  [phase_2_time]
    type = FVFunctorTimeKernel
    variable = phase_2
    functor = phase_2
  []
  [phase_2_advection]
    type = INSFVScalarFieldAdvection
    variable = phase_2
    u_slip = 'vel_x'
    v_slip = 'vel_y'
    velocity_interp_method = ${velocity_interp_method}
    advected_interp_method = 'upwind'
  []
  [phase_2_diffusion]
    type = FVDiffusion
    variable = phase_2
    coeff = 1.0
  []
  [phase_2_src]
    type = NSFVMixturePhaseInterface
    variable = phase_2
    phase_coupled = phase_1
    alpha = ${mass_exchange_coeff}
  []
  [interface_area_time]
    type = FVFunctorTimeKernel
    variable = interface_area
    functor = interface_area
  []
  [interface_area_advection]
    type = INSFVScalarFieldAdvection
    variable = interface_area
    velocity_interp_method = ${velocity_interp_method}
    advected_interp_method = 'upwind'
  []
  [interface_area_diffusion]
    type = FVDiffusion
    variable = interface_area
    coeff = 0.1
  []
  [interface_area_source_sink]
    type = WCNSFV2PInterfaceAreaSourceSink
    variable = interface_area
    u = 'vel_x'
    v = 'vel_y'
    L = ${fparse l/2}
    rho = 'rho_mixture'
    rho_d = 'rho'
    pressure = 'pressure'
    k_c = '${fparse mass_exchange_coeff}'
    fd = 'phase_2'
    sigma = 1e-3
    cutoff_fraction = 0.0
  []
[]
[FVBCs]
  [inlet-u]
    type = INSFVInletVelocityBC
    boundary = 'left'
    variable = vel_x
    functor = '${U}'
  []
  [inlet-v]
    type = INSFVInletVelocityBC
    boundary = 'left'
    variable = vel_y
    functor = '0'
  []
  [walls-u]
    type = INSFVNoSlipWallBC
    boundary = 'top'
    variable = vel_x
    function = 0
  []
  [walls-v]
    type = INSFVNoSlipWallBC
    boundary = 'top'
    variable = vel_y
    function = 0
  []
  [outlet_p]
    type = INSFVOutletPressureBC
    boundary = 'right'
    variable = pressure
    function = '${outlet_pressure}'
  []
  [inlet_phase_2]
    type = FVDirichletBC
    boundary = 'left'
    variable = phase_2
    value = ${inlet_phase_2}
  []
  [inlet_interface_area]
    type = FVDirichletBC
    boundary = 'left'
    variable = interface_area
    value = ${inlet_interface_area}
  []
  [symmetry-u]
    type = PINSFVSymmetryVelocityBC
    boundary = 'bottom'
    variable = vel_x
    u = vel_x
    v = vel_y
    mu = 'mu_mixture'
    momentum_component = 'x'
  []
  [symmetry-v]
    type = PINSFVSymmetryVelocityBC
    boundary = 'bottom'
    variable = vel_y
    u = vel_x
    v = vel_y
    mu = 'mu_mixture'
    momentum_component = 'y'
  []
  [symmetry-p]
    type = INSFVSymmetryPressureBC
    boundary = 'bottom'
    variable = pressure
  []
  [symmetry-phase-2]
    type = INSFVSymmetryScalarBC
    boundary = 'bottom'
    variable = phase_2
  []
  [symmetry-interface-area]
    type = INSFVSymmetryScalarBC
    boundary = 'bottom'
    variable = interface_area
  []
[]
[AuxVariables]
  [drag_coefficient]
    type = MooseVariableFVReal
  []
  [rho_mixture_var]
    type = MooseVariableFVReal
  []
  [mu_mixture_var]
    type = MooseVariableFVReal
  []
[]
[AuxKernels]
  [populate_cd]
    type = FunctorAux
    variable = drag_coefficient
    functor = 'Darcy_coefficient'
  []
  [populate_rho_mixture_var]
    type = FunctorAux
    variable = rho_mixture_var
    functor = 'rho_mixture'
  []
  [populate_mu_mixture_var]
    type = FunctorAux
    variable = mu_mixture_var
    functor = 'mu_mixture'
  []
[]
[FluidProperties]
  [fp]
    type = IdealGasFluidProperties
  []
[]
[FunctorMaterials]
  [bubble_properties]
    type = GeneralFunctorFluidProps
    fp = 'fp'
    pressure = 'pressure'
    T_fluid = 300.0
    speed = 1.0
    characteristic_length = 1.0
    porosity = 1.0
    output_properties = 'rho'
    outputs = 'out'
  []
  [populate_u_slip]
    type = WCNSFV2PSlipVelocityFunctorMaterial
    slip_velocity_name = 'vel_slip_x'
    momentum_component = 'x'
    u = 'vel_x'
    v = 'vel_y'
    rho = ${rho}
    mu = 'mu_mixture'
    rho_d = ${rho_d}
    particle_diameter = ${dp}
    linear_coef_name = 'Darcy_coefficient'
  []
  [populate_v_slip]
    type = WCNSFV2PSlipVelocityFunctorMaterial
    slip_velocity_name = 'vel_slip_y'
    momentum_component = 'y'
    u = 'vel_x'
    v = 'vel_y'
    rho = ${rho}
    mu = 'mu_mixture'
    rho_d = ${rho_d}
    particle_diameter = ${dp}
    linear_coef_name = 'Darcy_coefficient'
  []
  [compute_phase_1]
    type = ADParsedFunctorMaterial
    property_name = phase_1
    functor_names = 'phase_2'
    expression = '1 - phase_2'
  []
  [CD]
    type = NSFVDispersePhaseDragFunctorMaterial
    rho = 'rho_mixture'
    mu = mu_mixture
    u = 'vel_x'
    v = 'vel_y'
    particle_diameter = ${dp}
  []
  [mixing_material]
    type = NSFVMixtureFunctorMaterial
    phase_2_names = '${rho} ${mu}'
    phase_1_names = 'rho ${mu_d}'
    prop_names = 'rho_mixture mu_mixture'
    phase_1_fraction = 'phase_2'
  []
[]
[Executioner]
  type = Transient
  solve_type = 'NEWTON'
  nl_abs_tol = 1e-7
  dt = 0.1
  end_time = 1.0
  nl_max_its = 10
  line_search = 'none'
[]
[Debug]
  show_var_residual_norms = true
[]
[Preconditioning]
  [SMP]
    type = SMP
    full = true
    petsc_options_iname = '-pc_type -pc_factor_shift_type'
    petsc_options_value = 'lu       NONZERO'
  []
[]
[Outputs]
  [out]
    type = Exodus
  []
[]
[Postprocessors]
  [Re]
    type = ParsedPostprocessor
    expression = '${rho} * ${l} * ${U}'
    pp_names = ''
  []
  [rho_outlet]
    type = SideAverageValue
    boundary = 'right'
    variable = 'rho_mixture_var'
  []
[]
(modules/thermal_hydraulics/test/tests/components/heat_transfer_from_heat_structure_1phase/jac.1phase.i)
[GlobalParams]
  initial_p = 1.e5
  initial_vel = 2
  initial_T = 300
  scaling_factor_1phase = '1 1 1'
  scaling_factor_temperature = '1'
  closures = simple_closures
[]
[FluidProperties]
  [fp]
    type = IdealGasFluidProperties
  []
[]
[Closures]
  [simple_closures]
    type = Closures1PhaseSimple
  []
[]
[SolidProperties]
  [fuel-mat]
    type = ThermalFunctionSolidProperties
    k = 2.5
    cp = 300.
    rho = 1.032e4
  []
[]
[Components]
  [pipe]
    type = FlowChannel1Phase
    position = '0 0.1 0'
    orientation = '0 0 1'
    length = 2
    n_elems = 1
    A = 8.78882e-5
    D_h = 0.01179
    f = 0.01
    fp = fp
  []
  [hs]
    type = HeatStructureCylindrical
    position = '0 0 0'
    orientation = '0 0 1'
    length = 2
    n_elems = 1
    names = 'fuel'
    widths = '0.1'
    n_part_elems = '1'
    solid_properties = 'fuel-mat'
    solid_properties_T_ref = '300'
    initial_T = 300
  []
  [hx]
    type = HeatTransferFromHeatStructure1Phase
    hs = hs
    hs_side = outer
    flow_channel = pipe
    Hw = 100
    P_hf = 0.029832559676
  []
[]
[Preconditioning]
  [pc]
    type = SMP
    full = true
  []
[]
[Executioner]
  type = Transient
  start_time = 0
  dt = 1
  num_steps = 1
  abort_on_solve_fail = true
  solve_type = 'NEWTON'
  petsc_options_iname = '-snes_test_err'
  petsc_options_value = ' 1e-11'
[]
(modules/navier_stokes/test/tests/ics/test.i)
p_initial=1.01e5
T=273.15
[Mesh]
  [cartesian]
    type = GeneratedMeshGenerator
    dim = 2
    xmin = 0
    xmax = 1
    ymin = 1
    ymax = 2
    nx = 4
    ny = 4
  []
[]
[FluidProperties]
  [fp]
    type = IdealGasFluidProperties
  []
[]
[Problem]
  kernel_coverage_check = false
  solve = false
  skip_nl_system_check = true
[]
[AuxVariables]
  [pressure]
    type = MooseVariableFVReal
  []
  [vel_x]
    type = MooseVariableFVReal
  []
  [vel_y]
    type = MooseVariableFVReal
  []
  [vel_z]
    type = MooseVariableFVReal
  []
  [temperature]
    type = MooseVariableFVReal
  []
  [ht]
    type = MooseVariableFVReal
  []
  [e]
    type = MooseVariableFVReal
  []
  [Mach]
    type = MooseVariableFVReal
  []
  [rho]
    type = MooseVariableFVReal
  []
  [rhou]
    type = MooseVariableFVReal
  []
  [rhov]
    type = MooseVariableFVReal
  []
  [rhow]
    type = MooseVariableFVReal
  []
  [rho_et]
    type = MooseVariableFVReal
  []
  [specific_volume]
    type = MooseVariableFVReal
  []
  [pressure_2]
  []
  [vel_x_2]
  []
  [vel_y_2]
  []
  [vel_z_2]
  []
  [temperature_2]
  []
  [ht_2]
  []
  [e_2]
  []
  [Mach_2]
  []
  [rho_2]
  []
  [rhou_2]
  []
  [rhov_2]
  []
  [rhow_2]
  []
  [rho_et_2]
  []
  [specific_volume_2]
  []
[]
[GlobalParams]
  fluid_properties = 'fp'
  initial_pressure = ${p_initial}
  initial_temperature = ${T}
  initial_velocity = '1 0.2 18'
[]
[ICs]
  [p]
    type = NSInitialCondition
    variable = 'pressure'
  []
  [vel_x]
    type = NSInitialCondition
    variable = 'vel_x'
  []
  [vel_y]
    type = NSInitialCondition
    variable = 'vel_y'
  []
  [vel_z]
    type = NSInitialCondition
    variable = 'vel_z'
  []
  [temperature]
    type = NSInitialCondition
    variable = 'temperature'
  []
  [ht]
    type = NSInitialCondition
    variable = 'ht'
  []
  [e]
    type = NSInitialCondition
    variable = 'e'
  []
  [Mach]
    type = NSInitialCondition
    variable = 'Mach'
  []
  [rho]
    type = NSInitialCondition
    fluid_properties = 'fp'
    initial_pressure = ${p_initial}
    initial_temperature = ${T}
    initial_velocity = '1 0.2 18'
    variable = 'rho'
  []
  [rhou]
    type = NSInitialCondition
    variable = 'rhou'
  []
  [rhov]
    type = NSInitialCondition
    variable = 'rhov'
  []
  [rhow]
    type = NSInitialCondition
    variable = 'rhow'
  []
  [rho_et]
    type = NSInitialCondition
    variable = 'rho_et'
  []
  [specific_volume]
    type = NSInitialCondition
    variable = 'specific_volume'
  []
  [p_2]
    type = NSInitialCondition
    variable = 'pressure_2'
    variable_type = 'pressure'
  []
  [vel_x_2]
    type = NSInitialCondition
    variable = 'vel_x_2'
    variable_type = 'vel_x'
  []
  [vel_y_2]
    type = NSInitialCondition
    variable = 'vel_y_2'
      variable_type = 'vel_y'
  []
  [vel_z_2]
    type = NSInitialCondition
    variable = 'vel_z_2'
      variable_type = 'vel_z'
  []
  [temperature_2]
    type = NSInitialCondition
    variable = 'temperature_2'
    variable_type = 'temperature'
  []
  [ht_2]
    type = NSInitialCondition
    variable = 'ht_2'
    variable_type = 'ht'
  []
  [e_2]
    type = NSInitialCondition
    variable = 'e_2'
    variable_type = 'e'
  []
  [Mach_2]
    type = NSInitialCondition
    variable = 'Mach_2'
    variable_type = 'Mach'
  []
  [rho_2]
    type = NSInitialCondition
    variable = 'rho_2'
    variable_type = 'rho'
  []
  [rhou_2]
    type = NSInitialCondition
    variable = 'rhou_2'
    variable_type = 'rhou'
  []
  [rhov_2]
    type = NSInitialCondition
    variable = 'rhov_2'
    variable_type = 'rhov'
  []
  [rhow_2]
    type = NSInitialCondition
    variable = 'rhow_2'
    variable_type = 'rhow'
  []
  [rho_et_2]
    type = NSInitialCondition
    variable = 'rho_et_2'
    variable_type = 'rho_et'
  []
  [specific_volume_2]
    type = NSInitialCondition
    variable = 'specific_volume_2'
    variable_type = 'specific_volume'
  []
[]
[Executioner]
  type = Steady
[]
[Outputs]
  exodus = true
[]
(modules/thermal_hydraulics/test/tests/problems/lax_shock_tube/lax_shock_tube.i)
# This test problem is the Lax shock tube test problem,
# which is a Riemann problem with the following parameters:
#   * domain = (0,1)
#   * gravity = 0
#   * EoS: Ideal gas EoS with gamma = 1.4, R = 0.71428571428571428571
#   * interface: x = 0.5
#   * typical end time: 0.15
# Left initial values:
#   * rho = 0.445
#   * vel = 0.692
#   * p = 3.52874226
# Right initial values:
#   * rho = 0.5
#   * vel = 0
#   * p = 0.571
[GlobalParams]
  gravity_vector = '0 0 0'
  rdg_slope_reconstruction = minmod
  closures = simple_closures
[]
[Functions]
  [p_ic_fn]
    type = PiecewiseConstant
    axis = x
    direction = right
    x = '0.5        1.0'
    y = '3.52874226 0.571'
  []
  [T_ic_fn]
    type = PiecewiseConstant
    axis = x
    direction = right
    x = '0.5              1.0'
    y = '11.1016610426966 1.5988'
  []
  [vel_ic_fn]
    type = PiecewiseConstant
    axis = x
    direction = right
    x = '0.5   1.0'
    y = '0.692 0.0'
  []
[]
[FluidProperties]
  [fp]
    type = IdealGasFluidProperties
    gamma = 1.4
    molar_mass = 11.64024372
  []
[]
[Closures]
  [simple_closures]
    type = Closures1PhaseSimple
  []
[]
[Components]
  [pipe]
    type = FlowChannel1Phase
    fp = fp
    # geometry
    position = '0 0 0'
    orientation = '1 0 0'
    length = 1.0
    n_elems = 100
    A = 1.0
    # IC
    initial_T = T_ic_fn
    initial_p = p_ic_fn
    initial_vel = vel_ic_fn
    f = 0
  []
  [left_boundary]
    type = FreeBoundary1Phase
    input = 'pipe:in'
  []
  [right_boundary]
    type = FreeBoundary1Phase
    input = 'pipe:out'
  []
[]
[Executioner]
  type = Transient
  [TimeIntegrator]
    type = ExplicitSSPRungeKutta
    # add order via 'cli_args' in 'tests'
  []
  solve_type = LINEAR
  l_tol = 1e-4
  nl_rel_tol = 1e-8
  nl_abs_tol = 1e-8
  nl_max_its = 60
  # run to t = 0.15
  start_time = 0.0
  dt = 1e-3
  num_steps = 150
  abort_on_solve_fail = true
[]
[Outputs]
  file_base = 'lax_shock_tube'
  velocity_as_vector = false
  execute_on = 'initial timestep_end'
  [out]
    type = Exodus
    show = 'rho p vel'
  []
[]
(modules/thermal_hydraulics/test/tests/postprocessors/flow_junction_flux_1phase/flow_junction_flux_1phase.i)
# This input file tests mass conservation at steady-state by looking at the
# net mass flux into the domain.
T_in = 523.0
m_dot = 100
p_out = 7e6
[GlobalParams]
  initial_p = ${p_out}
  initial_vel = 1
  initial_T = ${T_in}
  gravity_vector = '0 0 0'
  closures = simple_closures
  n_elems = 3
  f = 0
  scaling_factor_1phase = '1 1 1e-5'
[]
[FluidProperties]
  [fp]
    type = IdealGasFluidProperties
  []
[]
[Closures]
  [simple_closures]
    type = Closures1PhaseSimple
  []
[]
[Components]
  [inlet_bc]
    type = InletMassFlowRateTemperature1Phase
    input = 'inlet:in'
    m_dot = ${m_dot}
    T = ${T_in}
  []
  [inlet]
    type = FlowChannel1Phase
    fp = fp
    position = '0 0 11'
    orientation = '0 0 -1'
    length = 1
    A = 3
  []
  [inlet_plenum]
    type = VolumeJunction1Phase
    position = '0 0 10'
    initial_vel_x = 0
    initial_vel_y = 0
    initial_vel_z = 1
    connections = 'inlet:out channel1:in channel2:in'
    volume = 1
    scaling_factor_rhoEV = '1e-5'
  []
  [channel1]
    type = FlowChannel1Phase
    fp = fp
    position = '0 0 10'
    orientation = '0 0 -1'
    length = 10
    A = 4
    D_h = 1
  []
  [K_bypass]
    type = FormLossFromFunction1Phase
    K_prime = 500
    flow_channel = channel1
  []
  [channel2]
    type = FlowChannel1Phase
    fp = fp
    position = '0 0 10'
    orientation = '0 0 -1'
    length = 10
    A = 1
    D_h = 1
  []
  [outlet_plenum]
    type = VolumeJunction1Phase
    position = '0 0 0'
    initial_vel_x = 1
    initial_vel_y = 0
    initial_vel_z = 1
    connections = 'channel1:out channel2:out outlet:in'
    volume = 1
    scaling_factor_rhoEV = '1e-5'
  []
  [outlet]
    type = FlowChannel1Phase
    fp = fp
    position = '0 0 0'
    orientation = '0 0 -1'
    length = 1
    A = 1
  []
  [outlet_bc]
    type = Outlet1Phase
    p = ${p_out}
    input = 'outlet:out'
  []
[]
[Postprocessors]
  [inlet_in_m_dot]
    type = ADFlowBoundaryFlux1Phase
    boundary = 'inlet_bc'
    equation = mass
  []
  [inlet_out_m_dot]
    type = ADFlowJunctionFlux1Phase
    boundary = 'inlet:out'
    connection_index = 0
    junction = inlet_plenum
    equation = mass
  []
  [channel1_in_m_dot]
    type = ADFlowJunctionFlux1Phase
    boundary = 'channel1:in'
    connection_index = 1
    junction = inlet_plenum
    equation = mass
  []
  [channel1_out_m_dot]
    type = ADFlowJunctionFlux1Phase
    boundary = 'channel1:out'
    connection_index = 0
    junction = outlet_plenum
    equation = mass
  []
  [channel2_in_m_dot]
    type = ADFlowJunctionFlux1Phase
    boundary = 'channel2:in'
    connection_index = 2
    junction = inlet_plenum
    equation = mass
  []
  [channel2_out_m_dot]
    type = ADFlowJunctionFlux1Phase
    boundary = 'channel2:out'
    connection_index = 1
    junction = outlet_plenum
    equation = mass
  []
  [outlet_in_m_dot]
    type = ADFlowJunctionFlux1Phase
    boundary = 'outlet:in'
    connection_index = 2
    junction = outlet_plenum
    equation = mass
  []
  [outlet_out_m_dot]
    type = ADFlowBoundaryFlux1Phase
    boundary = 'outlet_bc'
    equation = mass
  []
  [net_mass_flow_rate_domain]
    type = LinearCombinationPostprocessor
    pp_names = 'inlet_in_m_dot outlet_out_m_dot'
    pp_coefs = '1 -1'
  []
  [net_mass_flow_rate_volume_junction]
    type = LinearCombinationPostprocessor
    pp_names = 'inlet_out_m_dot channel1_in_m_dot channel2_in_m_dot'
    pp_coefs = '1 -1 -1'
  []
[]
[Preconditioning]
  [smp]
    type = SMP
    full = true
  []
[]
[Executioner]
  type = Transient
  scheme = bdf2
  start_time = 0
  end_time = 10000
  [TimeStepper]
    type = IterationAdaptiveDT
    dt = 0.01
    optimal_iterations = 8
    iteration_window = 2
  []
  timestep_tolerance = 1e-6
  abort_on_solve_fail = true
  line_search = none
  nl_rel_tol = 1e-8
  nl_abs_tol = 2e-8
  nl_max_its = 25
  l_tol = 1e-3
  l_max_its = 5
  petsc_options = '-snes_converged_reason'
  petsc_options_iname = '-pc_type'
  petsc_options_value = ' lu     '
[]
[Outputs]
  [out]
    type = CSV
    execute_on = 'FINAL'
    show = 'net_mass_flow_rate_domain net_mass_flow_rate_volume_junction'
  []
[]
(modules/thermal_hydraulics/test/tests/components/deprecated/junction_one_to_one.i)
[GlobalParams]
  gravity_vector = '0 0 0'
  closures = simple_closures
  fp = fp
  f = 0.0
  initial_T = 300
  initial_p = 1e5
  initial_vel = 0
[]
[FluidProperties]
  [fp]
    type = IdealGasFluidProperties
    gamma = 1.4
    molar_mass = 0.02897
  []
[]
[Closures]
  [simple_closures]
    type = Closures1PhaseSimple
  []
[]
[Components]
  [inlet]
    type = InletMassFlowRateTemperature1Phase
    input = 'pipe1:in'
    m_dot = 1
    T = 300
  []
  [pipe1]
    type = FlowChannel1Phase
    position = '0 0 0'
    orientation = '1 0 0'
    length = 0.5
    n_elems = 2
    A = 0.1
  []
  [valve]
    type = JunctionOneToOne
    connections = 'pipe1:out pipe2:in'
  []
  [pipe2]
    type = FlowChannel1Phase
    position = '0.5 0 0'
    orientation = '1 0 0'
    length = 0.5
    n_elems = 2
    A = 0.1
  []
  [outlet]
    type = Outlet1Phase
    input = 'pipe2:out'
    p = 1e5
  []
[]
[Preconditioning]
  [smp]
    type = SMP
    full = true
  []
[]
[Executioner]
  type = Transient
  scheme = bdf2
  solve_type = NEWTON
  nl_rel_tol = 1e-8
  nl_abs_tol = 1e-8
  nl_max_its = 20
  l_tol = 1e-4
  start_time = 0.0
  end_time = 1.0
  dt = 0.01
  abort_on_solve_fail = true
[]
(modules/thermal_hydraulics/test/tests/components/supersonic_inlet/err.i)
[GlobalParams]
  gravity_vector = '0 0 0'
  closures = simple_closures
  fp = fp
  f = 0.0
  initial_T = 300
  initial_p = 1e5
  initial_vel = 0
[]
[FluidProperties]
  [fp]
    type = IdealGasFluidProperties
    gamma = 1.4
    molar_mass = 0.02897
  []
[]
[Closures]
  [simple_closures]
    type = Closures1PhaseSimple
  []
[]
[Components]
  [in]
    type = SupersonicInlet
    input = 'pipe:in'
    vel = 500
    T = 300
    p = 1e5
  []
  [pipe]
    type = FlowChannel1Phase
    position = '0 0 0'
    orientation = '1 0 0'
    length = 0.5
    n_elems = 2
    A = 0.1
  []
  [out]
    type = Outlet1Phase
    input = 'pipe:out'
    p = 1e5
  []
[]
[Preconditioning]
  [smp]
    type = SMP
    full = true
  []
[]
[Executioner]
  type = Transient
  scheme = bdf2
  solve_type = NEWTON
  nl_rel_tol = 1e-8
  nl_abs_tol = 1e-8
  nl_max_its = 20
  l_tol = 1e-4
  start_time = 0.0
  end_time = 1.0
  dt = 0.01
  abort_on_solve_fail = true
[]
(modules/thermal_hydraulics/test/tests/problems/woodward_colella_blast_wave/woodward_colella_blast_wave.i)
# Woodward-Colella blast wave problem
[GlobalParams]
  gravity_vector = '0 0 0'
  closures = simple_closures
[]
[Functions]
  [p_ic_fn]
    type = PiecewiseConstant
    axis = x
    direction = right
    x = '0.1  0.9  1.0'
    y = '1000 0.01 100'
  []
  [T_ic_fn]
    type = PiecewiseConstant
    axis = x
    direction = right
    x = '0.1  0.9   1.0'
    y = '1400 0.014 140'
  []
[]
[FluidProperties]
  [fp]
    type = IdealGasFluidProperties
    gamma = 1.4
    molar_mass = 11.64024372
  []
[]
[Closures]
  [simple_closures]
    type = Closures1PhaseSimple
  []
[]
[Components]
  [pipe]
    type = FlowChannel1Phase
    fp = fp
    # geometry
    position = '0 0 0'
    orientation = '1 0 0'
    length = 1.0
    n_elems = 500
    A = 1.0
    # IC
    initial_T = T_ic_fn
    initial_p = p_ic_fn
    initial_vel = 0
    f = 0
  []
  [left_wall]
    type = SolidWall1Phase
    input = 'pipe:in'
  []
  [right_wall]
    type = SolidWall1Phase
    input = 'pipe:out'
  []
[]
[Executioner]
  type = Transient
  [TimeIntegrator]
    type = ExplicitSSPRungeKutta
    order = 2
  []
  solve_type = LINEAR
  l_tol = 1e-4
  nl_rel_tol = 1e-20
  nl_abs_tol = 1e-8
  nl_max_its = 60
  # run to t = 0.038
  start_time = 0.0
  dt = 1e-5
  num_steps = 3800
  abort_on_solve_fail = true
[]
[Outputs]
  file_base = 'woodward_colella_blast_wave'
  velocity_as_vector = false
  execute_on = 'initial timestep_end'
  [out]
    type = Exodus
    show = 'p T vel'
  []
[]
(modules/thermal_hydraulics/test/tests/closures/wall_temperature_1phase/base.i)
[FluidProperties]
  [fp]
    type = IdealGasFluidProperties
  []
[]
[Closures]
  [wall_temp_closures]
    type = WallTemperature1PhaseClosures
  []
[]
[Components]
  [pipe]
    type = FlowChannel1Phase
    gravity_vector = '0 0 0'
    position = '0 0 0'
    orientation = '1 0 0'
    A = 1e-4
    length = 1
    n_elems = 10
    initial_vel = 0
    initial_p = 1e5
    initial_T = 300
    fp = fp
    closures = wall_temp_closures
  []
  [inlet]
    type = SolidWall1Phase
    input = 'pipe:in'
  []
  [outlet]
    type = SolidWall1Phase
    input = 'pipe:out'
  []
  [ht]
    type = HeatTransferFromSpecifiedTemperature1Phase
    flow_channel = pipe
    T_wall = 500
  []
[]
[Preconditioning]
  [pc]
    type = SMP
    full = true
  []
[]
[Postprocessors]
  [T_wall]
    type = ADElementAverageMaterialProperty
    mat_prop = T_wall
    execute_on = 'INITIAL'
  []
[]
[Executioner]
  type = Transient
  scheme = 'bdf2'
  start_time = 0
  num_steps = 0
  dt = 1e-6
  solve_type = NEWTON
  nl_rel_tol = 1e-8
  nl_abs_tol = 1e-8
  nl_max_its = 5
  l_tol = 1e-3
  l_max_its = 10
[]
[Outputs]
  csv = true
  execute_on = 'INITIAL'
[]
(modules/thermal_hydraulics/test/tests/components/deprecated/free_boundary.i)
[GlobalParams]
  gravity_vector = '0 0 0'
  closures = simple_closures
  fp = fp
  f = 0.0
  initial_T = 300
  initial_p = 1e5
  initial_vel = 0
[]
[FluidProperties]
  [fp]
    type = IdealGasFluidProperties
    gamma = 1.4
    molar_mass = 0.02897
  []
[]
[Closures]
  [simple_closures]
    type = Closures1PhaseSimple
  []
[]
[Components]
  [in]
    type = FreeBoundary
    input = 'pipe:in'
  []
  [pipe]
    type = FlowChannel1Phase
    position = '0 0 0'
    orientation = '1 0 0'
    length = 0.5
    n_elems = 2
    A = 0.1
  []
  [out]
    type = FreeBoundary
    input = 'pipe:out'
  []
[]
[Preconditioning]
  [smp]
    type = SMP
    full = true
  []
[]
[Executioner]
  type = Transient
  scheme = bdf2
  solve_type = NEWTON
  nl_rel_tol = 1e-8
  nl_abs_tol = 1e-8
  nl_max_its = 20
  l_tol = 1e-4
  start_time = 0.0
  end_time = 1.0
  dt = 0.01
  abort_on_solve_fail = true
[]
(modules/navier_stokes/test/tests/finite_volume/wcns/natural_convection/natural_circulation_pipe.i)
# natural convection through a pipe
# Reference solution in "reference_pipe_natural_convection.py"
# Reference mdot: 0.0792 kg/s
# this input
# iy   mdot
# 10   8.302364e-02
# 20   8.111192e-02
# 40   8.007924e-02
# 80   7.954403e-02
# 160  7.927201e-02
# Convergence to the analytical result is observed
height = 10.0
gravity = 9.81
p0 = 1e5
molar_mass = 29.0e-3
T0 = 328
Ru = 8.3145
Ri = '${fparse Ru / molar_mass}'
density = '${fparse p0 / (Ri * T0)}'
head = '${fparse height * density * gravity}'
k = 25.68e-3
gamma = 1.4
[Mesh]
  [mesh]
    type = CartesianMeshGenerator
    dim = 2
    dx = '0.1'
    ix = '2'
    dy = '${height}'
    iy = '5'
  []
[]
[GlobalParams]
  rhie_chow_user_object = pins_rhie_chow_interpolator
[]
[FluidProperties]
  [air]
    type = IdealGasFluidProperties
    molar_mass = ${molar_mass}
    k = ${k}
    gamma = ${gamma}
  []
[]
[Modules]
  [NavierStokesFV]
    compressibility = 'weakly-compressible'
    add_energy_equation = true
    gravity = '0 -${gravity} 0'
    density = rho
    dynamic_viscosity = mu
    specific_heat = cp
    thermal_conductivity = k
    initial_velocity = '0 1e-6 0'
    initial_pressure = ${p0}
    initial_temperature = ${T0}
    inlet_boundaries = 'bottom'
    momentum_inlet_types = 'fixed-pressure'
    momentum_inlet_functors = '${fparse p0 + head}'
    energy_inlet_types = 'fixed-temperature'
    energy_inlet_functors = '${T0}'
    energy_scaling = 1e-5
    wall_boundaries = 'left right'
    momentum_wall_types = 'slip slip'
    energy_wall_types = 'heatflux heatflux'
    energy_wall_functors = '300 300'
    outlet_boundaries = 'top'
    momentum_outlet_types = 'fixed-pressure'
    pressure_functors = '${fparse p0}'
    momentum_advection_interpolation = 'upwind'
    mass_advection_interpolation = 'upwind'
    porous_medium_treatment = true
    porosity = porosity
    energy_advection_interpolation = 'average'
  []
[]
[FVKernels]
  [u_friction]
    type = PINSFVMomentumFriction
    variable = superficial_vel_x
    Darcy_name = linear_friction_coeff
    momentum_component = 'x'
    standard_friction_formulation = false
    rho = rho
  []
  [v_friction]
    type = PINSFVMomentumFriction
    variable = superficial_vel_y
    Darcy_name = linear_friction_coeff
    momentum_component = 'y'
    standard_friction_formulation = false
    rho = rho
  []
[]
[Executioner]
  type = Transient
  solve_type = 'NEWTON'
  petsc_options_iname = '-pc_type -sub_pc_factor_shift_type'
  petsc_options_value = 'lu        NONZERO'
  nl_rel_tol = 1e-8
  nl_abs_tol = 1e-6
  end_time = 1e4
  [TimeStepper]
    type = IterationAdaptiveDT
    dt = 0.1
    growth_factor = 2
    iteration_window = 2
    optimal_iterations = 6
  []
[]
[Functions]
  [mu_rampdown_fn]
    type = PiecewiseLinear
    x = '0    0.5  1   5  10 100 1000 2000'
    y = '1000 1000 100 10 1  1   1    0'
  []
[]
[FunctorMaterials]
  [fluid_props_to_mat_props]
    type = GeneralFunctorFluidProps
    fp = air
    pressure = pressure
    T_fluid = T_fluid
    speed = speed
    force_define_density = true
    neglect_derivatives_of_density_time_derivative = false
    mu_rampdown = 'mu_rampdown_fn'
    characteristic_length = 1
    porosity = porosity
  []
  [scalar_props]
    type = ADGenericFunctorMaterial
    prop_names = 'porosity loss_coeff'
    prop_values = '1       1.3'
  []
  [linear_friction]
    type = ADParsedFunctorMaterial
    property_name = 'linear_friction'
    expression = 'loss_coeff * rho'
    functor_names = 'loss_coeff rho'
  []
  [linear_friction_coeff]
    type = ADGenericVectorFunctorMaterial
    prop_names = 'linear_friction_coeff'
    prop_values = 'linear_friction linear_friction linear_friction'
  []
[]
[AuxVariables]
  [rho_var]
    type = MooseVariableFVReal
  []
  [cp_var]
    type = MooseVariableFVReal
  []
  [rho_cp_T_fluid_var]
    type = MooseVariableFVReal
  []
[]
[AuxKernels]
  [rho_var_aux]
    type = FunctorAux
    variable = rho_var
    functor = rho
  []
  [cp_var_aux]
    type = FunctorAux
    variable = cp_var
    functor = cp
  []
  [rho_cp_T_fluid_var_aux]
    type = ParsedAux
    variable = rho_cp_T_fluid_var
    coupled_variables = 'rho_var cp_var T_fluid'
    expression = 'rho_var * cp_var * T_fluid'
  []
[]
[Postprocessors]
  [inlet_mfr]
    type = VolumetricFlowRate
    vel_x = superficial_vel_x
    vel_y = superficial_vel_y
    advected_quantity = rho
    boundary = bottom
    advected_interp_method = average
  []
  [outlet_mfr]
    type = VolumetricFlowRate
    vel_x = superficial_vel_x
    vel_y = superficial_vel_y
    advected_quantity = rho
    boundary = top
    advected_interp_method = average
  []
  [inlet_energy]
    type = VolumetricFlowRate
    vel_x = superficial_vel_x
    vel_y = superficial_vel_y
    advected_quantity = rho_cp_T_fluid_var
    boundary = bottom
    advected_interp_method = average
  []
  [outlet_energy]
    type = VolumetricFlowRate
    vel_x = superficial_vel_x
    vel_y = superficial_vel_y
    advected_quantity = rho_cp_T_fluid_var
    boundary = top
    advected_interp_method = average
  []
[]
[Debug]
  show_var_residual_norms = true
[]
[Outputs]
  exodus = true
[]
(modules/navier_stokes/test/tests/finite_volume/ins/boussinesq/wcnsfv.i)
mu = 1
rho = 'rho'
k = 1
cp = 1
alpha = 1
velocity_interp_method = 'rc'
advected_interp_method = 'average'
# rayleigh=1e3
cold_temp=300
hot_temp=310
[GlobalParams]
  two_term_boundary_expansion = true
  rhie_chow_user_object = 'rc'
[]
[UserObjects]
  [rc]
    type = INSFVRhieChowInterpolator
    u = u
    v = v
    pressure = pressure
  []
[]
[Mesh]
  [gen]
    type = GeneratedMeshGenerator
    dim = 2
    xmin = 0
    xmax = 10
    ymin = 0
    ymax = 10
    nx = 64
    ny = 64
  []
[]
[Variables]
  [u]
    type = INSFVVelocityVariable
    initial_condition = 1e-15
  []
  [v]
    type = INSFVVelocityVariable
    initial_condition = 1e-15
  []
  [pressure]
    type = INSFVPressureVariable
    initial_condition = 1e5
  []
  [T]
    type = INSFVEnergyVariable
    scaling = 1e-4
    initial_condition = ${cold_temp}
  []
  [lambda]
    family = SCALAR
    order = FIRST
  []
[]
[AuxVariables]
  [U]
    order = CONSTANT
    family = MONOMIAL
    fv = true
  []
  [vel_x]
    order = FIRST
    family = MONOMIAL
  []
  [vel_y]
    order = FIRST
    family = MONOMIAL
  []
  [viz_T]
    order = FIRST
    family = MONOMIAL
  []
  [rho_out]
    type = MooseVariableFVReal
  []
[]
[AuxKernels]
  [mag]
    type = VectorMagnitudeAux
    variable = U
    x = u
    y = v
    execute_on = 'initial timestep_end'
  []
  [vel_x]
    type = ParsedAux
    variable = vel_x
    expression = 'u'
    execute_on = 'initial timestep_end'
    coupled_variables = 'u'
  []
  [vel_y]
    type = ParsedAux
    variable = vel_y
    expression = 'v'
    execute_on = 'initial timestep_end'
    coupled_variables = 'v'
  []
  [viz_T]
    type = ParsedAux
    variable = viz_T
    expression = 'T'
    execute_on = 'initial timestep_end'
    coupled_variables = 'T'
  []
  [rho_out]
    type = FunctorAux
    functor = 'rho'
    variable = 'rho_out'
    execute_on = 'initial timestep_end'
  []
[]
[FVKernels]
  [mass]
    type = INSFVMassAdvection
    variable = pressure
    advected_interp_method = ${advected_interp_method}
    velocity_interp_method = ${velocity_interp_method}
    rho = ${rho}
  []
  [mean_zero_pressure]
    type = FVIntegralValueConstraint
    variable = pressure
    lambda = lambda
    phi0 = 1e5
  []
  [u_advection]
    type = INSFVMomentumAdvection
    variable = u
    velocity_interp_method = ${velocity_interp_method}
    advected_interp_method = ${advected_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
  []
  [u_gravity]
    type = INSFVMomentumGravity
    variable = u
    gravity = '0 -1 0'
    rho = ${rho}
    momentum_component = 'x'
  []
  [v_advection]
    type = INSFVMomentumAdvection
    variable = v
    velocity_interp_method = ${velocity_interp_method}
    advected_interp_method = ${advected_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
  []
  [v_gravity]
    type = INSFVMomentumGravity
    variable = v
    gravity = '0 -1 0'
    rho = ${rho}
    momentum_component = 'y'
  []
  [temp_conduction]
    type = FVDiffusion
    coeff = 'k'
    variable = T
  []
  [temp_advection]
    type = INSFVEnergyAdvection
    variable = T
    velocity_interp_method = ${velocity_interp_method}
    advected_interp_method = ${advected_interp_method}
  []
[]
[FVBCs]
  [no_slip_x]
    type = INSFVNoSlipWallBC
    variable = u
    boundary = 'left right top bottom'
    function = 0
  []
  [no_slip_y]
    type = INSFVNoSlipWallBC
    variable = v
    boundary = 'left right top bottom'
    function = 0
  []
  [T_hot]
    type = FVDirichletBC
    variable = T
    boundary = left
    value = ${hot_temp}
  []
  [T_cold]
    type = FVDirichletBC
    variable = T
    boundary = right
    value = ${cold_temp}
  []
[]
[FluidProperties]
  [fp]
    type = IdealGasFluidProperties
  []
[]
[Materials]
  [const]
    type = ADGenericConstantMaterial
    prop_names = 'alpha'
    prop_values = '${alpha}'
  []
[]
[FunctorMaterials]
  [const_functor]
    type = ADGenericFunctorMaterial
    prop_names = 'cp k'
    prop_values = '${cp} ${k}'
  []
  [rho]
    type = RhoFromPTFunctorMaterial
    fp = fp
    temperature = T
    pressure = pressure
  []
  [ins_fv]
    type = INSFVEnthalpyFunctorMaterial
    temperature = 'T'
    rho = ${rho}
  []
[]
[Functions]
  [lid_function]
    type = ParsedFunction
    expression = '4*x*(1-x)'
  []
[]
[Executioner]
  type = Steady
  solve_type = 'NEWTON'
  petsc_options_iname = '-pc_type -pc_factor_shift_type'
  petsc_options_value = 'lu       NONZERO'
[]
[Outputs]
  exodus = true
[]
(modules/thermal_hydraulics/test/tests/problems/area_constriction/area_constriction_junction.i)
# This test features air flowing through a channel whose cross-sectional area
# shrinks to half its value in the right half. Assuming incompressible flow
# conditions, such as having a low Mach number, the velocity should approximately
# double from inlet to outlet. In this version of the test, the area discontinuity
# is achieved by connecting two flow channels with a junction.
p_outlet = 1e5
[GlobalParams]
  gravity_vector = '0 0 0'
  initial_T = 300
  initial_p = ${p_outlet}
  fp = fp
  closures = simple_closures
  f = 0
  scaling_factor_1phase = '1 1 1e-5'
[]
[FluidProperties]
  [fp]
    type = IdealGasFluidProperties
    gamma = 1.4
  []
[]
[Closures]
  [simple_closures]
    type = Closures1PhaseSimple
  []
[]
[Components]
  [inlet]
    type = InletDensityVelocity1Phase
    input = 'pipe1:in'
    rho = 1.16263315948279 # rho @ (p = 1e5 Pa, T = 300 K)
    vel = 1
  []
  [pipe1]
    type = FlowChannel1Phase
    position = '0 0 0'
    orientation = '1 0 0'
    length = 0.5
    n_elems = 50
    A = 1
    initial_vel = 1
  []
  [junction]
    type = JunctionOneToOne1Phase
    connections = 'pipe1:out pipe2:in'
  []
  [pipe2]
    type = FlowChannel1Phase
    position = '0.5 0 0'
    orientation = '1 0 0'
    length = 0.5
    n_elems = 50
    A = 0.5
    initial_vel = 2
  []
  [outlet]
    type = Outlet1Phase
    input = 'pipe2:out'
    p = ${p_outlet}
  []
[]
[Preconditioning]
  [pc]
    type = SMP
    full = true
  []
[]
[Executioner]
  type = Transient
  scheme = 'bdf2'
  end_time = 10
  [TimeStepper]
    type = IterationAdaptiveDT
    dt = 0.001
    optimal_iterations = 5
    iteration_window = 1
    growth_factor = 1.2
  []
  steady_state_detection = true
  solve_type = PJFNK
  nl_rel_tol = 1e-10
  nl_abs_tol = 1e-8
  nl_max_its = 15
  l_tol = 1e-3
  l_max_its = 10
[]
[Outputs]
  exodus = true
  velocity_as_vector = false
  show = 'A rho vel p'
[]
(modules/thermal_hydraulics/test/tests/postprocessors/specific_impulse_1phase/Isp_1ph.i)
[GlobalParams]
  gravity_vector = '0 0 0'
  initial_p = 6e6
  initial_T = 600
  initial_vel = 0
  scaling_factor_1phase = '1 1 1e-5'
  closures = simple_closures
[]
[FluidProperties]
  [eos]
    type = IdealGasFluidProperties
    gamma = 1.3066
    molar_mass = 2.016e-3
    k = 0.437
    mu = 3e-5
  []
[]
[Closures]
  [simple_closures]
    type = Closures1PhaseSimple
  []
[]
[Components]
  [pipe1]
    type = FlowChannel1Phase
    fp = eos
    position = '0 0 0'
    orientation = '1 0 0'
    length = 1
    n_elems = 10
    A = 0.1
    f = 0.
  []
  [inlet]
    type = InletMassFlowRateTemperature1Phase
    m_dot = 0.1
    T = 800
    input = 'pipe1:in'
  []
  [outlet]
    type = Outlet1Phase
    input = 'pipe1:out'
    p = 6e6
  []
[]
[Preconditioning]
  [SMP_PJFNK]
    type = SMP
    full = true
  []
[]
[Executioner]
  type = Transient
  [TimeStepper]
    type = IterationAdaptiveDT
    dt = 0.01
    growth_factor = 1.4
    optimal_iterations = 6
    iteration_window = 2
  []
  start_time = 0.0
  end_time = 100
  abort_on_solve_fail = true
  solve_type = 'NEWTON'
  line_search = 'basic'
  nl_rel_tol = 1e-6
  nl_abs_tol = 1e-6
  nl_max_its = 10
  l_tol = 1e-3
  l_max_its = 10
  petsc_options_iname = '-pc_type'
  petsc_options_value = 'lu'
[]
[Postprocessors]
  # hand calcs show that Isp should start at 274.3 at 600 K
  # and rise to 316.7 at 800 K.
  [Isp]
    type = ADSpecificImpulse1Phase
    p_exit = 1e6
    fp = eos
    boundary = outlet
  []
  [Isp_inst]
    type = ADSpecificImpulse1Phase
    p_exit = 1e6
    fp = eos
    cumulative = false
    boundary = outlet
  []
  [outletT]
    type = SideAverageValue
    variable = T
    boundary = pipe1:out
  []
[]
[Outputs]
  [out]
    type = CSV
    show = 'Isp Isp_inst'
    execute_on = 'INITIAL FINAL'
  []
[]
(modules/thermal_hydraulics/test/tests/auxkernels/flow_model_gas_mix_aux/flow_model_gas_mix_aux.i)
mass_fraction = 0.4
vel = 10
area = 0.2
# computed at p = 1e5 Pa, T = 300 K:
rho = 1.30632939267729
e_value = 1.789042384551724e+05
E = ${fparse e_value + 0.5 * vel * vel}
rhoA = ${fparse rho * area}
xirhoA = ${fparse mass_fraction * rhoA}
rhouA = ${fparse rhoA * vel}
rhoEA = ${fparse rhoA * E}
[GlobalParams]
  fluid_properties = mixture_fp
  xirhoA = xirhoA
  rhoA = rhoA
  rhouA = rhouA
  rhoEA = rhoEA
  area = A
[]
[Mesh]
  type = GeneratedMesh
  dim = 1
  nx = 5
[]
[FluidProperties]
  [fp1]
    type = IdealGasFluidProperties
    gamma = 1.4
    molar_mass = 0.029
  []
  [fp2]
    type = IdealGasFluidProperties
    gamma = 1.5
    molar_mass = 0.04
  []
  [mixture_fp]
    type = IdealGasMixtureFluidProperties
    component_fluid_properties = 'fp1 fp2'
  []
[]
[AuxVariables]
  [A]
    initial_condition = ${area}
  []
  [xirhoA]
    initial_condition = ${xirhoA}
  []
  [rhoA]
    initial_condition = ${rhoA}
  []
  [rhouA]
    initial_condition = ${rhouA}
  []
  [rhoEA]
    initial_condition = ${rhoEA}
  []
  [p]
  []
  [T]
  []
[]
[AuxKernels]
  [p_aux]
    type = FlowModelGasMixAux
    variable = p
    quantity = p
    execute_on = 'INITIAL'
  []
  [T_aux]
    type = FlowModelGasMixAux
    variable = T
    quantity = T
    execute_on = 'INITIAL'
  []
[]
[Postprocessors]
  [p]
    type = AverageNodalVariableValue
    variable = p
    execute_on = 'INITIAL'
  []
  [T]
    type = AverageNodalVariableValue
    variable = T
    execute_on = 'INITIAL'
  []
[]
[Problem]
  solve = false
[]
[Executioner]
  type = Steady
[]
[Outputs]
  csv = true
  execute_on = 'INITIAL'
[]
(modules/thermal_hydraulics/test/tests/materials/ad_wall_htc_gnielinski_annular/ad_wall_htc_gnielinski_annular.i)
rho = 3.1176
vel = 100
k = 0.38220
mu = 4.8587e-05
cp = 5189.8
p = 100e3
T = 1073
T_wall = 1074
D_inner = 0.01
D_outer = 0.015
length = 0.5
[GlobalParams]
  execute_on = 'INITIAL'
[]
[Mesh]
  type = GeneratedMesh
  dim = 1
  nx = 1
[]
[FluidProperties]
  [fp]
    type = IdealGasFluidProperties
  []
[]
[Materials]
  [props]
    type = ADGenericConstantMaterial
    prop_names = 'rho vel k mu cp p T T_wall'
    prop_values = '${rho} ${vel} ${k} ${mu} ${cp} ${p} ${T} ${T_wall}'
  []
  [test_material]
    type = ADWallHTCGnielinskiAnnularMaterial
    htc_wall = htc_wall
    D_inner = ${D_inner}
    D_outer = ${D_outer}
    channel_length = ${length}
    at_inner_wall = true
    fluid_is_gas = true
    gas_heating_correction_exponent = 0.15
    fluid_properties = fp
  []
[]
[Problem]
  solve = false
[]
[Executioner]
  type = Steady
[]
[Postprocessors]
  [htc_wall]
    type = ADElementAverageMaterialProperty
    mat_prop = htc_wall
  []
[]
[Outputs]
  csv = true
[]
(modules/navier_stokes/test/tests/finite_volume/cns/mms/1d-with-bcs/basic-conserved-pcnsfv-kt.i)
[GlobalParams]
  fp = fp
  limiter = 'central_difference'
  two_term_boundary_expansion = true
[]
[Mesh]
  [cartesian]
    type = GeneratedMeshGenerator
    dim = 1
    xmin = .1
    xmax = .6
    nx = 2
  []
[]
[FluidProperties]
  [fp]
    type = IdealGasFluidProperties
  []
[]
[Problem]
  fv_bcs_integrity_check = false
[]
[Variables]
  [rho]
    type = MooseVariableFVReal
  []
  [rho_ud]
    type = MooseVariableFVReal
  []
  [rho_et]
    type = MooseVariableFVReal
  []
[]
[ICs]
  [pressure]
    type = FunctionIC
    variable = rho
    function = 'exact_rho'
  []
  [sup_vel_x]
    type = FunctionIC
    variable = rho_ud
    function = 'exact_rho_ud'
  []
  [T_fluid]
    type = FunctionIC
    variable = rho_et
    function = 'exact_rho_et'
  []
[]
[FVKernels]
  [mass_advection]
    type = PCNSFVKT
    variable = rho
    eqn = "mass"
  []
  [mass_fn]
    type = FVBodyForce
    variable = rho
    function = 'forcing_rho'
  []
  [momentum_x_advection]
    type = PCNSFVKT
    variable = rho_ud
    momentum_component = x
    eqn = "momentum"
  []
  [momentum_fn]
    type = FVBodyForce
    variable = rho_ud
    function = 'forcing_rho_ud'
  []
  [fluid_energy_advection]
    type = PCNSFVKT
    variable = rho_et
    eqn = "energy"
  []
  [energy_fn]
    type = FVBodyForce
    variable = rho_et
    function = 'forcing_rho_et'
  []
[]
[FVBCs]
  [mass_left]
    variable = rho
    type = PCNSFVStrongBC
    boundary = left
    T_fluid = 'exact_T'
    superficial_velocity = 'exact_superficial_velocity'
    eqn = 'mass'
  []
  [momentum_left]
    variable = rho_ud
    type = PCNSFVStrongBC
    boundary = left
    T_fluid = 'exact_T'
    superficial_velocity = 'exact_superficial_velocity'
    eqn = 'momentum'
    momentum_component = 'x'
  []
  [energy_left]
    variable = rho_et
    type = PCNSFVStrongBC
    boundary = left
    T_fluid = 'exact_T'
    superficial_velocity = 'exact_superficial_velocity'
    eqn = 'energy'
  []
  [mass_right]
    variable = rho
    type = PCNSFVStrongBC
    boundary = right
    eqn = 'mass'
    pressure = 'exact_p'
  []
  [momentum_right]
    variable = rho_ud
    type = PCNSFVStrongBC
    boundary = right
    eqn = 'momentum'
    momentum_component = 'x'
    pressure = 'exact_p'
  []
  [energy_right]
    variable = rho_et
    type = PCNSFVStrongBC
    boundary = right
    eqn = 'energy'
    pressure = 'exact_p'
  []
  # help gradient reconstruction
  [rho_right]
    type = FVFunctionDirichletBC
    variable = rho
    function = exact_rho
    boundary = 'right'
  []
  [rho_ud_left]
    type = FVFunctionDirichletBC
    variable = rho_ud
    function = exact_rho_ud
    boundary = 'left'
  []
  [rho_et_left]
    type = FVFunctionDirichletBC
    variable = rho_et
    function = exact_rho_et
    boundary = 'left'
  []
[]
[Materials]
  [var_mat]
    type = PorousConservedVarMaterial
    rho = rho
    superficial_rhou = rho_ud
    rho_et = rho_et
    porosity = porosity
  []
  [porosity]
    type = GenericFunctionMaterial
    prop_names = 'porosity'
    prop_values = 'eps'
  []
[]
[Functions]
[exact_rho]
  type = ParsedFunction
  expression = '3.48788261470924*cos(x)'
[]
[forcing_rho]
  type = ParsedFunction
  expression = '-3.45300378856215*sin(1.1*x)'
[]
[exact_rho_ud]
  type = ParsedFunction
  expression = '3.13909435323832*cos(1.1*x)'
[]
[forcing_rho_ud]
  type = ParsedFunction
  expression = '-0.9*(10.6975765229419*cos(1.2*x)/cos(x) - 0.697576522941849*cos(1.1*x)^2/cos(x)^2)*sin(x) + 0.9*(10.6975765229419*sin(x)*cos(1.2*x)/cos(x)^2 - 1.3951530458837*sin(x)*cos(1.1*x)^2/cos(x)^3 + 1.53466835047207*sin(1.1*x)*cos(1.1*x)/cos(x)^2 - 12.8370918275302*sin(1.2*x)/cos(x))*cos(x) + 3.13909435323832*sin(x)*cos(1.1*x)^2/cos(x)^2 - 6.9060075771243*sin(1.1*x)*cos(1.1*x)/cos(x)'
[]
[exact_rho_et]
  type = ParsedFunction
  expression = '26.7439413073546*cos(1.2*x)'
[]
[forcing_rho_et]
  type = ParsedFunction
  expression = '0.9*(3.48788261470924*(3.06706896551724*cos(1.2*x)/cos(x) - 0.2*cos(1.1*x)^2/cos(x)^2)*cos(x) + 26.7439413073546*cos(1.2*x))*sin(x)*cos(1.1*x)/cos(x)^2 - 0.99*(3.48788261470924*(3.06706896551724*cos(1.2*x)/cos(x) - 0.2*cos(1.1*x)^2/cos(x)^2)*cos(x) + 26.7439413073546*cos(1.2*x))*sin(1.1*x)/cos(x) + 0.9*(-(10.6975765229419*cos(1.2*x)/cos(x) - 0.697576522941849*cos(1.1*x)^2/cos(x)^2)*sin(x) + (10.6975765229419*sin(x)*cos(1.2*x)/cos(x)^2 - 1.3951530458837*sin(x)*cos(1.1*x)^2/cos(x)^3 + 1.53466835047207*sin(1.1*x)*cos(1.1*x)/cos(x)^2 - 12.8370918275302*sin(1.2*x)/cos(x))*cos(x) - 32.0927295688256*sin(1.2*x))*cos(1.1*x)/cos(x)'
[]
[exact_T]
  type = ParsedFunction
  expression = '0.0106975765229418*cos(1.2*x)/cos(x) - 0.000697576522941848*cos(1.1*x)^2/cos(x)^2'
[]
[exact_eps_p]
  type = ParsedFunction
  expression = '3.13909435323832*(3.06706896551724*cos(1.2*x)/cos(x) - 0.2*cos(1.1*x)^2/cos(x)^2)*cos(x)'
[]
[exact_p]
  type = ParsedFunction
  expression = '3.48788261470924*(3.06706896551724*cos(1.2*x)/cos(x) - 0.2*cos(1.1*x)^2/cos(x)^2)*cos(x)'
[]
[exact_sup_vel_x]
  type = ParsedFunction
  expression = '0.9*cos(1.1*x)/cos(x)'
[]
[exact_superficial_velocity]
  type = ParsedVectorFunction
  expression_x = '0.9*cos(1.1*x)/cos(x)'
[]
[eps]
  type = ParsedFunction
  expression = '0.9'
[]
[]
[Preconditioning]
  [smp]
    type = SMP
    full = true
  []
[]
[Executioner]
  solve_type = NEWTON
  type = Transient
  num_steps = 1
  dtmin = 1
  petsc_options = '-snes_linesearch_monitor'
  petsc_options_iname = '-pc_type'
  petsc_options_value = 'lu'
  nl_max_its = 50
  line_search = bt
[]
[Outputs]
  exodus = true
  csv = true
[]
[Debug]
  show_var_residual_norms = true
[]
[Postprocessors]
  [h]
    type = AverageElementSize
    outputs = 'console csv'
    execute_on = 'timestep_end'
  []
  [L2rho]
    type = ElementL2Error
    variable = rho
    function = exact_rho
    outputs = 'console csv'
    execute_on = 'timestep_end'
  []
  [L2rho_ud]
    variable = rho_ud
    function = exact_rho_ud
    type = ElementL2Error
    outputs = 'console csv'
    execute_on = 'timestep_end'
  []
  [L2rho_et]
    variable = rho_et
    function = exact_rho_et
    type = ElementL2Error
    outputs = 'console csv'
    execute_on = 'timestep_end'
  []
[]
(modules/navier_stokes/test/tests/finite_volume/cns/straight_channel_porosity_step/implicit-euler-basic-kt-primitive.i)
p_initial=1.01e5
T=273.15
# u refers to the superficial velocity
u_in=1
user_limiter='upwind'
[GlobalParams]
  fp = fp
  two_term_boundary_expansion = true
  limiter = ${user_limiter}
[]
[Mesh]
  [cartesian]
    type = GeneratedMeshGenerator
    dim = 1
    xmin = 0
    xmax = 18
    nx = 180
  []
  [to_pt5]
    input = cartesian
    type = SubdomainBoundingBoxGenerator
    bottom_left = '2 0 0'
    top_right = '4 1 0'
    block_id = 1
  []
  [pt5]
    input = to_pt5
    type = SubdomainBoundingBoxGenerator
    bottom_left = '4 0 0'
    top_right = '6 1 0'
    block_id = 2
  []
  [to_pt25]
    input = pt5
    type = SubdomainBoundingBoxGenerator
    bottom_left = '6 0 0'
    top_right = '8 1 0'
    block_id = 3
  []
  [pt25]
    input = to_pt25
    type = SubdomainBoundingBoxGenerator
    bottom_left = '8 0 0'
    top_right = '10 1 0'
    block_id = 4
  []
  [to_pt5_again]
    input = pt25
    type = SubdomainBoundingBoxGenerator
    bottom_left = '10 0 0'
    top_right = '12 1 0'
    block_id = 5
  []
  [pt5_again]
    input = to_pt5_again
    type = SubdomainBoundingBoxGenerator
    bottom_left = '12 0 0'
    top_right = '14 1 0'
    block_id = 6
  []
  [to_one]
    input = pt5_again
    type = SubdomainBoundingBoxGenerator
    bottom_left = '14 0 0'
    top_right = '16 1 0'
    block_id = 7
  []
  [one]
    input = to_one
    type = SubdomainBoundingBoxGenerator
    bottom_left = '16 0 0'
    top_right = '18 1 0'
    block_id = 8
  []
[]
[FluidProperties]
  [fp]
    type = IdealGasFluidProperties
  []
[]
[Problem]
  fv_bcs_integrity_check = false
[]
[Variables]
  [pressure]
    type = MooseVariableFVReal
    initial_condition = ${p_initial}
  []
  [sup_vel_x]
    type = MooseVariableFVReal
    initial_condition = 1e-15
    scaling = 1e-2
  []
  [T_fluid]
    type = MooseVariableFVReal
    initial_condition = ${T}
    scaling = 1e-5
  []
[]
[AuxVariables]
  [vel_x]
    type = MooseVariableFVReal
  []
  [sup_mom_x]
    type = MooseVariableFVReal
  []
  [rho]
    type = MooseVariableFVReal
  []
  [worst_courant]
    type = MooseVariableFVReal
  []
  [porosity]
    type = MooseVariableFVReal
  []
[]
[AuxKernels]
  [vel_x]
    type = ADMaterialRealAux
    variable = vel_x
    property = vel_x
    execute_on = 'timestep_end'
  []
  [sup_mom_x]
    type = ADMaterialRealAux
    variable = sup_mom_x
    property = superficial_rhou
    execute_on = 'timestep_end'
  []
  [rho]
    type = ADMaterialRealAux
    variable = rho
    property = rho
    execute_on = 'timestep_end'
  []
  [worst_courant]
    type = Courant
    variable = worst_courant
    u = sup_vel_x
    execute_on = 'timestep_end'
  []
  [porosity]
    type = MaterialRealAux
    variable = porosity
    property = porosity
    execute_on = 'timestep_end'
  []
[]
[FVKernels]
  [mass_time]
    type = FVMatPropTimeKernel
    mat_prop_time_derivative = 'dsuperficial_rho_dt'
    variable = pressure
  []
  [mass_advection]
    type = PCNSFVKT
    variable = pressure
    eqn = "mass"
  []
  [momentum_time]
    type = FVMatPropTimeKernel
    mat_prop_time_derivative = 'dsuperficial_rhou_dt'
    variable = sup_vel_x
  []
  [momentum_advection]
    type = PCNSFVKT
    variable = sup_vel_x
    eqn = "momentum"
    momentum_component = 'x'
  []
  [eps_grad]
    type = PNSFVPGradEpsilon
    variable = sup_vel_x
    momentum_component = 'x'
    epsilon_function = 'eps'
  []
  [energy_time]
    type = FVMatPropTimeKernel
    mat_prop_time_derivative = 'dsuperficial_rho_et_dt'
    variable = T_fluid
  []
  [energy_advection]
    type = PCNSFVKT
    variable = T_fluid
    eqn = "energy"
  []
[]
[FVBCs]
  [rho_left]
    type = PCNSFVStrongBC
    boundary = 'left'
    variable = pressure
    superficial_velocity = 'ud_in'
    T_fluid = ${T}
    eqn = 'mass'
  []
  [rhou_left]
    type = PCNSFVStrongBC
    boundary = 'left'
    variable = sup_vel_x
    superficial_velocity = 'ud_in'
    T_fluid = ${T}
    eqn = 'momentum'
    momentum_component = 'x'
  []
  [rho_et_left]
    type = PCNSFVStrongBC
    boundary = 'left'
    variable = T_fluid
    superficial_velocity = 'ud_in'
    T_fluid = ${T}
    eqn = 'energy'
  []
  [rho_right]
    type = PCNSFVStrongBC
    boundary = 'right'
    variable = pressure
    pressure = ${p_initial}
    eqn = 'mass'
  []
  [rhou_right]
    type = PCNSFVStrongBC
    boundary = 'right'
    variable = sup_vel_x
    pressure = ${p_initial}
    eqn = 'momentum'
    momentum_component = 'x'
  []
  [rho_et_right]
    type = PCNSFVStrongBC
    boundary = 'right'
    variable = T_fluid
    pressure = ${p_initial}
    eqn = 'energy'
  []
  # Use these to help create more accurate cell centered gradients for cells adjacent to boundaries
  [T_left]
    type = FVDirichletBC
    variable = T_fluid
    value = ${T}
    boundary = 'left'
  []
  [sup_vel_left]
    type = FVDirichletBC
    variable = sup_vel_x
    value = ${u_in}
    boundary = 'left'
  []
  [p_right]
    type = FVDirichletBC
    variable = pressure
    value = ${p_initial}
    boundary = 'right'
  []
[]
[Functions]
  [ud_in]
    type = ParsedVectorFunction
    expression_x = '${u_in}'
  []
  [eps]
    type = ParsedFunction
    expression = 'if(x < 2, 1,
             if(x < 4, 1 - .5 / 2 * (x - 2),
             if(x < 6, .5,
             if(x < 8, .5 - .25 / 2 * (x - 6),
             if(x < 10, .25,
             if(x < 12, .25 + .25 / 2 * (x - 10),
             if(x < 14, .5,
             if(x < 16, .5 + .5 / 2 * (x - 14),
                1))))))))'
  []
[]
[Materials]
  [var_mat]
    type = PorousPrimitiveVarMaterial
    pressure = pressure
    T_fluid = T_fluid
    superficial_vel_x = sup_vel_x
    fp = fp
    porosity = porosity
  []
  [porosity]
    type = GenericFunctionMaterial
    prop_names = 'porosity'
    prop_values = 'eps'
  []
[]
[Executioner]
  solve_type = NEWTON
  line_search = 'bt'
  type = Transient
  nl_max_its = 20
  [TimeStepper]
    type = IterationAdaptiveDT
    dt = 5e-5
    optimal_iterations = 6
    growth_factor = 1.2
  []
  num_steps = 10000
  end_time = 500
  nl_abs_tol = 1e-8
[]
[Outputs]
  [out]
    type = Exodus
    execute_on = 'final'
  []
  checkpoint = true
[]
[Debug]
  show_var_residual_norms = true
[]
(modules/thermal_hydraulics/test/tests/components/junction_one_to_one_1phase/junction_one_to_one_1phase.i)
# This input file simulates the Sod shock tube using a junction in the middle
# of the domain. The solution should be exactly equivalent to the problem with
# no junction. This test examines the solutions at the junction connections
# and compares them to gold values generated from a version of this input file
# that has no junction.
[GlobalParams]
  gravity_vector = '0 0 0'
  closures = simple_closures
[]
[Functions]
  [p_ic_fn]
    type = PiecewiseConstant
    axis = x
    direction = right
    x = '0.5 1.0'
    y = '1.0 0.1'
  []
  [T_ic_fn]
    type = PiecewiseConstant
    axis = x
    direction = right
    x = '0.5 1.0'
    y = '1.4 1.12'
  []
[]
[FluidProperties]
  [fp]
    type = IdealGasFluidProperties
    gamma = 1.4
    molar_mass = 11.64024372
  []
[]
[Closures]
  [simple_closures]
    type = Closures1PhaseSimple
  []
[]
[Components]
  [left_boundary]
    type = FreeBoundary1Phase
    input = 'left_channel:in'
  []
  [left_channel]
    type = FlowChannel1Phase
    fp = fp
    position = '0 0 0'
    orientation = '1 0 0'
    length = 0.5
    n_elems = 50
    A = 1.0
    initial_T = T_ic_fn
    initial_p = p_ic_fn
    initial_vel = 0
    f = 0
  []
  [junction]
    type = JunctionOneToOne1Phase
    connections = 'left_channel:out right_channel:in'
  []
  [right_channel]
    type = FlowChannel1Phase
    fp = fp
    position = '0.5 0 0'
    orientation = '1 0 0'
    length = 0.5
    n_elems = 50
    A = 1.0
    initial_T = T_ic_fn
    initial_p = p_ic_fn
    initial_vel = 0
    f = 0
  []
  [right_boundary]
    type = FreeBoundary1Phase
    input = 'right_channel:out'
  []
[]
[Preconditioning]
  [smp]
    type = SMP
    full = true
  []
[]
[Executioner]
  type = Transient
  scheme = bdf2
  solve_type = NEWTON
  nl_rel_tol = 1e-10
  nl_abs_tol = 1e-8
  nl_max_its = 60
  l_tol = 1e-4
  start_time = 0.0
  dt = 1e-3
  num_steps = 5
  abort_on_solve_fail = true
[]
[Postprocessors]
  [rhoA_left]
    type = SideAverageValue
    variable = rhoA
    boundary = left_channel:out
    execute_on = 'initial timestep_end'
  []
  [rhouA_left]
    type = SideAverageValue
    variable = rhouA
    boundary = left_channel:out
    execute_on = 'initial timestep_end'
  []
  [rhoEA_left]
    type = SideAverageValue
    variable = rhoEA
    boundary = left_channel:out
    execute_on = 'initial timestep_end'
  []
  [rhoA_right]
    type = SideAverageValue
    variable = rhoA
    boundary = right_channel:in
    execute_on = 'initial timestep_end'
  []
  # rhouA_right is added by tests file
  [rhoEA_right]
    type = SideAverageValue
    variable = rhoEA
    boundary = right_channel:in
    execute_on = 'initial timestep_end'
  []
  # This is present to test that junction sidesets work properly
  [p_avg_junction]
    type = SideAverageValue
    boundary = 'junction'
    variable = p
    execute_on = 'initial timestep_end'
  []
[]
[Outputs]
  csv = true
  show = 'rhoA_left rhouA_left rhoEA_left rhoA_right rhouA_right rhoEA_right'
  execute_on = 'initial timestep_end'
[]
(modules/fluid_properties/test/tests/fp_interrogator/1ph.rho_rhou_rhoE.i)
[FluidPropertiesInterrogator]
  fp = fp
  rho = 0.5
  rhou = 0.5
  rhoE = 2.75
[]
[FluidProperties]
  [./fp]
    type = IdealGasFluidProperties
    gamma = 1.4
    molar_mass = 11.640243719999999
  [../]
[]
(modules/fluid_properties/test/tests/fp_interrogator/1ph.p_T.i)
[FluidPropertiesInterrogator]
  fp = fp
  p = 1e5
  T = 300
[]
[FluidProperties]
  [./fp]
    type = IdealGasFluidProperties
    gamma = 1.4
    molar_mass = 0.02900055737704918
    mu = 1.823e-05
    k = 0.02568
  [../]
[]
(modules/thermal_hydraulics/tutorials/single_phase_flow/05_secondary_side.i)
T_in = 300. # K
m_dot_in = 1e-2 # kg/s
press = 10e5 # Pa
# core parameters
core_length = 1. # m
core_n_elems = 25
core_dia = '${units 2. cm -> m}'
core_pitch = '${units 8.7 cm -> m}'
A_core = '${fparse core_pitch^2 - 0.25 *pi * core_dia^2}'
P_wet_core = '${fparse 4*core_pitch + pi * core_dia}'
Dh_core = '${fparse 4 * A_core / P_wet_core}'
# pipe parameters
pipe_dia = '${units 10. cm -> m}'
A_pipe = '${fparse 0.25 * pi * pipe_dia^2}'
tot_power = 2000 # W
# heat exchanger parameters
hx_dia_inner = '${units 12. cm -> m}'
hx_wall_thickness = '${units 5. mm -> m}'
hx_dia_outer = '${units 50. cm -> m}'
hx_radius_wall = '${fparse hx_dia_inner / 2. + hx_wall_thickness}'
hx_length = 1.5 # m
hx_n_elems = 25
m_dot_sec_in = 1. # kg/s
[GlobalParams]
  initial_p = ${press}
  initial_vel = 0.0001
  initial_T = ${T_in}
  initial_vel_x = 0
  initial_vel_y = 0
  initial_vel_z = 0
  gravity_vector = '0 0 0'
  rdg_slope_reconstruction = minmod
  scaling_factor_1phase = '1 1e-2 1e-4'
  scaling_factor_rhoV = 1
  scaling_factor_rhouV = 1e-2
  scaling_factor_rhovV = 1e-2
  scaling_factor_rhowV = 1e-2
  scaling_factor_rhoEV = 1e-4
  closures = thm_closures
  fp = he
[]
[Functions]
  [m_dot_sec_fn]
    type = PiecewiseLinear
    xy_data = '
      0    0
      10 ${m_dot_sec_in}'
  []
[]
[FluidProperties]
  [he]
    type = IdealGasFluidProperties
    molar_mass = 4e-3
    gamma = 1.67
    k = 0.2556
    mu = 3.22639e-5
  []
  [water]
    type = StiffenedGasFluidProperties
    gamma = 2.35
    cv = 1816.0
    q = -1.167e6
    p_inf = 1.0e9
    q_prime = 0
  []
[]
[Closures]
  [thm_closures]
    type = Closures1PhaseTHM
  []
[]
[SolidProperties]
  [steel]
    type = ThermalFunctionSolidProperties
    rho = 8050
    k = 45
    cp = 466
  []
[]
[Components]
  [total_power]
    type = TotalPower
    power = ${tot_power}
  []
  [up_pipe_1]
    type = FlowChannel1Phase
    position = '0 0 0'
    orientation = '0 0 1'
    length = 0.5
    n_elems = 15
    A = ${A_pipe}
    D_h = ${pipe_dia}
  []
  [jct1]
    type = JunctionParallelChannels1Phase
    position = '0 0 0.5'
    connections = 'up_pipe_1:out core_chan:in'
    volume = 1e-5
  []
  [core_chan]
    type = FlowChannel1Phase
    position = '0 0 0.5'
    orientation = '0 0 1'
    length = ${core_length}
    n_elems = ${core_n_elems}
    roughness = .0001
    A = ${A_core}
    D_h = ${Dh_core}
  []
  [core_hs]
    type = HeatStructureCylindrical
    position = '0 0 0.5'
    orientation = '0 0 1'
    length = ${core_length}
    n_elems = ${core_n_elems}
    names = 'block'
    widths = '${fparse core_dia / 2.}'
    solid_properties = 'steel'
    solid_properties_T_ref = '300'
    n_part_elems = 3
  []
  [core_heating]
    type = HeatSourceFromTotalPower
    hs = core_hs
    regions = block
    power = total_power
  []
  [core_ht]
    type = HeatTransferFromHeatStructure1Phase
    flow_channel = core_chan
    hs = core_hs
    hs_side = outer
    P_hf = '${fparse pi * core_dia}'
  []
  [jct2]
    type = JunctionParallelChannels1Phase
    position = '0 0 1.5'
    connections = 'core_chan:out up_pipe_2:in'
    volume = 1e-5
  []
  [up_pipe_2]
    type = FlowChannel1Phase
    position = '0 0 1.5'
    orientation = '0 0 1'
    length = 0.5
    n_elems = 10
    A = ${A_pipe}
    D_h = ${pipe_dia}
  []
  [jct3]
    type = JunctionOneToOne1Phase
    connections = 'up_pipe_2:out top_pipe_1:in'
  []
  [top_pipe_1]
    type = FlowChannel1Phase
    position = '0 0 2'
    orientation = '1 0 0'
    length = 0.5
    n_elems = 10
    A = ${A_pipe}
    D_h = ${pipe_dia}
  []
  [top_pipe_2]
    type = FlowChannel1Phase
    position = '0.5 0 2'
    orientation = '1 0 0'
    length = 0.5
    n_elems = 10
    A = ${A_pipe}
    D_h = ${pipe_dia}
  []
  [jct4]
    type = VolumeJunction1Phase
    position = '0.5 0 2'
    volume = 1e-5
    connections = 'top_pipe_1:out top_pipe_2:in press_pipe:in'
  []
  [press_pipe]
    type = FlowChannel1Phase
    position = '0.5 0 2'
    orientation = '0 1 0'
    length = 0.2
    n_elems = 5
    A = ${A_pipe}
    D_h = ${pipe_dia}
  []
  [pressurizer]
    type = InletStagnationPressureTemperature1Phase
    p0 = ${press}
    T0 = ${T_in}
    input = press_pipe:out
  []
  [jct5]
    type = JunctionOneToOne1Phase
    connections = 'top_pipe_2:out down_pipe_1:in'
  []
  [down_pipe_1]
    type = FlowChannel1Phase
    position = '1 0 2'
    orientation = '0 0 -1'
    length = 0.25
    A = ${A_pipe}
    n_elems = 5
  []
  [jct6]
    type = JunctionParallelChannels1Phase
    position = '1 0 1.75'
    connections = 'down_pipe_1:out hx/pri:in'
    volume = 1e-5
  []
  [hx]
    [pri]
      type = FlowChannel1Phase
      position = '1 0 1.75'
      orientation = '0 0 -1'
      length = ${hx_length}
      n_elems = ${hx_n_elems}
      roughness = 1e-5
      A = '${fparse pi * hx_dia_inner * hx_dia_inner / 4.}'
      D_h = ${hx_dia_inner}
    []
    [ht_pri]
      type = HeatTransferFromHeatStructure1Phase
      hs = hx/wall
      hs_side = inner
      flow_channel = hx/pri
      P_hf = '${fparse pi * hx_dia_inner}'
    []
    [wall]
      type = HeatStructureCylindrical
      position = '1 0 1.75'
      orientation = '0 0 -1'
      length = ${hx_length}
      n_elems = ${hx_n_elems}
      widths = '${hx_wall_thickness}'
      n_part_elems = '3'
      solid_properties = 'steel'
      solid_properties_T_ref = '300'
      names = '0'
      inner_radius = '${fparse hx_dia_inner / 2.}'
    []
    [ht_sec]
      type = HeatTransferFromHeatStructure1Phase
      hs = hx/wall
      hs_side = outer
      flow_channel = hx/sec
      P_hf = '${fparse 2 * pi * hx_radius_wall}'
    []
    [sec]
      type = FlowChannel1Phase
      position = '${fparse 1 + hx_wall_thickness} 0 0.25'
      orientation = '0 0 1'
      length = ${hx_length}
      n_elems = ${hx_n_elems}
      A = '${fparse pi * (hx_dia_outer * hx_dia_outer / 4. - hx_radius_wall * hx_radius_wall)}'
      D_h = '${fparse hx_dia_outer - (2 * hx_radius_wall)}'
      fp = water
      initial_T = 300
    []
  []
  [jct7]
    type = JunctionParallelChannels1Phase
    position = '1 0 0.5'
    connections = 'hx/pri:out down_pipe_2:in'
    volume = 1e-5
  []
  [down_pipe_2]
    type = FlowChannel1Phase
    position = '1 0 0.25'
    orientation = '0 0 -1'
    length = 0.25
    n_elems = 10
    A = ${A_pipe}
    D_h = ${pipe_dia}
  []
  [jct8]
    type = JunctionOneToOne1Phase
    connections = 'down_pipe_2:out bottom_1:in'
  []
  [bottom_1]
    type = FlowChannel1Phase
    position = '1 0 0'
    orientation = '-1 0 0'
    length = 0.5
    n_elems = 5
    A = ${A_pipe}
    D_h = ${pipe_dia}
  []
  [pump]
    type = Pump1Phase
    position = '0.5 0 0'
    connections = 'bottom_1:out bottom_2:in'
    volume = 1e-4
    A_ref = ${A_pipe}
    head = 0
  []
  [bottom_2]
    type = FlowChannel1Phase
    position = '0.5 0 0'
    orientation = '-1 0 0'
    length = 0.5
    n_elems = 5
    A = ${A_pipe}
    D_h = ${pipe_dia}
  []
  [jct9]
    type = JunctionOneToOne1Phase
    connections = 'bottom_2:out up_pipe_1:in'
  []
  [inlet_sec]
    type = InletMassFlowRateTemperature1Phase
    input = 'hx/sec:in'
    m_dot = 0
    T = 300
  []
  [outlet_sec]
    type = Outlet1Phase
    input = 'hx/sec:out'
    p = 1e5
  []
[]
[ControlLogic]
  [set_point]
    type = GetFunctionValueControl
    function = ${m_dot_in}
  []
  [pid]
    type = PIDControl
    initial_value = 0.0
    set_point = set_point:value
    input = m_dot_pump
    K_p = 1.
    K_i = 4.
    K_d = 0
  []
  [set_pump_head]
    type = SetComponentRealValueControl
    component = pump
    parameter = head
    value = pid:output
  []
  [m_dot_sec_inlet_ctrl]
    type = GetFunctionValueControl
    function = m_dot_sec_fn
  []
  [set_m_dot_sec_ctrl]
    type = SetComponentRealValueControl
    component = inlet_sec
    parameter = m_dot
    value = m_dot_sec_inlet_ctrl:value
  []
[]
[Postprocessors]
  [power_to_coolant]
    type = ADHeatRateConvection1Phase
    block = core_chan
    P_hf = '${fparse pi *core_dia}'
  []
  [m_dot_pump]
    type = ADFlowJunctionFlux1Phase
    boundary = core_chan:in
    connection_index = 1
    equation = mass
    junction = jct7
  []
  [core_T_out]
    type = SideAverageValue
    boundary = core_chan:out
    variable = T
  []
  [core_p_in]
    type = SideAverageValue
    boundary = core_chan:in
    variable = p
  []
  [core_p_out]
    type = SideAverageValue
    boundary = core_chan:out
    variable = p
  []
  [core_delta_p]
    type = ParsedPostprocessor
    pp_names = 'core_p_in core_p_out'
    expression = 'core_p_in - core_p_out'
  []
  [hx_pri_T_out]
    type = SideAverageValue
    boundary = hx/pri:out
    variable = T
  []
  [hx_sec_T_in]
    type = SideAverageValue
    boundary = inlet_sec
    variable = T
  []
  [hx_sec_T_out]
    type = SideAverageValue
    boundary = outlet_sec
    variable = T
  []
  [m_dot_sec]
    type = ADFlowBoundaryFlux1Phase
    boundary = inlet_sec
    equation = mass
  []
[]
[Preconditioning]
  [pc]
    type = SMP
    full = true
  []
[]
[Executioner]
  type = Transient
  start_time = 0
  [TimeStepper]
    type = IterationAdaptiveDT
    dt = 1
  []
  dtmax = 5
  end_time = 500
  line_search = basic
  solve_type = NEWTON
  petsc_options_iname = '-pc_type'
  petsc_options_value = 'lu'
  nl_rel_tol = 0
  nl_abs_tol = 1e-8
  nl_max_its = 25
[]
[Outputs]
  exodus = true
  [console]
    type = Console
    max_rows = 1
    outlier_variable_norms = false
  []
  print_linear_residuals = false
[]
(modules/porous_flow/test/tests/jacobian/esbc02.i)
# Tests the Jacobian of PorousFlowEnthalpySink when pressure
[Mesh]
  type = GeneratedMesh
  dim = 2
[]
[GlobalParams]
  PorousFlowDictator = dictator
  at_nodes = true
[]
[UserObjects]
  [dictator]
    type = PorousFlowDictator
    porous_flow_vars = 'pp temp'
    number_fluid_phases = 1
    number_fluid_components = 1
  []
  [pc]
    type = PorousFlowCapillaryPressureConst
    pc = 0.1
  []
[]
[Variables]
  [pp]
    initial_condition = 1
  []
  [temp]
    initial_condition = 2
  []
[]
[AuxVariables]
  [pressure]
  []
[]
[Kernels]
  [mass0]
    type = TimeDerivative
    variable = pp
  []
  [heat_conduction]
    type = TimeDerivative
    variable = temp
  []
[]
[FluidProperties]
  [simple_fluid]
    type = IdealGasFluidProperties
  []
[]
[Materials]
  [ppss]
    type = PorousFlow1PhaseFullySaturated
    porepressure = pp
  []
  [simple_fluid]
    type = PorousFlowSingleComponentFluid
    fp = simple_fluid
    phase = 0
  []
  [temperature]
    type = PorousFlowTemperature
    temperature = temp
  []
[]
[BCs]
  [left]
    type = PorousFlowEnthalpySink
    variable = temp
    boundary = left
    porepressure_var = pressure
    T_in = 300
    fp = simple_fluid
    flux_function = -23
  []
[]
[Preconditioning]
  [andy]
    type = SMP
    full = true
  []
[]
[Executioner]
  type = Transient
  solve_type = Newton
  dt = 0.1
  num_steps = 1
  nl_rel_tol = 1E-12
  nl_abs_tol = 1E-12
  petsc_options_iname = '-snes_test_err'
  petsc_options_value = '1e-1'
[]
(modules/fluid_properties/test/tests/materials/fluid_properties_material/test_ve.i)
[Mesh]
  type = GeneratedMesh
  dim = 2
  nx = 2
  ny = 2
  elem_type = QUAD4
[]
[Functions]
  [fn_1]
    type = ParsedFunction
    expression = '2000 + 100*x'
  []
  [fn_2]
    type = ParsedFunction
    expression = '0.02 * (x*x+y*y)'
  []
[]
[AuxVariables]
  [e]
    [InitialCondition]
      type = FunctionIC
      function = fn_1
    []
  []
  [v]
    [InitialCondition]
      type = FunctionIC
      function = fn_2
    []
  []
  [p]
    family = MONOMIAL
    order = CONSTANT
  []
  [T]
    family = MONOMIAL
    order = CONSTANT
  []
  [cp]
    family = MONOMIAL
    order = CONSTANT
  []
  [cv]
    family = MONOMIAL
    order = CONSTANT
  []
  [c]
    family = MONOMIAL
    order = CONSTANT
  []
  [mu]
    family = MONOMIAL
    order = CONSTANT
  []
  [k]
    family = MONOMIAL
    order = CONSTANT
  []
  [s]
    family = MONOMIAL
    order = CONSTANT
  []
  [g]
    family = MONOMIAL
    order = CONSTANT
  []
[]
[AuxKernels]
  [p]
    type = MaterialRealAux
     variable = p
     property = pressure
  []
  [T]
    type = MaterialRealAux
     variable = T
     property = temperature
  []
  [cp]
    type = MaterialRealAux
     variable = cp
     property = cp
  []
  [cv]
    type = MaterialRealAux
     variable = cv
     property = cv
  []
  [c]
    type = MaterialRealAux
     variable = c
     property = c
  []
  [mu]
    type = MaterialRealAux
     variable = mu
     property = mu
  []
  [k]
    type = MaterialRealAux
     variable = k
     property = k
  []
  [s]
    type = MaterialRealAux
     variable = s
     property = s
  []
  [g]
    type = MaterialRealAux
     variable = g
     property = g
  []
[]
[FluidProperties]
  [ideal_gas]
    type = IdealGasFluidProperties
    gamma = 1.4
    molar_mass = 1.000536678700361
  []
[]
[Materials]
  [fp_mat]
    type = FluidPropertiesMaterialVE
    e = e
    v = v
    fp = ideal_gas
  []
[]
[Executioner]
  type = Steady
  solve_type = NEWTON
[]
[Problem]
  solve = false
[]
[Outputs]
  exodus = true
[]
(modules/thermal_hydraulics/test/tests/problems/square_wave/square_wave.i)
# Square wave problem
[GlobalParams]
  gravity_vector = '0 0 0'
  rdg_slope_reconstruction = minmod
  closures = simple_closures
[]
[Functions]
  [T_ic_fn]
    type = PiecewiseConstant
    axis = x
    direction = right
    x = '0.1 0.6 1.0'
    y = '2.8 1.4 2.8'
  []
[]
[FluidProperties]
  [fp]
    type = IdealGasFluidProperties
    gamma = 1.4
    molar_mass = 11.64024372
  []
[]
[Closures]
  [simple_closures]
    type = Closures1PhaseSimple
  []
[]
[Components]
  [pipe]
    type = FlowChannel1Phase
    fp = fp
    # geometry
    position = '0 0 0'
    orientation = '1 0 0'
    length = 1.0
    n_elems = 400
    A = 1.0
    # IC
    initial_T = T_ic_fn
    initial_p = 1
    initial_vel = 1
    f = 0
  []
  [left_boundary]
    type = FreeBoundary1Phase
    input = 'pipe:in'
  []
  [right_boundary]
    type = FreeBoundary1Phase
    input = 'pipe:out'
  []
[]
[Executioner]
  type = Transient
  [TimeIntegrator]
    type = ExplicitSSPRungeKutta
    order = 2
  []
  solve_type = LINEAR
  l_tol = 1e-4
  nl_rel_tol = 1e-20
  nl_abs_tol = 1e-8
  nl_max_its = 60
  # run to t = 0.3
  start_time = 0.0
  dt = 2e-4
  num_steps = 1500
  abort_on_solve_fail = true
[]
[Outputs]
  file_base = 'square_wave'
  velocity_as_vector = false
  execute_on = 'initial timestep_end'
  [out]
    type = Exodus
    show = 'p T vel'
  []
[]
(modules/thermal_hydraulics/test/tests/problems/sedov_blast_wave/sedov_blast_wave.i)
# This test problem is the Sedov blast wave test problem,
# which is a Riemann problem with the following parameters:
#   * domain = (0,1)
#   * gravity = 0
#   * EoS: Ideal gas EoS with gamma = 1.4, R = 0.71428571428571428571
#   * interface: x = 0.5
#   * typical end time: 0.15
# Left initial values:
#   * rho = 0.445
#   * vel = 0.692
#   * p = 3.52874226
# Right initial values:
#   * rho = 0.5
#   * vel = 0
#   * p = 0.571
[GlobalParams]
  gravity_vector = '0 0 0'
  closures = simple_closures
[]
[Functions]
  [p_ic_fn]
    type = PiecewiseConstant
    axis = x
    direction = right
    x = '0.0025                1'
    y = '1.591549333333333e+06 6.666666666666668e-09'
  []
  [T_ic_fn]
    type = PiecewiseConstant
    axis = x
    direction = right
    x = '0.0025                1'
    y = '2.228169066666667e+06 9.333333333333334e-09'
  []
[]
[FluidProperties]
  [fp]
    type = IdealGasFluidProperties
    gamma = 1.66666666666666666667
    molar_mass = 11.64024372
  []
[]
[Closures]
  [simple_closures]
    type = Closures1PhaseSimple
  []
[]
[Components]
  [pipe]
    type = FlowChannel1Phase
    fp = fp
    # geometry
    position = '0 0 0'
    orientation = '1 0 0'
    length = 1.0
    n_elems = 400
    A = 1.0
    # IC
    initial_T = T_ic_fn
    initial_p = p_ic_fn
    initial_vel = 0
    f = 0
  []
  [left_boundary]
    type = SolidWall1Phase
    input = 'pipe:in'
  []
  [right_boundary]
    type = FreeBoundary1Phase
    input = 'pipe:out'
  []
[]
[Executioner]
  type = Transient
  [TimeIntegrator]
    type = ExplicitSSPRungeKutta
    order = 2
  []
  solve_type = LINEAR
  l_tol = 1e-4
  nl_rel_tol = 1e-20
  nl_abs_tol = 1e-8
  nl_max_its = 60
  # run to t = 0.005
  start_time = 0.0
  dt = 1e-6
  num_steps = 5000
  abort_on_solve_fail = true
[]
[Outputs]
  file_base = 'sedov_blast_wave'
  velocity_as_vector = false
  execute_on = 'initial timestep_end'
  [out]
    type = Exodus
    show = 'p T vel'
  []
[]
(modules/navier_stokes/test/tests/finite_volume/cns/pressure_outlet/subsonic_nozzle_fixed_inflow_hllc.i)
inlet_vel = 120
rho_in = 0.8719748696
H_in = 4.0138771448e+05
gamma = 1.4
R = 8.3145
molar_mass = 29e-3
R_specific = ${fparse R / molar_mass}
cp = ${fparse gamma * R_specific / (gamma - 1)}
cv = ${fparse cp / gamma}
T_in = ${fparse H_in / gamma / cv}
mass_flux = ${fparse inlet_vel * rho_in}
outlet_pressure = 0.9e5
[GlobalParams]
  fp = fp
[]
[Debug]
   show_material_props = true
[]
[Mesh]
  [file]
    type = FileMeshGenerator
    file = subsonic_nozzle.e
  []
[]
[FluidProperties]
  [fp]
    type = IdealGasFluidProperties
  []
[]
[Variables]
  [rho]
    family = MONOMIAL
    order = CONSTANT
    fv = true
    initial_condition = 0.8719748696
  []
  [rho_u]
    family = MONOMIAL
    order = CONSTANT
    fv = true
    initial_condition = 1e-4
  []
  [rho_v]
    family = MONOMIAL
    order = CONSTANT
    fv = true
  []
  [rho_E]
    family = MONOMIAL
    order = CONSTANT
    fv = true
    initial_condition = 2.5e5
  []
[]
[FVKernels]
  # Mass conservation
  [mass_time]
    type = FVTimeKernel
    variable = rho
  []
  [mass_advection]
    type = CNSFVMassHLLC
    variable = rho
  []
  # Momentum x conservation
  [momentum_x_time]
    type = FVTimeKernel
    variable = rho_u
  []
  [momentum_x_advection]
    type = CNSFVMomentumHLLC
    variable = rho_u
    momentum_component = x
  []
  # Momentum y conservation
  [momentum_y_time]
    type = FVTimeKernel
    variable = rho_v
  []
  [momentum_y_advection]
    type = CNSFVMomentumHLLC
    variable = rho_v
    momentum_component = y
  []
  # Fluid energy conservation
  [fluid_energy_time]
    type = FVTimeKernel
    variable = rho_E
  []
  [fluid_energy_advection]
    type = CNSFVFluidEnergyHLLC
    variable = rho_E
  []
[]
[FVBCs]
  ## inflow boundaries
  [mass_inflow]
    type = CNSFVHLLCSpecifiedMassFluxAndTemperatureMassBC
    variable = rho
    boundary = left
    rhou = ${mass_flux}
    rhov = 0
    temperature = ${T_in}
  []
  [momentum_x_inflow]
    type = CNSFVHLLCSpecifiedMassFluxAndTemperatureMomentumBC
    variable = rho_u
    boundary = left
    rhou = ${mass_flux}
    rhov = 0
    temperature = ${T_in}
    momentum_component = x
  []
  [momentum_y_inflow]
    type = CNSFVHLLCSpecifiedMassFluxAndTemperatureMomentumBC
    variable = rho_v
    boundary = left
    rhou = ${mass_flux}
    rhov = 0
    temperature = ${T_in}
    momentum_component = y
  []
  [fluid_energy_inflow]
    type = CNSFVHLLCSpecifiedMassFluxAndTemperatureFluidEnergyBC
    variable = rho_E
    boundary = left
    rhou = ${mass_flux}
    rhov = 0
    temperature = ${T_in}
  []
  ## outflow conditions
  [mass_outflow]
    type = CNSFVHLLCSpecifiedPressureMassBC
    variable = rho
    boundary = right
    pressure = ${outlet_pressure}
  []
  [momentum_x_outflow]
    type = CNSFVHLLCSpecifiedPressureMomentumBC
    variable = rho_u
    boundary = right
    momentum_component = x
    pressure = ${outlet_pressure}
  []
  [momentum_y_outflow]
    type = CNSFVHLLCSpecifiedPressureMomentumBC
    variable = rho_v
    boundary = right
    momentum_component = y
    pressure = ${outlet_pressure}
  []
  [fluid_energy_outflow]
    type = CNSFVHLLCSpecifiedPressureFluidEnergyBC
    variable = rho_E
    boundary = right
    pressure = ${outlet_pressure}
    []
  # wall conditions
  [momentum_x_pressure_wall]
    type = CNSFVMomImplicitPressureBC
    variable = rho_u
    momentum_component = x
    boundary = wall
  []
  [momentum_y_pressure_wall]
    type = CNSFVMomImplicitPressureBC
    variable = rho_v
    momentum_component = y
    boundary = wall
  []
[]
[AuxVariables]
  [Ma]
    family = MONOMIAL
    order = CONSTANT
  []
  [p]
    family = MONOMIAL
    order = CONSTANT
  []
  [Ma_layered]
    family = MONOMIAL
    order = CONSTANT
  []
[]
[UserObjects]
  [layered_Ma_UO]
    type = LayeredAverage
    variable = Ma
    num_layers = 10
    direction = x
  []
[]
[AuxKernels]
  [Ma_aux]
    type = NSMachAux
    variable = Ma
    fluid_properties = fp
    use_material_properties = true
  []
  [p_aux]
    type = ADMaterialRealAux
    variable = p
    property = pressure
  []
  [Ma_layered_aux]
    type = SpatialUserObjectAux
    variable = Ma_layered
    user_object = layered_Ma_UO
  []
[]
[Materials]
  [var_mat]
    type = ConservedVarValuesMaterial
    rho = rho
    rhou = rho_u
    rhov = rho_v
    rho_et = rho_E
  []
  [sound_speed]
    type = SoundspeedMat
  []
[]
[Postprocessors]
  [outflow_Ma]
    type = SideAverageValue
    variable = Ma
    boundary = right
  []
  [outflow_pressure]
    type = SideAverageValue
    variable = p
    boundary = right
  []
[]
[Preconditioning]
  [smp]
    type = SMP
    full = true
    petsc_options_iname = '-pc_type'
    petsc_options_value = 'lu'
  []
[]
[Executioner]
  type = Transient
  end_time = 10
  solve_type = NEWTON
  nl_abs_tol = 1e-7
  [TimeIntegrator]
    type = ImplicitEuler
  []
  [TimeStepper]
    type = IterationAdaptiveDT
    dt = 5e-3
    optimal_iterations = 6
    growth_factor = 1.5
  []
[]
[VectorPostprocessors]
  [Ma_layered]
    type = LineValueSampler
    variable = Ma_layered
    start_point = '0 0 0'
    end_point = '3 0 0'
    num_points = 100
    sort_by = x
    warn_discontinuous_face_values = false
  []
[]
[Outputs]
  [out]
    type = Exodus
    execute_on = 'final'
  []
[]
(modules/thermal_hydraulics/test/tests/components/component/err.nonexisting_component.i)
[FluidProperties]
  [fp]
    type = IdealGasFluidProperties
  []
[]
[Components]
  [cmp]
    type = HeatTransferFromSpecifiedTemperature1Phase
    flow_channel = pipe
    T_wall = 100
  []
[]
[Problem]
  solve = false
[]
[Executioner]
  type = Transient
  num_steps = 1
[]
(modules/thermal_hydraulics/test/tests/components/gate_valve_1phase/gate_valve_1phase.i)
# This input file is used to test the gate valve component.
# This problem consists of a T junction of 3 pipes. The inlet pipe is one of the
# 2 pipes of the "top" of the T. The other 2 pipes each have a gate valve.
# Initially, one of the 2 outlet pipes has an open valve and the other has a
# closed valve. Later in the transient, the valves gradually open/close to switch
# the outlet flow direction.
p = 1.0e5
T = 300.0
rho = 1.161430436 # @ 1e5 Pa, 300 K
D = 0.1
A = ${fparse pi * D^2 / 4.0}
V_junction = ${fparse pi * D^3 / 4.0}
vel_in = 2.0
m_dot = ${fparse rho * vel_in * A}
t_begin = 0.3
delta_t_open = 0.1
[GlobalParams]
  gravity_vector = '0 0 0'
  closures = simple_closures
  fp = fp
  f = 0.0
  initial_T = ${T}
  initial_p = ${p}
  initial_vel = 0
[]
[FluidProperties]
  [fp]
    type = IdealGasFluidProperties
    gamma = 1.4
    molar_mass = 0.02897
  []
[]
[Closures]
  [simple_closures]
    type = Closures1PhaseSimple
  []
[]
[Functions]
  [pipe3_open_fn]
    type = TimeRampFunction
    initial_value = 1
    final_value = 0
    initial_time = ${t_begin}
    ramp_duration = ${delta_t_open}
  []
  [pipe2_open_fn]
    type = ParsedFunction
    expression = '1 - pipe3_phi'
    symbol_names = 'pipe3_phi'
    symbol_values = 'pipe3_open_fn'
  []
[]
[Components]
  [inlet]
    type = InletMassFlowRateTemperature1Phase
    input = 'pipe1:in'
    m_dot = ${m_dot}
    T = ${T}
  []
  [pipe1]
    type = FlowChannel1Phase
    position = '0 0 0'
    orientation = '1 0 0'
    length = 1.0
    n_elems = 50
    A = ${A}
  []
  [volume_junction]
    type = VolumeJunction1Phase
    position = '1 0 0'
    connections = 'pipe1:out pipe2A:in pipe3A:in'
    volume = ${V_junction}
    initial_vel_x = 0
    initial_vel_y = 0
    initial_vel_z = 0
  []
  [pipe2A]
    type = FlowChannel1Phase
    position = '1 0 0'
    orientation = '0 1 0'
    length = 0.5
    n_elems = 25
    A = ${A}
  []
  [pipe2_valve]
    type = GateValve1Phase
    connections = 'pipe2A:out pipe2B:in'
    open_area_fraction = 0 # (controlled via 'pipe2_valve_control')
  []
  [pipe2B]
    type = FlowChannel1Phase
    position = '1 0.5 0'
    orientation = '0 1 0'
    length = 0.5
    n_elems = 25
    A = ${A}
  []
  [pipe2_outlet]
    type = Outlet1Phase
    input = 'pipe2B:out'
    p = ${p}
  []
  [pipe3A]
    type = FlowChannel1Phase
    position = '1 0 0'
    orientation = '1 0 0'
    length = 0.5
    n_elems = 25
    A = ${A}
  []
  [pipe3_valve]
    type = GateValve1Phase
    connections = 'pipe3A:out pipe3B:in'
    open_area_fraction = 0 # (controlled via 'pipe3_valve_control')
  []
  [pipe3B]
    type = FlowChannel1Phase
    position = '1.5 0 0'
    orientation = '1 0 0'
    length = 0.5
    n_elems = 25
    A = ${A}
  []
  [pipe3_outlet]
    type = Outlet1Phase
    input = 'pipe3B:out'
    p = ${p}
  []
[]
[ControlLogic]
  [pipe2_valve_control]
    type = TimeFunctionComponentControl
    component = pipe2_valve
    parameter = open_area_fraction
    function = pipe2_open_fn
  []
  [pipe3_valve_control]
    type = TimeFunctionComponentControl
    component = pipe3_valve
    parameter = open_area_fraction
    function = pipe3_open_fn
  []
[]
[Preconditioning]
  [smp]
    type = SMP
    full = true
  []
[]
[Executioner]
  type = Transient
  scheme = bdf2
  solve_type = PJFNK
  nl_rel_tol = 1e-8
  nl_abs_tol = 1e-8
  nl_max_its = 20
  l_tol = 1e-4
  start_time = 0.0
  end_time = 1.0
  dt = 0.01
  abort_on_solve_fail = true
[]
[Outputs]
  exodus = true
  show = 'p T vel'
  velocity_as_vector = false
  print_linear_residuals = false
  [console]
    type = Console
    max_rows = 1
  []
[]
(modules/fluid_properties/test/tests/tabulated/tabulated_v_e.i)
# Test thermophysical property calculations using TabulatedBiCubic/LinearFluidProperties.
# Calculations for density, internal energy and enthalpy using bicubic or bilinear
# interpolation of data generated using CO2FluidProperties.
[Mesh]
  type = GeneratedMesh
  dim = 2
  # This test uses ElementalVariableValue postprocessors on specific
  # elements, so element numbering needs to stay unchanged
  allow_renumbering = false
[]
[AuxVariables]
  [p]
    family = MONOMIAL
    order = CONSTANT
  []
  [T]
    family = MONOMIAL
    order = CONSTANT
  []
  [mu]
    family = MONOMIAL
    order = CONSTANT
  []
  [s]
    family = MONOMIAL
    order = CONSTANT
  []
  [cv]
    family = MONOMIAL
    order = CONSTANT
  []
  [cp]
    family = MONOMIAL
    order = CONSTANT
  []
  [c]
    family = MONOMIAL
    order = CONSTANT
  []
  [k]
    family = MONOMIAL
    order = CONSTANT
  []
  [g]
    family = MONOMIAL
    order = CONSTANT
  []
[]
[AuxKernels]
  [pressure]
    type = MaterialRealAux
    variable = p
    property = pressure
  []
  [temperature]
    type = MaterialRealAux
    variable = T
    property = temperature
  []
  [viscosity]
    type = MaterialRealAux
    variable = mu
    property = mu
  []
  [s]
    type = MaterialRealAux
    variable = 's'
    property = 's'
  []
  [cv]
    type = MaterialRealAux
    variable = cv
    property = cv
  []
  [cp]
    type = MaterialRealAux
    variable = cp
    property = cp
  []
  [c]
    type = MaterialRealAux
    variable = c
    property = c
  []
  [thermal_conductivity]
    type = MaterialRealAux
    variable = k
    property = k
  []
  [g]
    type = MaterialRealAux
    variable = g
    property = g
  []
[]
[FluidProperties]
  [co2]
    type = IdealGasFluidProperties
  []
  [tabulated]
    type = TabulatedBicubicFluidProperties
    interpolated_properties = 'density enthalpy viscosity internal_energy k c cv cp entropy'
    # Uncomment this to read the tabulation
    # fluid_property_file = fluid_properties.csv
    # Uncomment this to use the CO2 fluid properties above
    # fp = 'co2'
    # Uncomment this to write out a tabulation
    # fluid_property_output_file = 'fluid_properties.csv'
    # Enable the use of the (v,e) variables
    construct_pT_from_ve = true
    construct_pT_from_vh = true
    out_of_bounds_behavior = 'set_to_closest_bound'
    # Tabulation range
    temperature_min = 280
    temperature_max = 600
    pressure_min = 1e5
    pressure_max = 7e5
    # Newton parameters
    tolerance = 1e-8
    T_initial_guess = 310
    p_initial_guess = 1.8e5
  []
[]
[Materials]
  [fp_mat_ve]
    type = FluidPropertiesMaterialVE
    v = 0.03108975251
    e = -30797.6
    fp = tabulated
  []
[]
[Executioner]
  type = Steady
  solve_type = NEWTON
[]
[Problem]
  solve = false
[]
[Postprocessors]
  [p]
    type = ElementalVariableValue
    elementid = 0
    variable = p
  []
  [T]
    type = ElementalVariableValue
    elementid = 0
    variable = T
  []
  [mu]
    type = ElementalVariableValue
    elementid = 0
    variable = mu
  []
  [s]
    type = ElementalVariableValue
    elementid = 0
    variable = s
  []
  [cv]
    type = ElementalVariableValue
    elementid = 0
    variable = cv
  []
  [cp]
    type = ElementalVariableValue
    elementid = 0
    variable = cp
  []
  [c]
    type = ElementalVariableValue
    elementid = 0
    variable = c
  []
  [k]
    type = ElementalVariableValue
    elementid = 0
    variable = k
  []
  [g]
    type = ElementalVariableValue
    elementid = 0
    variable = g
  []
[]
[Outputs]
  csv = true
  file_base = tabulated_v_e_bilinear_out
  execute_on = 'TIMESTEP_END'
[]
(modules/thermal_hydraulics/test/tests/components/flow_channel_gasmix/flow_channel_gasmix.i)
initial_p = 1e5
initial_T = 500
[FluidProperties]
  [fp1]
    type = IdealGasFluidProperties
    gamma = 1.4
    molar_mass = 0.029
  []
  [fp2]
    type = IdealGasFluidProperties
    gamma = 1.5
    molar_mass = 0.04
  []
  [fp_mix]
    type = IdealGasMixtureFluidProperties
    component_fluid_properties = 'fp1 fp2'
  []
[]
[Closures]
  [closures]
    type = FunctorClosures
    properties = 'f_D mass_diffusion_coefficient'
    functors = '0 0.26e-4'
  []
[]
[Functions]
  [initial_mass_fraction_fn]
    type = PiecewiseConstant
    axis = x
    x = '0 5.0'
    y = '0.2 0.4'
  []
[]
[Components]
  [pipe]
    type = FlowChannelGasMix
    position = '0 0 0'
    orientation = '1 0 0'
    length = 10.0
    n_elems = 50
    A = 0.2
    initial_mass_fraction = initial_mass_fraction_fn
    initial_p = ${initial_p}
    initial_T = ${initial_T}
    initial_vel = 0
    fp = fp_mix
    closures = 'closures'
    scaling_factor_rhoEA = 1e-5
  []
  [inlet]
    type = SolidWallGasMix
    input = 'pipe:in'
  []
  [outlet]
    type = SolidWallGasMix
    input = 'pipe:out'
  []
[]
[Preconditioning]
  [pc]
    type = SMP
    full = true
  []
[]
[Executioner]
  type = Transient
  scheme = bdf2
  dt = 1000
  num_steps = 5
  solve_type = NEWTON
  petsc_options_iname = '-pc_type'
  petsc_options_value = 'lu'
  nl_rel_tol = 1e-8
  nl_abs_tol = 1e-8
  nl_max_its = 15
  l_tol = 1e-3
  l_max_its = 10
[]
[Outputs]
  [exodus]
    type = Exodus
    file_base = flow_channel_gasmix
    show = 'mass_fraction p T'
  []
[]
(modules/navier_stokes/test/tests/finite_volume/pwcns/channel-flow/2d-transient-gas.i)
# Fluid properties
mu = 'mu'
rho = 'rho'
k = 'k'
# Solid properties
cp_s = 2
rho_s = 4
k_s = 1e-2
h_fs = 10
# Operating conditions
u_inlet = 1
T_inlet = 200
p_outlet = 10
top_side_temperature = 150
# Numerical scheme
advected_interp_method = 'upwind'
velocity_interp_method = 'rc'
[Mesh]
  [gen]
    type = GeneratedMeshGenerator
    dim = 2
    xmin = 0
    xmax = 10
    ymin = 0
    ymax = 1
    nx = 20
    ny = 5
  []
[]
[GlobalParams]
  rhie_chow_user_object = 'rc'
[]
[UserObjects]
  [rc]
    type = PINSFVRhieChowInterpolator
    u = superficial_vel_x
    v = superficial_vel_y
    pressure = pressure
    porosity = porosity
  []
[]
[Variables]
  [superficial_vel_x]
    type = PINSFVSuperficialVelocityVariable
    initial_condition = ${u_inlet}
  []
  [superficial_vel_y]
    type = PINSFVSuperficialVelocityVariable
  []
  [pressure]
    type = INSFVPressureVariable
    initial_condition = ${p_outlet}
  []
  [T_fluid]
    type = INSFVEnergyVariable
    initial_condition = ${T_inlet}
  []
  [T_solid]
    type = MooseVariableFVReal
    initial_condition = 100
  []
[]
[AuxVariables]
  [porosity]
    type = MooseVariableFVReal
    initial_condition = 0.5
  []
[]
[FVKernels]
  [mass_time]
    type = PWCNSFVMassTimeDerivative
    variable = pressure
    porosity = 'porosity'
    drho_dt = 'drho_dt'
  []
  [mass]
    type = PWCNSFVMassAdvection
    variable = pressure
    advected_interp_method = ${advected_interp_method}
    velocity_interp_method = ${velocity_interp_method}
    rho = ${rho}
  []
  [u_time]
    type = WCNSFVMomentumTimeDerivative
    variable = superficial_vel_x
    rho = ${rho}
    drho_dt = 'drho_dt'
    momentum_component = 'x'
  []
  [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
  []
  [v_time]
    type = WCNSFVMomentumTimeDerivative
    variable = superficial_vel_y
    rho = ${rho}
    drho_dt = 'drho_dt'
    momentum_component = 'y'
  []
  [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
  []
  [energy_time]
    type = PINSFVEnergyTimeDerivative
    variable = T_fluid
    h = 'h'
    dh_dt = 'dh_dt'
    rho = ${rho}
    drho_dt = 'drho_dt'
    is_solid = false
    porosity = porosity
  []
  [energy_advection]
    type = PINSFVEnergyAdvection
    variable = T_fluid
    velocity_interp_method = ${velocity_interp_method}
    advected_interp_method = ${advected_interp_method}
  []
  [energy_diffusion]
    type = PINSFVEnergyDiffusion
    variable = T_fluid
    k = ${k}
    porosity = porosity
  []
  [energy_convection]
    type = PINSFVEnergyAmbientConvection
    variable = T_fluid
    is_solid = false
    T_fluid = T_fluid
    T_solid = T_solid
    h_solid_fluid = 'h_cv'
  []
  [solid_energy_time]
    type = PINSFVEnergyTimeDerivative
    variable = T_solid
    cp = ${cp_s}
    rho = ${rho_s}
    is_solid = true
    porosity = porosity
  []
  [solid_energy_diffusion]
    type = FVDiffusion
    variable = T_solid
    coeff = ${k_s}
  []
  [solid_energy_convection]
    type = PINSFVEnergyAmbientConvection
    variable = T_solid
    is_solid = true
    T_fluid = T_fluid
    T_solid = T_solid
    h_solid_fluid = 'h_cv'
  []
[]
[FVBCs]
  [inlet-u]
    type = INSFVInletVelocityBC
    boundary = 'left'
    variable = superficial_vel_x
    functor = ${u_inlet}
  []
  [inlet-v]
    type = INSFVInletVelocityBC
    boundary = 'left'
    variable = superficial_vel_y
    functor = 0
  []
  [inlet-T]
    type = FVDirichletBC
    variable = T_fluid
    value = ${T_inlet}
    boundary = 'left'
  []
  [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
  []
  [heated-side]
    type = FVDirichletBC
    boundary = 'top'
    variable = 'T_solid'
    value = ${top_side_temperature}
  []
  [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 = ${p_outlet}
  []
[]
[FluidProperties]
  [fp]
    type = IdealGasFluidProperties
    gamma = 1.4
  []
[]
[FunctorMaterials]
  [fluid_props_to_mat_props]
    type = GeneralFunctorFluidProps
    fp = fp
    pressure = 'pressure'
    T_fluid = 'T_fluid'
    speed = 'speed'
    # To initialize with a high viscosity
    mu_rampdown = 'mu_rampdown'
    # For porous flow
    characteristic_length = 1
    porosity = 'porosity'
  []
  [ins_fv]
    type = INSFVEnthalpyFunctorMaterial
    rho = ${rho}
    temperature = 'T_fluid'
  []
  [constants]
    type = ADGenericFunctorMaterial
    prop_names = 'h_cv'
    prop_values = '${h_fs}'
  []
  [speed]
    type = PINSFVSpeedFunctorMaterial
    porosity = 'porosity'
    superficial_vel_x = 'superficial_vel_x'
    superficial_vel_y = 'superficial_vel_y'
  []
[]
[Functions]
  [mu_rampdown]
    type = PiecewiseLinear
    x = '1 2 3 4'
    y = '1e3 1e2 1e1 1'
  []
[]
[Executioner]
  type = Transient
  solve_type = 'NEWTON'
  petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_pc_type -sub_pc_factor_shift_type'
  petsc_options_value = 'asm      100                lu           NONZERO'
  line_search = 'none'
  nl_rel_tol = 1e-12
  nl_abs_tol = 1e-10
  automatic_scaling = true
  end_time = 3.0
[]
# Some basic Postprocessors to examine the solution
[Postprocessors]
  [inlet-p]
    type = SideAverageValue
    variable = pressure
    boundary = 'left'
  []
  [outlet-u]
    type = VolumetricFlowRate
    boundary = 'right'
    advected_quantity = '1'
    advected_interp_method = ${advected_interp_method}
    vel_x = 'superficial_vel_x'
    vel_y = 'superficial_vel_y'
  []
  [outlet-temp]
    type = SideAverageValue
    variable = T_fluid
    boundary = 'right'
  []
  [solid-temp]
    type = ElementAverageValue
    variable = T_solid
  []
[]
[Outputs]
  exodus = true
  csv = true
[]
(modules/navier_stokes/test/tests/ics/pns_test.i)
p_initial=1.01e5
T=273.15
[Mesh]
  [cartesian]
    type = GeneratedMeshGenerator
    dim = 2
    xmin = 0
    xmax = 1
    ymin = 1
    ymax = 2
    nx = 4
    ny = 4
  []
[]
[FluidProperties]
  [fp]
    type = IdealGasFluidProperties
  []
[]
[Problem]
  kernel_coverage_check = false
  solve = false
  skip_nl_system_check = true
[]
[AuxVariables]
  [porosity]
    initial_condition = 0.2
  []
  [pressure]
    type = MooseVariableFVReal
  []
  [superficial_vel_x]
    type = MooseVariableFVReal
  []
  [superficial_vel_y]
    type = MooseVariableFVReal
  []
  [superficial_vel_z]
    type = MooseVariableFVReal
  []
  [temperature]
    type = MooseVariableFVReal
  []
  [vel_x]
    type = MooseVariableFVReal
  []
  [vel_y]
    type = MooseVariableFVReal
  []
  [vel_z]
    type = MooseVariableFVReal
  []
  [superficial_rho_ht]
    type = MooseVariableFVReal
  []
  [ht]
    type = MooseVariableFVReal
  []
  [e]
    type = MooseVariableFVReal
  []
  [Mach]
    type = MooseVariableFVReal
  []
  [superficial_rho]
    type = MooseVariableFVReal
  []
  [superficial_rhou]
    type = MooseVariableFVReal
  []
  [superficial_rhov]
    type = MooseVariableFVReal
  []
  [superficial_rhow]
    type = MooseVariableFVReal
  []
  [superficial_rho_et]
    type = MooseVariableFVReal
  []
  [rho]
    type = MooseVariableFVReal
  []
  [rhou]
    type = MooseVariableFVReal
  []
  [rhov]
    type = MooseVariableFVReal
  []
  [rhow]
    type = MooseVariableFVReal
  []
  [rho_et]
    type = MooseVariableFVReal
  []
  [specific_volume]
    type = MooseVariableFVReal
  []
  [pressure_2]
  []
  [superficial_vel_x_2]
  []
  [superficial_vel_y_2]
  []
  [superficial_vel_z_2]
  []
  [vel_x_2]
  []
  [vel_y_2]
  []
  [vel_z_2]
  []
  [temperature_2]
  []
  [ht_2]
  []
  [superficial_rho_ht_2]
  []
  [e_2]
  []
  [Mach_2]
  []
  [superficial_rho_2]
  []
  [superficial_rhou_2]
  []
  [superficial_rhov_2]
  []
  [superficial_rhow_2]
  []
  [superficial_rho_et_2]
  []
  [rho_2]
  []
  [rhou_2]
  []
  [rhov_2]
  []
  [rhow_2]
  []
  [rho_et_2]
  []
  [specific_volume_2]
  []
[]
[GlobalParams]
  fluid_properties = 'fp'
  initial_pressure = ${p_initial}
  initial_temperature = ${T}
  initial_superficial_velocity = '1 0.2 18'
  porosity = porosity
[]
[ICs]
  [p]
    type = PNSInitialCondition
    variable = 'pressure'
  []
  [vel_x]
    type = PNSInitialCondition
    variable = 'vel_x'
  []
  [vel_y]
    type = PNSInitialCondition
    variable = 'vel_y'
  []
  [vel_z]
    type = PNSInitialCondition
    variable = 'vel_z'
  []
  [superficial_vel_x]
    type = PNSInitialCondition
    variable = 'superficial_vel_x'
  []
  [superficial_vel_y]
    type = PNSInitialCondition
    variable = 'superficial_vel_y'
  []
  [superficial_vel_z]
    type = PNSInitialCondition
    variable = 'superficial_vel_z'
  []
  [temperature]
    type = PNSInitialCondition
    variable = 'temperature'
  []
  [ht]
    type = PNSInitialCondition
    variable = 'ht'
  []
  [superficial_rho_ht]
    type = PNSInitialCondition
    variable = 'superficial_rho_ht'
  []
  [e]
    type = PNSInitialCondition
    variable = 'e'
  []
  [Mach]
    type = PNSInitialCondition
    variable = 'Mach'
  []
  [superficial_rho]
    type = PNSInitialCondition
    variable = 'superficial_rho'
  []
  [superficial_rhou]
    type = PNSInitialCondition
    fluid_properties = 'fp'
    initial_pressure = ${p_initial}
    initial_temperature = ${T}
    initial_superficial_velocity = '1 0.2 18'
    porosity = porosity
    variable = 'superficial_rhou'
  []
  [superficial_rhov]
    type = PNSInitialCondition
    variable = 'superficial_rhov'
  []
  [superficial_rhow]
    type = PNSInitialCondition
    variable = 'superficial_rhow'
  []
  [rho]
    type = PNSInitialCondition
    variable = 'rho'
  []
  [rhou]
    type = PNSInitialCondition
    variable = 'rhou'
  []
  [rhov]
    type = PNSInitialCondition
    variable = 'rhov'
  []
  [rhow]
    type = PNSInitialCondition
    variable = 'rhow'
  []
  [rho_et]
    type = PNSInitialCondition
    variable = 'rho_et'
  []
  [superficial_rho_et]
    type = PNSInitialCondition
    variable = 'superficial_rho_et'
  []
  [specific_volume]
    type = PNSInitialCondition
    variable = 'specific_volume'
  []
  [p_2]
    type = PNSInitialCondition
    variable = 'pressure_2'
    variable_type = 'pressure'
  []
  [superficial_vel_x_2]
    type = PNSInitialCondition
    variable = 'superficial_vel_x_2'
    variable_type = 'superficial_vel_x'
  []
  [superficial_vel_y_2]
    type = PNSInitialCondition
    variable = 'superficial_vel_y_2'
    variable_type = 'superficial_vel_y'
  []
  [superficial_vel_z_2]
    type = PNSInitialCondition
    variable = 'superficial_vel_z_2'
    variable_type = 'superficial_vel_z'
  []
  [vel_x_2]
    type = PNSInitialCondition
    variable = 'vel_x_2'
    variable_type = 'vel_x'
  []
  [vel_y_2]
    type = PNSInitialCondition
    variable = 'vel_y_2'
    variable_type = 'vel_y'
  []
  [vel_z_2]
    type = PNSInitialCondition
    variable = 'vel_z_2'
    variable_type = 'vel_z'
  []
  [temperature_2]
    type = PNSInitialCondition
    variable = 'temperature_2'
    variable_type = 'temperature'
  []
  [superficial_ht_2]
    type = PNSInitialCondition
    variable = 'superficial_rho_ht_2'
    variable_type = 'superficial_rho_ht'
  []
  [ht_2]
    type = PNSInitialCondition
    variable = 'ht_2'
    variable_type = 'ht'
  []
  [e_2]
    type = PNSInitialCondition
    variable = 'e_2'
    variable_type = 'e'
  []
  [Mach_2]
    type = PNSInitialCondition
    variable = 'Mach_2'
    variable_type = 'Mach'
  []
  [superficial_rho_2]
    type = PNSInitialCondition
    variable = 'superficial_rho_2'
    variable_type = 'superficial_rho'
  []
  [superficial_rhou_2]
    type = PNSInitialCondition
    variable = 'superficial_rhou_2'
    variable_type = 'superficial_rhou'
  []
  [superficial_rhov_2]
    type = PNSInitialCondition
    variable = 'superficial_rhov_2'
    variable_type = 'superficial_rhov'
  []
  [superficial_rhow_2]
    type = PNSInitialCondition
    variable = 'superficial_rhow_2'
    variable_type = 'superficial_rhow'
  []
  [superficial_rho_et_2]
    type = PNSInitialCondition
    variable = 'superficial_rho_et_2'
    variable_type = 'superficial_rho_et'
  []
  [rho_2]
    type = PNSInitialCondition
    variable = 'rho_2'
    variable_type = 'rho'
  []
  [rhou_2]
    type = PNSInitialCondition
    variable = 'rhou_2'
    variable_type = 'rhou'
  []
  [rhov_2]
    type = PNSInitialCondition
    variable = 'rhov_2'
    variable_type = 'rhov'
  []
  [rhow_2]
    type = PNSInitialCondition
    variable = 'rhow_2'
    variable_type = 'rhow'
  []
  [rho_et_2]
    type = PNSInitialCondition
    variable = 'rho_et_2'
    variable_type = 'rho_et'
  []
  [specific_volume_2]
    type = PNSInitialCondition
    variable = 'specific_volume_2'
    variable_type = 'specific_volume'
  []
[]
[Executioner]
  type = Steady
[]
[Outputs]
  exodus = true
[]
(modules/fluid_properties/test/tests/functions/saturation_pressure_function/saturation_pressure_function.i)
# TestTwoPhaseFluidProperties has the following saturation pressure function:
#   p_sat(p) = 3 T
# Thus for T = 5, p_sat should be 15.
[Mesh]
  type = GeneratedMesh
  dim = 1
  nx = 1
[]
[FluidProperties]
  [./fp_liquid]
    type = IdealGasFluidProperties
  [../]
  [./fp_vapor]
    type = IdealGasFluidProperties
  [../]
  [./fp_2phase]
    type = TestTwoPhaseFluidProperties
    fp_liquid = fp_liquid
    fp_vapor = fp_vapor
  [../]
[]
[Functions]
  [./T]
    type = ConstantFunction
    value = 5
  [../]
  [./p_sat]
    type = SaturationPressureFunction
    T = T
    fp_2phase = fp_2phase
  [../]
[]
[Postprocessors]
  [./p_sat_pp]
    type = FunctionValuePostprocessor
    function = p_sat
    execute_on = 'INITIAL'
  [../]
[]
[Problem]
  solve = false
[]
[Executioner]
  type = Steady
[]
[Outputs]
  csv = true
[]
(modules/thermal_hydraulics/test/tests/problems/brayton_cycle/recuperated_brayton_cycle.i)
# This input file models an open, recuperated Brayton cycle with a PID
# controlled start up using a coupled motor.
#
# Heat is supplied to the system by a volumetric heat source, and a second heat
# source is used to model a recuperator. The recuperator transfers heat from the
# turbine exhaust gas to the compressor outlet gas.
#
# Initially the fluid and heat structures are at rest at ambient conditions,
# and the shaft speed is zero.
# The transient is controlled as follows:
#   * 0   - 2000 s: Motor increases shaft speed to approx. 85,000 RPM by PID control
#   * 1000 - 8600 s: Power in main heat source increases from 0 - 104 kW
#   * 2000 - 200000 s: Torque supplied by turbine increases to steady state level
#                      as working fluid temperature increases. Torque supplied by
#                      the motor is ramped down to 0 N-m transitioning shaft control
#                      to the turbine at its rated speed of 96,000 RPM.
I_motor = 1.0
I_generator = 1.0
generator_torque_per_shaft_speed = -0.00025
motor_ramp_up_duration = 3605
motor_ramp_down_duration = 1800
post_motor_time = 2160000
t1 = ${motor_ramp_up_duration}
t2 = ${fparse t1 + motor_ramp_down_duration}
t3 = ${fparse t2 + post_motor_time}
D1 = 0.15
D2 = ${D1}
D3 = ${D1}
D4 = ${D1}
D5 = ${D1}
D6 = ${D1}
D7 = ${D1}
D8 = ${D1}
A1 = ${fparse 0.25 * pi * D1^2}
A2 = ${fparse 0.25 * pi * D2^2}
A3 = ${fparse 0.25 * pi * D3^2}
A4 = ${fparse 0.25 * pi * D4^2}
A5 = ${fparse 0.25 * pi * D5^2}
A6 = ${fparse 0.25 * pi * D6^2}
A7 = ${fparse 0.25 * pi * D7^2}
A8 = ${fparse 0.25 * pi * D8^2}
recuperator_width = 0.15
L1 = 5.0
L2 = ${L1}
L3 = ${fparse 2 * L1}
L4 = ${fparse 2 * L1}
L5 = ${L1}
L6 = ${L1}
L7 = ${fparse L1 + recuperator_width}
L8 = ${L1}
x1 = 0.0
x2 = ${fparse x1 + L1}
x3 = ${fparse x2 + L2}
x4 = ${x3}
x5 = ${fparse x4 - L4}
x6 = ${x5}
x7 = ${fparse x6 + L6}
x8 = ${fparse x7 + L7}
y1 = 0
y2 = ${y1}
y3 = ${y2}
y4 = ${fparse y3 - L3}
y5 = ${y4}
y6 = ${fparse y5 + L5}
y7 = ${y6}
y8 = ${y7}
x1_out = ${fparse x1 + L1 - 0.001}
x2_in = ${fparse x2 + 0.001}
y5_in = ${fparse y5 + 0.001}
x6_out = ${fparse x6 + L6 - 0.001}
x7_in = ${fparse x7 + 0.001}
y8_in = ${fparse y8 + 0.001}
y8_out = ${fparse y8 + L8 - 0.001}
hot_leg_in = ${y8_in}
hot_leg_out = ${y8_out}
cold_leg_in = ${fparse y3 - 0.001}
cold_leg_out = ${fparse y3 - (L3/2) - 0.001}
n_elems1 = 5
n_elems2 = ${n_elems1}
n_elems3 = ${fparse 2 * n_elems1}
n_elems4 = ${fparse 2 * n_elems1}
n_elems5 = ${n_elems1}
n_elems6 = ${n_elems1}
n_elems7 = ${n_elems1}
n_elems8 = ${n_elems1}
A_ref_comp = ${fparse 0.5 * (A1 + A2)}
V_comp = ${fparse A_ref_comp * 1.0}
I_comp = 1.0
A_ref_turb = ${fparse 0.5 * (A4 + A5)}
V_turb = ${fparse A_ref_turb * 1.0}
I_turb = 1.0
c0_rated_comp = 351.6925137
rho0_rated_comp = 1.146881112
rated_mfr = 0.25
speed_rated_rpm = 96000
speed_rated = ${fparse speed_rated_rpm * 2 * pi / 60.0}
speed_initial = 0
eff_comp = 0.79
eff_turb = 0.843
T_ambient = 300
p_ambient = 1e5
hs_power = 105750
[GlobalParams]
  gravity_vector = '0 0 0'
  initial_p = ${p_ambient}
  initial_T = ${T_ambient}
  initial_vel = 0
  initial_vel_x = 0
  initial_vel_y = 0
  initial_vel_z = 0
  fp = fp_air
  closures = closures
  f = 0
  scaling_factor_1phase = '1 1 1e-5'
  scaling_factor_rhoV = 1
  scaling_factor_rhouV = 1e-2
  scaling_factor_rhovV = 1e-2
  scaling_factor_rhowV = 1e-2
  scaling_factor_rhoEV = 1e-5
  scaling_factor_temperature = 1e-2
  rdg_slope_reconstruction = none
[]
[FluidProperties]
  [fp_air]
    type = IdealGasFluidProperties
    emit_on_nan = none
  []
[]
[SolidProperties]
  [steel]
    type = ThermalFunctionSolidProperties
    rho = 8050
    k = 45
    cp = 466
  []
[]
[Closures]
  [closures]
    type = Closures1PhaseSimple
  []
[]
[Functions]
  ##########################
  # Motor
  ##########################
  # Functions for control logic that determines when to shut off the PID system
  [is_tripped_fn]
    type = ParsedFunction
    symbol_names = 'motor_torque turbine_torque'
    symbol_values = 'motor_torque turbine_torque'
    expression = 'turbine_torque > motor_torque'
  []
  [PID_tripped_constant_value]
    type = ConstantFunction
    value = 1
  []
  [PID_tripped_status_fn]
    type = ParsedFunction
    symbol_values = 'PID_trip_status'
    symbol_names = 'PID_trip_status'
    expression = 'PID_trip_status'
  []
  [time_fn]
    type = ParsedFunction
    expression = t
  []
  # Shutdown function which ramps down the motor once told by the control logic
  [motor_torque_fn_shutdown]
    type = ParsedFunction
    symbol_values = 'PID_trip_status time_trip'
    symbol_names = 'PID_trip_status time_trip'
    expression = 'if(PID_trip_status = 1, max(2.4 - (2.4 * ((t - time_trip) / 35000)),0.0), 1)'
  []
  # Generates motor power curve
  [motor_power_fn]
    type = ParsedFunction
    expression = 'torque * speed'
    symbol_names = 'torque speed'
    symbol_values = 'motor_torque shaft:omega'
  []
  ##########################
  # Generator
  ##########################
  # Generates generator torque curve
  [generator_torque_fn]
    type = ParsedFunction
    expression = 'slope * t'
    symbol_names = 'slope'
    symbol_values = '${generator_torque_per_shaft_speed}'
  []
  # Generates generator power curve
  [generator_power_fn]
    type = ParsedFunction
    expression = 'torque * speed'
    symbol_names = 'torque speed'
    symbol_values = 'generator_torque shaft:omega'
  []
  ##########################
  # Reactor
  ##########################
  # Ramps up reactor power when activated by control logic
  [power_fn]
    type = PiecewiseLinear
    x = '0 1000 8600'
    y = '0 0 ${hs_power}'
  []
  ##########################
  # Compressor
  ##########################
  # compressor pressure ratios
  [rp_comp1]
    type = PiecewiseLinear
    data_file = 'rp_comp1.csv'
    x_index_in_file = 0
    y_index_in_file = 1
    format = columns
    extrap = true
  []
  [rp_comp2]
    type = PiecewiseLinear
    data_file = 'rp_comp2.csv'
    x_index_in_file = 0
    y_index_in_file = 1
    format = columns
    extrap = true
  []
  [rp_comp3]
    type = PiecewiseLinear
    data_file = 'rp_comp3.csv'
    x_index_in_file = 0
    y_index_in_file = 1
    format = columns
    extrap = true
  []
  [rp_comp4]
    type = PiecewiseLinear
    data_file = 'rp_comp4.csv'
    x_index_in_file = 0
    y_index_in_file = 1
    format = columns
    extrap = true
  []
  [rp_comp5]
    type = PiecewiseLinear
    data_file = 'rp_comp5.csv'
    x_index_in_file = 0
    y_index_in_file = 1
    format = columns
    extrap = true
  []
  # compressor efficiencies
  [eff_comp1]
    type = ConstantFunction
    value = ${eff_comp}
  []
  [eff_comp2]
    type = ConstantFunction
    value = ${eff_comp}
  []
  [eff_comp3]
    type = ConstantFunction
    value = ${eff_comp}
  []
  [eff_comp4]
    type = ConstantFunction
    value = ${eff_comp}
  []
  [eff_comp5]
    type = ConstantFunction
    value = ${eff_comp}
  []
  ##########################
  # Turbine
  ##########################
  # turbine pressure ratios
  [rp_turb0]
    type = ConstantFunction
    value = 1
  []
  [rp_turb1]
    type = PiecewiseLinear
    data_file = 'rp_turb1.csv'
    x_index_in_file = 0
    y_index_in_file = 1
    format = columns
    extrap = true
  []
  [rp_turb2]
    type = PiecewiseLinear
    data_file = 'rp_turb2.csv'
    x_index_in_file = 0
    y_index_in_file = 1
    format = columns
    extrap = true
  []
  [rp_turb3]
    type = PiecewiseLinear
    data_file = 'rp_turb3.csv'
    x_index_in_file = 0
    y_index_in_file = 1
    format = columns
    extrap = true
  []
  [rp_turb4]
    type = PiecewiseLinear
    data_file = 'rp_turb4.csv'
    x_index_in_file = 0
    y_index_in_file = 1
    format = columns
    extrap = true
  []
  [rp_turb5]
    type = PiecewiseLinear
    data_file = 'rp_turb5.csv'
    x_index_in_file = 0
    y_index_in_file = 1
    format = columns
    extrap = true
  []
  # turbine efficiency
  [eff_turb1]
    type = ConstantFunction
    value = ${eff_turb}
  []
  [eff_turb2]
    type = ConstantFunction
    value = ${eff_turb}
  []
  [eff_turb3]
    type = ConstantFunction
    value = ${eff_turb}
  []
  [eff_turb4]
    type = ConstantFunction
    value = ${eff_turb}
  []
  [eff_turb5]
    type = ConstantFunction
    value = ${eff_turb}
  []
[]
[Components]
  # system inlet pulling air from the open atmosphere
  [inlet]
    type = InletStagnationPressureTemperature1Phase
    input = 'pipe1:in'
    p0 = ${p_ambient}
    T0 = ${T_ambient}
  []
  # Inlet pipe
  [pipe1]
    type = FlowChannel1Phase
    position = '${x1} ${y1} 0'
    orientation = '1 0 0'
    length = ${L1}
    n_elems = ${n_elems1}
    A = ${A1}
  []
  # Compressor as defined in MAGNET PCU document (Guillen 2020)
  [compressor]
    type = ShaftConnectedCompressor1Phase
    position = '${x2} ${y2} 0'
    inlet = 'pipe1:out'
    outlet = 'pipe2:in'
    A_ref = ${A_ref_comp}
    volume = ${V_comp}
    omega_rated = ${speed_rated}
    mdot_rated = ${rated_mfr}
    c0_rated = ${c0_rated_comp}
    rho0_rated = ${rho0_rated_comp}
    # Determines which compression ratio curve and efficiency curve to use depending on ratio of speed/rated_speed
    speeds = '0.5208 0.6250 0.7292 0.8333 0.9375'
    Rp_functions = 'rp_comp1 rp_comp2 rp_comp3 rp_comp4 rp_comp5'
    eff_functions = 'eff_comp1 eff_comp2 eff_comp3 eff_comp4 eff_comp5'
    min_pressure_ratio = 1.0
    speed_cr_I = 0
    inertia_const = ${I_comp}
    inertia_coeff = '${I_comp} 0 0 0'
    # assume no shaft friction
    speed_cr_fr = 0
    tau_fr_const = 0
    tau_fr_coeff = '0 0 0 0'
  []
  # Outlet pipe from the compressor
  [pipe2]
    type = FlowChannel1Phase
    position = '${x2} ${y2} 0'
    orientation = '1 0 0'
    length = ${L2}
    n_elems = ${n_elems2}
    A = ${A2}
  []
  # 90 degree connection between pipe 2 and 3
  [junction2_cold_leg]
    type = VolumeJunction1Phase
    connections = 'pipe2:out cold_leg:in'
    position = '${x3} ${y3} 0'
    volume = ${fparse A2*0.1}
  []
  # Cold leg of the recuperator
  [cold_leg]
    type = FlowChannel1Phase
    position = '${x3} ${y3} 0'
    orientation = '0 -1 0'
    length = ${fparse L3/2}
    n_elems = ${fparse n_elems3/2}
    A = ${A3}
  []
  # Recuperator which transfers heat from exhaust gas to reactor inlet gas to improve thermal efficency
  [recuperator]
    type = HeatStructureCylindrical
    orientation = '0 -1 0'
    position = '${x3} ${y3} 0'
    length = ${fparse L3/2}
    widths = ${recuperator_width}
    n_elems = ${fparse n_elems3/2}
    n_part_elems = 2
    names = recuperator
    solid_properties = steel
    solid_properties_T_ref = '300'
    inner_radius = ${D1}
  []
  # heat transfer from recuperator to cold leg
  [heat_transfer_cold_leg]
    type = HeatTransferFromHeatStructure1Phase
    flow_channel = cold_leg
    hs = recuperator
    hs_side = OUTER
    Hw = 10000
  []
  # heat transfer from hot leg to recuperator
  [heat_transfer_hot_leg]
    type = HeatTransferFromHeatStructure1Phase
    flow_channel = hot_leg
    hs = recuperator
    hs_side = INNER
    Hw = 10000
  []
  [junction_cold_leg_3]
    type = JunctionOneToOne1Phase
    connections = 'cold_leg:out pipe3:in'
  []
  [pipe3]
    type = FlowChannel1Phase
    position = '${x3} ${fparse y3 - (L3/2)} 0'
    orientation = '0 -1 0'
    length = ${fparse L3/2}
    n_elems = ${fparse n_elems3/2}
    A = ${A3}
  []
  # 90 degree connection between pipe 3 and 4
  [junction3_4]
    type = VolumeJunction1Phase
    connections = 'pipe3:out pipe4:in'
    position = '${x4} ${y4} 0'
    volume = ${fparse A3*0.1}
  []
  # Pipe through the "reactor core"
  [pipe4]
    type = FlowChannel1Phase
    position = '${x4} ${y4} 0'
    orientation = '-1 0 0'
    length = ${L4}
    n_elems = ${n_elems4}
    A = ${A4}
  []
  # "Reactor Core" and it's associated heat transfer to pipe 4
  [reactor]
    type = HeatStructureCylindrical
    orientation = '-1 0 0'
    position = '${x4} ${y4} 0'
    length = ${L4}
    widths = 0.15
    n_elems = ${n_elems4}
    n_part_elems = 2
    names = core
    solid_properties = steel
    solid_properties_T_ref = '300'
  []
  [total_power]
    type = TotalPower
    power = 0
  []
  [heat_generation]
    type = HeatSourceFromTotalPower
    power = total_power
    hs = reactor
    regions = core
  []
  [heat_transfer]
    type = HeatTransferFromHeatStructure1Phase
    flow_channel = pipe4
    hs = reactor
    hs_side = OUTER
    Hw = 10000
  []
  # 90 degree connection between pipe 4 and 5
  [junction4_5]
    type = VolumeJunction1Phase
    connections = 'pipe4:out pipe5:in'
    position = '${x5} ${y5} 0'
    volume = ${fparse A4*0.1}
  []
  # Pipe carrying hot gas back to the PCU
  [pipe5]
    type = FlowChannel1Phase
    position = '${x5} ${y5} 0'
    orientation = '0 1 0'
    length = ${L5}
    n_elems = ${n_elems5}
    A = ${A5}
  []
  # 90 degree connection between pipe 5 and 6
  [junction5_6]
    type = VolumeJunction1Phase
    connections = 'pipe5:out pipe6:in'
    position = '${x6} ${y6} 0'
    volume = ${fparse A5*0.1}
  []
  # Inlet pipe to the turbine
  [pipe6]
    type = FlowChannel1Phase
    position = '${x6} ${y6} 0'
    orientation = '1 0 0'
    length = ${L6}
    n_elems = ${n_elems6}
    A = ${A6}
  []
  # Turbine as defined in MAGNET PCU document (Guillen 2020) and (Wright 2006)
  [turbine]
    type = ShaftConnectedCompressor1Phase
    position = '${x7} ${y7} 0'
    inlet = 'pipe6:out'
    outlet = 'pipe7:in'
    A_ref = ${A_ref_turb}
    volume = ${V_turb}
    # A turbine is treated as an "inverse" compressor, this value determines if component is to be treated as turbine or compressor
    # If treat_as_turbine is omitted, code automatically assumes it is a compressor
    treat_as_turbine = true
    omega_rated = ${speed_rated}
    mdot_rated = ${rated_mfr}
    c0_rated = ${c0_rated_comp}
    rho0_rated = ${rho0_rated_comp}
    # Determines which compression ratio curve and efficiency curve to use depending on ratio of speed/rated_speed
    speeds = '0 0.5208 0.6250 0.7292 0.8333 0.9375'
    Rp_functions = 'rp_turb0 rp_turb1 rp_turb2 rp_turb3 rp_turb4 rp_turb5'
    eff_functions = 'eff_turb1 eff_turb1 eff_turb2 eff_turb3 eff_turb4 eff_turb5'
    min_pressure_ratio = 1.0
    speed_cr_I = 0
    inertia_const = ${I_turb}
    inertia_coeff = '${I_turb} 0 0 0'
    # assume no shaft friction
    speed_cr_fr = 0
    tau_fr_const = 0
    tau_fr_coeff = '0 0 0 0'
  []
  # Outlet pipe from turbine
  [pipe7]
    type = FlowChannel1Phase
    position = '${x7} ${y7} 0'
    orientation = '1 0 0'
    length = ${L7}
    n_elems = ${n_elems7}
    A = ${A7}
  []
  # 90 degree connection between pipe 7 and 8
  [junction7_hot_leg]
    type = VolumeJunction1Phase
    connections = 'pipe7:out hot_leg:in'
    position = '${x8} ${y8} 0'
    volume = ${fparse A7*0.1}
  []
  # Hot leg of the recuperator
  [hot_leg]
    type = FlowChannel1Phase
    position = '${x8} ${y8} 0'
    orientation = '0 1 0'
    length = ${L8}
    n_elems = ${n_elems8}
    A = ${A8}
  []
  # System outlet dumping exhaust gas to the atmosphere
  [outlet]
    type = Outlet1Phase
    input = 'hot_leg:out'
    p = ${p_ambient}
  []
  # Roatating shaft connecting motor, compressor, turbine, and generator
  [shaft]
    type = Shaft
    connected_components = 'motor compressor turbine generator'
    initial_speed = ${speed_initial}
  []
  # 3-Phase electircal motor used for system start-up, controlled by PID
  [motor]
    type = ShaftConnectedMotor
    inertia = ${I_motor}
    torque = 0 # controlled
  []
  # Electric generator supplying power to the grid
  [generator]
    type = ShaftConnectedMotor
    inertia = ${I_generator}
    torque = generator_torque_fn
  []
[]
# Control logics which govern startup of the motor, startup of the "reactor core", and shutdown of the motor
[ControlLogic]
  # Sets desired shaft speed to be reached by motor NOTE: SHOULD BE SET LOWER THAN RATED TURBINE RPM
  [set_point]
    type = GetFunctionValueControl
    function = ${fparse speed_rated_rpm - 9000}
  []
  # PID with gains determined by iterative process NOTE: Gain values are system specific
  [initial_motor_PID]
    type = PIDControl
    set_point = set_point:value
    input = shaft_RPM
    initial_value = 0
    K_p = 0.0011
    K_i = 0.00000004
    K_d = 0
  []
  # Determines when the PID system should be running and when it should begin the shutdown cycle. If needed: PID output, else: shutdown function
  [logic]
    type = ParsedFunctionControl
    function = 'if(motor+0.5 > turb, PID, shutdown_fn)'
    symbol_names = 'motor turb PID shutdown_fn'
    symbol_values = 'motor_torque turbine_torque initial_motor_PID:output motor_torque_fn_shutdown'
  []
  # Takes the output generated in [logic] and applies it to the motor torque
  [motor_PID]
    type = SetComponentRealValueControl
    component = motor
    parameter = torque
    value = logic:value
  []
  # Determines when to turn on heat source
  [power_logic]
    type = ParsedFunctionControl
    function = 'power_fn'
    symbol_names = 'power_fn'
    symbol_values = 'power_fn'
  []
  # Applies heat source to the total_power block
  [power_applied]
    type = SetComponentRealValueControl
    component = total_power
    parameter = power
    value = power_logic:value
  []
[]
[Controls]
  # Enables set_PID_tripped
  [PID_trip_status]
    type = ConditionalFunctionEnableControl
    conditional_function = is_tripped_fn
    enable_objects = 'AuxScalarKernels::PID_trip_status_aux'
    execute_on = 'TIMESTEP_END'
  []
  # Enables set_time_PID
  [time_PID]
    type = ConditionalFunctionEnableControl
    conditional_function = PID_tripped_status_fn
    disable_objects = 'AuxScalarKernels::time_trip_aux'
    execute_on = 'TIMESTEP_END'
  []
[]
[AuxVariables]
  # Creates a variable that will later be set to the time when tau_turbine > tau_motor
  [time_trip]
    order = FIRST
    family = SCALAR
  []
  # Creates variable which indicates if tau_turbine > tau_motor....... If tau_motor > tau_turbine, 0, else 1
  [PID_trip_status]
    order = FIRST
    family = SCALAR
    initial_condition = 0
  []
[]
[AuxScalarKernels]
  # Creates variable from time_fn which indicates when tau_turbine > tau_motor
  [time_trip_aux]
    type = FunctionScalarAux
    function = time_fn
    variable = time_trip
    execute_on = 'TIMESTEP_END'
  []
  # Overwrites variable PID_trip_status to the value from PID_tripped_constant_value (changes 0 to 1)
  [PID_trip_status_aux]
    type = FunctionScalarAux
    function = PID_tripped_constant_value
    variable = PID_trip_status
    execute_on = 'TIMESTEP_END'
    enable = false
  []
[]
[Postprocessors]
  # Indicates when tau_turbine > tau_motor
  [trip_time]
    type = ScalarVariable
    variable = time_trip
    execute_on = 'TIMESTEP_END'
  []
  ##########################
  # Motor
  ##########################
  [motor_torque]
    type = RealComponentParameterValuePostprocessor
    component = motor
    parameter = torque
    execute_on = 'INITIAL TIMESTEP_END'
  []
  [motor_power]
    type = FunctionValuePostprocessor
    function = motor_power_fn
    execute_on = 'INITIAL TIMESTEP_END'
  []
  ##########################
  # generator
  ##########################
  [generator_torque]
    type = ShaftConnectedComponentPostprocessor
    quantity = torque
    shaft_connected_component_uo = generator:shaftconnected_uo
    execute_on = 'INITIAL TIMESTEP_END'
  []
  [generator_power]
    type = FunctionValuePostprocessor
    function = generator_power_fn
    execute_on = 'INITIAL TIMESTEP_END'
  []
  ##########################
  # Shaft
  ##########################
  # Speed in rad/s
  [shaft_speed]
    type = ScalarVariable
    variable = 'shaft:omega'
    execute_on = 'INITIAL TIMESTEP_END'
  []
  # speed in RPM
  [shaft_RPM]
    type = ParsedPostprocessor
    pp_names = 'shaft_speed'
    expression = '(shaft_speed * 60) /( 2 * ${fparse pi})'
    execute_on = 'INITIAL TIMESTEP_END'
  []
  ##########################
  # Compressor
  ##########################
  [comp_dissipation_torque]
    type = ElementAverageValue
    variable = dissipation_torque
    block = 'compressor'
    execute_on = 'INITIAL TIMESTEP_END'
  []
  [comp_isentropic_torque]
    type = ElementAverageValue
    variable = isentropic_torque
    block = 'compressor'
    execute_on = 'INITIAL TIMESTEP_END'
  []
  [comp_friction_torque]
    type = ElementAverageValue
    variable = friction_torque
    block = 'compressor'
    execute_on = 'INITIAL TIMESTEP_END'
  []
  [compressor_torque]
    type = ParsedPostprocessor
    pp_names = 'comp_dissipation_torque comp_isentropic_torque comp_friction_torque'
    expression = 'comp_dissipation_torque + comp_isentropic_torque + comp_friction_torque'
  []
  [p_in_comp]
    type = PointValue
    variable = p
    point = '${x1_out} ${y1} 0'
    execute_on = 'INITIAL TIMESTEP_END'
  []
  [p_out_comp]
    type = PointValue
    variable = p
    point = '${x2_in} ${y2} 0'
    execute_on = 'INITIAL TIMESTEP_END'
  []
  [p_ratio_comp]
    type = ParsedPostprocessor
    pp_names = 'p_in_comp p_out_comp'
    expression = 'p_out_comp / p_in_comp'
    execute_on = 'INITIAL TIMESTEP_END'
  []
  [T_in_comp]
    type = PointValue
    variable = T
    point = '${x1_out} ${y1} 0'
    execute_on = 'INITIAL TIMESTEP_END'
  []
  [T_out_comp]
    type = PointValue
    variable = T
    point = '${x2_in} ${y2} 0'
    execute_on = 'INITIAL TIMESTEP_END'
  []
  [T_ratio_comp]
    type = ParsedPostprocessor
    pp_names = 'T_in_comp T_out_comp'
    expression = '(T_out_comp - T_in_comp) / T_out_comp'
    execute_on = 'INITIAL TIMESTEP_END'
  []
  [mfr_comp]
    type = ADFlowJunctionFlux1Phase
    boundary = pipe1:out
    connection_index = 0
    equation = mass
    junction = compressor
  []
  ##########################
  # turbine
  ##########################
  [turb_dissipation_torque]
    type = ElementAverageValue
    variable = dissipation_torque
    block = 'turbine'
    execute_on = 'INITIAL TIMESTEP_END'
  []
  [turb_isentropic_torque]
    type = ElementAverageValue
    variable = isentropic_torque
    block = 'turbine'
    execute_on = 'INITIAL TIMESTEP_END'
  []
  [turb_friction_torque]
    type = ElementAverageValue
    variable = friction_torque
    block = 'turbine'
    execute_on = 'INITIAL TIMESTEP_END'
  []
  [turbine_torque]
    type = ParsedPostprocessor
    pp_names = 'turb_dissipation_torque turb_isentropic_torque turb_friction_torque'
    expression = 'turb_dissipation_torque + turb_isentropic_torque + turb_friction_torque'
  []
  [p_in_turb]
    type = PointValue
    variable = p
    point = '${x6_out} ${y6} 0'
    execute_on = 'INITIAL TIMESTEP_END'
  []
  [p_out_turb]
    type = PointValue
    variable = p
    point = '${x7_in} ${y7} 0'
    execute_on = 'INITIAL TIMESTEP_END'
  []
  [p_ratio_turb]
    type = ParsedPostprocessor
    pp_names = 'p_in_turb p_out_turb'
    expression = 'p_in_turb / p_out_turb'
    execute_on = 'INITIAL TIMESTEP_END'
  []
  [T_in_turb]
    type = PointValue
    variable = T
    point = '${x6_out} ${y6} 0'
    execute_on = 'INITIAL TIMESTEP_END'
  []
  [T_out_turb]
    type = PointValue
    variable = T
    point = '${x7_in} ${y7} 0'
    execute_on = 'INITIAL TIMESTEP_END'
  []
  [mfr_turb]
    type = ADFlowJunctionFlux1Phase
    boundary = pipe6:out
    connection_index = 0
    equation = mass
    junction = turbine
  []
  ##########################
  # Recuperator
  ##########################
  [cold_leg_in]
    type = PointValue
    variable = T
    point = '${x3} ${cold_leg_in} 0'
    execute_on = 'INITIAL TIMESTEP_END'
  []
  [cold_leg_out]
    type = PointValue
    variable = T
    point = '${x3} ${cold_leg_out} 0'
    execute_on = 'INITIAL TIMESTEP_END'
  []
  [hot_leg_in]
    type = PointValue
    variable = T
    point = '${x8} ${hot_leg_in} 0'
    execute_on = 'INITIAL TIMESTEP_END'
  []
  [hot_leg_out]
    type = PointValue
    variable = T
    point = '${x8} ${hot_leg_out} 0'
    execute_on = 'INITIAL TIMESTEP_END'
  []
  ##########################
  # Reactor
  ##########################
  [reactor_inlet]
    type = PointValue
    variable = T
    point = '${x4} ${y4} 0'
    execute_on = 'INITIAL TIMESTEP_END'
  []
  [reactor_outlet]
    type = PointValue
    variable = T
    point = '${x5} ${y5_in} 0'
    execute_on = 'INITIAL TIMESTEP_END'
  []
[]
[Executioner]
  type = Transient
  scheme = 'bdf2'
  end_time = ${t3}
  [TimeStepper]
    type = IterationAdaptiveDT
    dt = 0.01
    growth_factor = 1.1
    cutback_factor = 0.9
  []
  dtmin = 1e-5
  dtmax = 1000
  steady_state_detection = true
  steady_state_start_time = 200000
  solve_type = NEWTON
  nl_rel_tol = 1e-8
  nl_abs_tol = 1e-8
  nl_max_its = 15
  l_tol = 1e-4
  l_max_its = 10
  petsc_options_iname  = '-pc_type'
  petsc_options_value  = ' lu     '
[]
[Outputs]
  [e]
    type = Exodus
    file_base = 'recuperated_brayton_cycle_out'
  []
  [csv]
    type = CSV
    file_base = 'recuperated_brayton_cycle'
    execute_vector_postprocessors_on = 'INITIAL'
  []
  [console]
    type = Console
    show = 'shaft_speed p_ratio_comp p_ratio_turb pressure_ratio pressure_ratio'
  []
[]
(modules/navier_stokes/test/tests/finite_volume/cns/userobject/HLLC/hllc_uo_1D.i)
rho_left = 1.162633159
E_left = 2.1502913276e+05
u_left = 100
rho_right = 1.116127833
E_right = 1.7919094397e+05
u_right = 90
[Mesh]
  allow_renumbering = false
  [./cartesian]
    type = GeneratedMeshGenerator
    dim = 1
    xmin = 0
    xmax = 1
    nx = 2
  [../]
[]
[FluidProperties]
  [./fp]
    type = IdealGasFluidProperties
    allow_imperfect_jacobians = true
  [../]
[]
[Problem]
  kernel_coverage_check = false
[]
[Variables]
  [./rho]
    order = CONSTANT
    family = MONOMIAL
  [../]
  [./rho_u]
    order = CONSTANT
    family = MONOMIAL
  [../]
  [./rho_E]
    order = CONSTANT
    family = MONOMIAL
  [../]
[]
[ICs]
  [./rho_ic]
    type = FunctionIC
    variable = rho
    function = 'if (x < 0.5, ${rho_left}, ${rho_right})'
  [../]
  [./rho_u_ic]
    type = FunctionIC
    variable = rho_u
    function = 'if (x < 0.5, ${fparse rho_left * u_left}, ${fparse rho_right * u_right})'
  [../]
  [./rho_E_ic]
    type = FunctionIC
    variable = rho_E
    function = 'if (x < 0.5, ${fparse E_left * rho_left}, ${fparse E_right * rho_right})'
  [../]
[]
[Materials]
  [./var_mat]
    type = ConservedVarValuesMaterial
    rho = rho
    rhou = rho_u
    rho_et = rho_E
    fp = fp
  [../]
[]
[UserObjects]
  [./hllc]
    type = HLLCUserObject
    fp = fp
  [../]
[]
[VectorPostprocessors]
  [./wave_speeds]
    type = WaveSpeedVPP
    hllc_uo = hllc
    elem_id = 0
    side_id = 1
  [../]
[]
[Executioner]
  type = Steady
[]
[Outputs]
  csv = true
[]
(modules/thermal_hydraulics/test/tests/components/flow_connection/err.connection_format.i)
[FluidProperties]
  [fp]
    type = IdealGasFluidProperties
    gamma = 1.4
    molar_mass = 28.964e-3
  []
[]
[Closures]
  [simple_closures]
    type = Closures1PhaseSimple
  []
[]
[Components]
  [left_wall]
    type = SolidWall1Phase
  []
  [pipe]
    type = FlowChannel1Phase
    fp = fp
    closures = simple_closures
    position = '0 0 0'
    orientation = '1 0 0'
    length = 1.0
    n_elems = 5
    A = 1.0
    initial_T = 300
    initial_p = 1e5
    initial_vel = 0
    f = 0
  []
  [right_wall]
    type = SolidWall1Phase
    input = 'pipe:out'
  []
[]
[Executioner]
  type = Transient
  scheme = 'bdf2'
  nl_rel_tol = 0
  nl_abs_tol = 1e-6
  nl_max_its = 15
  l_tol = 1e-3
  l_max_its = 10
  start_time = 0.0
  dt = 0.01
  num_steps = 1
  abort_on_solve_fail = true
  [Quadrature]
    type = GAUSS
    order = SECOND
  []
[]
(modules/thermal_hydraulics/test/tests/problems/brayton_cycle/closed_brayton_cycle.i)
# This input file is used to demonstrate a simple closed, air Brayton cycle using
# a compressor, turbine, shaft, motor, and generator.
# The flow length is divided into 6 segments as illustrated below, where
#   - "(C)" denotes the compressor
#   - "(T)" denotes the turbine
#   - "*" denotes a fictitious junction
#
#                Heated section               Cooled section
# *-----(C)-----*--------------*-----(T)-----*--------------*
#    1       2         3          4       5         6
#
# Initially the fluid is at rest at ambient conditions, the shaft speed is zero,
# and no heat transfer occurs with the system.
# The transient is controlled as follows:
#   * 0   - 100 s: motor ramps up torque linearly from zero
#   * 100 - 200 s: motor ramps down torque linearly to zero, HTC ramps up linearly from zero.
#   * 200 - 300 s: (no changes; should approach steady condition)
I_motor = 1.0
motor_torque_max = 400.0
I_generator = 1.0
generator_torque_per_shaft_speed = -0.00025
motor_ramp_up_duration = 100.0
motor_ramp_down_duration = 100.0
post_motor_time = 100.0
t1 = ${motor_ramp_up_duration}
t2 = ${fparse t1 + motor_ramp_down_duration}
t3 = ${fparse t2 + post_motor_time}
D1 = 0.15
D2 = ${D1}
D3 = ${D1}
D4 = ${D1}
D5 = ${D1}
D6 = ${D1}
A1 = ${fparse 0.25 * pi * D1^2}
A2 = ${fparse 0.25 * pi * D2^2}
A3 = ${fparse 0.25 * pi * D3^2}
A4 = ${fparse 0.25 * pi * D4^2}
A5 = ${fparse 0.25 * pi * D5^2}
A6 = ${fparse 0.25 * pi * D6^2}
L1 = 10.0
L2 = ${L1}
L3 = ${L1}
L4 = ${L1}
L5 = ${L1}
L6 = ${L1}
x1 = 0.0
x2 = ${fparse x1 + L1}
x3 = ${fparse x2 + L2}
x4 = ${fparse x3 + L3}
x5 = ${fparse x4 + L4}
x6 = ${fparse x5 + L5}
x2_minus = ${fparse x2 - 0.001}
x2_plus = ${fparse x2 + 0.001}
x5_minus = ${fparse x5 - 0.001}
x5_plus = ${fparse x5 + 0.001}
n_elems1 = 10
n_elems2 = ${n_elems1}
n_elems3 = ${n_elems1}
n_elems4 = ${n_elems1}
n_elems5 = ${n_elems1}
n_elems6 = ${n_elems1}
A_ref_comp = ${fparse 0.5 * (A1 + A2)}
V_comp = ${fparse A_ref_comp * 1.0}
I_comp = 1.0
A_ref_turb = ${fparse 0.5 * (A4 + A5)}
V_turb = ${fparse A_ref_turb * 1.0}
I_turb = 1.0
c0_rated_comp = 351.6925137
rho0_rated_comp = 1.146881112
rated_mfr = 0.25
speed_rated_rpm = 96000
speed_rated = ${fparse speed_rated_rpm * 2 * pi / 60.0}
speed_initial = 0
eff_comp = 0.79
eff_turb = 0.843
T_hot = 1000
T_cold = 300
T_ambient = 300
p_ambient = 1e5
[GlobalParams]
  orientation = '1 0 0'
  gravity_vector = '0 0 0'
  initial_p = ${p_ambient}
  initial_T = ${T_ambient}
  initial_vel = 0
  initial_vel_x = 0
  initial_vel_y = 0
  initial_vel_z = 0
  fp = fp_air
  closures = closures
  f = 0
  scaling_factor_1phase = '1 1 1e-5'
  scaling_factor_rhoV = 1
  scaling_factor_rhouV = 1
  scaling_factor_rhovV = 1
  scaling_factor_rhowV = 1
  scaling_factor_rhoEV = 1e-5
  rdg_slope_reconstruction = none
[]
[Functions]
  [motor_torque_fn]
    type = PiecewiseLinear
    x = '0 ${t1} ${t2}'
    y = '0 ${motor_torque_max} 0'
  []
  [motor_power_fn]
    type = ParsedFunction
    expression = 'torque * speed'
    symbol_names = 'torque speed'
    symbol_values = 'motor_torque shaft:omega'
  []
  [generator_torque_fn]
    type = ParsedFunction
    expression = 'slope * t'
    symbol_names = 'slope'
    symbol_values = '${generator_torque_per_shaft_speed}'
  []
  [generator_power_fn]
    type = ParsedFunction
    expression = 'torque * speed'
    symbol_names = 'torque speed'
    symbol_values = 'generator_torque shaft:omega'
  []
  [htc_wall_fn]
    type = PiecewiseLinear
    x = '0 ${t1} ${t2}'
    y = '0 0 1e3'
  []
[]
[FluidProperties]
  [fp_air]
    type = IdealGasFluidProperties
    emit_on_nan = none
  []
[]
[Closures]
  [closures]
    type = Closures1PhaseSimple
  []
[]
[Components]
  [shaft]
    type = Shaft
    connected_components = 'motor compressor turbine generator'
    initial_speed = ${speed_initial}
    scaling_factor_omega = 1e-3
  []
  [motor]
    type = ShaftConnectedMotor
    inertia = ${I_motor}
    torque = 0 # controlled
  []
  [generator]
    type = ShaftConnectedMotor
    inertia = ${I_generator}
    torque = generator_torque_fn
  []
  [pipe1]
    type = FlowChannel1Phase
    position = '${x1} 0 0'
    length = ${L1}
    n_elems = ${n_elems1}
    A = ${A1}
  []
  [compressor]
    type = ShaftConnectedCompressor1Phase
    position = '${x2} 0 0'
    inlet = 'pipe1:out'
    outlet = 'pipe2:in'
    A_ref = ${A_ref_comp}
    volume = ${V_comp}
    omega_rated = ${speed_rated}
    mdot_rated = ${rated_mfr}
    c0_rated = ${c0_rated_comp}
    rho0_rated = ${rho0_rated_comp}
    speeds = '0.5208 0.6250 0.7292 0.8333 0.9375'
    Rp_functions = 'rp_comp1 rp_comp2 rp_comp3 rp_comp4 rp_comp5'
    eff_functions = 'eff_comp1 eff_comp2 eff_comp3 eff_comp4 eff_comp5'
    min_pressure_ratio = 1.0
    speed_cr_I = 0
    inertia_const = ${I_comp}
    inertia_coeff = '${I_comp} 0 0 0'
    # assume no shaft friction
    speed_cr_fr = 0
    tau_fr_const = 0
    tau_fr_coeff = '0 0 0 0'
  []
  [pipe2]
    type = FlowChannel1Phase
    position = '${x2} 0 0'
    length = ${L2}
    n_elems = ${n_elems2}
    A = ${A2}
  []
  [junction2_3]
    type = JunctionOneToOne1Phase
    connections = 'pipe2:out pipe3:in'
  []
  [pipe3]
    type = FlowChannel1Phase
    position = '${x3} 0 0'
    length = ${L3}
    n_elems = ${n_elems3}
    A = ${A3}
  []
  [junction3_4]
    type = JunctionOneToOne1Phase
    connections = 'pipe3:out pipe4:in'
  []
  [pipe4]
    type = FlowChannel1Phase
    position = '${x4} 0 0'
    length = ${L4}
    n_elems = ${n_elems4}
    A = ${A4}
  []
  [turbine]
    type = ShaftConnectedCompressor1Phase
    position = '${x5} 0 0'
    inlet = 'pipe4:out'
    outlet = 'pipe5:in'
    A_ref = ${A_ref_turb}
    volume = ${V_turb}
    treat_as_turbine = true
    omega_rated = ${speed_rated}
    mdot_rated = ${rated_mfr}
    c0_rated = ${c0_rated_comp}
    rho0_rated = ${rho0_rated_comp}
    speeds = '0 0.5208 0.6250 0.7292 0.8333 0.9375'
    Rp_functions = 'rp_turb0 rp_turb1 rp_turb2 rp_turb3 rp_turb4 rp_turb5'
    eff_functions = 'eff_turb1 eff_turb1 eff_turb2 eff_turb3 eff_turb4 eff_turb5'
    min_pressure_ratio = 1.0
    speed_cr_I = 0
    inertia_const = ${I_turb}
    inertia_coeff = '${I_turb} 0 0 0'
    # assume no shaft friction
    speed_cr_fr = 0
    tau_fr_const = 0
    tau_fr_coeff = '0 0 0 0'
  []
  [pipe5]
    type = FlowChannel1Phase
    position = '${x5} 0 0'
    length = ${L5}
    n_elems = ${n_elems5}
    A = ${A5}
  []
  [junction5_6]
    type = JunctionOneToOne1Phase
    connections = 'pipe5:out pipe6:in'
  []
  [pipe6]
    type = FlowChannel1Phase
    position = '${x6} 0 0'
    length = ${L6}
    n_elems = ${n_elems6}
    A = ${A6}
  []
  [junction6_1]
    type = JunctionOneToOne1Phase
    connections = 'pipe6:out pipe1:in'
  []
  [heating]
    type = HeatTransferFromSpecifiedTemperature1Phase
    flow_channel = pipe3
    T_wall = ${T_hot}
    Hw = htc_wall_fn
  []
  [cooling]
    type = HeatTransferFromSpecifiedTemperature1Phase
    flow_channel = pipe6
    T_wall = ${T_cold}
    Hw = htc_wall_fn
  []
[]
[ControlLogic]
  [motor_ctrl]
    type = TimeFunctionComponentControl
    component = motor
    parameter = torque
    function = motor_torque_fn
  []
[]
[Postprocessors]
  [heating_rate]
    type = ADHeatRateConvection1Phase
    block = 'pipe3'
    T = T
    T_wall = T_wall
    Hw = Hw
    P_hf = P_hf
    execute_on = 'INITIAL TIMESTEP_END'
  []
  [cooling_rate]
    type = ADHeatRateConvection1Phase
    block = 'pipe6'
    T = T
    T_wall = T_wall
    Hw = Hw
    P_hf = P_hf
    execute_on = 'INITIAL TIMESTEP_END'
  []
  [motor_torque]
    type = RealComponentParameterValuePostprocessor
    component = motor
    parameter = torque
    execute_on = 'INITIAL TIMESTEP_END'
  []
  [motor_power]
    type = FunctionValuePostprocessor
    function = motor_power_fn
    execute_on = 'INITIAL TIMESTEP_END'
    indirect_dependencies = 'motor_torque shaft:omega'
  []
  [generator_torque]
    type = ShaftConnectedComponentPostprocessor
    quantity = torque
    shaft_connected_component_uo = generator:shaftconnected_uo
    execute_on = 'INITIAL TIMESTEP_END'
  []
  [generator_power]
    type = FunctionValuePostprocessor
    function = generator_power_fn
    execute_on = 'INITIAL TIMESTEP_END'
    indirect_dependencies = 'generator_torque shaft:omega'
  []
  [shaft_speed]
    type = ScalarVariable
    variable = 'shaft:omega'
    execute_on = 'INITIAL TIMESTEP_END'
  []
  [p_in_comp]
    type = PointValue
    variable = p
    point = '${x2_minus} 0 0'
    execute_on = 'INITIAL TIMESTEP_END'
  []
  [p_out_comp]
    type = PointValue
    variable = p
    point = '${x2_plus} 0 0'
    execute_on = 'INITIAL TIMESTEP_END'
  []
  [p_ratio_comp]
    type = ParsedPostprocessor
    pp_names = 'p_in_comp p_out_comp'
    expression = 'p_out_comp / p_in_comp'
    execute_on = 'INITIAL TIMESTEP_END'
  []
  [p_in_turb]
    type = PointValue
    variable = p
    point = '${x5_minus} 0 0'
    execute_on = 'INITIAL TIMESTEP_END'
  []
  [p_out_turb]
    type = PointValue
    variable = p
    point = '${x5_plus} 0 0'
    execute_on = 'INITIAL TIMESTEP_END'
  []
  [p_ratio_turb]
    type = ParsedPostprocessor
    pp_names = 'p_in_turb p_out_turb'
    expression = 'p_in_turb / p_out_turb'
    execute_on = 'INITIAL TIMESTEP_END'
  []
  [mfr_comp]
    type = ADFlowJunctionFlux1Phase
    boundary = pipe1:out
    connection_index = 0
    equation = mass
    junction = compressor
  []
  [mfr_turb]
    type = ADFlowJunctionFlux1Phase
    boundary = pipe4:out
    connection_index = 0
    equation = mass
    junction = turbine
  []
[]
[Preconditioning]
  [pc]
    type = SMP
    full = true
  []
[]
[Executioner]
  type = Transient
  scheme = 'bdf2'
  end_time = ${t3}
  dt = 0.1
  solve_type = NEWTON
  nl_rel_tol = 1e-50
  nl_abs_tol = 1e-10
  nl_max_its = 15
  l_tol = 1e-4
  l_max_its = 10
[]
[Outputs]
  [csv]
    type = CSV
    file_base = 'closed_brayton_cycle'
    execute_vector_postprocessors_on = 'INITIAL'
  []
  [console]
    type = Console
    show = 'shaft_speed p_ratio_comp p_ratio_turb compressor:pressure_ratio turbine:pressure_ratio'
  []
[]
[Functions]
  # compressor pressure ratio
  [rp_comp1]
    type = PiecewiseLinear
    data_file = 'rp_comp1.csv'
    x_index_in_file = 0
    y_index_in_file = 1
    format = columns
    extrap = true
  []
  [rp_comp2]
    type = PiecewiseLinear
    data_file = 'rp_comp2.csv'
    x_index_in_file = 0
    y_index_in_file = 1
    format = columns
    extrap = true
  []
  [rp_comp3]
    type = PiecewiseLinear
    data_file = 'rp_comp3.csv'
    x_index_in_file = 0
    y_index_in_file = 1
    format = columns
    extrap = true
  []
  [rp_comp4]
    type = PiecewiseLinear
    data_file = 'rp_comp4.csv'
    x_index_in_file = 0
    y_index_in_file = 1
    format = columns
    extrap = true
  []
  [rp_comp5]
    type = PiecewiseLinear
    data_file = 'rp_comp5.csv'
    x_index_in_file = 0
    y_index_in_file = 1
    format = columns
    extrap = true
  []
  # compressor efficiency
  [eff_comp1]
    type = ConstantFunction
    value = ${eff_comp}
  []
  [eff_comp2]
    type = ConstantFunction
    value = ${eff_comp}
  []
  [eff_comp3]
    type = ConstantFunction
    value = ${eff_comp}
  []
  [eff_comp4]
    type = ConstantFunction
    value = ${eff_comp}
  []
  [eff_comp5]
    type = ConstantFunction
    value = ${eff_comp}
  []
  # turbine pressure ratio
  [rp_turb0]
    type = ConstantFunction
    value = 1
  []
  [rp_turb1]
    type = PiecewiseLinear
    data_file = 'rp_turb1.csv'
    x_index_in_file = 0
    y_index_in_file = 1
    format = columns
    extrap = true
  []
  [rp_turb2]
    type = PiecewiseLinear
    data_file = 'rp_turb2.csv'
    x_index_in_file = 0
    y_index_in_file = 1
    format = columns
    extrap = true
  []
  [rp_turb3]
    type = PiecewiseLinear
    data_file = 'rp_turb3.csv'
    x_index_in_file = 0
    y_index_in_file = 1
    format = columns
    extrap = true
  []
  [rp_turb4]
    type = PiecewiseLinear
    data_file = 'rp_turb4.csv'
    x_index_in_file = 0
    y_index_in_file = 1
    format = columns
    extrap = true
  []
  [rp_turb5]
    type = PiecewiseLinear
    data_file = 'rp_turb5.csv'
    x_index_in_file = 0
    y_index_in_file = 1
    format = columns
    extrap = true
  []
  # turbine efficiency
  [eff_turb1]
    type = ConstantFunction
    value = ${eff_turb}
  []
  [eff_turb2]
    type = ConstantFunction
    value = ${eff_turb}
  []
  [eff_turb3]
    type = ConstantFunction
    value = ${eff_turb}
  []
  [eff_turb4]
    type = ConstantFunction
    value = ${eff_turb}
  []
  [eff_turb5]
    type = ConstantFunction
    value = ${eff_turb}
  []
[]
(modules/navier_stokes/test/tests/finite_volume/cns/mms/1d-with-bcs/basic-primitive-pcnsfv-kt.i)
[GlobalParams]
  fp = fp
  limiter = 'central_difference'
  two_term_boundary_expansion = true
[]
[Mesh]
  [cartesian]
    type = GeneratedMeshGenerator
    dim = 1
    xmin = .1
    xmax = .6
    nx = 2
  []
[]
[FluidProperties]
  [fp]
    type = IdealGasFluidProperties
  []
[]
[Problem]
  fv_bcs_integrity_check = false
[]
[Variables]
  [pressure]
    type = MooseVariableFVReal
  []
  [sup_vel_x]
    type = MooseVariableFVReal
  []
  [T_fluid]
    type = MooseVariableFVReal
  []
[]
[ICs]
  [pressure]
    type = FunctionIC
    variable = pressure
    function = 'exact_p'
  []
  [sup_vel_x]
    type = FunctionIC
    variable = sup_vel_x
    function = 'exact_sup_vel_x'
  []
  [T_fluid]
    type = FunctionIC
    variable = T_fluid
    function = 'exact_T'
  []
[]
[FVKernels]
  [mass_advection]
    type = PCNSFVKT
    variable = pressure
    eqn = "mass"
  []
  [mass_fn]
    type = FVBodyForce
    variable = pressure
    function = 'forcing_rho'
  []
  [momentum_x_advection]
    type = PCNSFVKT
    variable = sup_vel_x
    momentum_component = x
    eqn = "momentum"
  []
  [momentum_fn]
    type = FVBodyForce
    variable = sup_vel_x
    function = 'forcing_rho_ud'
  []
  [fluid_energy_advection]
    type = PCNSFVKT
    variable = T_fluid
    eqn = "energy"
  []
  [energy_fn]
    type = FVBodyForce
    variable = T_fluid
    function = 'forcing_rho_et'
  []
[]
[FVBCs]
  [mass_left]
    variable = pressure
    type = PCNSFVStrongBC
    boundary = left
    T_fluid = 'exact_T'
    superficial_velocity = 'exact_superficial_velocity'
    eqn = 'mass'
  []
  [momentum_left]
    variable = sup_vel_x
    type = PCNSFVStrongBC
    boundary = left
    T_fluid = 'exact_T'
    superficial_velocity = 'exact_superficial_velocity'
    eqn = 'momentum'
    momentum_component = 'x'
  []
  [energy_left]
    variable = T_fluid
    type = PCNSFVStrongBC
    boundary = left
    T_fluid = 'exact_T'
    superficial_velocity = 'exact_superficial_velocity'
    eqn = 'energy'
  []
  [mass_right]
    variable = pressure
    type = PCNSFVStrongBC
    boundary = right
    eqn = 'mass'
    pressure = 'exact_p'
  []
  [momentum_right]
    variable = sup_vel_x
    type = PCNSFVStrongBC
    boundary = right
    eqn = 'momentum'
    momentum_component = 'x'
    pressure = 'exact_p'
  []
  [energy_right]
    variable = T_fluid
    type = PCNSFVStrongBC
    boundary = right
    eqn = 'energy'
    pressure = 'exact_p'
  []
  # help gradient reconstruction
  [pressure_right]
    type = FVFunctionDirichletBC
    variable = pressure
    function = exact_p
    boundary = 'right'
  []
  [sup_vel_x_left]
    type = FVFunctionDirichletBC
    variable = sup_vel_x
    function = exact_sup_vel_x
    boundary = 'left'
  []
  [T_fluid_left]
    type = FVFunctionDirichletBC
    variable = T_fluid
    function = exact_T
    boundary = 'left'
  []
[]
[Materials]
  [var_mat]
    type = PorousPrimitiveVarMaterial
    pressure = pressure
    superficial_vel_x = sup_vel_x
    T_fluid = T_fluid
    porosity = porosity
  []
  [porosity]
    type = GenericFunctionMaterial
    prop_names = 'porosity'
    prop_values = 'eps'
  []
[]
[Functions]
[exact_rho]
  type = ParsedFunction
  expression = '3.48788261470924*cos(x)'
[]
[forcing_rho]
  type = ParsedFunction
  expression = '-3.45300378856215*sin(1.1*x)'
[]
[exact_rho_ud]
  type = ParsedFunction
  expression = '3.13909435323832*cos(1.1*x)'
[]
[forcing_rho_ud]
  type = ParsedFunction
  expression = '-0.9*(10.6975765229419*cos(1.2*x)/cos(x) - 0.697576522941849*cos(1.1*x)^2/cos(x)^2)*sin(x) + 0.9*(10.6975765229419*sin(x)*cos(1.2*x)/cos(x)^2 - 1.3951530458837*sin(x)*cos(1.1*x)^2/cos(x)^3 + 1.53466835047207*sin(1.1*x)*cos(1.1*x)/cos(x)^2 - 12.8370918275302*sin(1.2*x)/cos(x))*cos(x) + 3.13909435323832*sin(x)*cos(1.1*x)^2/cos(x)^2 - 6.9060075771243*sin(1.1*x)*cos(1.1*x)/cos(x)'
[]
[exact_rho_et]
  type = ParsedFunction
  expression = '26.7439413073546*cos(1.2*x)'
[]
[forcing_rho_et]
  type = ParsedFunction
  expression = '0.9*(3.48788261470924*(3.06706896551724*cos(1.2*x)/cos(x) - 0.2*cos(1.1*x)^2/cos(x)^2)*cos(x) + 26.7439413073546*cos(1.2*x))*sin(x)*cos(1.1*x)/cos(x)^2 - 0.99*(3.48788261470924*(3.06706896551724*cos(1.2*x)/cos(x) - 0.2*cos(1.1*x)^2/cos(x)^2)*cos(x) + 26.7439413073546*cos(1.2*x))*sin(1.1*x)/cos(x) + 0.9*(-(10.6975765229419*cos(1.2*x)/cos(x) - 0.697576522941849*cos(1.1*x)^2/cos(x)^2)*sin(x) + (10.6975765229419*sin(x)*cos(1.2*x)/cos(x)^2 - 1.3951530458837*sin(x)*cos(1.1*x)^2/cos(x)^3 + 1.53466835047207*sin(1.1*x)*cos(1.1*x)/cos(x)^2 - 12.8370918275302*sin(1.2*x)/cos(x))*cos(x) - 32.0927295688256*sin(1.2*x))*cos(1.1*x)/cos(x)'
[]
[exact_T]
  type = ParsedFunction
  expression = '0.0106975765229418*cos(1.2*x)/cos(x) - 0.000697576522941848*cos(1.1*x)^2/cos(x)^2'
[]
[exact_eps_p]
  type = ParsedFunction
  expression = '3.13909435323832*(3.06706896551724*cos(1.2*x)/cos(x) - 0.2*cos(1.1*x)^2/cos(x)^2)*cos(x)'
[]
[exact_p]
  type = ParsedFunction
  expression = '3.48788261470924*(3.06706896551724*cos(1.2*x)/cos(x) - 0.2*cos(1.1*x)^2/cos(x)^2)*cos(x)'
[]
[exact_sup_vel_x]
  type = ParsedFunction
  expression = '0.9*cos(1.1*x)/cos(x)'
[]
[exact_superficial_velocity]
  type = ParsedVectorFunction
  expression_x = '0.9*cos(1.1*x)/cos(x)'
[]
[eps]
  type = ParsedFunction
  expression = '0.9'
[]
[]
[Executioner]
  solve_type = NEWTON
  type = Transient
  num_steps = 1
  dtmin = 1
  petsc_options_iname = '-pc_type'
  petsc_options_value = 'lu'
  nl_max_its = 50
  line_search = bt
  nl_rel_tol = 1e-12
  nl_abs_tol = 1e-12
[]
[Outputs]
  exodus = true
  csv = true
[]
[Debug]
  show_var_residual_norms = true
[]
[Postprocessors]
  [h]
    type = AverageElementSize
    outputs = 'console csv'
    execute_on = 'timestep_end'
  []
  [L2pressure]
    type = ElementL2Error
    variable = pressure
    function = exact_p
    outputs = 'console csv'
    execute_on = 'timestep_end'
  []
  [L2sup_vel_x]
    variable = sup_vel_x
    function = exact_sup_vel_x
    type = ElementL2Error
    outputs = 'console csv'
    execute_on = 'timestep_end'
  []
  [L2T_fluid]
    variable = T_fluid
    function = exact_T
    type = ElementL2Error
    outputs = 'console csv'
    execute_on = 'timestep_end'
  []
[]
(modules/thermal_hydraulics/test/tests/problems/double_rarefaction/1phase.i)
# Riemann problem that has a double-rarefaction solution
[GlobalParams]
  gravity_vector = '0 0 0'
  rdg_slope_reconstruction = minmod
  closures = simple_closures
[]
[Functions]
  [vel_ic_fn]
    type = PiecewiseConstant
    axis = x
    direction = right
    x = ' 0.0 0.1'
    y = '-1.0 1.0'
  []
[]
[FluidProperties]
  [fp]
    type = IdealGasFluidProperties
    gamma = 1.4
    molar_mass = 11.64024372
  []
[]
[Closures]
  [simple_closures]
    type = Closures1PhaseSimple
  []
[]
[Components]
  [pipe]
    type = FlowChannel1Phase
    fp = fp
    # geometry
    position = '-1 0 0'
    orientation = '1 0 0'
    length = 2.0
    n_elems = 100
    A = 1.0
    # IC
    initial_T = 0.04
    initial_p = 0.2
    initial_vel = vel_ic_fn
    f = 0
  []
  [left_boundary]
    type = FreeBoundary1Phase
    input = 'pipe:in'
  []
  [right_boundary]
    type = FreeBoundary1Phase
    input = 'pipe:out'
  []
[]
[Executioner]
  type = Transient
  [TimeIntegrator]
    type = ExplicitSSPRungeKutta
    order = 2
  []
  solve_type = LINEAR
  l_tol = 1e-4
  nl_rel_tol = 1e-20
  nl_abs_tol = 1e-8
  nl_max_its = 60
  # run to t = 0.6
  start_time = 0.0
  dt = 1e-3
  num_steps = 600
  abort_on_solve_fail = true
[]
[Outputs]
  file_base = '1phase'
  velocity_as_vector = false
  execute_on = 'initial timestep_end'
  [out]
    type = Exodus
    show = 'p T vel'
  []
[]
(modules/thermal_hydraulics/test/tests/components/shaft_connected_turbine_1phase/turbine_startup.i)
# This test tests that the turbine can startup from rest and reach full power.
# The mass flow rate for the inlet component is ramped up over 10s. The dyno
# component and pid_ctrl controler are used to maintain the turbine's rated shaft
# speed. The turbine should supply ~1e6 W of power to the shaft by the end of the test.
omega_rated = 450
mdot = 5.0
T_in = 1000.0
p_out = 1e6
[GlobalParams]
  f = 1
  scaling_factor_1phase = '0.04 0.04 0.04e-5'
  closures = simple_closures
  n_elems = 20
  initial_T = ${T_in}
  initial_p = ${p_out}
  initial_vel = 0
  initial_vel_x = 0
  initial_vel_y = 0
  initial_vel_z = 0
[]
[FluidProperties]
  [eos]
    type = IdealGasFluidProperties
  []
[]
[Closures]
  [simple_closures]
    type = Closures1PhaseSimple
  []
[]
[Components]
  [ch_in]
    type = FlowChannel1Phase
    position = '-1 0 0'
    orientation = '1 0 0'
    length = 1
    A = 0.1
    D_h = 1
    fp = eos
  []
  [inlet]
    type = InletMassFlowRateTemperature1Phase
    input = 'ch_in:in'
    m_dot = 0
    T = ${T_in}
  []
  [turbine]
    type = ShaftConnectedTurbine1Phase
    inlet = 'ch_in:out'
    outlet = 'ch_out:in'
    position = '0 0 0'
    scaling_factor_rhoEV = 1e-5
    A_ref = 0.1
    volume = 0.0002
    inertia_coeff = '1 1 1 1'
    inertia_const = 1.61397
    speed_cr_I = 1e12
    speed_cr_fr = 0
    tau_fr_coeff = '0 0 0 0'
    tau_fr_const = 0
    omega_rated = ${omega_rated}
    D_wheel = 0.4
    head_coefficient = head
    power_coefficient = power
  []
  [ch_out]
    type = FlowChannel1Phase
    position = '0 0 0'
    orientation = '1 0 0'
    length = 1
    A = 0.1
    D_h = 1
    fp = eos
  []
  [outlet]
    type = Outlet1Phase
    input = 'ch_out:out'
    p = ${p_out}
  []
  [dyno]
    type = ShaftConnectedMotor
    inertia = 10
    torque = -450
  []
  [shaft]
    type = Shaft
    connected_components = 'turbine dyno'
    initial_speed = ${omega_rated}
  []
[]
[Functions]
  [head]
    type = PiecewiseLinear
    x = '0 7e-3 1e-2'
    y = '0 15 20'
  []
  [power]
    type = PiecewiseLinear
    x = '0 6e-3 1e-2'
    y = '0 0.05 0.18'
  []
  [mfr_fn]
    type = PiecewiseLinear
    x = '0    10'
    y = '1e-6 ${mdot}'
  []
  [dts]
    type = PiecewiseConstant
    y = '5e-3 1e-2 5e-2 5e-1'
    x = '0 0.5 1 10'
  []
[]
[ControlLogic]
  [mfr_cntrl]
    type = TimeFunctionComponentControl
    component = inlet
    parameter = m_dot
    function = mfr_fn
  []
  [speed_set_point]
    type = GetFunctionValueControl
    function = ${omega_rated}
  []
  [pid_ctrl]
    type = PIDControl
    input = omega
    set_point = speed_set_point:value
    K_i = 2
    K_p = 5
    K_d = 5
    initial_value = -450
  []
  [set_torque_value]
    type = SetComponentRealValueControl
    component = dyno
    parameter = torque
    value = pid_ctrl:output
  []
[]
[Postprocessors]
  [omega]
    type = ScalarVariable
    variable = shaft:omega
    execute_on = 'initial timestep_end'
  []
  [flow_coefficient]
    type = ElementAverageValue
    variable = flow_coeff
    block = 'turbine'
    execute_on = 'initial timestep_end'
  []
  [delta_p]
    type = ElementAverageValue
    variable = delta_p
    block = 'turbine'
    execute_on = 'initial timestep_end'
  []
  [power]
    type = ElementAverageValue
    variable = power
    block = 'turbine'
    execute_on = 'initial timestep_end'
  []
[]
[Preconditioning]
  [SMP]
    type = SMP
    full = true
  []
[]
[Executioner]
  type = Transient
  scheme = 'implicit-euler'
  start_time = 0
  [TimeStepper]
    type = FunctionDT
    function = dts
  []
  end_time = 20
  abort_on_solve_fail = true
  solve_type = 'PJFNK'
  line_search = 'basic'
  nl_rel_tol = 1e-6
  nl_abs_tol = 1e-4
  nl_max_its = 30
  l_tol = 1e-4
  l_max_its = 20
  [Quadrature]
    type = GAUSS
    order = SECOND
  []
[]
[Outputs]
  [console]
    type = Console
    max_rows = 1
  []
  print_linear_residuals = false
[]
(modules/navier_stokes/test/tests/finite_volume/cns/straight_channel_porosity_step/rotated-2d-bkt-function-porosity-mixed.i)
p_initial=1.01e5
T=273.15
# u refers to the superficial velocity
u_in=1
rho_in=1.30524
sup_mom_y_in=${fparse u_in * rho_in}
user_limiter='upwind'
friction_coeff=10
[GlobalParams]
  fp = fp
  two_term_boundary_expansion = true
  limiter = ${user_limiter}
[]
[Mesh]
  [cartesian]
    type = GeneratedMeshGenerator
    dim = 2
    xmin = 0
    xmax = 1
    nx = 3
    ymin = 0
    ymax = 18
    ny = 90
  []
[]
[FluidProperties]
  [fp]
    type = IdealGasFluidProperties
  []
[]
[Problem]
  fv_bcs_integrity_check = false
[]
[Variables]
  [pressure]
    type = MooseVariableFVReal
    initial_condition = ${p_initial}
  []
  [sup_mom_x]
    type = MooseVariableFVReal
    initial_condition = 1e-15
    scaling = 1e-2
  []
  [sup_mom_y]
    type = MooseVariableFVReal
    initial_condition = 1e-15
    scaling = 1e-2
  []
  [T_fluid]
    type = MooseVariableFVReal
    initial_condition = ${T}
    scaling = 1e-5
  []
[]
[AuxVariables]
  [vel_y]
    type = MooseVariableFVReal
  []
  [rho]
    type = MooseVariableFVReal
  []
  [eps]
    type = MooseVariableFVReal
  []
[]
[AuxKernels]
  [vel_y]
    type = ADMaterialRealAux
    variable = vel_y
    property = vel_y
    execute_on = 'timestep_end'
  []
  [rho]
    type = ADMaterialRealAux
    variable = rho
    property = rho
    execute_on = 'timestep_end'
  []
  [eps]
    type = MaterialRealAux
    variable = eps
    property = porosity
    execute_on = 'timestep_end'
  []
[]
[FVKernels]
  [mass_time]
    type = FVMatPropTimeKernel
    mat_prop_time_derivative = 'dsuperficial_rho_dt'
    variable = pressure
  []
  [mass_advection]
    type = PCNSFVKT
    variable = pressure
    eqn = "mass"
  []
  [momentum_time]
    type = FVMatPropTimeKernel
    mat_prop_time_derivative = 'dsuperficial_rhou_dt'
    variable = sup_mom_x
  []
  [momentum_advection]
    type = PCNSFVKT
    variable = sup_mom_x
    eqn = "momentum"
    momentum_component = 'x'
  []
  [eps_grad]
    type = PNSFVPGradEpsilon
    variable = sup_mom_x
    momentum_component = 'x'
    epsilon_function = 'eps'
  []
  [drag]
    type = PCNSFVMomentumFriction
    variable = sup_mom_x
    momentum_component = 'x'
    Darcy_name = 'cl'
    momentum_name = superficial_rhou
  []
  [momentum_time_y]
    type = FVMatPropTimeKernel
    mat_prop_time_derivative = 'dsuperficial_rhov_dt'
    variable = sup_mom_y
  []
  [momentum_advection_y]
    type = PCNSFVKT
    variable = sup_mom_y
    eqn = "momentum"
    momentum_component = 'y'
  []
  [eps_grad_y]
    type = PNSFVPGradEpsilon
    variable = sup_mom_y
    momentum_component = 'y'
    epsilon_function = 'eps'
  []
  [drag_y]
    type = PCNSFVMomentumFriction
    variable = sup_mom_y
    momentum_component = 'y'
    Darcy_name = 'cl'
    momentum_name = superficial_rhov
  []
  [energy_time]
    type = FVMatPropTimeKernel
    mat_prop_time_derivative = 'dsuperficial_rho_et_dt'
    variable = T_fluid
  []
  [energy_advection]
    type = PCNSFVKT
    variable = T_fluid
    eqn = "energy"
  []
[]
[FVBCs]
  [rho_bottom]
    type = PCNSFVStrongBC
    boundary = 'bottom'
    variable = pressure
    superficial_velocity = 'ud_in'
    T_fluid = ${T}
    eqn = 'mass'
    velocity_function_includes_rho = true
  []
  [rhou_bottom]
    type = PCNSFVStrongBC
    boundary = 'bottom'
    variable = sup_mom_x
    superficial_velocity = 'ud_in'
    T_fluid = ${T}
    eqn = 'momentum'
    momentum_component = 'x'
    velocity_function_includes_rho = true
  []
  [rhov_bottom]
    type = PCNSFVStrongBC
    boundary = 'bottom'
    variable = sup_mom_y
    superficial_velocity = 'ud_in'
    T_fluid = ${T}
    eqn = 'momentum'
    momentum_component = 'y'
    velocity_function_includes_rho = true
  []
  [rho_et_bottom]
    type = PCNSFVStrongBC
    boundary = 'bottom'
    variable = T_fluid
    superficial_velocity = 'ud_in'
    T_fluid = ${T}
    eqn = 'energy'
    velocity_function_includes_rho = true
  []
  [rho_top]
    type = PCNSFVStrongBC
    boundary = 'top'
    variable = pressure
    pressure = ${p_initial}
    eqn = 'mass'
  []
  [rhou_top]
    type = PCNSFVStrongBC
    boundary = 'top'
    variable = sup_mom_x
    pressure = ${p_initial}
    eqn = 'momentum'
    momentum_component = 'x'
  []
  [rhov_top]
    type = PCNSFVStrongBC
    boundary = 'top'
    variable = sup_mom_y
    pressure = ${p_initial}
    eqn = 'momentum'
    momentum_component = 'y'
  []
  [rho_et_top]
    type = PCNSFVStrongBC
    boundary = 'top'
    variable = T_fluid
    pressure = ${p_initial}
    eqn = 'energy'
  []
  [wall_pressure_x]
    type = PCNSFVImplicitMomentumPressureBC
    momentum_component = 'x'
    boundary = 'left right'
    variable = sup_mom_x
  []
  [wall_pressure_y]
    type = PCNSFVImplicitMomentumPressureBC
    momentum_component = 'y'
    boundary = 'left right'
    variable = sup_mom_y
  []
  # Use these to help create more accurate cell centered gradients for cells adjacent to boundaries
  [T_bottom]
    type = FVDirichletBC
    variable = T_fluid
    value = ${T}
    boundary = 'bottom'
  []
  [sup_mom_x_bottom_and_walls]
    type = FVDirichletBC
    variable = sup_mom_x
    value = 0
    boundary = 'bottom left right'
  []
  [sup_mom_y_walls]
    type = FVDirichletBC
    variable = sup_mom_y
    value = 0
    boundary = 'left right'
  []
  [sup_mom_y_bottom]
    type = FVDirichletBC
    variable = sup_mom_y
    value = ${sup_mom_y_in}
    boundary = 'bottom'
  []
  [p_top]
    type = FVDirichletBC
    variable = pressure
    value = ${p_initial}
    boundary = 'top'
  []
[]
[Functions]
  [ud_in]
    type = ParsedVectorFunction
    expression_x = '0'
    expression_y = '${sup_mom_y_in}'
  []
  [eps]
    type = ParsedFunction
    expression = 'if(y < 2.8, 1,
             if(y < 3.2, 1 - .5 / .4 * (y - 2.8),
             if(y < 6.8, .5,
             if(y < 7.2, .5 - .25 / .4 * (y - 6.8),
             if(y < 10.8, .25,
             if(y < 11.2, .25 + .25 / .4 * (y - 10.8),
             if(y < 14.8, .5,
             if(y < 15.2, .5 + .5 / .4 * (y - 14.8),
                1))))))))'
  []
[]
[Materials]
  [var_mat]
    type = PorousMixedVarMaterial
    pressure = pressure
    T_fluid = T_fluid
    superficial_rhou = sup_mom_x
    superficial_rhov = sup_mom_y
    fp = fp
    porosity = porosity
  []
  [porosity]
    type = GenericFunctionMaterial
    prop_names = 'porosity'
    prop_values = 'eps'
  []
  [ad_generic]
    type = ADGenericConstantVectorMaterial
    prop_names = 'cl'
    prop_values = '${friction_coeff} ${friction_coeff} ${friction_coeff}'
  []
[]
[Preconditioning]
  [smp]
    type = SMP
    full = true
  []
[]
[Executioner]
  solve_type = NEWTON
  line_search = 'bt'
  type = Transient
  nl_max_its = 20
  [TimeStepper]
    type = IterationAdaptiveDT
    dt = 5e-5
    optimal_iterations = 6
    growth_factor = 1.2
  []
  num_steps = 10000
  end_time = 500
  nl_abs_tol = 1e-7
  petsc_options_iname = '-pc_type -pc_factor_mat_solver_type'
  petsc_options_value = 'lu       mumps'
[]
[Outputs]
  [out]
    type = Exodus
    execute_on = 'final'
  []
  checkpoint = true
[]
[Debug]
  show_var_residual_norms = true
[]
(modules/fluid_properties/test/tests/fp_interrogator/err.no_params.i)
[FluidPropertiesInterrogator]
  fp = fp
[]
[FluidProperties]
  [./fp]
    type = IdealGasFluidProperties
    gamma = 1.4
    molar_mass = 0.02900055737704918
    mu = 1.823e-05
    k = 0.02568
  [../]
[]
(modules/navier_stokes/test/tests/finite_volume/cns/mms/1d-with-bcs/free-flow-hllc.i)
diff_coeff = 0.1
[GlobalParams]
  fp = fp
[]
[Mesh]
  [cartesian]
    type = GeneratedMeshGenerator
    dim = 1
    xmin = .1
    xmax = 1.1
    nx = 2
  []
[]
[FluidProperties]
  [fp]
    type = IdealGasFluidProperties
  []
[]
[Variables]
  [rho]
    type = MooseVariableFVReal
  []
  [rho_u]
    type = MooseVariableFVReal
  []
  [rho_et]
    type = MooseVariableFVReal
  []
[]
[ICs]
  [rho]
    type = FunctionIC
    variable = rho
    function = 'exact_rho'
  []
  [rho_u]
    type = FunctionIC
    variable = rho_u
    function = 'exact_rho_u'
  []
  [rho_et]
    type = FunctionIC
    variable = rho_et
    function = 'exact_rho_et'
  []
[]
[FVKernels]
  [mass_advection]
    type = CNSFVMassHLLC
    variable = rho
  []
  [mass_fn]
    type = FVBodyForce
    variable = rho
    function = 'forcing_rho'
  []
  [momentum_x_advection]
    type = CNSFVMomentumHLLC
    variable = rho_u
    momentum_component = x
  []
  [momentum_fn]
    type = FVBodyForce
    variable = rho_u
    function = 'forcing_rho_u'
  []
  [fluid_energy_advection]
    type = CNSFVFluidEnergyHLLC
    variable = rho_et
  []
  [energy_fn]
    type = FVBodyForce
    variable = rho_et
    function = 'forcing_rho_et'
  []
  [mass_diff]
    type = FVDiffusion
    variable = rho
    coeff = ${diff_coeff}
  []
  [momentum_diff]
    type = FVDiffusion
    variable = rho_u
    coeff = ${diff_coeff}
  []
  [energy_diff]
    type = FVDiffusion
    variable = rho_et
    coeff = ${diff_coeff}
  []
[]
[FVBCs]
  [mass_in]
    variable = rho
    type = CNSFVHLLCSpecifiedMassFluxAndTemperatureMassBC
    boundary = left
    temperature = 'exact_T'
    rhou = 'exact_rho_u'
  []
  [momentum_in]
    variable = rho_u
    type = CNSFVHLLCSpecifiedMassFluxAndTemperatureMomentumBC
    boundary = left
    temperature = 'exact_T'
    rhou = 'exact_rho_u'
    momentum_component = 'x'
  []
  [energy_in]
    variable = rho_et
    type = CNSFVHLLCSpecifiedMassFluxAndTemperatureFluidEnergyBC
    boundary = left
    temperature = 'exact_T'
    rhou = 'exact_rho_u'
  []
  [mass_out]
    variable = rho
    type = CNSFVHLLCSpecifiedPressureMassBC
    boundary = right
    pressure = 'exact_p'
  []
  [momentum_out]
    variable = rho_u
    type = CNSFVHLLCSpecifiedPressureMomentumBC
    boundary = right
    pressure = 'exact_p'
    momentum_component = 'x'
  []
  [energy_out]
    variable = rho_et
    type = CNSFVHLLCSpecifiedPressureFluidEnergyBC
    boundary = right
    pressure = 'exact_p'
  []
  [left_mass_diffusion]
    type = FVFunctionNeumannBC
    variable = rho
    function = minus_rho_bc
    boundary = 'left'
  []
  [left_momentum_diffusion]
    type = FVFunctionNeumannBC
    variable = rho_u
    function = minus_rho_u_bc
    boundary = 'left'
  []
  [left_energy_diffusion]
    type = FVFunctionNeumannBC
    variable = rho_et
    function = minus_rho_et_bc
    boundary = 'left'
  []
  [right_mass_diffusion]
    type = FVFunctionNeumannBC
    variable = rho
    function = rho_bc
    boundary = 'right'
  []
  [right_momentum_diffusion]
    type = FVFunctionNeumannBC
    variable = rho_u
    function = rho_u_bc
    boundary = 'right'
  []
  [right_energy_diffusion]
    type = FVFunctionNeumannBC
    variable = rho_et
    function = rho_et_bc
    boundary = 'right'
  []
[]
[Materials]
  [var_mat]
    type = ConservedVarValuesMaterial
    rho = rho
    rhou = rho_u
    rho_et = rho_et
  []
[]
[Functions]
  [exact_rho]
    type = ParsedFunction
    expression = '3.48788261470924*cos(x)'
  []
  [rho_bc]
    type = ParsedFunction
    value = '-diff_coeff*3.48788261470924*sin(x)'
    vars = 'diff_coeff'
    vals = '${diff_coeff}'
  []
  [minus_rho_bc]
    type = ParsedFunction
    value = 'diff_coeff*3.48788261470924*sin(x)'
    vars = 'diff_coeff'
    vals = '${diff_coeff}'
  []
  [forcing_rho]
    type = ParsedFunction
    expression = '-3.83667087618017*sin(1.1*x) + 0.348788261470924*cos(x)'
  []
  [exact_rho_u]
    type = ParsedFunction
    expression = '3.48788261470924*cos(1.1*x)'
  []
  [rho_u_bc]
    type = ParsedFunction
    value = '-diff_coeff*3.48788261470924*1.1*sin(1.1*x)'
    vars = 'diff_coeff'
    vals = '${diff_coeff}'
  []
  [minus_rho_u_bc]
    type = ParsedFunction
    value = 'diff_coeff*3.48788261470924*1.1*sin(1.1*x)'
    vars = 'diff_coeff'
    vals = '${diff_coeff}'
  []
  [forcing_rho_u]
    type = ParsedFunction
    expression = '-(10.6975765229419*cos(1.2*x)/cos(x) - 0.697576522941849*cos(1.1*x)^2/cos(x)^2)*sin(x) + (10.6975765229419*sin(x)*cos(1.2*x)/cos(x)^2 - 1.3951530458837*sin(x)*cos(1.1*x)^2/cos(x)^3 + 1.53466835047207*sin(1.1*x)*cos(1.1*x)/cos(x)^2 - 12.8370918275302*sin(1.2*x)/cos(x))*cos(x) + 3.48788261470924*sin(x)*cos(1.1*x)^2/cos(x)^2 - 7.67334175236034*sin(1.1*x)*cos(1.1*x)/cos(x) + 0.422033796379819*cos(1.1*x)'
  []
  [exact_rho_et]
    type = ParsedFunction
    expression = '26.7439413073546*cos(1.2*x)'
  []
  [rho_et_bc]
    type = ParsedFunction
    value = '-diff_coeff*26.7439413073546*1.2*sin(1.2*x)'
    vars = 'diff_coeff'
    vals = '${diff_coeff}'
  []
  [minus_rho_et_bc]
    type = ParsedFunction
    value = 'diff_coeff*26.7439413073546*1.2*sin(1.2*x)'
    vars = 'diff_coeff'
    vals = '${diff_coeff}'
  []
  [forcing_rho_et]
    type = ParsedFunction
    expression = '1.0*(3.48788261470924*(3.06706896551724*cos(1.2*x)/cos(x) - 0.2*cos(1.1*x)^2/cos(x)^2)*cos(x) + 26.7439413073546*cos(1.2*x))*sin(x)*cos(1.1*x)/cos(x)^2 - 1.1*(3.48788261470924*(3.06706896551724*cos(1.2*x)/cos(x) - 0.2*cos(1.1*x)^2/cos(x)^2)*cos(x) + 26.7439413073546*cos(1.2*x))*sin(1.1*x)/cos(x) + 1.0*(-(10.6975765229419*cos(1.2*x)/cos(x) - 0.697576522941849*cos(1.1*x)^2/cos(x)^2)*sin(x) + (10.6975765229419*sin(x)*cos(1.2*x)/cos(x)^2 - 1.3951530458837*sin(x)*cos(1.1*x)^2/cos(x)^3 + 1.53466835047207*sin(1.1*x)*cos(1.1*x)/cos(x)^2 - 12.8370918275302*sin(1.2*x)/cos(x))*cos(x) - 32.0927295688256*sin(1.2*x))*cos(1.1*x)/cos(x) + 3.85112754825907*cos(1.2*x)'
  []
  [exact_T]
    type = ParsedFunction
    expression = '0.0106975765229418*cos(1.2*x)/cos(x) - 0.000697576522941848*cos(1.1*x)^2/cos(x)^2'
  []
  [exact_p]
    type = ParsedFunction
    expression = '3.48788261470924*(3.06706896551724*cos(1.2*x)/cos(x) - 0.2*cos(1.1*x)^2/cos(x)^2)*cos(x)'
  []
[]
[Executioner]
  solve_type = NEWTON
  type = Steady
  petsc_options_iname = '-pc_type'
  petsc_options_value = 'lu'
  nl_max_its = 50
  line_search = none
  nl_rel_tol = 1e-11
  nl_abs_tol = 1e-11
[]
[Outputs]
  exodus = true
  csv = true
[]
[Debug]
  show_var_residual_norms = true
[]
[Postprocessors]
  [h]
    type = AverageElementSize
    outputs = 'console csv'
    execute_on = 'timestep_end'
  []
  [L2rho]
    type = ElementL2Error
    variable = rho
    function = exact_rho
    outputs = 'console csv'
    execute_on = 'timestep_end'
  []
  [L2rho_u]
    variable = rho_u
    function = exact_rho_u
    type = ElementL2Error
    outputs = 'console csv'
    execute_on = 'timestep_end'
  []
  [L2rho_et]
    variable = rho_et
    function = exact_rho_et
    type = ElementL2Error
    outputs = 'console csv'
    execute_on = 'timestep_end'
  []
[]
(modules/navier_stokes/test/tests/finite_volume/cns/mms/1d-with-bcs/varying-eps-basic-kt-primitive.i)
[GlobalParams]
  fp = fp
  limiter = 'central_difference'
  two_term_boundary_expansion = true
[]
[Mesh]
  [cartesian]
    type = GeneratedMeshGenerator
    dim = 1
    xmin = .1
    xmax = .6
    nx = 2
  []
[]
[FluidProperties]
  [fp]
    type = IdealGasFluidProperties
  []
[]
[Problem]
  fv_bcs_integrity_check = false
[]
[Variables]
  [pressure]
    type = MooseVariableFVReal
  []
  [sup_vel_x]
    type = MooseVariableFVReal
  []
  [T_fluid]
    type = MooseVariableFVReal
  []
[]
[ICs]
  [pressure]
    type = FunctionIC
    variable = pressure
    function = 'exact_p'
  []
  [sup_vel_x]
    type = FunctionIC
    variable = sup_vel_x
    function = 'exact_sup_vel_x'
  []
  [T_fluid]
    type = FunctionIC
    variable = T_fluid
    function = 'exact_T'
  []
[]
[FVKernels]
  [mass_advection]
    type = PCNSFVKT
    variable = pressure
    eqn = "mass"
  []
  [mass_fn]
    type = FVBodyForce
    variable = pressure
    function = 'forcing_rho'
  []
  [momentum_x_advection]
    type = PCNSFVKT
    variable = sup_vel_x
    momentum_component = x
    eqn = "momentum"
  []
  [eps_grad]
    type = PNSFVPGradEpsilon
    variable = sup_vel_x
    momentum_component = 'x'
    epsilon_function = 'eps'
  []
  [momentum_fn]
    type = FVBodyForce
    variable = sup_vel_x
    function = 'forcing_rho_ud'
  []
  [fluid_energy_advection]
    type = PCNSFVKT
    variable = T_fluid
    eqn = "energy"
  []
  [energy_fn]
    type = FVBodyForce
    variable = T_fluid
    function = 'forcing_rho_et'
  []
[]
[FVBCs]
  [mass_left]
    variable = pressure
    type = PCNSFVStrongBC
    boundary = left
    T_fluid = 'exact_T'
    superficial_velocity = 'exact_superficial_velocity'
    eqn = 'mass'
  []
  [momentum_left]
    variable = sup_vel_x
    type = PCNSFVStrongBC
    boundary = left
    T_fluid = 'exact_T'
    superficial_velocity = 'exact_superficial_velocity'
    eqn = 'momentum'
    momentum_component = 'x'
  []
  [energy_left]
    variable = T_fluid
    type = PCNSFVStrongBC
    boundary = left
    T_fluid = 'exact_T'
    superficial_velocity = 'exact_superficial_velocity'
    eqn = 'energy'
  []
  [mass_right]
    variable = pressure
    type = PCNSFVStrongBC
    boundary = right
    eqn = 'mass'
    pressure = 'exact_p'
  []
  [momentum_right]
    variable = sup_vel_x
    type = PCNSFVStrongBC
    boundary = right
    eqn = 'momentum'
    momentum_component = 'x'
    pressure = 'exact_p'
  []
  [energy_right]
    variable = T_fluid
    type = PCNSFVStrongBC
    boundary = right
    eqn = 'energy'
    pressure = 'exact_p'
  []
  # help gradient reconstruction
  [pressure_right]
    type = FVFunctionDirichletBC
    variable = pressure
    function = exact_p
    boundary = 'right'
  []
  [sup_vel_x_left]
    type = FVFunctionDirichletBC
    variable = sup_vel_x
    function = exact_sup_vel_x
    boundary = 'left'
  []
  [T_fluid_left]
    type = FVFunctionDirichletBC
    variable = T_fluid
    function = exact_T
    boundary = 'left'
  []
[]
[Materials]
  [var_mat]
    type = PorousPrimitiveVarMaterial
    pressure = pressure
    superficial_vel_x = sup_vel_x
    T_fluid = T_fluid
    porosity = porosity
  []
  [porosity]
    type = GenericFunctionMaterial
    prop_names = 'porosity'
    prop_values = 'eps'
  []
[]
[Functions]
[exact_rho]
  type = ParsedFunction
  expression = '3.48788261470924*cos(x)'
[]
[forcing_rho]
  type = ParsedFunction
  expression = '-3.83667087618017*sin(1.1*x)*cos(1.3*x) - 4.53424739912202*sin(1.3*x)*cos(1.1*x)'
[]
[exact_rho_ud]
  type = ParsedFunction
  expression = '3.48788261470924*cos(1.1*x)*cos(1.3*x)'
[]
[forcing_rho_ud]
  type = ParsedFunction
  expression = '(-(10.6975765229419*cos(1.5*x)/cos(x) - 0.697576522941849*cos(1.1*x)^2/cos(x)^2)*sin(x) + (10.6975765229419*sin(x)*cos(1.5*x)/cos(x)^2 - 1.3951530458837*sin(x)*cos(1.1*x)^2/cos(x)^3 + 1.53466835047207*sin(1.1*x)*cos(1.1*x)/cos(x)^2 - 16.0463647844128*sin(1.5*x)/cos(x))*cos(x))*cos(1.3*x) + 3.48788261470924*sin(x)*cos(1.1*x)^2*cos(1.3*x)/cos(x)^2 - 7.67334175236034*sin(1.1*x)*cos(1.1*x)*cos(1.3*x)/cos(x) - 4.53424739912202*sin(1.3*x)*cos(1.1*x)^2/cos(x)'
[]
[exact_rho_et]
  type = ParsedFunction
  expression = '26.7439413073546*cos(1.5*x)'
[]
[forcing_rho_et]
  type = ParsedFunction
  expression = '1.0*(3.48788261470924*(3.06706896551724*cos(1.5*x)/cos(x) - 0.2*cos(1.1*x)^2/cos(x)^2)*cos(x) + 26.7439413073546*cos(1.5*x))*sin(x)*cos(1.1*x)*cos(1.3*x)/cos(x)^2 - 1.1*(3.48788261470924*(3.06706896551724*cos(1.5*x)/cos(x) - 0.2*cos(1.1*x)^2/cos(x)^2)*cos(x) + 26.7439413073546*cos(1.5*x))*sin(1.1*x)*cos(1.3*x)/cos(x) - 1.3*(3.48788261470924*(3.06706896551724*cos(1.5*x)/cos(x) - 0.2*cos(1.1*x)^2/cos(x)^2)*cos(x) + 26.7439413073546*cos(1.5*x))*sin(1.3*x)*cos(1.1*x)/cos(x) + 1.0*(-(10.6975765229419*cos(1.5*x)/cos(x) - 0.697576522941849*cos(1.1*x)^2/cos(x)^2)*sin(x) + (10.6975765229419*sin(x)*cos(1.5*x)/cos(x)^2 - 1.3951530458837*sin(x)*cos(1.1*x)^2/cos(x)^3 + 1.53466835047207*sin(1.1*x)*cos(1.1*x)/cos(x)^2 - 16.0463647844128*sin(1.5*x)/cos(x))*cos(x) - 40.1159119610319*sin(1.5*x))*cos(1.1*x)*cos(1.3*x)/cos(x)'
[]
[exact_T]
  type = ParsedFunction
  expression = '0.0106975765229418*cos(1.5*x)/cos(x) - 0.000697576522941848*cos(1.1*x)^2/cos(x)^2'
[]
[exact_eps_p]
  type = ParsedFunction
  expression = '3.48788261470924*(3.06706896551724*cos(1.5*x)/cos(x) - 0.2*cos(1.1*x)^2/cos(x)^2)*cos(x)*cos(1.3*x)'
[]
[exact_p]
  type = ParsedFunction
  expression = '3.48788261470924*(3.06706896551724*cos(1.5*x)/cos(x) - 0.2*cos(1.1*x)^2/cos(x)^2)*cos(x)'
[]
[exact_sup_vel_x]
  type = ParsedFunction
  expression = '1.0*cos(1.1*x)*cos(1.3*x)/cos(x)'
[]
[eps]
  type = ParsedFunction
  expression = 'cos(1.3*x)'
[]
[exact_superficial_velocity]
  type = ParsedVectorFunction
  expression_x = '1.0*cos(1.1*x)*cos(1.3*x)/cos(x)'
[]
[]
[Executioner]
  solve_type = NEWTON
  type = Transient
  num_steps = 1
  dtmin = 1
  petsc_options_iname = '-pc_type'
  petsc_options_value = 'lu'
  nl_max_its = 50
  line_search = bt
  nl_rel_tol = 1e-12
  nl_abs_tol = 1e-12
[]
[Outputs]
  exodus = true
  csv = true
[]
[Debug]
  show_var_residual_norms = true
[]
[Postprocessors]
  [h]
    type = AverageElementSize
    outputs = 'console csv'
    execute_on = 'timestep_end'
  []
  [L2pressure]
    type = ElementL2Error
    variable = pressure
    function = exact_p
    outputs = 'console csv'
    execute_on = 'timestep_end'
  []
  [L2sup_vel_x]
    variable = sup_vel_x
    function = exact_sup_vel_x
    type = ElementL2Error
    outputs = 'console csv'
    execute_on = 'timestep_end'
  []
  [L2T_fluid]
    variable = T_fluid
    function = exact_T
    type = ElementL2Error
    outputs = 'console csv'
    execute_on = 'timestep_end'
  []
[]
(modules/thermal_hydraulics/test/tests/components/junction_one_to_one_1phase/constriction_1phase.i)
# This test is used to test the JunctionOneToOne1Phase1Phase component with unequal areas
# at the junction. The downstream flow channel has an area half that of the
# upstream pipe, so there should be a pressure increase just upstream of the
# junction due to the partial wall. The velocity should increase through the
# junction (approximately by a factor of 2, but there are compressibility effects).
[GlobalParams]
  gravity_vector = '0 0 0'
  fp = fp
  closures = simple_closures
  f = 0
  initial_T = 300
  initial_p = 1e5
  initial_vel = 1
[]
[FluidProperties]
  [fp]
    type = IdealGasFluidProperties
    gamma = 1.4
    molar_mass = 11.64024372
  []
[]
[Closures]
  [simple_closures]
    type = Closures1PhaseSimple
  []
[]
[Components]
  [left_boundary]
    type = InletDensityVelocity1Phase
    input = 'left_channel:in'
    rho = 466.6666667
    vel = 1
  []
  [left_channel]
    type = FlowChannel1Phase
    position = '0 0 0'
    orientation = '1 0 0'
    length = 0.5
    n_elems = 50
    A = 1.0
  []
  [junction]
    type = JunctionOneToOne1Phase
    connections = 'left_channel:out right_channel:in'
  []
  [right_channel]
    type = FlowChannel1Phase
    position = '0.5 0 0'
    orientation = '1 0 0'
    length = 0.5
    n_elems = 50
    A = 0.5
  []
  [right_boundary]
    type = Outlet1Phase
    input = 'right_channel:out'
    p = 1e5
  []
[]
[Preconditioning]
  [smp]
    type = SMP
    full = true
  []
[]
[Executioner]
  type = Transient
  scheme = bdf2
  dt = 0.01
  num_steps = 10
  abort_on_solve_fail = true
  solve_type = NEWTON
  nl_rel_tol = 1e-10
  nl_abs_tol = 1e-8
  nl_max_its = 60
  l_tol = 1e-4
[]
[Outputs]
  exodus = true
  show = 'p T vel'
  execute_on = 'initial timestep_end'
  velocity_as_vector = false
[]
(modules/thermal_hydraulics/test/tests/problems/pressure_drop/pressure_drop.i)
nelem = 100
friction_factor = 1e4
area = 0.176752
mfr_final = 1.0
p_out = 7e6
T_in = 300
ramp_time = 5.0
[GlobalParams]
  gravity_vector = '0 0 0'
  initial_T = ${T_in}
  initial_p = ${p_out}
  initial_vel = 0
  closures = closures
  rdg_slope_reconstruction = full
  scaling_factor_1phase = '1 1 1e-5'
[]
[FluidProperties]
  [h2]
    type = IdealGasFluidProperties
    gamma = 1.3066
    molar_mass = 2.016e-3
    k = 0.437
    mu = 3e-5
  []
[]
[Closures]
  [closures]
    type = Closures1PhaseSimple
  []
[]
[Components]
  [bc_inlet]
    type = InletMassFlowRateTemperature1Phase
    input = 'ch_1:in'
    m_dot = 0 # This value is controlled by 'mfr_ctrl'
    T = ${T_in}
  []
  [ch_1]
    type = FlowChannel1Phase
    position = '0 0 0'
    orientation = '1 0 0'
    length = 1.0
    n_elems = ${nelem}
    A = ${area}
    f = ${friction_factor}
    fp = h2
  []
  [bc_outlet]
    type = Outlet1Phase
    input = 'ch_1:out'
    p = ${p_out}
  []
[]
[Functions]
  [mfr_fn]
    type = PiecewiseLinear
    x = '0 ${ramp_time}'
    y = '0 ${mfr_final}'
  []
[]
[ControlLogic]
  [mfr_ctrl]
    type = TimeFunctionComponentControl
    component = bc_inlet
    parameter = m_dot
    function = mfr_fn
  []
[]
[Preconditioning]
  [pc]
    type = SMP
    full = true
  []
[]
[VectorPostprocessors]
  [pressure_vpp]
    type = ADSampler1DReal
    block = 'ch_1'
    property = 'p'
    sort_by = x
    execute_on = 'FINAL'
  []
[]
[Executioner]
  type = Transient
  scheme = bdf2
  start_time = 0
  end_time = 50
  dt = 1
  steady_state_detection = true
  steady_state_start_time = ${ramp_time}
  petsc_options_iname = '-pc_type'
  petsc_options_value = ' lu     '
  nl_rel_tol = 1e-6
  nl_abs_tol = 1e-6
  nl_max_its = 15
  l_tol = 1e-4
  l_max_its = 10
[]
[Outputs]
  [csv]
    type = CSV
    create_final_symlink = true
    execute_on = 'FINAL'
  []
[]
(modules/thermal_hydraulics/test/tests/components/heat_transfer_from_heat_structure_1phase/hs_boundary.i)
[FluidProperties]
  [fp]
    type = IdealGasFluidProperties
  []
[]
[Closures]
  [simple_closures]
    type = Closures1PhaseSimple
  []
[]
[SolidProperties]
  [sp_ss316]
    type = ThermalSS316Properties
  []
[]
[Functions]
  [T0_fn]
    type = ParsedFunction
    expression = '290 + 20 * (y - 1)'
  []
[]
[Components]
  [left_wall]
    type = SolidWall1Phase
    input = 'pipe:in'
  []
  [pipe]
    type = FlowChannel1Phase
    position = '5.0 0 0'
    orientation = '1 0 0'
    length = 5.0
    n_elems = 5
    A = 1.0
    initial_T = 300
    initial_p = 1e5
    initial_vel = 0
    f = 0
    fp = fp
    closures = simple_closures
    scaling_factor_1phase = '1 1 1e-5'
  []
  [right_wall]
    type = SolidWall1Phase
    input = 'pipe:out'
  []
  [heat_transfer]
    type = HeatTransferFromHeatStructure1Phase
    flow_channel = pipe
    hs = heat_structure
    hs_boundary = heat_structure:region2:inner
    Hw = 1e3
  []
  [heat_structure]
    type = HeatStructureCylindrical
    position = '0 0 0'
    orientation = '1 0 0'
    length = '5.0 5.0'
    n_elems = '5 5'
    axial_region_names = 'region1 region2'
    names = 'main'
    solid_properties = 'sp_ss316'
    solid_properties_T_ref = '500'
    widths = '1.0'
    n_part_elems = '1'
    inner_radius = 1.0
    initial_T = 500
    scaling_factor_temperature = 1e-8
  []
[]
[Postprocessors]
  [T_avg]
    type = ElementAverageValue
    block = 'pipe'
    variable = T
    execute_on = 'INITIAL TIMESTEP_END'
  []
[]
[Preconditioning]
  [pc]
    type = SMP
    full = true
  []
[]
[Executioner]
  type = Transient
  scheme = 'bdf2'
  dt = 0.01
  num_steps = 1
  solve_type = NEWTON
  nl_rel_tol = 0
  nl_abs_tol = 1e-6
  nl_max_its = 15
  l_tol = 1e-3
  l_max_its = 10
[]
[Outputs]
  csv = true
[]
(modules/navier_stokes/test/tests/finite_volume/ins/boussinesq/transient-wcnsfv.i)
mu = 1
rho = 'rho'
k = 1
cp = 1
l = 10
velocity_interp_method = 'rc'
advected_interp_method = 'average'
cold_temp=300
hot_temp=310
[GlobalParams]
  two_term_boundary_expansion = true
  rhie_chow_user_object = 'rc'
[]
[UserObjects]
  [rc]
    type = INSFVRhieChowInterpolator
    u = u
    v = v
    pressure = pressure
  []
[]
[Mesh]
  [gen]
    type = GeneratedMeshGenerator
    dim = 2
    xmin = 0
    xmax = ${l}
    ymin = 0
    ymax = ${l}
    nx = 16
    ny = 16
  []
[]
[Variables]
  [u]
    type = INSFVVelocityVariable
    initial_condition = 1e-15
  []
  [v]
    type = INSFVVelocityVariable
    initial_condition = 1e-15
  []
  [pressure]
    type = INSFVPressureVariable
    initial_condition = 1e5
  []
  [T]
    type = INSFVEnergyVariable
    scaling = 1e-4
    initial_condition = ${cold_temp}
  []
[]
[AuxVariables]
  [U]
    order = CONSTANT
    family = MONOMIAL
    fv = true
  []
  [vel_x]
    order = FIRST
    family = MONOMIAL
  []
  [vel_y]
    order = FIRST
    family = MONOMIAL
  []
  [viz_T]
    order = FIRST
    family = MONOMIAL
  []
[]
[AuxKernels]
  [mag]
    type = VectorMagnitudeAux
    variable = U
    x = u
    y = v
    execute_on = 'initial timestep_end'
  []
  [vel_x]
    type = ParsedAux
    variable = vel_x
    expression = 'u'
    execute_on = 'initial timestep_end'
    coupled_variables = 'u'
  []
  [vel_y]
    type = ParsedAux
    variable = vel_y
    expression = 'v'
    execute_on = 'initial timestep_end'
    coupled_variables = 'v'
  []
  [viz_T]
    type = ParsedAux
    variable = viz_T
    expression = 'T'
    execute_on = 'initial timestep_end'
    coupled_variables = 'T'
  []
[]
[FVKernels]
  [mass_time]
    type = WCNSFVMassTimeDerivative
    variable = pressure
    drho_dt = drho_dt
  []
  [mass]
    type = WCNSFVMassAdvection
    variable = pressure
    advected_interp_method = ${advected_interp_method}
    velocity_interp_method = ${velocity_interp_method}
    rho = ${rho}
  []
  [u_time]
    type = WCNSFVMomentumTimeDerivative
    variable = u
    drho_dt = drho_dt
    rho = rho
    momentum_component = 'x'
  []
  [u_advection]
    type = INSFVMomentumAdvection
    variable = u
    velocity_interp_method = ${velocity_interp_method}
    advected_interp_method = ${advected_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
  []
  [u_gravity]
    type = INSFVMomentumGravity
    variable = u
    gravity = '0 -1 0'
    rho = ${rho}
    momentum_component = 'x'
  []
  [v_time]
    type = WCNSFVMomentumTimeDerivative
    variable = v
    drho_dt = drho_dt
    rho = rho
    momentum_component = 'y'
  []
  [v_advection]
    type = INSFVMomentumAdvection
    variable = v
    velocity_interp_method = ${velocity_interp_method}
    advected_interp_method = ${advected_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
  []
  [v_gravity]
    type = INSFVMomentumGravity
    variable = v
    gravity = '0 -1 0'
    rho = ${rho}
    momentum_component = 'y'
  []
  [temp_conduction]
    type = FVDiffusion
    coeff = 'k'
    variable = T
  []
  [temp_advection]
    type = INSFVEnergyAdvection
    variable = T
    velocity_interp_method = ${velocity_interp_method}
    advected_interp_method = ${advected_interp_method}
  []
[]
[FVBCs]
  [no_slip_x]
    type = INSFVNoSlipWallBC
    variable = u
    boundary = 'left right top bottom'
    function = 0
  []
  [no_slip_y]
    type = INSFVNoSlipWallBC
    variable = v
    boundary = 'left right top bottom'
    function = 0
  []
  [T_hot]
    type = FVDirichletBC
    variable = T
    boundary = left
    value = ${hot_temp}
  []
  [T_cold]
    type = FVDirichletBC
    variable = T
    boundary = right
    value = ${cold_temp}
  []
[]
[FluidProperties]
  [fp]
    type = IdealGasFluidProperties
  []
[]
[FunctorMaterials]
  [const_functor]
    type = ADGenericFunctorMaterial
    prop_names = 'cp k'
    prop_values = '${cp} ${k}'
  []
  [rho]
    type = RhoFromPTFunctorMaterial
    fp = fp
    temperature = T
    pressure = pressure
  []
  [ins_fv]
    type = INSFVEnthalpyFunctorMaterial
    temperature = 'T'
    rho = ${rho}
  []
[]
[Functions]
  [lid_function]
    type = ParsedFunction
    expression = '4*x*(1-x)'
  []
[]
[Executioner]
  type = Transient
  solve_type = 'NEWTON'
  petsc_options_iname = '-pc_type -pc_factor_shift_type'
  petsc_options_value = 'lu       NONZERO'
  steady_state_detection = true
  [TimeStepper]
    type = IterationAdaptiveDT
    dt = 1e-5
    optimal_iterations = 6
  []
  nl_abs_tol = 1e-9
  normalize_solution_diff_norm_by_dt = false
  nl_max_its = 10
[]
[Outputs]
  [out]
    type = Exodus
  []
[]
(modules/navier_stokes/test/tests/finite_volume/cns/benchmark_shock_tube_1D/hllc_sod_shocktube.i)
rho_left = 1
E_left = 2.501505578
u_left = 1e-15
rho_right = 0.125
E_right = 1.999770935
u_right = 1e-15
middle = 50
[GlobalParams]
  fp = fp
[]
[Mesh]
  [cartesian]
    type = GeneratedMeshGenerator
    dim = 1
    xmin = 0
    xmax = ${fparse 2 * middle}
    nx = 1000
  []
[]
[FluidProperties]
  [fp]
    type = IdealGasFluidProperties
  []
[]
[Variables]
  [rho]
    order = CONSTANT
    family = MONOMIAL
    fv = true
  []
  [rho_u]
    order = CONSTANT
    family = MONOMIAL
    fv = true
  []
  [rho_E]
    order = CONSTANT
    family = MONOMIAL
    fv = true
  []
[]
[AuxVariables]
  [rho_a]
    order = CONSTANT
    family = MONOMIAL
  []
[]
[FVKernels]
  [mass_time]
    type = FVTimeKernel
    variable = rho
  []
  [mass_advection]
    type = CNSFVMassHLLC
    variable = rho
  []
  [momentum_time]
    type = FVTimeKernel
    variable = rho_u
  []
  [momentum_advection]
    type = CNSFVMomentumHLLC
    variable = rho_u
    momentum_component = x
  []
  [fluid_energy_time]
    type = FVTimeKernel
    variable = rho_E
  [../]
  [fluid_energy_advection]
    type = CNSFVFluidEnergyHLLC
    variable = rho_E
  []
[]
[FVBCs]
  [mass_implicit]
    type = CNSFVHLLCMassImplicitBC
    variable = rho
    fp = fp
    boundary = 'left right'
  []
  [mom_implicit]
    type = CNSFVHLLCMomentumImplicitBC
    variable = rho_u
    momentum_component = x
    fp = fp
    boundary = 'left right'
  []
  [fluid_energy_implicit]
    type = CNSFVHLLCFluidEnergyImplicitBC
    variable = rho_E
    fp = fp
    boundary = 'left right'
  []
[]
[ICs]
  [rho_ic]
    type = FunctionIC
    variable = rho
    function = 'if (x < ${middle}, ${rho_left}, ${rho_right})'
  []
  [rho_u_ic]
    type = FunctionIC
    variable = rho_u
    function = 'if (x < ${middle}, ${fparse rho_left * u_left}, ${fparse rho_right * u_right})'
  []
  [rho_E_ic]
    type = FunctionIC
    variable = rho_E
    function = 'if (x < ${middle}, ${fparse E_left * rho_left}, ${fparse E_right * rho_right})'
  []
[]
[Materials]
  [var_mat]
    type = ConservedVarValuesMaterial
    rho = rho
    rhou = rho_u
    rho_et = rho_E
    fp = fp
  []
[]
[Preconditioning]
  active = ''
  [./smp]
    type = SMP
    full = true
    petsc_options_iname = '-pc_type'
    petsc_options_value = 'lu'
  [../]
[]
[Executioner]
  type = Transient
  [TimeIntegrator]
    type = ExplicitSSPRungeKutta
    order = 2
  []
  l_tol = 1e-8
  start_time = 0.0
  dt = 1e-2
  end_time = 20
  abort_on_solve_fail = true
[]
[Outputs]
  exodus = true
  perf_graph = true
[]
(modules/navier_stokes/test/tests/finite_volume/cns/straight_channel_porosity_step/dc.i)
p_initial=1.01e5
T=273.15
# u refers to the superficial velocity
u_in=1
rho_in=1.30524
sup_mom_y_in=${fparse u_in * rho_in}
user_limiter='min_mod'
friction_coeff=10
[GlobalParams]
  fp = fp
  two_term_boundary_expansion = true
  limiter = ${user_limiter}
[]
[Mesh]
  [cartesian]
    type = GeneratedMeshGenerator
    dim = 2
    xmin = 0
    xmax = 1
    nx = 3
    ymin = 0
    ymax = 18
    ny = 90
  []
[]
[FluidProperties]
  [fp]
    type = IdealGasFluidProperties
  []
[]
[Problem]
  fv_bcs_integrity_check = false
[]
[Variables]
  [pressure]
    type = MooseVariableFVReal
    initial_condition = ${p_initial}
  []
  [sup_mom_x]
    type = MooseVariableFVReal
    initial_condition = 1e-15
  []
  [sup_mom_y]
    type = MooseVariableFVReal
    initial_condition = 1e-15
  []
  [T_fluid]
    type = MooseVariableFVReal
    initial_condition = ${T}
  []
[]
[AuxVariables]
  [vel_y]
    type = MooseVariableFVReal
  []
  [rho]
    type = MooseVariableFVReal
  []
  [eps]
    type = MooseVariableFVReal
  []
[]
[AuxKernels]
  [vel_y]
    type = ADMaterialRealAux
    variable = vel_y
    property = vel_y
    execute_on = 'timestep_end'
  []
  [rho]
    type = ADMaterialRealAux
    variable = rho
    property = rho
    execute_on = 'timestep_end'
  []
  [eps]
    type = MaterialRealAux
    variable = eps
    property = porosity
    execute_on = 'timestep_end'
  []
[]
[FVKernels]
  [mass_time]
    type = FVMatPropTimeKernel
    mat_prop_time_derivative = 'dsuperficial_rho_dt'
    variable = pressure
  []
  [mass_advection]
    type = PCNSFVKTDC
    variable = pressure
    eqn = "mass"
  []
  [momentum_time]
    type = FVMatPropTimeKernel
    mat_prop_time_derivative = 'dsuperficial_rhou_dt'
    variable = sup_mom_x
  []
  [momentum_advection]
    type = PCNSFVKTDC
    variable = sup_mom_x
    eqn = "momentum"
    momentum_component = 'x'
  []
  [eps_grad]
    type = PNSFVPGradEpsilon
    variable = sup_mom_x
    momentum_component = 'x'
    epsilon_function = 'eps'
  []
  [drag]
    type = PCNSFVMomentumFriction
    variable = sup_mom_x
    momentum_component = 'x'
    Darcy_name = 'cl'
    momentum_name = superficial_rhou
  []
  [momentum_time_y]
    type = FVMatPropTimeKernel
    mat_prop_time_derivative = 'dsuperficial_rhov_dt'
    variable = sup_mom_y
  []
  [momentum_advection_y]
    type = PCNSFVKTDC
    variable = sup_mom_y
    eqn = "momentum"
    momentum_component = 'y'
  []
  [eps_grad_y]
    type = PNSFVPGradEpsilon
    variable = sup_mom_y
    momentum_component = 'y'
    epsilon_function = 'eps'
  []
  [drag_y]
    type = PCNSFVMomentumFriction
    variable = sup_mom_y
    momentum_component = 'y'
    Darcy_name = 'cl'
    momentum_name = superficial_rhov
  []
  [energy_time]
    type = FVMatPropTimeKernel
    mat_prop_time_derivative = 'dsuperficial_rho_et_dt'
    variable = T_fluid
  []
  [energy_advection]
    type = PCNSFVKTDC
    variable = T_fluid
    eqn = "energy"
  []
[]
[FVBCs]
  [rho_bottom]
    type = PCNSFVStrongBC
    boundary = 'bottom'
    variable = pressure
    superficial_velocity = 'ud_in'
    T_fluid = ${T}
    eqn = 'mass'
    velocity_function_includes_rho = true
  []
  [rhou_bottom]
    type = PCNSFVStrongBC
    boundary = 'bottom'
    variable = sup_mom_x
    superficial_velocity = 'ud_in'
    T_fluid = ${T}
    eqn = 'momentum'
    momentum_component = 'x'
    velocity_function_includes_rho = true
  []
  [rhov_bottom]
    type = PCNSFVStrongBC
    boundary = 'bottom'
    variable = sup_mom_y
    superficial_velocity = 'ud_in'
    T_fluid = ${T}
    eqn = 'momentum'
    momentum_component = 'y'
    velocity_function_includes_rho = true
  []
  [rho_et_bottom]
    type = PCNSFVStrongBC
    boundary = 'bottom'
    variable = T_fluid
    superficial_velocity = 'ud_in'
    T_fluid = ${T}
    eqn = 'energy'
    velocity_function_includes_rho = true
  []
  [rho_top]
    type = PCNSFVStrongBC
    boundary = 'top'
    variable = pressure
    pressure = ${p_initial}
    eqn = 'mass'
  []
  [rhou_top]
    type = PCNSFVStrongBC
    boundary = 'top'
    variable = sup_mom_x
    pressure = ${p_initial}
    eqn = 'momentum'
    momentum_component = 'x'
  []
  [rhov_top]
    type = PCNSFVStrongBC
    boundary = 'top'
    variable = sup_mom_y
    pressure = ${p_initial}
    eqn = 'momentum'
    momentum_component = 'y'
  []
  [rho_et_top]
    type = PCNSFVStrongBC
    boundary = 'top'
    variable = T_fluid
    pressure = ${p_initial}
    eqn = 'energy'
  []
  [wall_pressure_x]
    type = PCNSFVImplicitMomentumPressureBC
    momentum_component = 'x'
    boundary = 'left right'
    variable = sup_mom_x
  []
  [wall_pressure_y]
    type = PCNSFVImplicitMomentumPressureBC
    momentum_component = 'y'
    boundary = 'left right'
    variable = sup_mom_y
  []
  # Use these to help create more accurate cell centered gradients for cells adjacent to boundaries
  [T_bottom]
    type = FVDirichletBC
    variable = T_fluid
    value = ${T}
    boundary = 'bottom'
  []
  [sup_mom_x_bottom_and_walls]
    type = FVDirichletBC
    variable = sup_mom_x
    value = 0
    boundary = 'bottom left right'
  []
  [sup_mom_y_walls]
    type = FVDirichletBC
    variable = sup_mom_y
    value = 0
    boundary = 'left right'
  []
  [sup_mom_y_bottom]
    type = FVDirichletBC
    variable = sup_mom_y
    value = ${sup_mom_y_in}
    boundary = 'bottom'
  []
  [p_top]
    type = FVDirichletBC
    variable = pressure
    value = ${p_initial}
    boundary = 'top'
  []
[]
[Functions]
  [ud_in]
    type = ParsedVectorFunction
    expression_x = '0'
    expression_y = '${sup_mom_y_in}'
  []
  [eps]
    type = ParsedFunction
    expression = 'if(y < 2.8, 1,
             if(y < 3.2, 1 - .5 / .4 * (y - 2.8),
             if(y < 6.8, .5,
             if(y < 7.2, .5 - .25 / .4 * (y - 6.8),
             if(y < 10.8, .25,
             if(y < 11.2, .25 + .25 / .4 * (y - 10.8),
             if(y < 14.8, .5,
             if(y < 15.2, .5 + .5 / .4 * (y - 14.8),
                1))))))))'
  []
[]
[Materials]
  [var_mat]
    type = PorousMixedVarMaterial
    pressure = pressure
    T_fluid = T_fluid
    superficial_rhou = sup_mom_x
    superficial_rhov = sup_mom_y
    porosity = porosity
  []
  [porosity]
    type = GenericFunctionMaterial
    prop_names = 'porosity'
    prop_values = 'eps'
  []
  [ad_generic]
    type = ADGenericConstantVectorMaterial
    prop_names = 'cl'
    prop_values = '${friction_coeff} ${friction_coeff} ${friction_coeff}'
  []
[]
[Preconditioning]
  [smp]
    type = SMP
    full = true
  []
[]
[Executioner]
  solve_type = NEWTON
  line_search = 'bt'
  type = Transient
  nl_max_its = 20
  [TimeStepper]
    type = IterationAdaptiveDT
    dt = 5e-5
    optimal_iterations = 6
    growth_factor = 1.2
  []
  num_steps = 10
  nl_abs_tol = 1e-8
  automatic_scaling = true
  compute_scaling_once = false
  resid_vs_jac_scaling_param = 0.5
  verbose = true
  steady_state_detection = true
  steady_state_tolerance = 1e-8
  normalize_solution_diff_norm_by_dt = false
  petsc_options_iname = '-pc_type'
  petsc_options_value = 'lu'
[]
[Outputs]
  [out]
    type = Exodus
  []
[]
[Debug]
  show_var_residual_norms = true
[]
[Postprocessors]
  active = ''
  [num_nl]
    type = NumNonlinearIterations
  []
  [total_nl]
    type = CumulativeValuePostprocessor
    postprocessor = num_nl
  []
[]
(modules/fluid_properties/test/tests/fp_interrogator/2ph_ncg_partial_pressure_p_T.i)
[FluidPropertiesInterrogator]
  fp = fp_2phase_ncg_partial_pressure
  p = 1e5
  T = 372.7559289
[]
[FluidProperties]
  [fp_water]
    type = StiffenedGasFluidProperties
    gamma = 2.35
    cv = 1816.0
    q = -1.167e6
    p_inf = 1.0e9
    q_prime = 0
    k = 0.5
    mu = 281.8e-6
    M = 0.01801488
  []
  [fp_steam]
    type = IdealGasFluidProperties
    gamma = 1.43
    molar_mass = 0.01801488
  []
  [fp_2phase]
    type = TestTwoPhaseFluidProperties
    fp_liquid = fp_water
    fp_vapor = fp_steam
  []
  [fp_air]
    type = IdealGasFluidProperties
  []
  [fp_2phase_ncg_partial_pressure]
    type = TwoPhaseNCGPartialPressureFluidProperties
    fp_2phase = fp_2phase
    fp_ncg = fp_air
  []
[]
(modules/fluid_properties/test/tests/materials/fluid_properties_material/test_ph.i)
[Mesh]
  type = GeneratedMesh
  dim = 2
  nx = 2
  ny = 2
  elem_type = QUAD4
[]
[Functions]
  [fn_1]
    type = ParsedFunction
    expression = '2e5 * (1 + x)'
  []
  [fn_2]
    type = ParsedFunction
    expression = '2000 * (1 + x*x+y*y)'
  []
[]
[AuxVariables]
  [p]
    [InitialCondition]
      type = FunctionIC
      function = fn_1
    []
  []
  [h]
    [InitialCondition]
      type = FunctionIC
      function = fn_2
    []
  []
  [T]
    family = MONOMIAL
    order = CONSTANT
  []
  [s]
    family = MONOMIAL
    order = CONSTANT
  []
[]
[AuxKernels]
  [T]
    type = MaterialRealAux
     variable = T
     property = T
  []
  [s]
    type = MaterialRealAux
     variable = s
     property = s
  []
[]
[FluidProperties]
  [ideal_gas]
    type = IdealGasFluidProperties
    gamma = 1.4
    molar_mass = 1.000536678700361
  []
[]
[Materials]
  [fp_mat]
    type = FluidPropertiesMaterialPH
    pressure = p
    h = h
    fp = ideal_gas
  []
[]
[Executioner]
  type = Steady
  solve_type = NEWTON
[]
[Problem]
  solve = false
[]
[Outputs]
  exodus = true
[]
(modules/fluid_properties/test/tests/functions/saturation_density_function/saturation_density_function.i)
# Tests SaturationDensityFunction.
# The gold values are computed as follows:
# T = 5
# p_sat = 3 T = 15
# liquid: rho(p_sat, T) = 0.01046369844
# vapor: rho(p_sat, T) = 0.01804085937
[Mesh]
  type = GeneratedMesh
  dim = 1
  nx = 1
[]
[FluidProperties]
  [fp_liquid]
    type = IdealGasFluidProperties
  []
  [fp_vapor]
    type = IdealGasFluidProperties
    molar_mass = 0.05
  []
  [fp_2phase]
    type = TestTwoPhaseFluidProperties
    fp_liquid = fp_liquid
    fp_vapor = fp_vapor
  []
[]
[Functions]
  [T]
    type = ConstantFunction
    value = 5
  []
  [rho_sat_fn]
    type = SaturationDensityFunction
    T = T
    fp_2phase = fp_2phase
    use_liquid = true
  []
[]
[Postprocessors]
  [rho_sat_pp]
    type = FunctionValuePostprocessor
    function = rho_sat_fn
    execute_on = 'INITIAL'
  []
[]
[Problem]
  solve = false
[]
[Executioner]
  type = Steady
[]
[Outputs]
  csv = true
  file_base = liquid
  execute_on = 'INITIAL'
[]
(modules/navier_stokes/test/tests/finite_volume/cns/mms/1d-with-bcs/pwcnsfv.i)
rho='rho'
advected_interp_method='upwind'
velocity_interp_method='rc'
gamma=1.4
R=8.3145
molar_mass=29.0e-3
R_specific=${fparse R/molar_mass}
cp=${fparse gamma*R_specific/(gamma-1)}
[GlobalParams]
  two_term_boundary_expansion = true
  rhie_chow_user_object = 'rc'
[]
[UserObjects]
  [rc]
    type = PINSFVRhieChowInterpolator
    u = sup_vel_x
    pressure = pressure
    porosity = porosity
  []
[]
[Mesh]
  [cartesian]
    type = GeneratedMeshGenerator
    dim = 1
    xmin = .1
    xmax = .6
    nx = 2
  []
[]
[FluidProperties]
  [fp]
    type = IdealGasFluidProperties
  []
[]
[Problem]
  fv_bcs_integrity_check = false
[]
[Variables]
  [pressure]
    type = INSFVPressureVariable
  []
  [sup_vel_x]
    type = PINSFVSuperficialVelocityVariable
  []
[]
[AuxVariables]
  [porosity]
    type = MooseVariableFVReal
  []
  [T_fluid]
    type = INSFVEnergyVariable
  []
[]
[ICs]
  [pressure]
    type = FunctionIC
    variable = pressure
    function = 'exact_p'
  []
  [sup_vel_x]
    type = FunctionIC
    variable = sup_vel_x
    function = 'exact_sup_vel_x'
  []
  [T_fluid]
    type = FunctionIC
    variable = T_fluid
    function = 'exact_T'
  []
  [eps]
    type = FunctionIC
    variable = porosity
    function = 'eps'
  []
[]
[FVKernels]
  [mass_advection]
    type = PINSFVMassAdvection
    variable = pressure
    advected_interp_method = ${advected_interp_method}
    velocity_interp_method = ${velocity_interp_method}
    rho = ${rho}
  []
  [mass_fn]
    type = FVBodyForce
    variable = pressure
    function = 'forcing_rho'
  []
  [u_advection]
    type = PINSFVMomentumAdvection
    variable = sup_vel_x
    advected_interp_method = ${advected_interp_method}
    velocity_interp_method = ${velocity_interp_method}
    rho = ${rho}
    porosity = porosity
    momentum_component = 'x'
  []
  [u_pressure]
    type = PINSFVMomentumPressureFlux
    variable = sup_vel_x
    pressure = pressure
    porosity = porosity
    momentum_component = 'x'
    force_boundary_execution = false
  []
  [momentum_fn]
    type = INSFVBodyForce
    variable = sup_vel_x
    functor = 'forcing_rho_ud'
    momentum_component = 'x'
  []
[]
[FVBCs]
  [mass]
    variable = pressure
    type = PINSFVFunctorBC
    boundary = 'left right'
    superficial_vel_x = sup_vel_x
    pressure = pressure
    eqn = 'mass'
    porosity = porosity
  []
  [momentum]
    variable = sup_vel_x
    type = PINSFVFunctorBC
    boundary = 'left right'
    superficial_vel_x = sup_vel_x
    pressure = pressure
    eqn = 'momentum'
    momentum_component = 'x'
    porosity = porosity
  []
  # help gradient reconstruction *and* create Dirichlet values for use in PINSFVFunctorBC
  [pressure_right]
    type = FVFunctionDirichletBC
    variable = pressure
    function = exact_p
    boundary = 'right'
  []
  [sup_vel_x_left]
    type = FVFunctionDirichletBC
    variable = sup_vel_x
    function = exact_sup_vel_x
    boundary = 'left'
  []
  [T_fluid_left]
    type = FVFunctionDirichletBC
    variable = T_fluid
    function = exact_T
    boundary = 'left'
  []
[]
[FunctorMaterials]
  [const_functor]
    type = ADGenericFunctorMaterial
    prop_names = 'cp'
    prop_values = '${cp}'
  []
  [rho]
    type = RhoFromPTFunctorMaterial
    fp = fp
    temperature = T_fluid
    pressure = pressure
  []
  [ins_fv]
    type = INSFVEnthalpyFunctorMaterial
    temperature = T_fluid
    rho = ${rho}
  []
[]
[Functions]
  [forcing_rho]
    type = ParsedFunction
    expression = '-3.45300378856215*sin(1.1*x)'
  []
  [forcing_rho_ud]
    type = ParsedFunction
    expression = '-0.9*(10.6975765229419*cos(1.2*x)/cos(x) - 0.697576522941849*cos(1.1*x)^2/cos(x)^2)*sin(x) + 0.9*(10.6975765229419*sin(x)*cos(1.2*x)/cos(x)^2 - 1.3951530458837*sin(x)*cos(1.1*x)^2/cos(x)^3 + 1.53466835047207*sin(1.1*x)*cos(1.1*x)/cos(x)^2 - 12.8370918275302*sin(1.2*x)/cos(x))*cos(x) + 3.13909435323832*sin(x)*cos(1.1*x)^2/cos(x)^2 - 6.9060075771243*sin(1.1*x)*cos(1.1*x)/cos(x)'
  []
  [exact_T]
    type = ParsedFunction
    expression = '0.0106975765229418*cos(1.2*x)/cos(x) - 0.000697576522941848*cos(1.1*x)^2/cos(x)^2'
  []
  [exact_p]
    type = ParsedFunction
    expression = '3.48788261470924*(3.06706896551724*cos(1.2*x)/cos(x) - 0.2*cos(1.1*x)^2/cos(x)^2)*cos(x)'
  []
  [exact_sup_vel_x]
    type = ParsedFunction
    expression = '0.9*cos(1.1*x)/cos(x)'
  []
  [eps]
    type = ParsedFunction
    expression = '0.9'
  []
[]
[Executioner]
  solve_type = NEWTON
  type = Transient
  num_steps = 1
  dtmin = 1
  petsc_options_iname = '-pc_type'
  petsc_options_value = 'lu'
  nl_max_its = 50
  line_search = bt
  nl_rel_tol = 1e-12
  nl_abs_tol = 1e-12
[]
[Outputs]
  exodus = true
  csv = true
[]
[Debug]
  show_var_residual_norms = true
[]
[Postprocessors]
  [h]
    type = AverageElementSize
    outputs = 'console csv'
    execute_on = 'timestep_end'
  []
  [L2pressure]
    type = ElementL2FunctorError
    approximate = pressure
    exact = exact_p
    outputs = 'console csv'
    execute_on = 'timestep_end'
  []
  [L2sup_vel_x]
    approximate = sup_vel_x
    exact = exact_sup_vel_x
    type = ElementL2FunctorError
    outputs = 'console csv'
    execute_on = 'timestep_end'
  []
[]
(modules/navier_stokes/test/tests/finite_volume/cns/shock_tube_2D_cavity/hllc_sod_shocktube_2D.i)
rho_left = 1
E_left = 2.501505578
u_left = 1e-15
rho_right = 0.125
E_right = 1.999770935
u_right = 1e-15
x_sep = 35
[GlobalParams]
  fp = fp
[]
[Mesh]
  [./cartesian]
    type = CartesianMeshGenerator
    dim = 2
    dx = '40 20'
    ix = '200 100'
    dy = '1 20  2  20 1'
    iy = '4 100 10 100 4'
    subdomain_id = '0 0
                    0 1
                    1 1
                    0 1
                    0 0'
  [../]
  [./wall]
    type = SideSetsBetweenSubdomainsGenerator
    input = cartesian
    primary_block = 1
    paired_block = 0
    new_boundary = 'wall'
  [../]
  [./delete]
    type = BlockDeletionGenerator
    input = wall
    block = 0
  [../]
[]
[FluidProperties]
  [./fp]
    type = IdealGasFluidProperties
    allow_imperfect_jacobians = true
  [../]
[]
[Variables]
  [./rho]
    order = CONSTANT
    family = MONOMIAL
    fv = true
  [../]
  [./rho_u]
    order = CONSTANT
    family = MONOMIAL
    fv = true
  [../]
  [./rho_v]
    order = CONSTANT
    family = MONOMIAL
    fv = true
  [../]
  [./rho_E]
    order = CONSTANT
    family = MONOMIAL
    fv = true
  [../]
[]
[AuxVariables]
  [./Ma]
    order = CONSTANT
    family = MONOMIAL
  [../]
  [./p]
    order = CONSTANT
    family = MONOMIAL
  [../]
  [./v_norm]
    order = CONSTANT
    family = MONOMIAL
  [../]
  [./temperature]
    order = CONSTANT
    family = MONOMIAL
  [../]
[]
[AuxKernels]
  [./Ma_aux]
    type = NSMachAux
    variable = Ma
    fluid_properties = fp
    use_material_properties = true
  [../]
  [./p_aux]
    type = ADMaterialRealAux
    variable = p
    property = pressure
  [../]
  [./v_norm_aux]
    type = ADMaterialRealAux
    variable = v_norm
    property = speed
  [../]
  [./temperature_aux]
    type = ADMaterialRealAux
    variable = temperature
    property = T_fluid
  [../]
[]
[FVKernels]
  [./mass_time]
    type = FVTimeKernel
    variable = rho
  [../]
  [./mass_advection]
    type = CNSFVMassHLLC
    variable = rho
  [../]
  [./momentum_x_time]
    type = FVTimeKernel
    variable = rho_u
  [../]
  [./momentum_x_advection]
    type = CNSFVMomentumHLLC
    variable = rho_u
    momentum_component = x
  [../]
  [./momentum_y_time]
    type = FVTimeKernel
    variable = rho_v
  [../]
  [./momentum_y_advection]
    type = CNSFVMomentumHLLC
    variable = rho_v
    momentum_component = y
  [../]
  [./fluid_energy_time]
    type = FVTimeKernel
    variable = rho_E
  [../]
  [./fluid_energy_advection]
    type = CNSFVFluidEnergyHLLC
    variable = rho_E
  [../]
[]
[FVBCs]
  [./mom_x_pressure]
    type = CNSFVMomImplicitPressureBC
    variable = rho_u
    momentum_component = x
    boundary = 'left right wall'
  [../]
  [./mom_y_pressure]
    type = CNSFVMomImplicitPressureBC
    variable = rho_v
    momentum_component = y
    boundary = 'wall'
  [../]
[]
[ICs]
  [./rho_ic]
    type = FunctionIC
    variable = rho
    function = 'if (x < ${x_sep}, ${rho_left}, ${rho_right})'
  [../]
  [./rho_u_ic]
    type = FunctionIC
    variable = rho_u
    function = 'if (x < ${x_sep}, ${fparse rho_left * u_left}, ${fparse rho_right * u_right})'
  [../]
  [./rho_E_ic]
    type = FunctionIC
    variable = rho_E
    function = 'if (x < ${x_sep}, ${fparse E_left * rho_left}, ${fparse E_right * rho_right})'
  [../]
[]
[Materials]
  [./var_mat]
    type = ConservedVarValuesMaterial
    rho = rho
    rhou = rho_u
    rhov = rho_v
    rho_et = rho_E
    fp = fp
  [../]
  [./sound_speed]
    type = SoundspeedMat
    fp = fp
  [../]
[]
[Preconditioning]
  [./smp]
    type = SMP
    full = true
    petsc_options_iname = '-pc_type'
    petsc_options_value = 'lu'
  [../]
[]
[Postprocessors]
  [./cfl_dt]
    type = ADCFLTimeStepSize
    c_names = 'sound_speed'
    vel_names = 'speed'
  [../]
[]
[Executioner]
  type = Transient
  end_time = 100
  [TimeIntegrator]
    type = ExplicitSSPRungeKutta
    order = 2
  []
  l_tol = 1e-8
  [./TimeStepper]
    type = PostprocessorDT
    postprocessor = cfl_dt
  [../]
[]
(modules/thermal_hydraulics/test/tests/components/heat_transfer_from_heat_structure_1phase/phy.heat_structure_multiple_3eqn.i)
# Tests that energy conservation is satisfied in 1-phase flow when there are
# multiple heat structures are connected to the same pipe.
#
# This problem has 2 heat structures with different material properties and
# initial conditions connected to the same flow channel, which has solid wall
# boundary conditions at both ends. An ideal gas equation of state is used for
# the fluid:
#   e(T) = cv * T
# From energy conservation, an analytic expression for the steady-state
# temperature results:
#   (rho(p,T)*e(T)*V)_fluid + (rho*cp*T*V)_hs1 + (rho*cp*T*V)_hs2 = constant
# The following are constant:
#   V_i         domain volumes for flow channel and heat structures
#   rho_fluid   fluid density (due to conservation of mass)
#   rho_hsi     heat structure densities
#   cp_hsi      heat structure specific heats
# Furthermore, all volumes are set equal to 1. Therefore the expression for the
# steady-state temperature is the following:
#   T = E0 / C0
# where
#   E0 = (rho(p0,T0)*e(T0))_fluid + (rho*cp*T0)_hs1 + (rho*cp*T0)_hs2
#   C0 = (rho(p0,T0)*cv)_fluid + (rho*cp)_hs1 + (rho*cp)_hs2
#
# An ideal gas is defined by (gamma, R), and the relation between R and cv is as
# follows:
#   cp = gamma * R / (gamma - 1)
#   cv = cp / gamma = R / (gamma - 1)
# For the EOS parameters
#   gamma = 1.0001
#   R = 100 J/kg-K
# the relevant specific heat is
#   cv = 1e6 J/kg-K
#
# For the initial conditions
#   p = 100 kPa
#   T = 300 K
# the density and specific internal energy should be
#   rho = 3.3333333333333 kg/m^3
#   e = 300000000 J/kg
#
# The following heat structure parameters are used:
#   T0_hs1 = 290 K           T0_hs2 = 310 K
#   rho_hs1 = 8000 kg/m^3    rho_hs2 = 6000 kg/m^3
#   cp_hs1 = 500 J/kg-K      cp_hs2 = 600 J/kg-K
#
# E0 = 1e9 + 8000 * 500 * 290 + 6000 * 600 * 310
#    = 3276000000 J
# C0 = 3.3333333333333e6 + 8000 * 500 + 6000 * 600
#    = 10933333.3333333 J/K
# T = E0 / C0
#   = 3276000000 / 10933333.3333333
#   = 299.6341463414643 K
#
T1 = 290
k1 = 50
rho1 = 8000
cp1  = 500
T2 = 310
k2 = 100
rho2 = 6000
cp2 = 600
[GlobalParams]
  gravity_vector = '0 0 0'
  initial_T = 300
  initial_p = 100e3
  initial_vel = 0
  scaling_factor_1phase = '1e-3 1e-3 1e-8'
  closures = simple_closures
[]
[FluidProperties]
  [fp]
    type = IdealGasFluidProperties
    gamma = 1.0001
    molar_mass = 0.083144598
  []
[]
[Closures]
  [simple_closures]
    type = Closures1PhaseSimple
  []
[]
[SolidProperties]
  [hs1_mat]
    type = ThermalFunctionSolidProperties
    k = ${k1}
    rho = ${rho1}
    cp = ${cp1}
  []
  [hs2_mat]
    type = ThermalFunctionSolidProperties
    k = ${k2}
    rho = ${rho2}
    cp = ${cp2}
  []
[]
[Components]
  [pipe]
    type = FlowChannel1Phase
    position = '0 0 0'
    orientation = '1 0 0'
    length = 1
    n_elems = 10
    A = 1
    f = 0
    fp = fp
  []
  [hs1]
    type = HeatStructurePlate
    position = '0 -1 0'
    orientation = '1 0 0'
    length = 1
    depth = 1
    n_elems = 10
    solid_properties = 'hs1_mat'
    solid_properties_T_ref = '300'
    n_part_elems = '5'
    widths = '1'
    names = 'solid'
    initial_T = ${T1}
  []
  [hs2]
    type = HeatStructurePlate
    position = '0 -1 0'
    orientation = '1 0 0'
    length = 1
    depth = 1
    n_elems = 10
    solid_properties = 'hs2_mat'
    solid_properties_T_ref = '300'
    n_part_elems = '5'
    widths = '1'
    names = 'solid'
    initial_T = ${T2}
  []
  [ht1]
    type = HeatTransferFromHeatStructure1Phase
    hs = hs1
    hs_side = outer
    flow_channel = pipe
    Hw = 1e5
    P_hf = 0.5
  []
  [ht2]
    type = HeatTransferFromHeatStructure1Phase
    hs = hs2
    hs_side = outer
    flow_channel = pipe
    Hw = 1e5
    P_hf = 0.5
  []
  [left]
    type = SolidWall1Phase
    input = 'pipe:in'
  []
  [right]
    type = SolidWall1Phase
    input = 'pipe:out'
  []
[]
[Preconditioning]
  [preconditioner]
    type = SMP
    full = true
  []
[]
[Executioner]
  type = Transient
  scheme = 'bdf2'
  start_time = 0
  end_time = 4e5
  dt = 1e4
  abort_on_solve_fail = true
  solve_type = 'newton'
  line_search = 'basic'
  nl_rel_tol = 0
  nl_abs_tol = 1e-6
  nl_max_its = 10
  l_tol = 1e-3
  l_max_its = 100
  [Quadrature]
    type = GAUSS
    order = SECOND
  []
  petsc_options_iname = '-pc_type'
  petsc_options_value = ' lu'
[]
[Postprocessors]
  [T_steady_state_predicted]
    type = FunctionValuePostprocessor
    # This value is computed in the input file description
    function = 299.6341463414643
  []
  [T_fluid_average]
    type = ElementAverageValue
    variable = T
    block = pipe
  []
  [relative_error]
    type = RelativeDifferencePostprocessor
    value1 = T_steady_state_predicted
    value2 = T_fluid_average
  []
[]
[Outputs]
  [out]
    type = CSV
    show = 'relative_error'
    execute_on = 'final'
  []
[]
(modules/thermal_hydraulics/test/tests/problems/william_louis/4pipes_closed.i)
# Junction of 4 pipes:
#
#        4
#        |
# 1 -----*----- 3
#        |
#        2
#
# The left end of Pipe 1 is a high-pressure region, and the rest of the system
# is at a low pressure.
#
# All pipes are closed.
end_time = 0.07
D_pipe = 0.01
A_pipe = ${fparse 0.25 * pi * D_pipe^2}
length_pipe1_HP = 0.53
length_pipe1_LP = 3.10
length_pipe2 = 2.595
length_pipe3 = 1.725
length_pipe4 = 0.845
x_junction = ${fparse length_pipe1_HP + length_pipe1_LP}
# Numbers of elements correspond to dx ~ 1/3 cm
n_elems_pipe1_HP = 159
n_elems_pipe1_LP = 930
n_elems_pipe2 = 779
n_elems_pipe3 = 518
n_elems_pipe4 = 254
S_junction = ${fparse 4 * A_pipe}
r_junction = ${fparse sqrt(S_junction / (4 * pi))}
V_junction = ${fparse 4/3 * pi * r_junction^3}
p_low = 1e5
p_high = 1.15e5
T_initial = 283.5690633 # at p = 1e5 Pa, rho = 1.23 kg/m^3
cfl = 0.95
[GlobalParams]
  # common FlowChannel1Phase parameters
  A = ${A_pipe}
  initial_T = ${T_initial}
  initial_vel = 0
  fp = fp_air
  closures = closures
  f = 0
  gravity_vector = '0 0 0'
  scaling_factor_1phase = '1 1 1e-5'
[]
[FluidProperties]
  [fp_air]
    type = IdealGasFluidProperties
    gamma = 1.4
    molar_mass = 0.029
  []
[]
[Closures]
  [closures]
    type = Closures1PhaseSimple
  []
[]
[Functions]
  [initial_p_pipe1_fn]
    type = PiecewiseConstant
    axis = x
    x = '0 ${length_pipe1_HP}'
    y = '${p_high} ${p_low}'
  []
[]
[Components]
  [pipe1_wall]
    type = SolidWall1Phase
    input = 'pipe1:in'
  []
  [pipe1]
    type = FlowChannel1Phase
    position = '0 0 0'
    orientation = '1 0 0'
    length = '${length_pipe1_HP} ${length_pipe1_LP}'
    n_elems = '${n_elems_pipe1_HP} ${n_elems_pipe1_LP}'
    initial_p = initial_p_pipe1_fn
  []
  [junction]
    type = VolumeJunction1Phase
    position = '${x_junction} 0 0'
    connections = 'pipe1:out pipe2:in pipe3:in pipe4:in'
    initial_p = ${p_low}
    initial_T = ${T_initial}
    initial_vel_x = 0
    initial_vel_y = 0
    initial_vel_z = 0
    volume = ${V_junction}
    scaling_factor_rhoEV = 1e-5
    apply_velocity_scaling = true
  []
  [pipe2]
    type = FlowChannel1Phase
    position = '${x_junction} 0 0'
    orientation = '0 -1 0'
    length = ${length_pipe2}
    n_elems = ${n_elems_pipe2}
    initial_p = ${p_low}
  []
  [pipe2_wall]
    type = SolidWall1Phase
    input = 'pipe2:out'
  []
  [pipe3]
    type = FlowChannel1Phase
    position = '${x_junction} 0 0'
    orientation = '1 0 0'
    length = ${length_pipe3}
    n_elems = ${n_elems_pipe3}
    initial_p = ${p_low}
  []
  [pipe3_wall]
    type = SolidWall1Phase
    input = 'pipe3:out'
  []
  [pipe4]
    type = FlowChannel1Phase
    position = '${x_junction} 0 0'
    orientation = '0 1 0'
    length = ${length_pipe4}
    n_elems = ${n_elems_pipe4}
    initial_p = ${p_low}
  []
  [pipe4_wall]
    type = SolidWall1Phase
    input = 'pipe4:out'
  []
[]
[Postprocessors]
  [cfl_dt]
    type = ADCFLTimeStepSize
    block = 'pipe1 pipe2 pipe3 pipe4'
    CFL = ${cfl}
    c_names = 'c'
    vel_names = 'vel'
  []
  [p_pipe1_048]
    type = PointValue
    variable = p
    point = '${fparse x_junction - 0.48} 0 0'
    execute_on = 'INITIAL TIMESTEP_END'
  []
  [p_pipe2_052]
    type = PointValue
    variable = p
    point = '${fparse x_junction} -0.52 0'
    execute_on = 'INITIAL TIMESTEP_END'
  []
  [p_pipe3_048]
    type = PointValue
    variable = p
    point = '${fparse x_junction + 0.48} 0 0'
    execute_on = 'INITIAL TIMESTEP_END'
  []
  [p_pipe4_043]
    type = PointValue
    variable = p
    point = '${fparse x_junction} 0.43 0'
    execute_on = 'INITIAL TIMESTEP_END'
  []
[]
[Preconditioning]
  [pc]
    type = SMP
    full = true
  []
[]
[Executioner]
  type = Transient
  end_time = ${end_time}
  [TimeIntegrator]
    type = ExplicitSSPRungeKutta
    order = 1
  []
  [TimeStepper]
    type = PostprocessorDT
    postprocessor = cfl_dt
  []
  abort_on_solve_fail = true
  solve_type = LINEAR
[]
[Times]
  [output_times]
    type = TimeIntervalTimes
    time_interval = 7e-4
  []
[]
[Outputs]
  file_base = '4pipes_closed'
  [csv]
    type = CSV
    show = 'p_pipe1_048 p_pipe2_052 p_pipe3_048 p_pipe4_043'
    sync_only = true
    sync_times_object = output_times
  []
  [console]
    type = Console
    execute_postprocessors_on = 'NONE'
  []
[]
(modules/thermal_hydraulics/test/tests/functormaterials/conjugate_ht_numbers/conjugate_ht_numbers.i)
p_fluid = 1e5
T_fluid = 300
T_solid = 500
[Mesh]
  type = GeneratedMesh
  dim = 1
  nx = 1
[]
[FluidProperties]
  [fp_air]
    type = IdealGasFluidProperties
  []
[]
[FunctorMaterials]
  [q_fmat]
    type = ADConjugateHTNumbersFunctorMaterial
    Pr_name = Pr
    Gr_name = Gr
    p_fluid = ${p_fluid}
    T_fluid = ${T_fluid}
    T_solid = ${T_solid}
    length = 0.01
    fluid_properties = fp_air
  []
[]
[Postprocessors]
  [Pr]
    type = ADElementExtremeFunctorValue
    functor = Pr
    execute_on = 'INITIAL'
  []
  [Gr]
    type = ADElementExtremeFunctorValue
    functor = Gr
    execute_on = 'INITIAL'
  []
[]
[Problem]
  solve = false
[]
[Executioner]
  type = Steady
[]
[Outputs]
  csv = true
  execute_on = 'INITIAL'
[]
(modules/thermal_hydraulics/test/tests/output/vector_velocity/test.i)
[GlobalParams]
  initial_vel = 0
  initial_vel_x = 0
  initial_vel_y = 0
  initial_vel_z = 0
  initial_p = 1e5
  initial_T = 300
  f = 0.1
  closures = simple_closures
  fp = fp
[]
[FluidProperties]
  [fp]
    type = IdealGasFluidProperties
  []
[]
[Closures]
  [simple_closures]
    type = Closures1PhaseSimple
  []
[]
[Components]
  [inlet]
    type = InletMassFlowRateTemperature1Phase
    input = 'fch1:in'
    m_dot = 1
    T = 300
  []
  [fch1]
    type = FlowChannel1Phase
    position = '0 0 0'
    orientation = '1 1 1'
    length = 1.73205
    n_elems = 5
    A = 1
  []
  [junction]
    type = VolumeJunction1Phase
    position = '1 1 1'
    connections = 'fch1:out fch2:out'
    volume = 0.1
  []
  [fch2]
    type = FlowChannel1Phase
    position = '2 2 2'
    orientation = '-1 -1 -1'
    length = 1.73205
    n_elems = 5
    A = 2
  []
  [outlet]
    type = Outlet1Phase
    input = 'fch2:in'
    p = 1e5
  []
[]
[Executioner]
  type = Transient
  dt = 0.5
  num_steps = 50
  solve_type = NEWTON
  line_search = basic
  petsc_options_iname = '-pc_type'
  petsc_options_value = 'lu'
  nl_abs_tol = 1e-6
  l_tol = 1e-03
  automatic_scaling = true
[]
[Outputs]
  print_linear_converged_reason = false
  print_nonlinear_converged_reason = false
  print_linear_residuals = false
  [out]
    type = Exodus
    sync_only = false
    sync_times = '0 5 10 15 20 25'
    show = 'vel_x vel_y vel_z'
  []
[]
(modules/fluid_properties/test/tests/materials/fluid_properties_material/test_pt.i)
[Mesh]
  type = GeneratedMesh
  dim = 2
  nx = 2
  ny = 2
  elem_type = QUAD4
[]
[Functions]
  [fn_1]
    type = ParsedFunction
    expression = '2e5 * (1 + x)'
  []
  [fn_2]
    type = ParsedFunction
    expression = '300 * (1 + x*x+y*y)'
  []
[]
[AuxVariables]
  [pressure]
    [InitialCondition]
      type = FunctionIC
      function = fn_1
    []
  []
  [temperature]
    [InitialCondition]
      type = FunctionIC
      function = fn_2
    []
  []
  [rho]
    family = MONOMIAL
    order = CONSTANT
  []
  [mu]
    family = MONOMIAL
    order = CONSTANT
  []
  [cp]
    family = MONOMIAL
    order = CONSTANT
  []
  [cv]
    family = MONOMIAL
    order = CONSTANT
  []
  [k]
    family = MONOMIAL
    order = CONSTANT
  []
  [h]
    family = MONOMIAL
    order = CONSTANT
  []
  [e]
    family = MONOMIAL
    order = CONSTANT
  []
  [s]
    family = MONOMIAL
    order = CONSTANT
  []
  [c]
    family = MONOMIAL
    order = CONSTANT
  []
[]
[AuxKernels]
  [rho]
    type = MaterialRealAux
     variable = rho
     property = density
  []
  [mu]
    type = MaterialRealAux
     variable = mu
     property = viscosity
  []
  [cp]
    type = MaterialRealAux
     variable = cp
     property = cp
  []
  [cv]
    type = MaterialRealAux
     variable = cv
     property = cv
  []
  [k]
    type = MaterialRealAux
     variable = k
     property = k
  []
  [h]
    type = MaterialRealAux
     variable = h
     property = h
  []
  [e]
    type = MaterialRealAux
     variable = e
     property = e
  []
  [s]
    type = MaterialRealAux
     variable = s
     property = s
  []
  [c]
    type = MaterialRealAux
     variable = c
     property = c
  []
[]
[FluidProperties]
  [ideal_gas]
    type = IdealGasFluidProperties
    gamma = 1.4
    molar_mass = 1.000536678700361
  []
[]
[Materials]
  [fp_mat]
    type = FluidPropertiesMaterialPT
    pressure = pressure
    temperature = temperature
    fp = ideal_gas
  []
[]
[Executioner]
  type = Steady
  solve_type = NEWTON
[]
[Problem]
  solve = false
[]
[Outputs]
  exodus = true
[]
(modules/thermal_hydraulics/test/tests/problems/brayton_cycle/open_brayton_cycle.i)
# This input file is used to demonstrate a simple open-air Brayton cycle using
# a compressor, turbine, shaft, motor, and generator.
# The flow length is divided into 5 segments as illustrated below, where
#   - "(I)" denotes the inlet
#   - "(C)" denotes the compressor
#   - "(T)" denotes the turbine
#   - "(O)" denotes the outlet
#   - "*" denotes a fictitious junction
#
#                  Heated section
# (I)-----(C)-----*--------------*-----(T)-----(O)
#      1       2         3          4       5
#
# Initially the fluid is at rest at ambient conditions, the shaft speed is zero,
# and no heat transfer occurs with the system.
# The transient is controlled as follows:
#   * 0   - 100 s: motor ramps up torque linearly from zero
#   * 100 - 200 s: motor ramps down torque linearly to zero, HTC ramps up linearly from zero.
#   * 200 - 300 s: (no changes; should approach steady condition)
I_motor = 1.0
motor_torque_max = 400.0
I_generator = 1.0
generator_torque_per_shaft_speed = -0.00025
motor_ramp_up_duration = 100.0
motor_ramp_down_duration = 100.0
post_motor_time = 100.0
t1 = ${motor_ramp_up_duration}
t2 = ${fparse t1 + motor_ramp_down_duration}
t3 = ${fparse t2 + post_motor_time}
D1 = 0.15
D2 = ${D1}
D3 = ${D1}
D4 = ${D1}
D5 = ${D1}
A1 = ${fparse 0.25 * pi * D1^2}
A2 = ${fparse 0.25 * pi * D2^2}
A3 = ${fparse 0.25 * pi * D3^2}
A4 = ${fparse 0.25 * pi * D4^2}
A5 = ${fparse 0.25 * pi * D5^2}
L1 = 10.0
L2 = ${L1}
L3 = ${L1}
L4 = ${L1}
L5 = ${L1}
x1 = 0.0
x2 = ${fparse x1 + L1}
x3 = ${fparse x2 + L2}
x4 = ${fparse x3 + L3}
x5 = ${fparse x4 + L4}
x2_minus = ${fparse x2 - 0.001}
x2_plus = ${fparse x2 + 0.001}
x5_minus = ${fparse x5 - 0.001}
x5_plus = ${fparse x5 + 0.001}
n_elems1 = 10
n_elems2 = ${n_elems1}
n_elems3 = ${n_elems1}
n_elems4 = ${n_elems1}
n_elems5 = ${n_elems1}
A_ref_comp = ${fparse 0.5 * (A1 + A2)}
V_comp = ${fparse A_ref_comp * 1.0}
I_comp = 1.0
A_ref_turb = ${fparse 0.5 * (A4 + A5)}
V_turb = ${fparse A_ref_turb * 1.0}
I_turb = 1.0
c0_rated_comp = 351.6925137
rho0_rated_comp = 1.146881112
rated_mfr = 0.25
speed_rated_rpm = 96000
speed_rated = ${fparse speed_rated_rpm * 2 * pi / 60.0}
speed_initial = 0
eff_comp = 0.79
eff_turb = 0.843
T_hot = 1000
T_ambient = 300
p_ambient = 1e5
[GlobalParams]
  orientation = '1 0 0'
  gravity_vector = '0 0 0'
  initial_p = ${p_ambient}
  initial_T = ${T_ambient}
  initial_vel = 0
  initial_vel_x = 0
  initial_vel_y = 0
  initial_vel_z = 0
  fp = fp_air
  closures = closures
  f = 0
  scaling_factor_1phase = '1 1 1e-5'
  scaling_factor_rhoV = 1
  scaling_factor_rhouV = 1
  scaling_factor_rhovV = 1
  scaling_factor_rhowV = 1
  scaling_factor_rhoEV = 1e-5
  rdg_slope_reconstruction = none
[]
[Functions]
  [motor_torque_fn]
    type = PiecewiseLinear
    x = '0 ${t1} ${t2}'
    y = '0 ${motor_torque_max} 0'
  []
  [motor_power_fn]
    type = ParsedFunction
    expression = 'torque * speed'
    symbol_names = 'torque speed'
    symbol_values = 'motor_torque shaft:omega'
  []
  [generator_torque_fn]
    type = ParsedFunction
    expression = 'slope * t'
    symbol_names = 'slope'
    symbol_values = '${generator_torque_per_shaft_speed}'
  []
  [generator_power_fn]
    type = ParsedFunction
    expression = 'torque * speed'
    symbol_names = 'torque speed'
    symbol_values = 'generator_torque shaft:omega'
  []
  [htc_wall_fn]
    type = PiecewiseLinear
    x = '0 ${t1} ${t2}'
    y = '0 0 1e3'
  []
[]
[FluidProperties]
  [fp_air]
    type = IdealGasFluidProperties
    emit_on_nan = none
  []
[]
[Closures]
  [closures]
    type = Closures1PhaseSimple
  []
[]
[Components]
  [shaft]
    type = Shaft
    connected_components = 'motor compressor turbine generator'
    initial_speed = ${speed_initial}
  []
  [motor]
    type = ShaftConnectedMotor
    inertia = ${I_motor}
    torque = 0 # controlled
  []
  [generator]
    type = ShaftConnectedMotor
    inertia = ${I_generator}
    torque = generator_torque_fn
  []
  [inlet]
    type = InletStagnationPressureTemperature1Phase
    input = 'pipe1:in'
    p0 = ${p_ambient}
    T0 = ${T_ambient}
  []
  [pipe1]
    type = FlowChannel1Phase
    position = '${x1} 0 0'
    length = ${L1}
    n_elems = ${n_elems1}
    A = ${A1}
  []
  [compressor]
    type = ShaftConnectedCompressor1Phase
    position = '${x2} 0 0'
    inlet = 'pipe1:out'
    outlet = 'pipe2:in'
    A_ref = ${A_ref_comp}
    volume = ${V_comp}
    omega_rated = ${speed_rated}
    mdot_rated = ${rated_mfr}
    c0_rated = ${c0_rated_comp}
    rho0_rated = ${rho0_rated_comp}
    speeds = '0.5208 0.6250 0.7292 0.8333 0.9375'
    Rp_functions = 'rp_comp1 rp_comp2 rp_comp3 rp_comp4 rp_comp5'
    eff_functions = 'eff_comp1 eff_comp2 eff_comp3 eff_comp4 eff_comp5'
    min_pressure_ratio = 1.0
    speed_cr_I = 0
    inertia_const = ${I_comp}
    inertia_coeff = '${I_comp} 0 0 0'
    # assume no shaft friction
    speed_cr_fr = 0
    tau_fr_const = 0
    tau_fr_coeff = '0 0 0 0'
  []
  [pipe2]
    type = FlowChannel1Phase
    position = '${x2} 0 0'
    length = ${L2}
    n_elems = ${n_elems2}
    A = ${A2}
  []
  [junction2_3]
    type = JunctionOneToOne1Phase
    connections = 'pipe2:out pipe3:in'
  []
  [pipe3]
    type = FlowChannel1Phase
    position = '${x3} 0 0'
    length = ${L3}
    n_elems = ${n_elems3}
    A = ${A3}
  []
  [junction3_4]
    type = JunctionOneToOne1Phase
    connections = 'pipe3:out pipe4:in'
  []
  [pipe4]
    type = FlowChannel1Phase
    position = '${x4} 0 0'
    length = ${L4}
    n_elems = ${n_elems4}
    A = ${A4}
  []
  [turbine]
    type = ShaftConnectedCompressor1Phase
    position = '${x5} 0 0'
    inlet = 'pipe4:out'
    outlet = 'pipe5:in'
    A_ref = ${A_ref_turb}
    volume = ${V_turb}
    treat_as_turbine = true
    omega_rated = ${speed_rated}
    mdot_rated = ${rated_mfr}
    c0_rated = ${c0_rated_comp}
    rho0_rated = ${rho0_rated_comp}
    speeds = '0 0.5208 0.6250 0.7292 0.8333 0.9375'
    Rp_functions = 'rp_turb0 rp_turb1 rp_turb2 rp_turb3 rp_turb4 rp_turb5'
    eff_functions = 'eff_turb1 eff_turb1 eff_turb2 eff_turb3 eff_turb4 eff_turb5'
    min_pressure_ratio = 1.0
    speed_cr_I = 0
    inertia_const = ${I_turb}
    inertia_coeff = '${I_turb} 0 0 0'
    # assume no shaft friction
    speed_cr_fr = 0
    tau_fr_const = 0
    tau_fr_coeff = '0 0 0 0'
  []
  [pipe5]
    type = FlowChannel1Phase
    position = '${x5} 0 0'
    length = ${L5}
    n_elems = ${n_elems5}
    A = ${A5}
  []
  [outlet]
    type = Outlet1Phase
    input = 'pipe5:out'
    p = ${p_ambient}
  []
  [heating]
    type = HeatTransferFromSpecifiedTemperature1Phase
    flow_channel = pipe3
    T_wall = ${T_hot}
    Hw = htc_wall_fn
  []
[]
[ControlLogic]
  [motor_ctrl]
    type = TimeFunctionComponentControl
    component = motor
    parameter = torque
    function = motor_torque_fn
  []
[]
[Postprocessors]
  [heating_rate]
    type = ADHeatRateConvection1Phase
    block = 'pipe3'
    T = T
    T_wall = T_wall
    Hw = Hw
    P_hf = P_hf
    execute_on = 'INITIAL TIMESTEP_END'
  []
  [motor_torque]
    type = RealComponentParameterValuePostprocessor
    component = motor
    parameter = torque
    execute_on = 'INITIAL TIMESTEP_END'
  []
  [motor_power]
    type = FunctionValuePostprocessor
    function = motor_power_fn
    execute_on = 'INITIAL TIMESTEP_END'
    indirect_dependencies = 'motor_torque shaft:omega'
  []
  [generator_torque]
    type = ShaftConnectedComponentPostprocessor
    quantity = torque
    shaft_connected_component_uo = generator:shaftconnected_uo
    execute_on = 'INITIAL TIMESTEP_END'
  []
  [generator_power]
    type = FunctionValuePostprocessor
    function = generator_power_fn
    execute_on = 'INITIAL TIMESTEP_END'
    indirect_dependencies = 'generator_torque shaft:omega'
  []
  [shaft_speed]
    type = ScalarVariable
    variable = 'shaft:omega'
    execute_on = 'INITIAL TIMESTEP_END'
  []
  [p_in_comp]
    type = PointValue
    variable = p
    point = '${x2_minus} 0 0'
    execute_on = 'INITIAL TIMESTEP_END'
  []
  [p_out_comp]
    type = PointValue
    variable = p
    point = '${x2_plus} 0 0'
    execute_on = 'INITIAL TIMESTEP_END'
  []
  [p_ratio_comp]
    type = ParsedPostprocessor
    pp_names = 'p_in_comp p_out_comp'
    expression = 'p_out_comp / p_in_comp'
    execute_on = 'INITIAL TIMESTEP_END'
  []
  [p_in_turb]
    type = PointValue
    variable = p
    point = '${x5_minus} 0 0'
    execute_on = 'INITIAL TIMESTEP_END'
  []
  [p_out_turb]
    type = PointValue
    variable = p
    point = '${x5_plus} 0 0'
    execute_on = 'INITIAL TIMESTEP_END'
  []
  [p_ratio_turb]
    type = ParsedPostprocessor
    pp_names = 'p_in_turb p_out_turb'
    expression = 'p_in_turb / p_out_turb'
    execute_on = 'INITIAL TIMESTEP_END'
  []
  [mfr_comp]
    type = ADFlowJunctionFlux1Phase
    boundary = pipe1:out
    connection_index = 0
    equation = mass
    junction = compressor
  []
  [mfr_turb]
    type = ADFlowJunctionFlux1Phase
    boundary = pipe4:out
    connection_index = 0
    equation = mass
    junction = turbine
  []
[]
[Preconditioning]
  [pc]
    type = SMP
    full = true
  []
[]
[Executioner]
  type = Transient
  scheme = 'bdf2'
  end_time = ${t3}
  dt = 0.1
  abort_on_solve_fail = true
  solve_type = NEWTON
  nl_rel_tol = 1e-50
  nl_abs_tol = 1e-11
  nl_max_its = 15
  l_tol = 1e-4
  l_max_its = 10
[]
[Outputs]
  [csv]
    type = CSV
    file_base = 'open_brayton_cycle'
    execute_vector_postprocessors_on = 'INITIAL'
  []
  [console]
    type = Console
    show = 'shaft_speed p_ratio_comp p_ratio_turb compressor:pressure_ratio turbine:pressure_ratio'
  []
[]
[Functions]
  # compressor pressure ratio
  [rp_comp1]
    type = PiecewiseLinear
    data_file = 'rp_comp1.csv'
    x_index_in_file = 0
    y_index_in_file = 1
    format = columns
    extrap = true
  []
  [rp_comp2]
    type = PiecewiseLinear
    data_file = 'rp_comp2.csv'
    x_index_in_file = 0
    y_index_in_file = 1
    format = columns
    extrap = true
  []
  [rp_comp3]
    type = PiecewiseLinear
    data_file = 'rp_comp3.csv'
    x_index_in_file = 0
    y_index_in_file = 1
    format = columns
    extrap = true
  []
  [rp_comp4]
    type = PiecewiseLinear
    data_file = 'rp_comp4.csv'
    x_index_in_file = 0
    y_index_in_file = 1
    format = columns
    extrap = true
  []
  [rp_comp5]
    type = PiecewiseLinear
    data_file = 'rp_comp5.csv'
    x_index_in_file = 0
    y_index_in_file = 1
    format = columns
    extrap = true
  []
  # compressor efficiency
  [eff_comp1]
    type = ConstantFunction
    value = ${eff_comp}
  []
  [eff_comp2]
    type = ConstantFunction
    value = ${eff_comp}
  []
  [eff_comp3]
    type = ConstantFunction
    value = ${eff_comp}
  []
  [eff_comp4]
    type = ConstantFunction
    value = ${eff_comp}
  []
  [eff_comp5]
    type = ConstantFunction
    value = ${eff_comp}
  []
  # turbine pressure ratio
  [rp_turb0]
    type = ConstantFunction
    value = 1
  []
  [rp_turb1]
    type = PiecewiseLinear
    data_file = 'rp_turb1.csv'
    x_index_in_file = 0
    y_index_in_file = 1
    format = columns
    extrap = true
  []
  [rp_turb2]
    type = PiecewiseLinear
    data_file = 'rp_turb2.csv'
    x_index_in_file = 0
    y_index_in_file = 1
    format = columns
    extrap = true
  []
  [rp_turb3]
    type = PiecewiseLinear
    data_file = 'rp_turb3.csv'
    x_index_in_file = 0
    y_index_in_file = 1
    format = columns
    extrap = true
  []
  [rp_turb4]
    type = PiecewiseLinear
    data_file = 'rp_turb4.csv'
    x_index_in_file = 0
    y_index_in_file = 1
    format = columns
    extrap = true
  []
  [rp_turb5]
    type = PiecewiseLinear
    data_file = 'rp_turb5.csv'
    x_index_in_file = 0
    y_index_in_file = 1
    format = columns
    extrap = true
  []
  # turbine efficiency
  [eff_turb1]
    type = ConstantFunction
    value = ${eff_turb}
  []
  [eff_turb2]
    type = ConstantFunction
    value = ${eff_turb}
  []
  [eff_turb3]
    type = ConstantFunction
    value = ${eff_turb}
  []
  [eff_turb4]
    type = ConstantFunction
    value = ${eff_turb}
  []
  [eff_turb5]
    type = ConstantFunction
    value = ${eff_turb}
  []
[]
(modules/fluid_properties/test/tests/ics/rho_vapor_mixture_from_pressure_temperature/test.i)
# Tests the initial condition for mixture density from pressure and temperature.
# This test uses the general vapor mixture fluid properties with steam, air,
# and helium with mass fractions 0.5, 0.3, and 0.2, respectively. The individual
# specific volumes (in m^3/kg) at p = 100 kPa, T = 500 K are:
#   steam:  2.298113001
#   air:    1.43525
#   helium: 10.3855
# For the general vapor mixture, the mixture specific volume is computed as
#   v = \sum\limits_i x_i v_i  ,
# where x_i is the mass fraction of component i, and v_i is the specific volume
# of component i. Therefore, the correct value for specific volume of the mixture is
#   v = 3.65673150050 m^3/kg
# and thus density is
#   rho = 0.27346825980066236 kg/m^3
[Mesh]
  type = GeneratedMesh
  dim = 1
  nx = 1
  allow_renumbering = false
[]
[FluidProperties]
  [fp_steam]
    type = StiffenedGasFluidProperties
    gamma = 1.43
    cv = 1040.0
    q = 2.03e6
    p_inf = 0.0
    q_prime = -2.3e4
    k = 0.026
    mu = 134.4e-7
    M = 0.01801488
    rho_c = 322.0
  []
  [fp_air]
    type = IdealGasFluidProperties
    gamma = 1.4
    molar_mass = 28.965197004e-3
  []
  [fp_helium]
    type = IdealGasFluidProperties
    gamma = 1.66
    molar_mass = 4.002917432959e-3
  []
  [fp_vapor_mixture]
    type = IdealRealGasMixtureFluidProperties
    fp_primary = fp_steam
    fp_secondary = 'fp_air fp_helium'
  []
[]
[AuxVariables]
  [rho]
  []
  [p]
  []
  [T]
  []
  [x_air]
  []
  [x_helium]
  []
[]
[ICs]
  [rho_ic]
    type = RhoVaporMixtureFromPressureTemperatureIC
    variable = rho
    p = p
    T = T
    x_secondary_vapors = 'x_air x_helium'
    fp_vapor_mixture = fp_vapor_mixture
  []
  [p_ic]
    type = ConstantIC
    variable = p
    value = 100e3
  []
  [T_ic]
    type = ConstantIC
    variable = T
    value = 500
  []
  [x_air_ic]
    type = ConstantIC
    variable = x_air
    value = 0.3
  []
  [x_helium_ic]
    type = ConstantIC
    variable = x_helium
    value = 0.2
  []
[]
[Executioner]
  type = Steady
[]
[Postprocessors]
  [rho_test]
    type = ElementalVariableValue
    elementid = 0
    variable = rho
    execute_on = 'INITIAL TIMESTEP_END'
  []
[]
[Outputs]
  csv = true
  execute_on = 'INITIAL'
[]
[Problem]
  solve = false
[]
(modules/fluid_properties/test/tests/functions/saturation_temperature_function/saturation_temperature_function.i)
# TestTwoPhaseFluidProperties has the following saturation temperature function:
#   T_sat(p) = 2 p
# Thus for p = 5, T_sat should be 10.
[Mesh]
  type = GeneratedMesh
  dim = 1
  nx = 1
[]
[FluidProperties]
  [./fp_liquid]
    type = IdealGasFluidProperties
  [../]
  [./fp_vapor]
    type = IdealGasFluidProperties
  [../]
  [./fp_2phase]
    type = TestTwoPhaseFluidProperties
    fp_liquid = fp_liquid
    fp_vapor = fp_vapor
  [../]
[]
[Functions]
  [./p]
    type = ConstantFunction
    value = 5
  [../]
  [./T_sat]
    type = SaturationTemperatureFunction
    p = p
    fp_2phase = fp_2phase
  [../]
[]
[Postprocessors]
  [./T_sat_pp]
    type = FunctionValuePostprocessor
    function = T_sat
    execute_on = 'INITIAL'
  [../]
[]
[Problem]
  solve = false
[]
[Executioner]
  type = Steady
[]
[Outputs]
  csv = true
[]
(modules/navier_stokes/test/include/userobjects/TestConservedVarFluidProperties.h)
// This file is part of the MOOSE framework
// https://mooseframework.inl.gov
//
// 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 "IdealGasFluidProperties.h"
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Woverloaded-virtual"
class TestConservedVarFluidProperties : public IdealGasFluidProperties
{
public:
  static InputParameters validParams();
  TestConservedVarFluidProperties(const InputParameters & parameters);
  ADReal p_from_v_e(const ADReal & v, const ADReal & /*e*/) const override;
  ADReal T_from_v_e(const ADReal & /*v*/, const ADReal & /*e*/) const override;
};
#pragma GCC diagnostic pop