Skip to content

Commit

Permalink
Add a test for non-constant cp
Browse files Browse the repository at this point in the history
  • Loading branch information
GiudGiud committed Dec 18, 2024
1 parent 554a9d9 commit ac93fc1
Show file tree
Hide file tree
Showing 4 changed files with 125 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -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
[]
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit ac93fc1

Please sign in to comment.