Skip to content

Commit

Permalink
Added convection to HSCoupler2D3D
Browse files Browse the repository at this point in the history
Closes #27830
  • Loading branch information
joshuahansel committed Jun 10, 2024
1 parent ef01703 commit a27a1b4
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# HSCoupler2D3D

This component is used to couple a [HeatStructureCylindrical.md] and a
[HeatStructureFromFile3D.md] via gap conduction and radiation.
[HeatStructureFromFile3D.md] via gap conduction, radiation, and convection.

## Formulation

Expand Down Expand Up @@ -34,10 +34,10 @@ where

This approach guarantees energy conservation of this heat exchange.

The heat flux is composed of two pieces, corresponding to conduction and radiation:
The heat flux is composed of three pieces, corresponding to conduction, radiation, and convection:

!equation
q_{z,\theta} = q^\text{cond}_{z,\theta} + q^\text{rad}_{z,\theta} \,.
q_{z,\theta} = q^\text{cond}_{z,\theta} + q^\text{rad}_{z,\theta} + q^\text{conv}_{r,\theta} \,.

Before describing these pieces, we describe some preliminaries.

Expand Down Expand Up @@ -116,6 +116,18 @@ q^\text{rad}_{z,\theta} = \frac{\sigma (T_z^4 - T_{z,\theta}^4)}{\mathcal{R}_{z,

where $\sigma$ is the Stefan-Boltzmann constant.

### Convection Heat Flux

The convection heat flux is computed as

!equation
q^\text{conv}_{z,\theta} = h^\text{gap}_{z,\theta} (T_z^4 - T_{z,\theta}^4) \,,

where the gap heat transfer coefficient is evaluated at the gap temperature:

!equation
h^\text{gap}_{z,\theta} = h_\text{gap}(T^\text{gap}_{z,\theta}) \,.

## Restrictions and Assumptions

- Currently, no contact ($\delta = 0$) is permitted, but this restriction is
Expand All @@ -135,15 +147,17 @@ corresponding to each heat structure, at which the heat exchange occurs.

The parameters [!param](/Components/HSCoupler2D3D/emissivity_2d),
[!param](/Components/HSCoupler2D3D/emissivity_3d),
[!param](/Components/HSCoupler2D3D/gap_thickness), and
[!param](/Components/HSCoupler2D3D/gap_thermal_conductivity) correspond
[!param](/Components/HSCoupler2D3D/gap_thickness),
[!param](/Components/HSCoupler2D3D/gap_thermal_conductivity), and
[!param](/Components/HSCoupler2D3D/gap_htc) correspond
to [Functions](Functions/index.md) of the relevant temperature; respectively,
these correspond to

- $\epsilon_\text{2D}(T_\text{2D})$,
- $\epsilon_\text{3D}(T_\text{3D})$,
- $\delta(T_\text{gap})$, and
- $k_\text{gap}(T_\text{gap})$.
- $\delta(T_\text{gap})$,
- $k_\text{gap}(T_\text{gap})$, and
- $h_\text{gap}(T_\text{gap})$.

The temperature values are substituted in place of the time coordinate for
these `Function`s.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ class HSCoupler2D3DUserObject : public SideUserObject
const Function & _gap_thickness_fn;
/// Gap thermal conductivity as a function of temperature
const Function & _k_gap_fn;
/// Gap heat transfer coefficient as a function of temperature
const Function & _htc_gap_fn;

/// User object containing the temperature values on the 2D boundary
const StoreVariableByElemIDSideUserObject & _temperature_2d_uo;
Expand Down
3 changes: 3 additions & 0 deletions modules/thermal_hydraulics/src/components/HSCoupler2D3D.C
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ HSCoupler2D3D::validParams()
params.addRequiredParam<FunctionName>(
"gap_thermal_conductivity",
"Gap thermal conductivity [W/(m-K)] as a function of temperature [K]");
params.addParam<FunctionName>(
"gap_htc", 0, "Gap heat transfer coefficient [W/(m^2-K)] as a function of temperature [K]");

params.addClassDescription("Couples a 2D heat structure boundary to a 3D heat structure boundary "
"using gap heat transfer.");
Expand Down Expand Up @@ -183,6 +185,7 @@ HSCoupler2D3D::addMooseObjects()
params.set<FunctionName>("gap_thickness") = getParam<FunctionName>("gap_thickness");
params.set<FunctionName>("gap_thermal_conductivity") =
getParam<FunctionName>("gap_thermal_conductivity");
params.set<FunctionName>("gap_htc") = getParam<FunctionName>("gap_htc");
params.set<UserObjectName>("temperature_2d_uo") = temperature_2d_uo_name;
params.set<MeshAlignment2D3D *>("mesh_alignment") = &_mesh_alignment;
params.set<ExecFlagEnum>("execute_on") = {EXEC_INITIAL, EXEC_LINEAR, EXEC_NONLINEAR};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ HSCoupler2D3DUserObject::validParams()
params.addRequiredParam<FunctionName>(
"gap_thermal_conductivity",
"Gap thermal conductivity [W/(m-K)] as a function of temperature [K]");
params.addParam<FunctionName>(
"gap_htc", 0, "Gap heat transfer coefficient [W/(m^2-K)] as a function of temperature [K]");
params.addRequiredParam<UserObjectName>(
"temperature_2d_uo",
"StoreVariableByElemIDSideUserObject containing the temperature values on the 2D boundary");
Expand All @@ -56,6 +58,7 @@ HSCoupler2D3DUserObject::HSCoupler2D3DUserObject(const InputParameters & paramet
_include_radiation(isParamSetByUser("emissivity_2d") && isParamSetByUser("emissivity_3d")),
_gap_thickness_fn(getFunction("gap_thickness")),
_k_gap_fn(getFunction("gap_thermal_conductivity")),
_htc_gap_fn(getFunction("gap_htc")),
_temperature_2d_uo(getUserObject<StoreVariableByElemIDSideUserObject>("temperature_2d_uo")),
_mesh_alignment(*getParam<MeshAlignment2D3D *>("mesh_alignment"))
{
Expand Down Expand Up @@ -102,6 +105,9 @@ HSCoupler2D3DUserObject::execute()
HeatTransferModels::cylindricalGapConductionHeatFlux(k_gap, _r_2d, r_3d, T_2d, T_3d);
auto heat_flux = heat_flux_cond;

const auto htc = evaluateTemperatureFunction(_htc_gap_fn, T_gap);
heat_flux += htc * (T_2d - T_3d);

if (_include_radiation)
{
const auto emissivity_2d = evaluateTemperatureFunction(_emissivity_2d_fn, T_2d);
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,16 @@
exodiff = conduction_only.e
detail = 'using conduction only.'
[]
[convection_only]
type = Exodiff
input = hs_coupler_2d3d.i
cli_args = "
Components/hs_coupler/gap_thermal_conductivity=0
Components/hs_coupler/gap_htc=100
Outputs/file_base=convection_only"
exodiff = convection_only.e
detail = 'using convection only.'
[]
[]

[error_reporting]
Expand Down

0 comments on commit a27a1b4

Please sign in to comment.