From 08bd243e35a93b8c0efe950c6c649b93799b330e Mon Sep 17 00:00:00 2001 From: "Joshua E. Hansel" Date: Thu, 19 Sep 2024 11:13:15 -0500 Subject: [PATCH] Added scale parameter to HeatTransferFromHeatStructure1Phase Refs #25275 --- .../components/HSBoundaryAmbientConvection.md | 4 +- .../HeatTransferFromHeatStructure1Phase.md | 11 +- ...DHeatFluxFromHeatStructure3EqnUserObject.h | 3 + ...lowChannelHeatStructureCouplerUserObject.h | 4 +- .../HeatTransferFromHeatStructure1Phase.C | 3 + ...DHeatFluxFromHeatStructure3EqnUserObject.C | 7 +- ...lowChannelHeatStructureCouplerUserObject.C | 2 + .../fin_enhancement.i | 240 ++++++++++++++++++ .../gold/fin_enhancement_out.csv | 12 + .../tests | 7 + 10 files changed, 286 insertions(+), 7 deletions(-) create mode 100644 modules/thermal_hydraulics/test/tests/components/heat_transfer_from_heat_structure_1phase/fin_enhancement.i create mode 100644 modules/thermal_hydraulics/test/tests/components/heat_transfer_from_heat_structure_1phase/gold/fin_enhancement_out.csv diff --git a/modules/thermal_hydraulics/doc/content/source/components/HSBoundaryAmbientConvection.md b/modules/thermal_hydraulics/doc/content/source/components/HSBoundaryAmbientConvection.md index 420aea7e82a2..b6ac9f5739b8 100644 --- a/modules/thermal_hydraulics/doc/content/source/components/HSBoundaryAmbientConvection.md +++ b/modules/thermal_hydraulics/doc/content/source/components/HSBoundaryAmbientConvection.md @@ -12,7 +12,9 @@ The parameter [!param](/Components/HSBoundaryAmbientConvection/T_ambient) gives [!param](/Components/HSBoundaryAmbientConvection/htc_ambient) gives the heat transfer coefficient $\mathcal{H}$. The parameter [!param](/Components/HSBoundaryAmbientConvection/scale) specifies -the name of a [functor](Functors/index.md) $f$ that can scale the boundary conditions. +the name of a [functor](Functors/index.md) $f$ that can scale the boundary conditions, for +example, a functor material property created with [FinEnhancementFactorFunctorMaterial.md] +for heat transfer enhancement due to fins. !syntax parameters /Components/HSBoundaryAmbientConvection diff --git a/modules/thermal_hydraulics/doc/content/source/components/HeatTransferFromHeatStructure1Phase.md b/modules/thermal_hydraulics/doc/content/source/components/HeatTransferFromHeatStructure1Phase.md index 93a9452f7bb5..d8251eb19749 100644 --- a/modules/thermal_hydraulics/doc/content/source/components/HeatTransferFromHeatStructure1Phase.md +++ b/modules/thermal_hydraulics/doc/content/source/components/HeatTransferFromHeatStructure1Phase.md @@ -21,6 +21,11 @@ side of the connected heat structure that is coupled to the flow channel. The flow channel axis must be parallel to the heat structure axis and have the same discretization along their axes. +The parameter [!param](/Components/HeatTransferFromHeatStructure1Phase/scale) specifies +the name of a [functor](Functors/index.md) $f$ that can scale the heat flux, for +example, a functor material property created with [FinEnhancementFactorFunctorMaterial.md] +for heat transfer enhancement due to fins. + !syntax parameters /Components/HeatTransferFromHeatStructure1Phase ## Formulation @@ -30,15 +35,15 @@ and heat structure, with the flow channel receiving the following wall heat flux: !equation -q_\text{wall} = \mathcal{H}(T_s - T) \eqc +q_\text{wall} = f \mathcal{H}(T_s - T) \eqc where $\mathcal{H}$ is the heat transfer coefficient, $T_s$ is the heat -structure surface temperature, and $T$ is the fluid temperature. On the heat +structure surface temperature, $T$ is the fluid temperature, and $f$ is an optional scaling factor. On the heat structure side, the incoming boundary flux is the opposite of that going into the flow channel: !equation -q_b = -q_\text{wall} = \mathcal{H}(T - T_s) \eqp +q_b = -q_\text{wall} = f \mathcal{H}(T - T_s) \eqp !syntax inputs /Components/HeatTransferFromHeatStructure1Phase diff --git a/modules/thermal_hydraulics/include/userobjects/ADHeatFluxFromHeatStructure3EqnUserObject.h b/modules/thermal_hydraulics/include/userobjects/ADHeatFluxFromHeatStructure3EqnUserObject.h index 18344b2a9223..d26f6a234643 100644 --- a/modules/thermal_hydraulics/include/userobjects/ADHeatFluxFromHeatStructure3EqnUserObject.h +++ b/modules/thermal_hydraulics/include/userobjects/ADHeatFluxFromHeatStructure3EqnUserObject.h @@ -26,6 +26,9 @@ class ADHeatFluxFromHeatStructure3EqnUserObject : public ADHeatFluxFromHeatStruc const ADMaterialProperty & _Hw; const ADMaterialProperty & _T; + /// Functor by which to scale the heat flux + const Moose::Functor & _scale; + public: static InputParameters validParams(); }; diff --git a/modules/thermal_hydraulics/include/userobjects/FlowChannelHeatStructureCouplerUserObject.h b/modules/thermal_hydraulics/include/userobjects/FlowChannelHeatStructureCouplerUserObject.h index 341c7cc2d7b5..3fa97eb2764d 100644 --- a/modules/thermal_hydraulics/include/userobjects/FlowChannelHeatStructureCouplerUserObject.h +++ b/modules/thermal_hydraulics/include/userobjects/FlowChannelHeatStructureCouplerUserObject.h @@ -11,11 +11,13 @@ #include "ElementUserObject.h" #include "MeshAlignment.h" +#include "ADFunctorInterface.h" /** * Base class for caching quantities computed between flow channels and heat structures. */ -class FlowChannelHeatStructureCouplerUserObject : public ElementUserObject +class FlowChannelHeatStructureCouplerUserObject : public ElementUserObject, + public ADFunctorInterface { public: FlowChannelHeatStructureCouplerUserObject(const InputParameters & parameters); diff --git a/modules/thermal_hydraulics/src/components/HeatTransferFromHeatStructure1Phase.C b/modules/thermal_hydraulics/src/components/HeatTransferFromHeatStructure1Phase.C index 43287781cc46..f9bf7f8331c3 100644 --- a/modules/thermal_hydraulics/src/components/HeatTransferFromHeatStructure1Phase.C +++ b/modules/thermal_hydraulics/src/components/HeatTransferFromHeatStructure1Phase.C @@ -23,6 +23,8 @@ HeatTransferFromHeatStructure1Phase::validParams() InputParameters params = HeatTransferFromTemperature1Phase::validParams(); params += HSBoundaryInterface::validParams(); + params.addParam("scale", 1.0, "Functor by which to scale the heat flux"); + params.addClassDescription("Connects a 1-phase flow channel and a heat structure"); return params; @@ -143,6 +145,7 @@ HeatTransferFromHeatStructure1Phase::addMooseObjects() params.set>("P_hf") = {_P_hf_name}; params.set("Hw") = _Hw_1phase_name; params.set("T") = FlowModelSinglePhase::TEMPERATURE; + params.set("scale") = getParam("scale"); params.set("execute_on") = execute_on; getTHMProblem().addUserObject(class_name, heat_flux_uo_name, params); } diff --git a/modules/thermal_hydraulics/src/userobjects/ADHeatFluxFromHeatStructure3EqnUserObject.C b/modules/thermal_hydraulics/src/userobjects/ADHeatFluxFromHeatStructure3EqnUserObject.C index 8b6d69780216..dafdca9e8ec9 100644 --- a/modules/thermal_hydraulics/src/userobjects/ADHeatFluxFromHeatStructure3EqnUserObject.C +++ b/modules/thermal_hydraulics/src/userobjects/ADHeatFluxFromHeatStructure3EqnUserObject.C @@ -18,6 +18,7 @@ ADHeatFluxFromHeatStructure3EqnUserObject::validParams() params.addRequiredParam("T_wall", "Wall temperature"); params.addRequiredParam("T", "Fluid temperature"); params.addRequiredParam("Hw", "Convective heat transfer coefficient"); + params.addParam("scale", 1.0, "Functor by which to scale the heat flux"); params.addClassDescription( "Cache the heat flux between a single phase flow channel and a heat structure"); return params; @@ -28,12 +29,14 @@ ADHeatFluxFromHeatStructure3EqnUserObject::ADHeatFluxFromHeatStructure3EqnUserOb : ADHeatFluxFromHeatStructureBaseUserObject(parameters), _T_wall(getADMaterialProperty("T_wall")), _Hw(getADMaterialProperty("Hw")), - _T(getADMaterialProperty("T")) + _T(getADMaterialProperty("T")), + _scale(getFunctor("scale")) { } ADReal ADHeatFluxFromHeatStructure3EqnUserObject::computeQpHeatFlux() { - return _Hw[_qp] * (_T_wall[_qp] - _T[_qp]); + const Moose::ElemQpArg space_arg = {_current_elem, _qp, _qrule, _q_point[_qp]}; + return _Hw[_qp] * (_T_wall[_qp] - _T[_qp]) * _scale(space_arg, Moose::currentState()); } diff --git a/modules/thermal_hydraulics/src/userobjects/FlowChannelHeatStructureCouplerUserObject.C b/modules/thermal_hydraulics/src/userobjects/FlowChannelHeatStructureCouplerUserObject.C index b22551e45796..b90cc1e0655a 100644 --- a/modules/thermal_hydraulics/src/userobjects/FlowChannelHeatStructureCouplerUserObject.C +++ b/modules/thermal_hydraulics/src/userobjects/FlowChannelHeatStructureCouplerUserObject.C @@ -14,6 +14,7 @@ InputParameters FlowChannelHeatStructureCouplerUserObject::validParams() { InputParameters params = ElementUserObject::validParams(); + params += ADFunctorInterface::validParams(); params.addRequiredParam("_mesh_alignment", "Mesh alignment object"); params.addClassDescription( "Base class for caching quantities computed between flow channels and heat structures."); @@ -23,6 +24,7 @@ FlowChannelHeatStructureCouplerUserObject::validParams() FlowChannelHeatStructureCouplerUserObject::FlowChannelHeatStructureCouplerUserObject( const InputParameters & parameters) : ElementUserObject(parameters), + ADFunctorInterface(this), _fc_elem_id(0), _hs_elem_id(0), _fc_qp(0), diff --git a/modules/thermal_hydraulics/test/tests/components/heat_transfer_from_heat_structure_1phase/fin_enhancement.i b/modules/thermal_hydraulics/test/tests/components/heat_transfer_from_heat_structure_1phase/fin_enhancement.i new file mode 100644 index 000000000000..79b78bd61dfd --- /dev/null +++ b/modules/thermal_hydraulics/test/tests/components/heat_transfer_from_heat_structure_1phase/fin_enhancement.i @@ -0,0 +1,240 @@ +# This test has 2 pipes, each surrounded by a cylindrical HS: +# +# - pipe1: no fin heat transfer enhancement +# - pipe2: fin heat transfer enhancement + +diam = 0.01 +area = ${fparse 0.25 * pi * diam^2} + +length = 1.0 +n_elems = 10 + +t_hs = 0.02 +n_elems_radial = 5 + +rho_inlet = 1359.792245 # @ T = 300 K, p = 1e5 Pa +vel_inlet = 1.0 +T_inlet = 300 +p_outlet = 1e5 +T_initial_hs = 800 +mfr_inlet = ${fparse rho_inlet * vel_inlet * area} + +htc = 100 + +# Suppose that there are 20 rectangular, 1-mm-thick fins of height 1 mm over the length +# of the cooled section. +n_fin = 20 +h_fin = 0.001 +t_fin = 0.001 +A_fin_single = ${fparse (2 * h_fin + t_fin ) * length} +A_fin = ${fparse n_fin * A_fin_single} +A_cooled = ${fparse pi * diam * length} +A_total = ${fparse A_fin + A_cooled - n_fin * t_fin * length} +fin_area_fraction = ${fparse A_fin / A_total} +area_increase_factor = ${fparse A_total / A_cooled} +fin_perimeter_area_ratio = ${fparse (2 * length + 2 * t_fin) / (length * t_fin)} + +k_fin = 15.0 + +[FluidProperties] + [fp] + type = StiffenedGasFluidProperties + gamma = 2.35 + q = -1167e3 + q_prime = 0 + p_inf = 1e9 + cv = 1816 + [] +[] + +[Closures] + [simple_closures] + type = Closures1PhaseSimple + [] +[] + +[SolidProperties] + [sp_ss316] + type = ThermalSS316Properties + [] +[] + +[FunctorMaterials] + [fin_efficiency_fmat] + type = FinEfficiencyFunctorMaterial + fin_height = ${h_fin} + fin_perimeter_area_ratio = ${fparse fin_perimeter_area_ratio} + heat_transfer_coefficient = ${htc} + thermal_conductivity = ${k_fin} + fin_efficiency_name = fin_efficiency + [] + [fin_enhancement_fmat] + type = FinEnhancementFactorFunctorMaterial + fin_efficiency = fin_efficiency + fin_area_fraction = ${fin_area_fraction} + area_increase_factor = ${area_increase_factor} + fin_enhancement_factor_name = fin_enhancement + [] +[] + +[Components] + # pipe1 + + [pipe1_inlet] + type = InletMassFlowRateTemperature1Phase + m_dot = ${mfr_inlet} + T = ${T_inlet} + input = 'pipe1:in' + [] + [pipe1] + type = FlowChannel1Phase + gravity_vector = '0 0 0' + position = '0 0 0' + orientation = '0 0 1' + length = ${length} + n_elems = ${n_elems} + A = ${area} + initial_T = ${T_inlet} + initial_p = ${p_outlet} + initial_vel = ${vel_inlet} + fp = fp + closures = simple_closures + f = 0 + scaling_factor_1phase = '1 1 1e-5' + [] + [pipe1_outlet] + type = Outlet1Phase + p = ${p_outlet} + input = 'pipe1:out' + [] + [ht1] + type = HeatTransferFromHeatStructure1Phase + flow_channel = pipe1 + hs = hs1 + hs_side = inner + Hw = ${htc} + [] + [hs1] + type = HeatStructureCylindrical + position = '0 0 0' + orientation = '0 0 1' + length = ${length} + n_elems = ${n_elems} + inner_radius = ${fparse 0.5 * diam} + names = 'main' + solid_properties = 'sp_ss316' + solid_properties_T_ref = '300' + widths = '${t_hs}' + n_part_elems = '${n_elems_radial}' + initial_T = ${T_initial_hs} + scaling_factor_temperature = 1e-5 + [] + + # pipe 2 + + [pipe2_inlet] + type = InletMassFlowRateTemperature1Phase + m_dot = ${mfr_inlet} + T = ${T_inlet} + input = 'pipe2:in' + [] + [pipe2] + type = FlowChannel1Phase + gravity_vector = '0 0 0' + position = '0 0.5 0' + orientation = '0 0 1' + length = ${length} + n_elems = ${n_elems} + A = ${area} + initial_T = ${T_inlet} + initial_p = ${p_outlet} + initial_vel = ${vel_inlet} + fp = fp + closures = simple_closures + f = 0 + scaling_factor_1phase = '1 1 1e-5' + [] + [pipe2_outlet] + type = Outlet1Phase + p = ${p_outlet} + input = 'pipe2:out' + [] + [ht2] + type = HeatTransferFromHeatStructure1Phase + flow_channel = pipe2 + hs = hs2 + hs_side = inner + Hw = ${htc} + scale = fin_enhancement + [] + [hs2] + type = HeatStructureCylindrical + position = '0 0.5 0' + orientation = '0 0 1' + length = ${length} + n_elems = ${n_elems} + inner_radius = ${fparse 0.5 * diam} + names = 'main' + solid_properties = 'sp_ss316' + solid_properties_T_ref = '300' + widths = '${t_hs}' + n_part_elems = '${n_elems_radial}' + initial_T = ${T_initial_hs} + scaling_factor_temperature = 1e-5 + [] +[] + +[Postprocessors] + [pipe1_T_avg] + type = ElementAverageValue + variable = T + block = 'pipe1' + execute_on = 'INITIAL TIMESTEP_END' + [] + [pipe2_T_avg] + type = ElementAverageValue + variable = T + block = 'pipe2' + execute_on = 'INITIAL TIMESTEP_END' + [] + + [hs1_T_avg] + type = SideAverageValue + variable = T_solid + boundary = 'hs1:inner' + execute_on = 'INITIAL TIMESTEP_END' + [] + [hs2_T_avg] + type = SideAverageValue + variable = T_solid + boundary = 'hs2:inner' + execute_on = 'INITIAL TIMESTEP_END' + [] +[] + +[Preconditioning] + [pc] + type = SMP + full = true + [] +[] + +[Executioner] + type = Transient + scheme = 'bdf2' + + end_time = 10.0 + dt = 1.0 + + 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 +[] diff --git a/modules/thermal_hydraulics/test/tests/components/heat_transfer_from_heat_structure_1phase/gold/fin_enhancement_out.csv b/modules/thermal_hydraulics/test/tests/components/heat_transfer_from_heat_structure_1phase/gold/fin_enhancement_out.csv new file mode 100644 index 000000000000..e3320389c5d0 --- /dev/null +++ b/modules/thermal_hydraulics/test/tests/components/heat_transfer_from_heat_structure_1phase/gold/fin_enhancement_out.csv @@ -0,0 +1,12 @@ +time,hs1_T_avg,hs2_T_avg,pipe1_T_avg,pipe2_T_avg +0,800,800,300,300 +1,796.72027289917,792.64935813428,301.31617250519,302.94516242609 +2,794.69166436377,788.135459307,301.85991116439,304.1516529957 +3,793.45033687317,785.39526446055,301.93833543943,304.30895984674 +4,792.57973655753,783.48384183056,301.89517128134,304.19899179588 +5,791.88836565408,781.97071598749,301.86391390055,304.12099654351 +6,791.3019994347,780.69049835119,301.85504385904,304.09522697609 +7,790.78896970435,779.57285794509,301.85392032277,304.08744860216 +8,790.33185491519,778.57901794532,301.85317904221,304.08098041844 +9,789.91907595949,777.68318259154,301.85182073494,304.07360162723 +10,789.54231108575,776.86683869353,301.85032225901,304.06632651112 diff --git a/modules/thermal_hydraulics/test/tests/components/heat_transfer_from_heat_structure_1phase/tests b/modules/thermal_hydraulics/test/tests/components/heat_transfer_from_heat_structure_1phase/tests index 12f64006b931..de856d992b96 100644 --- a/modules/thermal_hydraulics/test/tests/components/heat_transfer_from_heat_structure_1phase/tests +++ b/modules/thermal_hydraulics/test/tests/components/heat_transfer_from_heat_structure_1phase/tests @@ -108,6 +108,13 @@ requirement = "The system shall conserve energy after reaching steady-state when a flow channel is coupled to a heat structure." issues = '#19754' [] + [fin_enhancement] + type = CSVDiff + input = 'fin_enhancement.i' + csvdiff = 'fin_enhancement_out.csv' + requirement = 'The system shall be able to enhance heat transfer between a flow channel and heat structure using fins.' + issues = '#25275' + [] # Error checking [err:not_a_pipe]