- inputThe mesh we want to modify
C++ Type:MeshGeneratorName
Controllable:No
Description:The mesh we want to modify
- mirror_normal_vectorA vector normal to (perpendicular/orthogonal to) the plane/line over which the reflection operation will be done
C++ Type:Eigen::Matrix<double, -1, 1, 0, -1, 1>
Unit:(no unit assumed)
Controllable:No
Description:A vector normal to (perpendicular/orthogonal to) the plane/line over which the reflection operation will be done
- mirror_pointAny point on the plane/line over which the reflection operation will be done
C++ Type:Eigen::Matrix<double, -1, 1, 0, -1, 1>
Unit:(no unit assumed)
Controllable:No
Description:Any point on the plane/line over which the reflection operation will be done
SymmetryTransformGenerator
Applies a symmetry transformation to the entire mesh.
Only the plane or mirror symmetry is currently implemented in the SymmetryTransformGenerator. Point or rotational symmetries are not implemented.
Overview
The SymmetryTransformGenerator makes a mirror reflection of a mesh across an arbitrary plane (or line in 2D) supplied by the user. All input is expected to be three dimensional even if the mesh in question is two dimensional; in such a case, let the z component be 0 (for example, mirror_normal_vector = '1 1 0').
The user sets the plane that will be reflected over by giving two vectors: a vector that gives the position of any given point on the line/plane from the origin; and, a vector that is normal (aka perpendicular/ orthogonal) to said line/plane. The normal vector establishes the slope of the plane of reflection.
Input Parameters
- enableTrueSet the enabled status of the MooseObject.
Default:True
C++ Type:bool
Controllable:No
Description:Set the enabled status of the MooseObject.
- save_with_nameKeep the mesh from this mesh generator in memory with the name specified
C++ Type:std::string
Controllable:No
Description:Keep the mesh from this mesh generator in memory with the name specified
Advanced Parameters
- nemesisFalseWhether or not to output the mesh file in the nemesisformat (only if output = true)
Default:False
C++ Type:bool
Controllable:No
Description:Whether or not to output the mesh file in the nemesisformat (only if output = true)
- outputFalseWhether or not to output the mesh file after generating the mesh
Default:False
C++ Type:bool
Controllable:No
Description:Whether or not to output the mesh file after generating the mesh
- show_infoFalseWhether or not to show mesh info after generating the mesh (bounding box, element types, sidesets, nodesets, subdomains, etc)
Default:False
C++ Type:bool
Controllable:No
Description:Whether or not to show mesh info after generating the mesh (bounding box, element types, sidesets, nodesets, subdomains, etc)
Debugging Parameters
Input Files
- (modules/navier_stokes/test/tests/finite_volume/ins/cht/conjugate_heat_transfer/cht_rob-rob.i)
- (test/tests/meshgenerators/symmetry_transform_generator/simple.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/cht/conjugate_heat_transfer/cht_neu-dir.i)
- (modules/navier_stokes/test/tests/finite_volume/pins/channel-flow/hydraulic-separators/separator-energy-nonorthogonal.i)
(modules/navier_stokes/test/tests/finite_volume/ins/cht/conjugate_heat_transfer/cht_rob-rob.i)
### benchmark sources:
### https://doi.org/10.1016/j.compfluid.2018.06.016
### https://doi.org/10.1016/0017-9310(74)90087-8
b = 0.01 # plate thickness
l = 0.2 # plate length
nxi = 24 # nx in the inlet/entrance region
nyf = 18 # ny in fluid
nxf = 24 # nx in the main fluid region
nys = 8 # ny in the solid domain
fx1_bias = 1.00 # bdry layer bias - fluid
fx2_bias = '${fparse 1.0/1.00}' # bdry layer bias - solid
fy_bias = 1.20 # bdry layer bias - fluid
sy_bias = '${fparse 1.0/1.05}' # bdry layer bias - solid
k_s = 0.2876
rho = 0.3525
mu = 3.95e-5
k = 0.06808
cp = 1142.6
vin = 12.0
Tin = 1000.0
T_s_bottom = 600.0
P_out = 1.03e5
h_s = 1.0
h_f = 1.0
advected_interp_method = 'upwind'
[Mesh]
[fluid_channel]
type = GeneratedMeshGenerator
dim = 2
nx = ${nxf}
ny = ${nyf}
xmin = 0
xmax = ${l}
ymin = 0
ymax = '${fparse 10.0*b}'
subdomain_ids = '1'
subdomain_name = 'fluid'
bias_x = '${fx1_bias}'
bias_y = '${fparse fy_bias}'
boundary_name_prefix = 'fluid'
[]
[solid_base]
type = GeneratedMeshGenerator
dim = 2
nx = ${nxf}
ny = ${nys}
xmin = 0
xmax = ${l}
ymin = '${fparse -b}'
ymax = 0
subdomain_ids = '2'
subdomain_name = 'solid'
bias_x = ${fx1_bias}
bias_y = '${fparse sy_bias}'
boundary_id_offset = 10
boundary_name_prefix = 'solid'
[]
[entrance]
type = GeneratedMeshGenerator
dim = 2
nx = '${fparse 2.0*nxi}'
ny = ${nyf}
xmin = '${fparse -2.0*l}'
xmax = 0
ymin = 0
ymax = '${fparse 10.0*b}'
subdomain_ids = '0'
subdomain_name = 'entrance'
bias_x = ${fx2_bias}
bias_y = '${fparse fy_bias}'
boundary_id_offset = 20
boundary_name_prefix = 'ent'
[]
[smg]
type = StitchedMeshGenerator
inputs = 'entrance fluid_channel solid_base'
stitch_boundaries_pairs = 'ent_right fluid_left;
fluid_bottom solid_top'
prevent_boundary_ids_overlap = false
[]
[interface]
type = SideSetsBetweenSubdomainsGenerator
input = 'smg'
primary_block = 'fluid'
paired_block = 'solid'
new_boundary = interface
[]
[symmetry_transform]
type = SymmetryTransformGenerator
input = interface
mirror_point = '0 0 0'
mirror_normal_vector = '0 1 0'
[]
inactive = 'symmetry_transform'
[]
[Problem]
linear_sys_names = 'u_system v_system pressure_system energy_system solid_energy_system'
previous_nl_solution_required = true
[]
[UserObjects]
[rc]
type = RhieChowMassFlux
u = vel_x
v = vel_y
pressure = pressure
rho = ${rho}
p_diffusion_kernel = p_diffusion
block = '0 1'
[]
[]
[Variables]
[vel_x]
type = MooseLinearVariableFVReal
initial_condition = ${vin}
solver_sys = u_system
block = '0 1'
[]
[vel_y]
type = MooseLinearVariableFVReal
solver_sys = v_system
initial_condition = 0.0
block = '0 1'
[]
[pressure]
type = MooseLinearVariableFVReal
solver_sys = pressure_system
initial_condition = ${P_out}
block = '0 1'
[]
[T_fluid]
type = MooseLinearVariableFVReal
solver_sys = energy_system
initial_condition = ${Tin}
block = '0 1'
[]
[T_solid]
type = MooseLinearVariableFVReal
solver_sys = solid_energy_system
initial_condition = ${T_s_bottom}
block = 2
[]
[]
[LinearFVKernels]
[u_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_x
advected_interp_method = ${advected_interp_method}
mu = ${mu}
u = vel_x
v = vel_y
momentum_component = 'x'
rhie_chow_user_object = 'rc'
use_nonorthogonal_correction = false
[]
[v_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_y
advected_interp_method = ${advected_interp_method}
mu = ${mu}
u = vel_x
v = vel_y
momentum_component = 'y'
rhie_chow_user_object = 'rc'
use_nonorthogonal_correction = false
[]
[u_pressure]
type = LinearFVMomentumPressure
variable = vel_x
pressure = pressure
momentum_component = 'x'
[]
[v_pressure]
type = LinearFVMomentumPressure
variable = vel_y
pressure = pressure
momentum_component = 'y'
[]
[p_diffusion]
type = LinearFVAnisotropicDiffusion
variable = pressure
diffusion_tensor = Ainv
use_nonorthogonal_correction = false
[]
[HbyA_divergence]
type = LinearFVDivergence
variable = pressure
face_flux = HbyA
force_boundary_execution = true
[]
[h_advection]
type = LinearFVEnergyAdvection
variable = T_fluid
advected_quantity = temperature
cp = ${cp}
advected_interp_method = ${advected_interp_method}
rhie_chow_user_object = 'rc'
[]
[conduction]
type = LinearFVDiffusion
variable = T_fluid
diffusion_coeff = ${k}
use_nonorthogonal_correction = false
[]
[solid-conduction]
type = LinearFVDiffusion
variable = T_solid
diffusion_coeff = ${k_s}
use_nonorthogonal_correction = false
[]
[]
[LinearFVBCs]
# velocity BCs
[inlet-u]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'ent_left'
variable = vel_x
functor = ${vin}
[]
[inlet-v]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'ent_left'
variable = vel_y
functor = '0.000'
[]
[walls-u]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'ent_bottom interface'
variable = vel_x
functor = 0.0
[]
[walls-v]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'ent_bottom interface'
variable = vel_y
functor = 0.0
[]
[outlet_p]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'fluid_right'
variable = pressure
functor = ${P_out}
[]
[outlet_u]
type = LinearFVAdvectionDiffusionOutflowBC
boundary = 'fluid_right'
variable = vel_x
use_two_term_expansion = false
[]
[outlet_v]
type = LinearFVAdvectionDiffusionOutflowBC
boundary = 'fluid_right'
variable = vel_y
use_two_term_expansion = false
[]
# freestream BCs for top of fluid domain
[freestream_u]
type = LinearFVAdvectionDiffusionOutflowBC
boundary = 'fluid_top ent_top'
variable = vel_x
use_two_term_expansion = false
[]
[freestream_v]
type = LinearFVAdvectionDiffusionOutflowBC
boundary = 'fluid_top ent_top'
variable = vel_y
use_two_term_expansion = false
[]
[freestream_p]
type = LinearFVAdvectionDiffusionFunctorNeumannBC
boundary = 'fluid_top ent_top'
variable = pressure
functor = 0
[]
# temperature BCs
[inlet_T]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = T_fluid
functor = ${Tin}
boundary = 'ent_left'
[]
[heated_wall_solid]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = T_solid
functor = ${T_s_bottom}
boundary = 'solid_bottom'
[]
[insulated_fluid]
type = LinearFVAdvectionDiffusionFunctorNeumannBC
variable = T_fluid
functor = 0
boundary = 'ent_top ent_bottom fluid_top'
[]
[insulated_solid]
type = LinearFVAdvectionDiffusionFunctorNeumannBC
variable = T_solid
functor = 0
boundary = 'solid_left solid_right'
[]
[outlet_T]
type = LinearFVAdvectionDiffusionOutflowBC
variable = T_fluid
use_two_term_expansion = false
boundary = 'fluid_right'
[]
[fluid_solid]
type = LinearFVRobinCHTBC
variable = T_fluid
boundary = interface
h = ${h_f}
incoming_flux = heat_flux_to_fluid_interface
surface_temperature = interface_temperature_solid_interface
thermal_conductivity = ${k}
[]
[solid_fluid]
type = LinearFVRobinCHTBC
variable = T_solid
boundary = interface
h = ${h_s}
incoming_flux = heat_flux_to_solid_interface
surface_temperature = interface_temperature_fluid_interface
thermal_conductivity = ${k_s}
[]
[]
[FunctorMaterials]
[rhocpT]
property_name = 'rhocpT'
type = ParsedFunctorMaterial
functor_names = 'T_fluid'
expression = '${rho}*${cp}*T_fluid'
[]
[]
[Postprocessors]
[h_in]
type = VolumetricFlowRate
boundary = 'ent_left'
vel_x = vel_x
vel_y = vel_y
rhie_chow_user_object = rc
advected_quantity = 'rhocpT'
subtract_mesh_velocity = false
[]
[h_out]
type = VolumetricFlowRate
boundary = 'fluid_right fluid_top ent_top interface'
vel_x = vel_x
vel_y = vel_y
rhie_chow_user_object = rc
advected_quantity = 'rhocpT'
advected_interp_method = upwind
subtract_mesh_velocity = false
[]
[]
[VectorPostprocessors]
[y_vs_ts]
type = LineValueSampler
variable = 'T_solid'
start_point = '0.05 -1e-9 0' # making sure we are always in the domain
end_point = '0.05 ${fparse -b+1e-9} 0'
num_points = 8
sort_by = id
warn_discontinuous_face_values = false
[]
[y_vs_tf]
type = LineValueSampler
variable = 'T_fluid'
start_point = '0.05 1e-9 0' # making sure we are always in the domain
end_point = '0.05 ${fparse b-1e-9} 0'
num_points = 12
sort_by = id
warn_discontinuous_face_values = false
[]
[]
[Executioner]
type = SIMPLE
num_iterations = 1000
momentum_systems = 'u_system v_system'
pressure_system = 'pressure_system'
rhie_chow_user_object = 'rc'
momentum_l_abs_tol = 1e-10
pressure_l_abs_tol = 1e-10
momentum_l_tol = 0
pressure_l_tol = 0
momentum_equation_relaxation = 0.9
pressure_variable_relaxation = 0.3
momentum_absolute_tolerance = 1e-7
pressure_absolute_tolerance = 1e-7
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_system = 'energy_system'
solid_energy_system = 'solid_energy_system'
energy_l_abs_tol = 1e-10
solid_energy_l_abs_tol = 1e-10
energy_l_tol = 0
solid_energy_l_tol = 0
energy_equation_relaxation = 1.0
energy_absolute_tolerance = 1e-7
solid_energy_absolute_tolerance = 1e-7
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'
cht_interfaces = 'interface'
cht_solid_flux_relaxation = 1.0
cht_fluid_flux_relaxation = 1.0
cht_solid_temperature_relaxation = 1.0
cht_fluid_temperature_relaxation = 1.0
max_cht_fpi = 2
print_fields = false
[]
[Outputs]
exodus = true
csv = true
execute_on = timestep_end
[]
(test/tests/meshgenerators/symmetry_transform_generator/simple.i)
[Mesh]
[file]
type = GeneratedMeshGenerator
dim = 2
nx = 2
ny = 3
[]
[mirror]
type = SymmetryTransformGenerator
input = file
mirror_point = "0 1 0"
mirror_normal_vector = "0 1 0"
[]
[stitch]
type = StitchedMeshGenerator
inputs = 'file mirror'
stitch_boundaries_pairs = 'top top'
[]
[]
(modules/navier_stokes/test/tests/finite_volume/ins/cht/conjugate_heat_transfer/cht_neu-dir.i)
### benchmark sources:
### https://doi.org/10.1016/j.compfluid.2018.06.016
### https://doi.org/10.1016/0017-9310(74)90087-8
b = 0.01 # plate thickness
l = 0.2 # plate length
nxi = 24 # nx in the inlet/entrance region
nyf = 18 # ny in fluid
nxf = 24 # nx in the main fluid region
nys = 8 # ny in the solid domain
fx1_bias = 1.00 # bdry layer bias - fluid
fx2_bias = '${fparse 1.0/1.00}' # bdry layer bias - solid
fy_bias = 1.20 # bdry layer bias - fluid
sy_bias = '${fparse 1.0/1.05}' # bdry layer bias - solid
k_s = 0.2876
rho = 0.3525
mu = 3.95e-5
k = 0.06808
cp = 1142.6
vin = 12.0
Tin = 1000.0
T_s_bottom = 600.0
P_out = 1.03e5
h_s = 0.0
advected_interp_method = 'upwind'
[Mesh]
[fluid_channel]
type = GeneratedMeshGenerator
dim = 2
nx = ${nxf}
ny = ${nyf}
xmin = 0
xmax = ${l}
ymin = 0
ymax = '${fparse 10.0*b}'
subdomain_ids = '1'
subdomain_name = 'fluid'
bias_x = '${fx1_bias}'
bias_y = '${fparse fy_bias}'
boundary_name_prefix = 'fluid'
[]
[solid_base]
type = GeneratedMeshGenerator
dim = 2
nx = ${nxf}
ny = ${nys}
xmin = 0
xmax = ${l}
ymin = '${fparse -b}'
ymax = 0
subdomain_ids = '2'
subdomain_name = 'solid'
bias_x = ${fx1_bias}
bias_y = '${fparse sy_bias}'
boundary_id_offset = 10
boundary_name_prefix = 'solid'
[]
[entrance]
type = GeneratedMeshGenerator
dim = 2
nx = '${fparse 2.0*nxi}'
ny = ${nyf}
xmin = '${fparse -2.0*l}'
xmax = 0
ymin = 0
ymax = '${fparse 10.0*b}'
subdomain_ids = '0'
subdomain_name = 'entrance'
bias_x = ${fx2_bias}
bias_y = '${fparse fy_bias}'
boundary_id_offset = 20
boundary_name_prefix = 'ent'
[]
[smg]
type = StitchedMeshGenerator
inputs = 'entrance fluid_channel solid_base'
stitch_boundaries_pairs = 'ent_right fluid_left;
fluid_bottom solid_top'
prevent_boundary_ids_overlap = false
[]
[interface]
type = SideSetsBetweenSubdomainsGenerator
input = 'smg'
primary_block = 'fluid'
paired_block = 'solid'
new_boundary = interface
[]
[symmetry_transform]
type = SymmetryTransformGenerator
input = interface
mirror_point = '0 0 0'
mirror_normal_vector = '0 1 0'
[]
inactive = 'symmetry_transform'
[]
[Problem]
linear_sys_names = 'u_system v_system pressure_system energy_system solid_energy_system'
previous_nl_solution_required = true
[]
[UserObjects]
[rc]
type = RhieChowMassFlux
u = vel_x
v = vel_y
pressure = pressure
rho = ${rho}
p_diffusion_kernel = p_diffusion
block = '0 1'
[]
[]
[Variables]
[vel_x]
type = MooseLinearVariableFVReal
initial_condition = ${vin}
solver_sys = u_system
block = '0 1'
[]
[vel_y]
type = MooseLinearVariableFVReal
solver_sys = v_system
initial_condition = 0.0
block = '0 1'
[]
[pressure]
type = MooseLinearVariableFVReal
solver_sys = pressure_system
initial_condition = ${P_out}
block = '0 1'
[]
[T_fluid]
type = MooseLinearVariableFVReal
solver_sys = energy_system
initial_condition = ${Tin}
block = '0 1'
[]
[T_solid]
type = MooseLinearVariableFVReal
solver_sys = solid_energy_system
initial_condition = ${T_s_bottom}
block = 2
[]
[]
[LinearFVKernels]
[u_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_x
advected_interp_method = ${advected_interp_method}
mu = ${mu}
u = vel_x
v = vel_y
momentum_component = 'x'
rhie_chow_user_object = 'rc'
use_nonorthogonal_correction = false
[]
[v_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_y
advected_interp_method = ${advected_interp_method}
mu = ${mu}
u = vel_x
v = vel_y
momentum_component = 'y'
rhie_chow_user_object = 'rc'
use_nonorthogonal_correction = false
[]
[u_pressure]
type = LinearFVMomentumPressure
variable = vel_x
pressure = pressure
momentum_component = 'x'
[]
[v_pressure]
type = LinearFVMomentumPressure
variable = vel_y
pressure = pressure
momentum_component = 'y'
[]
[p_diffusion]
type = LinearFVAnisotropicDiffusion
variable = pressure
diffusion_tensor = Ainv
use_nonorthogonal_correction = false
[]
[HbyA_divergence]
type = LinearFVDivergence
variable = pressure
face_flux = HbyA
force_boundary_execution = true
[]
[h_advection]
type = LinearFVEnergyAdvection
variable = T_fluid
advected_quantity = temperature
cp = ${cp}
advected_interp_method = ${advected_interp_method}
rhie_chow_user_object = 'rc'
[]
[conduction]
type = LinearFVDiffusion
variable = T_fluid
diffusion_coeff = ${k}
use_nonorthogonal_correction = false
[]
[solid-conduction]
type = LinearFVDiffusion
variable = T_solid
diffusion_coeff = ${k_s}
use_nonorthogonal_correction = false
[]
[]
[LinearFVBCs]
# velocity BCs
[inlet-u]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'ent_left'
variable = vel_x
functor = ${vin}
[]
[inlet-v]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'ent_left'
variable = vel_y
functor = '0.000'
[]
[walls-u]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'ent_bottom interface'
variable = vel_x
functor = 0.0
[]
[walls-v]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'ent_bottom interface'
variable = vel_y
functor = 0.0
[]
[outlet_p]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'fluid_right'
variable = pressure
functor = ${P_out}
[]
[outlet_u]
type = LinearFVAdvectionDiffusionOutflowBC
boundary = 'fluid_right'
variable = vel_x
use_two_term_expansion = false
[]
[outlet_v]
type = LinearFVAdvectionDiffusionOutflowBC
boundary = 'fluid_right'
variable = vel_y
use_two_term_expansion = false
[]
# freestream BCs for top of fluid domain
[freestream_u]
type = LinearFVAdvectionDiffusionOutflowBC
boundary = 'fluid_top ent_top'
variable = vel_x
use_two_term_expansion = false
[]
[freestream_v]
type = LinearFVAdvectionDiffusionOutflowBC
boundary = 'fluid_top ent_top'
variable = vel_y
use_two_term_expansion = false
[]
[freestream_p]
type = LinearFVAdvectionDiffusionFunctorNeumannBC
boundary = 'fluid_top ent_top'
variable = pressure
functor = 0
[]
# temperature BCs
[inlet_T]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = T_fluid
functor = ${Tin}
boundary = 'ent_left'
[]
[heated_wall_solid]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = T_solid
functor = ${T_s_bottom}
boundary = 'solid_bottom'
[]
[insulated_fluid]
type = LinearFVAdvectionDiffusionFunctorNeumannBC
variable = T_fluid
functor = 0
boundary = 'ent_bottom ent_top fluid_top'
[]
[insulated_solid]
type = LinearFVAdvectionDiffusionFunctorNeumannBC
variable = T_solid
functor = 0
boundary = 'solid_left solid_right'
[]
[outlet_T]
type = LinearFVAdvectionDiffusionOutflowBC
variable = T_fluid
use_two_term_expansion = false
boundary = 'fluid_right'
[]
[fluid_solid]
type = LinearFVDirichletCHTBC
variable = T_fluid
boundary = interface
functor = interface_temperature_solid_interface
[]
[solid_fluid]
type = LinearFVRobinCHTBC
variable = T_solid
boundary = interface
h = ${h_s}
thermal_conductivity = ${k_s}
incoming_flux = heat_flux_to_solid_interface
surface_temperature = interface_temperature_fluid_interface
[]
[]
[FunctorMaterials]
[rhocpT]
property_name = 'rhocpT'
type = ParsedFunctorMaterial
functor_names = 'T_fluid'
expression = '${rho}*${cp}*T_fluid'
[]
[]
[Postprocessors]
[h_in]
type = VolumetricFlowRate
boundary = 'ent_left'
vel_x = vel_x
vel_y = vel_y
rhie_chow_user_object = rc
advected_quantity = 'rhocpT'
subtract_mesh_velocity = false
[]
[h_out]
type = VolumetricFlowRate
boundary = 'fluid_right fluid_top ent_top interface'
vel_x = vel_x
vel_y = vel_y
rhie_chow_user_object = rc
advected_quantity = 'rhocpT'
advected_interp_method = upwind
subtract_mesh_velocity = false
[]
[]
[VectorPostprocessors]
[y_vs_ts]
type = LineValueSampler
variable = 'T_solid'
start_point = '0.05 -1e-9 0' # making sure we are always in the domain
end_point = '0.05 ${fparse -b+1e-9} 0'
num_points = 8
sort_by = id
warn_discontinuous_face_values = false
[]
[y_vs_tf]
type = LineValueSampler
variable = 'T_fluid'
start_point = '0.05 1e-9 0' # making sure we are always in the domain
end_point = '0.05 ${fparse b-1e-9} 0'
num_points = 12
sort_by = id
warn_discontinuous_face_values = false
[]
[]
[Executioner]
type = SIMPLE
num_iterations = 1000
momentum_systems = 'u_system v_system'
pressure_system = 'pressure_system'
rhie_chow_user_object = 'rc'
momentum_l_abs_tol = 1e-10
pressure_l_abs_tol = 1e-10
momentum_l_tol = 0
pressure_l_tol = 0
momentum_equation_relaxation = 0.9
pressure_variable_relaxation = 0.3
momentum_absolute_tolerance = 1e-7
pressure_absolute_tolerance = 1e-7
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_system = 'energy_system'
solid_energy_system = 'solid_energy_system'
energy_l_abs_tol = 1e-10
solid_energy_l_abs_tol = 1e-10
energy_l_tol = 0
solid_energy_l_tol = 0
energy_equation_relaxation = 1.0
energy_absolute_tolerance = 1e-7
solid_energy_absolute_tolerance = 1e-7
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'
cht_interfaces = 'interface'
cht_solid_flux_relaxation = 0.4
cht_fluid_flux_relaxation = 0.4
cht_solid_temperature_relaxation = 0.4
cht_fluid_temperature_relaxation = 0.4
max_cht_fpi = 3
print_fields = false
[]
[Outputs]
csv = true
execute_on = timestep_end
[]
(modules/navier_stokes/test/tests/finite_volume/pins/channel-flow/hydraulic-separators/separator-energy-nonorthogonal.i)
# This test is designed to check for energy conservation
# in separated channels which are described using a nonorthogonal mesh.
# The two inlet temperatures should be preserved at the outlets.
rho=1.1
mu=0.6
k=2.1
cp=5.5
advected_interp_method='upwind'
velocity_interp_method='rc'
[Mesh]
[file]
type = FileMeshGenerator
file = diverging.msh
[]
[mirror]
type = SymmetryTransformGenerator
input = file
mirror_point = "0 0 0"
mirror_normal_vector = "1 0 0"
[]
[stitch]
type = StitchedMeshGenerator
inputs = 'file mirror'
stitch_boundaries_pairs = 'left left'
[]
[subdomain1]
type = ParsedSubdomainMeshGenerator
input = stitch
combinatorial_geometry = 'x > 0'
block_id = 1
[]
[subdomain2]
type = ParsedSubdomainMeshGenerator
input = subdomain1
combinatorial_geometry = 'x < 0'
block_id = 2
[]
[separator]
type = ParsedGenerateSideset
input = subdomain2
combinatorial_geometry = 'x > -0.00001 & x < 0.00001'
replace = true
new_sideset_name = separator
[]
[inlet-1]
type = ParsedGenerateSideset
input = separator
combinatorial_geometry = 'y < 0.00001 & x < 0'
replace = true
new_sideset_name = inlet-1
[]
[inlet-2]
type = ParsedGenerateSideset
input = inlet-1
combinatorial_geometry = 'y < 0.00001 & x > 0'
replace = true
new_sideset_name = inlet-2
[]
[outlet-1]
type = ParsedGenerateSideset
input = inlet-2
combinatorial_geometry = 'y > 20.999999 & x < 0'
replace = true
new_sideset_name = outlet-1
[]
[outlet-2]
type = ParsedGenerateSideset
input = outlet-1
combinatorial_geometry = 'y > 20.999999 & x > 0'
replace = true
new_sideset_name = outlet-2
[]
uniform_refine = 1
[]
[GlobalParams]
rhie_chow_user_object = 'rc'
porosity = porosity
[]
[UserObjects]
[rc]
type = PINSFVRhieChowInterpolator
u = superficial_vel_x
v = superficial_vel_y
pressure = pressure
[]
[]
[Variables]
[superficial_vel_x]
type = PINSFVSuperficialVelocityVariable
[]
[superficial_vel_y]
type = PINSFVSuperficialVelocityVariable
initial_condition = 0.1
[]
[pressure]
type = BernoulliPressureVariable
u = superficial_vel_x
v = superficial_vel_y
rho = ${rho}
[]
[T_fluid]
type = INSFVEnergyVariable
initial_condition = 300
[]
[]
[FVKernels]
[mass]
type = PINSFVMassAdvection
variable = pressure
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
[]
[u_advection]
type = PINSFVMomentumAdvection
variable = superficial_vel_x
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
momentum_component = 'x'
[]
[u_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'
[]
[v_advection]
type = PINSFVMomentumAdvection
variable = superficial_vel_y
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
momentum_component = 'y'
[]
[v_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'
[]
[temp_conduction]
type = FVDiffusion
coeff = ${k}
variable = T_fluid
[]
[temp_advection]
type = INSFVEnergyAdvection
variable = T_fluid
[]
[]
[FVBCs]
[inlet-u]
type = INSFVInletVelocityBC
boundary = 'inlet-1 inlet-2'
variable = superficial_vel_x
functor = '0.0'
[]
[inlet-v-1]
type = INSFVInletVelocityBC
boundary = 'inlet-1'
variable = superficial_vel_y
functor = 0.1
[]
[inlet-v-2]
type = INSFVInletVelocityBC
boundary = 'inlet-2'
variable = superficial_vel_y
functor = 0.2
[]
[inlet-T-1]
type = FVDirichletBC
variable = T_fluid
boundary = 'inlet-1'
value = 310
[]
[inlet-T-2]
type = FVDirichletBC
variable = T_fluid
boundary = 'inlet-2'
value = 350
[]
[walls-u]
type = INSFVNaturalFreeSlipBC
boundary = 'right'
variable = superficial_vel_x
momentum_component = 'x'
[]
[walls-v]
type = INSFVNaturalFreeSlipBC
boundary = 'right'
variable = superficial_vel_y
momentum_component = 'y'
[]
[separator-u]
type = INSFVVelocityHydraulicSeparatorBC
boundary = 'separator'
variable = superficial_vel_x
momentum_component = 'x'
[]
[separator-v]
type = INSFVVelocityHydraulicSeparatorBC
boundary = 'separator'
variable = superficial_vel_y
momentum_component = 'y'
[]
[separator-p]
type = INSFVScalarFieldSeparatorBC
boundary = 'separator'
variable = pressure
[]
[separator-T]
type = INSFVScalarFieldSeparatorBC
boundary = 'separator'
variable = T_fluid
[]
[outlet_p]
type = INSFVOutletPressureBC
boundary = 'outlet-2 outlet-1'
variable = pressure
function = 0.4
[]
[]
[FunctorMaterials]
[porosity-1]
type = ADGenericFunctorMaterial
prop_names = 'porosity'
prop_values = '1.0'
block = '1'
[]
[porosity-2]
type = ADGenericFunctorMaterial
prop_names = 'porosity'
prop_values = '0.5'
block = '2'
[]
[speed]
type = PINSFVSpeedFunctorMaterial
superficial_vel_x = superficial_vel_x
superficial_vel_y = superficial_vel_y
porosity = porosity
[]
[ins_fv]
type = INSFVEnthalpyFunctorMaterial
temperature = 'T_fluid'
rho = ${rho}
cp = ${cp}
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = ' lu NONZERO 1e-10'
line_search = 'none'
nl_rel_tol = 1e-10
[]
[Postprocessors]
[outlet_T1]
type = SideAverageValue
variable = 'T_fluid'
boundary = 'outlet-1'
[]
[outlet_T2]
type = SideAverageValue
variable = 'T_fluid'
boundary = 'outlet-2'
[]
[]
[Outputs]
csv = true
execute_on = final
[]