diff --git a/modules/navier_stokes/test/tests/finite_volume/wcns/materials/enthalpy_computation.i b/modules/navier_stokes/test/tests/finite_volume/wcns/materials/enthalpy_computation.i new file mode 100644 index 000000000000..5c76a2250951 --- /dev/null +++ b/modules/navier_stokes/test/tests/finite_volume/wcns/materials/enthalpy_computation.i @@ -0,0 +1,101 @@ +[Mesh] + [gen] + type = GeneratedMeshGenerator + dim = 2 + xmin = 0 + xmax = 2 + ymin = 0 + ymax = 1 + nx = 5 + ny = 5 + [] +[] + +[AuxVariables] + [pressure] + type = INSFVPressureVariable + [] + [T_fluid] + type = INSFVEnergyVariable + [] +[] + +[FVICs] + [p] + type = FVFunctionIC + variable = 'pressure' + function = '1e5 + 1e4 * x + 5e3 * y' + [] + [T] + type = FVFunctionIC + variable = T_fluid + function = '300 + 20 * x + 100 * y' + [] +[] + +[FluidProperties] + [fp] + type = Water97FluidProperties + [] +[] + +[FunctorMaterials] + [fluid_props_to_mat_props] + type = GeneralFunctorFluidProps + fp = fp + pressure = 'pressure' + T_fluid = 'T_fluid' + speed = '1' + + # For porous flow + characteristic_length = 2 + porosity = 1 + [] + [compute_cp] + type = INSFVEnthalpyFunctorMaterial + # Use these for non constant cp + # fp = fp + # pressure = 'pressure' + temperature = 'T_fluid' + cp = 'cp' + rho = 'rho' + [] +[] + +[Postprocessors] + [min_h] + type = ElementExtremeFunctorValue + value_type = 'min' + functor = 'h' + [] + [max_h] + type = ElementExtremeFunctorValue + value_type = 'max' + functor = 'h' + [] + [min_rho_h] + type = ElementExtremeFunctorValue + value_type = 'min' + functor = 'rho_h' + [] + [max_rho_h] + type = ElementExtremeFunctorValue + value_type = 'max' + functor = 'rho_h' + [] +[] + + +[Executioner] + type = Transient + end_time = 0.1 + dt = 0.1 +[] + +[Outputs] + csv = true +[] + +[Problem] + solve = false +[] diff --git a/modules/navier_stokes/test/tests/finite_volume/wcns/materials/gold/enthalpy_computation_non_constant_cp_out.csv b/modules/navier_stokes/test/tests/finite_volume/wcns/materials/gold/enthalpy_computation_non_constant_cp_out.csv new file mode 100644 index 000000000000..22e12b015307 --- /dev/null +++ b/modules/navier_stokes/test/tests/finite_volume/wcns/materials/gold/enthalpy_computation_non_constant_cp_out.csv @@ -0,0 +1,3 @@ +time,max_h,max_rho_h,min_h,min_rho_h +0,0,0,0,0 +0.1,2780642.3501412,404825244.74395,171177.11854132,1611602.983575 diff --git a/modules/navier_stokes/test/tests/finite_volume/wcns/materials/gold/enthalpy_computation_out.csv b/modules/navier_stokes/test/tests/finite_volume/wcns/materials/gold/enthalpy_computation_out.csv new file mode 100644 index 000000000000..3800af8b7a8a --- /dev/null +++ b/modules/navier_stokes/test/tests/finite_volume/wcns/materials/gold/enthalpy_computation_out.csv @@ -0,0 +1,3 @@ +time,max_h,max_rho_h,min_h,min_rho_h +0,0,0,0,0 +0.1,1577428.5775996,1510770803.1975,786797.01942594,473293.31093746 diff --git a/modules/navier_stokes/test/tests/finite_volume/wcns/materials/tests b/modules/navier_stokes/test/tests/finite_volume/wcns/materials/tests index fa09b3fc0bad..95d669f960f7 100644 --- a/modules/navier_stokes/test/tests/finite_volume/wcns/materials/tests +++ b/modules/navier_stokes/test/tests/finite_volume/wcns/materials/tests @@ -39,6 +39,24 @@ custom_cmp = 'dynamic_pressure.cmp' prereq = 'neglect_drho_dt_derivatives' [] + [enthalpy_computation] + type = 'CSVDiff' + input = enthalpy_computation.i + csvdiff = enthalpy_computation_out.csv + requirement = 'The system shall be able to compute the specific enthalpy and the enthalpy assuming a constant specific heat.' + recover = false + [] + [enthalpy_computation_cp_variable] + type = 'CSVDiff' + input = enthalpy_computation.i + csvdiff = enthalpy_computation_non_constant_cp_out.csv + cli_args = "Outputs/file_base=enthalpy_computation_non_constant_cp_out + FunctorMaterials/compute_cp/fp=fp + FunctorMaterials/compute_cp/pressure=pressure + FunctorMaterials/compute_cp/assume_constant_cp=false" + requirement = 'The system shall be able to compute the specific enthalpy and the enthalpy with a non constant specific heat.' + recover = false + [] [exceptions] requirement = "The system shall throw an error if"