LinearFVEnthalpyVolumetricHeatTransfer
This object adds the volumetric fluid-solid heat transfer term for linear finite volume formulations where the solved variable is the specific enthalpy. This kernel cannot be used when the solved variable is the temperature.
For the current-side equation it contributes
where is the volumetric heat transfer coefficient "h_solid_fluid", and and are the temperatures of the phase whose equation this kernel acts on and of the other phase, selected with "is_solid". The current-side temperature is linearized about the latest auxiliary temperature as
Here is the specific enthalpy of the current phase, which is the solved variable, is the specific heat "cp", and superscripts and denote the previous and the new iterate.
This yields the matrix contribution
and the right-hand side contribution
If the auxiliary temperature satisfies the constant specific heat relation , then this reduces exactly to the simpler form .
This kernel is useful for porous-medium fluid and solid enthalpy equations that use auxiliary temperature variables for coupling and boundary data.
h_solid_fluid
C++ Type:MooseFunctorName
Unit:(no unit assumed)
Controllable:No
Description:Name of the convective heat transfer coefficient. A functor is any of the following: a variable, a functor material property, a function, a postprocessor or a number.
is_solid
Default:False
C++ Type:bool
Controllable:No
Description:Whether this kernel acts on the solid temperature.
cp
C++ Type:MooseFunctorName
Unit:(no unit assumed)
Controllable:No
Description:Specific heat used to linearize the current-side temperature from the enthalpy variable. A functor is any of the following: a variable, a functor material property, a function, a postprocessor or a number.
(modules/navier_stokes/test/tests/finite_volume/pins/channel-flow/linear-segregated/2d-simple-channel-enthalpy/porous-baffle-2d-enthalpy.i)
# Steady conjugate heat transfer from a heated solid to fluid in a 0.5-m porous block.
# The solid fraction scales the 20 MW/m^3 source to 10 MW/m^3. Conservation therefore gives
# u_block_2 = 2, T_fluid_out = 300.59523809524, and h_fluid_out = 1262500.
# For 10 upwind cells, T_fluid_block_2 = 300.32738095238. The local balance gives
# T_solid_block_2 - T_fluid_block_2 = 10e6 / 30000 = 333.33333333333,
# hence T_solid_block_2 = 633.66071428571.
mu = 2e-3
rho = 1000
advected_interp_method = 'upwind'
u_in = 2
forchheimer = 0
bf = '0 0'
cp_fluid = 4200
cp_solid = 500
k_fluid = 0.4
k_solid = 0.2
h_vol = 30000
q_solid = 20000000
T_inlet = 300
T_initial = 300
[FVGradientMethods]
[jump_aware]
type = FVPressureJumpGreenGaussGradient
[]
[velocity_jump_aware]
type = FVVelocityJumpGreenGaussGradient
[]
[reconstructed]
type = FVReconstructedPressureGradient
base_gradient_method = jump_aware
gradient_relaxation = 1.0
[]
[]
[Mesh]
[mesh]
type = CartesianMeshGenerator
dim = 2
dx = '0.5 0.5 0.5'
dy = '0.5'
ix = '10 10 10'
iy = '3'
subdomain_id = '1 2 3'
[]
[baffle]
type = SideSetsBetweenSubdomainsGenerator
input = mesh
primary_block = '1'
paired_block = '2'
new_boundary = 'baffle'
[]
[baffle2]
type = SideSetsBetweenSubdomainsGenerator
input = baffle
primary_block = '2'
paired_block = '3'
new_boundary = 'baffle2'
[]
[split_top_bottom]
type = BreakBoundaryOnSubdomainGenerator
input = baffle2
boundaries = 'top bottom'
[]
[delete]
type = BoundaryDeletionGenerator
boundary_names = 'top bottom'
input = split_top_bottom
[]
[]
[FVInterpolationMethods]
[upwind]
type = FVAdvectedUpwind
[]
[]
[Problem]
linear_sys_names = 'u_system v_system pressure_system energy_system solid_energy_system'
previous_nl_solution_required = true
[]
[UserObjects]
[pressure_jump]
type = BernoulliFormLossPressureJump
boundary = 'baffle baffle2'
porosity = porosity
density = ${rho}
form_loss = ${bf}
reference_velocity_side = 'lower_porosity higher_porosity'
[]
[rc]
type = PorousRhieChowMassFlux
u = superficial_u
v = superficial_v
pressure = pressure
rho = ${rho}
porosity = porosity
p_diffusion_kernel = p_diffusion
pressure_jump_models = pressure_jump
pressure_jump_relaxation = 0.1
[]
[]
[Variables]
[superficial_u]
type = MooseLinearVariableFVReal
solver_sys = u_system
initial_condition = ${u_in}
gradient_method = velocity_jump_aware
[]
[superficial_v]
type = MooseLinearVariableFVReal
solver_sys = v_system
initial_condition = 0.0
gradient_method = velocity_jump_aware
[]
[pressure]
type = MooseLinearVariableFVReal
solver_sys = pressure_system
initial_condition = 0.0
gradient_method = jump_aware
[]
[h_fluid]
type = MooseLinearVariableFVReal
solver_sys = energy_system
initial_condition = '${fparse cp_fluid * T_initial}'
[]
[T_solid]
type = MooseLinearVariableFVReal
solver_sys = solid_energy_system
initial_condition = ${T_initial}
block = 2
[]
[]
[LinearFVKernels]
[u_advection]
type = LinearPWCNSFVMomentumFlux
variable = superficial_u
advected_interp_method_name = ${advected_interp_method}
mu = ${mu}
u = superficial_u
v = superficial_v
momentum_component = 'x'
rhie_chow_user_object = rc
use_nonorthogonal_correction = false
[]
[v_advection]
type = LinearPWCNSFVMomentumFlux
variable = superficial_v
advected_interp_method_name = ${advected_interp_method}
mu = ${mu}
u = superficial_u
v = superficial_v
momentum_component = 'y'
rhie_chow_user_object = rc
use_nonorthogonal_correction = false
[]
[u_pressure]
type = LinearPWCNSFVMomentumPressure
variable = superficial_u
momentum_component = 'x'
porosity = porosity
pressure = pressure
gradient_method = reconstructed
[]
[v_pressure]
type = LinearPWCNSFVMomentumPressure
variable = superficial_v
momentum_component = 'y'
porosity = porosity
pressure = pressure
gradient_method = reconstructed
[]
[u_friction]
type = LinearFVMomentumFriction
variable = superficial_u
Forchheimer_name = forch
porosity = porosity
rho = ${rho}
u = superficial_u
v = superficial_v
momentum_component = 'x'
block = 2
[]
[v_friction]
type = LinearFVMomentumFriction
variable = superficial_v
Forchheimer_name = forch
porosity = porosity
rho = ${rho}
u = superficial_u
v = superficial_v
momentum_component = 'y'
block = 2
[]
[p_diffusion]
type = LinearFVPressureCorrectionDiffusionJump
variable = pressure
rhie_chow_user_object = rc
use_nonorthogonal_correction = false
[]
[HbyA_divergence]
type = LinearFVDivergence
variable = pressure
face_flux = HbyA
force_boundary_execution = true
[]
[fluid_advection]
type = LinearFVEnergyAdvection
variable = h_fluid
advected_quantity = enthalpy
advected_interp_method = ${advected_interp_method}
rhie_chow_user_object = rc
[]
[fluid_diffusion]
type = LinearFVDiffusion
variable = h_fluid
diffusion_coeff = kappa_fluid
use_nonorthogonal_correction = false
[]
[fluid_exchange]
type = LinearFVEnthalpyVolumetricHeatTransfer
variable = h_fluid
h_solid_fluid = h_vol
cp = cp_fluid
T_fluid = T_fluid
T_solid = T_solid
is_solid = false
block = 2
[]
[fluid_source]
type = LinearFVSource
variable = h_fluid
source_density = q_fluid_scaled
[]
[solid_diffusion]
type = LinearFVDiffusion
variable = T_solid
diffusion_coeff = ${k_solid}
use_nonorthogonal_correction = false
block = 2
[]
[solid_exchange]
type = LinearFVEnthalpyVolumetricHeatTransfer
variable = T_solid
h_solid_fluid = h_vol
cp = 1.0
T_fluid = T_fluid
T_solid = T_solid
is_solid = true
block = 2
[]
[solid_source]
type = LinearFVSource
variable = T_solid
source_density = q_solid_scaled
block = 2
[]
[]
[LinearFVBCs]
[left_u]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = left
variable = superficial_u
functor = ${u_in}
[]
[outlet_u]
type = LinearFVAdvectionDiffusionOutflowBC
boundary = right
variable = superficial_u
use_two_term_expansion = false
[]
[left_v]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = left
variable = superficial_v
functor = 0.0
[]
[outlet_v]
type = LinearFVAdvectionDiffusionOutflowBC
boundary = right
variable = superficial_v
use_two_term_expansion = false
[]
[symmetry-u]
type = LinearFVVelocitySymmetryBC
boundary = 'top_to_1 top_to_3 bottom_to_1 bottom_to_3 top_to_2 bottom_to_2'
variable = superficial_u
u = superficial_u
v = superficial_v
momentum_component = x
[]
[symmetry-v]
type = LinearFVVelocitySymmetryBC
boundary = 'top_to_1 top_to_3 bottom_to_1 bottom_to_3 top_to_2 bottom_to_2'
variable = superficial_v
u = superficial_u
v = superficial_v
momentum_component = y
[]
[pressure-extrapolation]
type = LinearFVPressureFluxBC
boundary = 'bottom_to_1 bottom_to_2 bottom_to_3 top_to_1 top_to_2 top_to_3'
variable = pressure
HbyA_flux = HbyA
Ainv = Ainv
rho = ${rho}
u = superficial_u
v = superficial_v
[]
[outlet_p]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = right
variable = pressure
functor = 0.0
[]
[left_T_fluid]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = left
variable = T_fluid
functor = ${T_inlet}
[]
[left_h_fluid]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = left
variable = h_fluid
functor = h_from_p_T
[]
[walls_h_fluid]
type = LinearFVAdvectionDiffusionFunctorNeumannBC
boundary = 'top_to_1 top_to_2 top_to_3 bottom_to_1 bottom_to_2 bottom_to_3'
variable = h_fluid
functor = 0.0
diffusion_coeff = kappa_fluid
[]
[outlet_h_fluid]
type = LinearFVAdvectionDiffusionOutflowBC
boundary = right
variable = h_fluid
use_two_term_expansion = false
[]
[solid_zero_flux]
type = LinearFVAdvectionDiffusionFunctorNeumannBC
boundary = 'baffle baffle2 top_to_2 bottom_to_2'
variable = T_solid
functor = 0.0
diffusion_coeff = kappa_solid
[]
[]
[FunctorMaterials]
[forch]
type = GenericVectorFunctorMaterial
prop_names = forch
prop_values = '${forchheimer} ${forchheimer} ${forchheimer}'
[]
[porosity]
type = PiecewiseByBlockFunctorMaterial
prop_name = porosity
subdomain_to_prop_value = '1 1.0 2 0.5 3 1.0'
[]
[fluid_constants]
type = GenericFunctorMaterial
prop_names = 'cp_fluid kappa_fluid h_vol q_fluid_scaled'
prop_values = '${cp_fluid} ${fparse k_fluid/cp_fluid} ${h_vol} 0'
[]
[solid_constants]
type = GenericFunctorMaterial
prop_names = 'cp_solid kappa_solid'
prop_values = '${cp_solid} ${fparse k_solid/cp_solid}'
[]
[q_solid]
type = GenericFunctorMaterial
prop_names = 'q_solid'
prop_values = ${q_solid}
block = 2
[]
[q_solid_scaled]
type = ParsedFunctorMaterial
property_name = q_solid_scaled
functor_names = 'porosity q_solid'
expression = '(1 - porosity) * q_solid'
block = 2
[]
[fluid_enthalpy_material]
type = LinearFVEnthalpyFunctorMaterial
pressure = pressure
T_fluid = T_fluid
h = h_fluid
h_from_p_T_functor = h_from_p_T_functor
T_from_p_h_functor = T_from_p_h_functor
[]
[h_from_p_T_functor]
type = ParsedFunctorMaterial
property_name = h_from_p_T_functor
functor_names = 'T_fluid'
expression = '${cp_fluid} * T_fluid'
[]
[T_from_p_h_functor]
type = ParsedFunctorMaterial
property_name = T_from_p_h_functor
functor_names = 'h_fluid'
expression = 'h_fluid / ${cp_fluid}'
[]
[]
[Postprocessors]
[u_block_2]
type = ElementAverageValue
variable = superficial_u
block = 2
[]
[T_fluid_out]
type = SideAverageValue
variable = T_fluid
boundary = right
[]
[T_fluid_block_2]
type = ElementAverageValue
variable = T_fluid
block = 2
[]
[T_solid_block_2]
type = ElementAverageValue
variable = T_solid
block = 2
[]
[h_fluid_out]
type = SideAverageValue
variable = h_fluid
boundary = right
[]
[]
[AuxVariables]
[porosity_aux]
type = MooseLinearVariableFVReal
[]
[T_fluid]
type = MooseLinearVariableFVReal
initial_condition = ${T_initial}
[]
[]
[AuxKernels]
[por]
type = FunctorAux
variable = porosity_aux
functor = porosity
execute_on = 'NONLINEAR'
[]
[fluid_temperature]
type = FunctorAux
variable = T_fluid
functor = T_from_p_h
execute_on = 'NONLINEAR'
[]
[]
[VectorPostprocessors]
# Sample each x-cell once at its center.
[centerline]
type = LineValueSampler
variable = 'superficial_u T_fluid T_solid'
start_point = '0.0119047619047619 0.25 0'
end_point = '1.4880952380952381 0.25 0'
num_points = 30
sort_by = x
[]
[]
[Executioner]
type = SIMPLE
momentum_l_abs_tol = 1e-14
pressure_l_abs_tol = 1e-14
energy_l_abs_tol = 1e-14
solid_energy_l_abs_tol = 1e-14
momentum_l_tol = 0
pressure_l_tol = 0
energy_l_tol = 0
solid_energy_l_tol = 0
rhie_chow_user_object = rc
momentum_systems = 'u_system v_system'
pressure_system = pressure_system
energy_system = energy_system
solid_energy_system = solid_energy_system
momentum_equation_relaxation = 0.2
pressure_variable_relaxation = 0.1
energy_equation_relaxation = 0.8
num_iterations = 1000
# These outer tolerances stop once the velocity and zero-pressure fields have stabilized to
# substantially below the accuracy exercised by the temperature and velocity profile checks.
pressure_absolute_tolerance = 1e-6
momentum_absolute_tolerance = 1e-2
energy_absolute_tolerance = 1e-8
solid_energy_absolute_tolerance = 1e-8
momentum_petsc_options_iname = '-pc_type -pc_hypre_type'
momentum_petsc_options_value = 'hypre boomeramg'
pressure_petsc_options_iname = '-pc_type -pc_hypre_type'
pressure_petsc_options_value = 'hypre boomeramg'
energy_petsc_options_iname = '-pc_type -pc_hypre_type'
energy_petsc_options_value = 'hypre boomeramg'
solid_energy_petsc_options_iname = '-pc_type -pc_hypre_type'
solid_energy_petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
csv = true
execute_on = FINAL
[]