Step 6: Custom Closures
Complete input file for this step: 06_custom_closures.i
Closure System
The closure system is another powerful system provided by THM. It allows users to either use pre-defined closure sets or entirely define their own ones.
Flow channels have the closures
parameter, which corresponds to the name of a Closures object. This parameter can be specified globally in [GlobalParams]
block or on per-component basis. Note that not all components require the closure parameter (for example heat structures have no concept of closure correlations).
Custom closure correlations are provided via MOOSE material system. Users can use any pre-built material objects that come with MOOSE and provide the required value. The most notable and useful material is ADParsedMaterial which allows users to provide the closure formula on the input file level.
Tip: THM provides convenient materials for computing Reynolds and Prandtl number, named ADReynoldsNumberMaterial and ADPrandtlNumberMaterial, respectively.
In single-phase flow, the Darcy wall friction factor f_D
and the convective wall heat transfer coefficient Hw
need to be supplied.
Add Custom Closure Correlations
Note: Heat transfer is optional, so defining a wall heat transfer coefficient on blocks that do not have wall heat transfer linked to them makes no sense.
In our tutorial we will define the custom closures on the primary side of the heat exchanger.
To use the custom closure set, we create a closures object of the class Closures1PhaseNone, which does not create any of its own Materials:
Then the name we gave this closures object (none_closures
) is passed to the closures
parameter in the hx/pri
component. This will overwrite the closures
parameter set in the GlobalParams
block.
Materials
For our custom closure set, we choose the following expression for the friction factor:
where is the Darcy friction factor, is the Reynolds number, and , , and are constant coefficients with , , and .
The first step is to define the Reynolds number using an ADReynoldsNumberMaterial, and then the expression for the friction factor is implemented using an ADParsedMaterial. Note that these materials are defined only on the block where the custom closures are used. They are defined by the other closure set on the other components.
For the heat transfer, the following expression for Nusselt number is used:
To accomplish this, we define the Prandtl number using an ADPrandtlNumberMaterial block. The Nusselt number is defined using an ADParsedMaterial, and the heat transfer coefficient is set using an ADConvectiveHeatTransferCoefficientMaterial block. Again, the block is restricted to the hx/pri
block to avoid conflicting with the other closure set.