\subsection{Contents of \dir{thm} data structure}\label{sect:thmdir}

This data structure contains the thermal-hydraulics information required in a multi-physics calculation

\subsubsection{The main \dir{thm} directory}\label{sect:thmdirmain}

The following records and sub-directories will be found in the first level of a \dir{thm} directory:

\begin{DescriptionEnregistrement}{Main records and sub-directories in \dir{thm}}{8.0cm}
\CharEnr
  {SIGNATURE\blank{3}}{$*12$}
  {parameter $\mathsf{SIGNA}$ containing the signature of the data structure}
\IntEnr
  {STATE-VECTOR}{$40$}
  {array $\mathcal{S}^{th}_{i}$ containing various integer parameters that are required to describe this data structure}
\RealEnr
  {REAL-PARAM\blank{2}}{$40$}{}
  {array $\mathcal{R}^{th}_{i}$ containing various floating-point parameters that are required to describe this data structure}
\OptRealEnr
  {KCONDF\blank{6}}{$\mathcal{S}^{th}_{16}+3$}{$\mathcal{S}^{th}_{12}\ne 0$}{}
  {coefficients of the user-defined correlation for the fuel thermal conductivity}
\OptCharEnr
  {UCONDF\blank{6}}{$12$}{$\mathcal{S}^{th}_{12}\ne 0$}
  {string variable set to {\tt KELVIN} or to {\tt CELSIUS}}
\OptRealEnr
  {KCONDC\blank{6}}{$\mathcal{S}^{th}_{17}+3$}{$\mathcal{S}^{th}_{13}\ne 0$}{}
  {coefficients of the user-defined correlation for the clad thermal conductivity}
\OptCharEnr
  {UCONDC\blank{6}}{$12$}{$\mathcal{S}^{th}_{13}\ne 0$}
  {string variable set to {\tt KELVIN} or to {\tt CELSIUS}}
\RealEnr
  {ERROR-T-FUEL}{1}{K}
  {absolute error in fuel temperature}
\RealEnr
  {ERROR-D-COOL}{1}{g/cc}
  {absolute error in coolant density}
\RealEnr
  {ERROR-T-COOL}{1}{K}
  {absolute error in coolant temperature}
\RealEnr
  {MIN-T-FUEL\blank{2}}{1}{K}
  {minimum fuel temperature}
\RealEnr
  {MIN-D-COOL\blank{2}}{1}{g/cc}
  {minimum coolant density}
\RealEnr
  {MIN-T-COOL\blank{2}}{1}{K}
  {minimum coolant temperature}
\RealEnr
  {MAX-T-FUEL\blank{2}}{1}{K}
  {maximum fuel temperature}
\RealEnr
  {MAX-D-COOL\blank{2}}{1}{g/cc}
  {maximum coolant density}
\RealEnr
  {MAX-T-COOL\blank{2}}{1}{K}
  {maximum coolant temperature}
 \DirEnr
  {HISTORY-DATA}
  {sub-directory containing the historical values taken by the thermal-hydraulics parameters (mass flux, density, pressure, enthalpy, temperature) in the coolant and in the fuel rod for the whole geometry}
\end{DescriptionEnregistrement}

The signature for this data structure is $\mathsf{SIGNA}$=\verb*|L_THM|. The array $\mathcal{S}^{h}_{i}$
contains the following information: 

\begin{itemize}
\item $\mathcal{S}^{th}_{1}$ contains the number of active fuel rods.
\item $\mathcal{S}^{th}_{2}$ contains the number of guide tubes.
\item $\mathcal{S}^{th}_{3}$ contains the maximum number of iterations for computing the
conduction integral.
\item $\mathcal{S}^{th}_{4}$ contains the maximum number of iterations for computing the
center pellet temperature.
\item $\mathcal{S}^{th}_{5}$ contains the maximum number of iterations for computing the
coolant parameters (velocity, pressure, enthapy, density) in case of a transient calculation.
\item $\mathcal{S}^{th}_{6}$ contains the number of discretisation points in fuel.
\item $\mathcal{S}^{th}_{7}$ contains the number of total discretisation points in the whole fuel rod (fuel+cladding).
\item $\mathcal{S}^{th}_{8}$ contains the integer setting the type of calculation (steady-state or transient) performed by the \moc{THM:} module.
\item $\mathcal{S}^{th}_{9}$ contains the current time index.
\item $\mathcal{S}^{th}_{10}$ flag to set the gap correlation:

\begin{displaymath} \mathcal{S}^{th}_{10} = \left\{
\begin{array}{rl}
 0 & \textrm{built-in correlation is used} \\
 1 & \textrm{set the heat exchange coefficient of the gap as a user-defined constant.} \\
\end{array} \right.
\end{displaymath}

\item $\mathcal{S}^{th}_{11}$ flag to set the heat transfer coefficient between the clad and fluid:

\begin{displaymath} \mathcal{S}^{th}_{11} = \left\{
\begin{array}{rl}
 0 & \textrm{built-in correlation is used} \\
 1 & \textrm{set the heat exchange coefficient between the clad and fluid as a user-defined constant.} \\
\end{array} \right.
\end{displaymath}

\item $\mathcal{S}^{th}_{12}$ flag to set the fuel thermal conductivity:

\begin{displaymath} \mathcal{S}^{th}_{12} = \left\{
\begin{array}{rl}
 0 & \textrm{built-in correlation is used} \\
 1 & \textrm{set the fuel thermal conductivity as a function of a simple user-defined correlation.} \\
\end{array} \right.
\end{displaymath}

\item $\mathcal{S}^{th}_{13}$ flag to set the clad thermal conductivity:

\begin{displaymath} \mathcal{S}^{th}_{13} = \left\{
\begin{array}{rl}
 0 & \textrm{built-in correlation is used} \\
 1 & \textrm{set the clad thermal conductivity as a function of a simple user-defined correlation.} \\
\end{array} \right.
\end{displaymath}

\item $\mathcal{S}^{th}_{14}$ type of approximation used during the fuel conductivity evaluation:

\begin{displaymath} \mathcal{S}^{th}_{14} = \left\{
\begin{array}{rl}
 0 & \textrm{use a rectangle quadrature approximation} \\
 1 & \textrm{use an average approximation.} \\
\end{array} \right.
\end{displaymath}

\item $\mathcal{S}^{th}_{15}$ type of subcooling model:

\begin{displaymath} \mathcal{S}^{th}_{15} = \left\{
\begin{array}{rl}
 0 & \textrm{use the Jens-Lottes correlation and Bowring's model} \\
 1 & \textrm{use the Saha-Zuber subcooling model.} \\
\end{array} \right.
\end{displaymath}

\item $\mathcal{S}^{th}_{16}$ contains the number of terms in the user-defined correlation for the fuel thermal confuctivity (if $\mathcal{S}^{th}_{12}=1$).
\item $\mathcal{S}^{th}_{17}$ contains the number of terms in the user-defined correlation for the clad thermal confuctivity (if $\mathcal{S}^{th}_{13}=1$).
\end{itemize}

The array $\mathcal{R}^{th}_{i}$ contains the following information: 

\begin{itemize}
\item $\mathcal{R}^{th}_{1}$ contains the current time step in s. 
\item $\mathcal{R}^{th}_{2}$ contains the fraction of reactor power released in fuel.
\item $\mathcal{R}^{th}_{3}$ contains the critical heat flux in W/m$^2$.
\item $\mathcal{R}^{th}_{4}$ contains the inlet coolant velocity in m/s.
\item $\mathcal{R}^{th}_{5}$ contains the outlet coolant pressure in Pa.
\item $\mathcal{R}^{th}_{6}$ contains the inlet coolant temperature in K.
\item $\mathcal{R}^{th}_{7}$ contains the Plutonium mass fraction in fuel.
\item $\mathcal{R}^{th}_{8}$ contains the fuel porosity.
\item $\mathcal{R}^{th}_{9}$ contains the fuel pellet radius
\item $\mathcal{R}^{th}_{10}$ contains the internal clad rod radius in m.
\item $\mathcal{R}^{th}_{11}$ contains the external clad rod radius in m.
\item $\mathcal{R}^{th}_{12}$ contains the guide tube radius in m.
\item $\mathcal{R}^{th}_{13}$ contains the assembly surface in m$^2$.
\item $\mathcal{R}^{th}_{14}$ contains the temperature maximum absolute error (in K) allowed in the solution of the conduction equations.
\item $\mathcal{R}^{th}_{15}$ contains the maximum relative error allowed in the matrix resolution of the conservation equations of the coolant.
\item $\mathcal{R}^{th}_{16}$ contains the relaxation parameter for the multiphysics parameters (temperature of fuel and coolant  and density of coolant).
\item $\mathcal{R}^{th}_{17}$ contains the time in s.
\item $\mathcal{R}^{th}_{18}$ contains the heat transfer coefficient of the gap (if $\mathcal{S}^{th}_{10}=1$).
\item $\mathcal{R}^{th}_{19}$ contains the heat transfer coefficient between the clad and fluid (if $\mathcal{S}^{th}_{11}=1$).
\item $\mathcal{R}^{th}_{20}$ contains the surface temperature weighting factor of effective fuel temperature for the Rowlands approximation.
\end{itemize}
\clearpage

\subsubsection{The \moc{HISTORY-DATA}  sub-directory}\label{sect:thmdirhistorydata}
In the \moc{HISTORY-DATA} directory, the following sub-directories will be found:
\begin{DescriptionEnregistrement}{Sub-directories
 in \moc{HISTORY-DATA} directory}{7.0cm} \label{tabl:tabhistorydatadir}
  \DirlEnr
  {STATIC-PARAM}{$N_{\rm ch}$}
 {sub-directory containing all the values of the thermal-hydraulics parameters computed by the \moc{THM:} module in steady-state conditions and sorted channel by channel. Each channel is identified by an integer {\sl numc} that can take values between 1 and 9999. For example, the first channel is identified by the string character ``\moc{CHANNEL} \moc{0001}".}
   \DirlEnr
 {TIMESTEP{\sl numt}}{$N_{\rm ch}$}
 {sub-directories containing all the values of the thermal-hydraulics parameters computed by the \moc{THM:} module in transient conditions at a given time index {\sl numt} and sorted channel by channel. {\sl numt} can take values between 1 and 9999.}
\end{DescriptionEnregistrement}
\noindent
In each of the $N_{\rm ch}$ \moc{CHANNEL} {\sl numc} sub-directories, the following records will be found:
\begin{DescriptionEnregistrement}{Records
 in each \moc{CHANNEL} directory}{7.0cm} \label{tabl:tabchanneldir}
 \RealEnr
 {VINLET\blank{6}}{$1$}{$m.s^{-1}$}
 {inlet velocity}
 \RealEnr
 {TINLET\blank{6}}{$1$}{$K$}
 {inlet temperature}
 \RealEnr
 {PINLET\blank{6}}{$1$}{$Pa$}
 {inlet pressure}
 \RealEnr
 {VELOCITIES\blank{2}}{$N_b$}{$m.s^{-1}$}
 {velocity in each of the $N_b$ bundles of the channel numbered {\sl numc}}
 \RealEnr
 {PRESSURE\blank{4}}{$N_b$}{$Pa$}
 {pressure in each bundle of the channel}
 \RealEnr
 {ENTHALPY\blank{4}}{$N_b$}{$J.kg^{-1}$}
 {enthalpy in each bundle of the channel}
 \RealEnr
 {DENSITY\blank{5}}{$N_b$}{$kg.m^{-3}$}
 {density in each bundle of the channel}
 \RealEnr
 {LIQUID-DENS\blank{1}}{$N_b$}{$kg.m^{-3}$}
 {density of liquid phase in each bundle of the channel}
 \RealEnr
 {TEMPERATURES}{$N_b, N_{\rm dtot}$}{$K$}
 {distribution of the temperature in the fuel-pin for each bundle of the channel}
 \RealEnr
 {CENTER-TEMPS}{$N_b$}{$K$}
 {center fuel pellet temperature in each bundle of the channel}
\end{DescriptionEnregistrement}
