.. _section-5.4.4:

Compressible Volumes
~~~~~~~~~~~~~~~~~~~~

The liquid temperature for a compressible volume other than the outlet
plenum is computed as a one-point perfect mixing model. If cover gas is
present, its contribution to the liquid temperature is ignored because
of the small heat capacity of the gas, and the calculation is carried
out as though no gas were present. In :eq:`(5.3-8)` of
:numref:`section-5.3.1` for
the liquid pressure calculation in a compressible volume, the heat flow
from the walls was ignored. Here in the liquid temperature calculation
it is included in the energy balance equation.

For the temperature calculation, the heat flow is taken as

.. math::
   :label: eq-5.4-68

   Q \Delta t = \Delta t \left\lbrack \theta_{1\text{w}} \left( T_{\text{w}3} - T_{3} \right) + \theta_{2\text{w}}\left( T_{\text{w}4} - T_{4} \right) \right\rbrack h_{\text{w}} A_{\text{w}} + E_{\text{src}}

where

:math:`T_{\text{w}}` = the compressible volume wall temperature

:math:`h_{\text{w}}` = the effective heat-transfer coefficient

:math:`A_{\text{w}}` = the compressible volume wall area

:math:`\theta_{2\text{w}}` = the degree of implicitness

:math:`T_{3}` = the liquid temperature at the beginning of the
subinterval

:math:`T_{4}` = the liquid temperature at the end of the sub-interval

:math:`E_{\text{src}}` = heat flow to the liquid from other components

Also, the wall temperature is determined by

.. math::
   :label: eq-5.4-69

   m_{\text{w}} c_{\text{w}} \left( T_{\text{w}4} + T_{\text{w}3} \right) =  - Q\Delta t + \Delta t H_{\text{snk}} A_{\text{snk}} \left( T_{\text{snk}} - \theta_{1\text{w}} T_{\text{w}3} - \theta_{2\text{w}} T_{\text{w}4} \right)

where

:math:`m_{\text{w}}` = the mass of the compressible volume wall

:math:`c_{\text{w}}` = the heat capacity of the compressible volume wall

:math:`T_{\text{snk}}` = the temperature of a heat sink representing heat
loss to sodium or air outside the compressible volume, as discussed in
:numref:`section-5.4.6`

:math:`H_{\text{snk}}` = the heat transfer coefficient from the compressible
volume wall to the heat sink

Combining  :eq:`eq-5.4-68` and :eq:`eq-5.4-69` gives

.. math::
   :label: eq-5.4-70

   T_{\text{w}4} = \left\{ T_{\text{w}3} \left\lbrack m_{\text{w}} c_{\text{w}} - \theta_{1\text{w}} \Delta t \left( h_{\text{w}} A_{\text{w}} + H_{\text{snk}} A_{\text{snk}} \right) \right\rbrack + \Delta t h_{\text{w}} A_{\text{w}} \left( \theta_{1\text{w}} T_{3} + \theta_{2\text{w}} T_{4} \right)  \\
   + \Delta t H_{\text{snk}} A_{\text{snk}} T_{\text{snk}} \right\} \big/ \left\lbrack m_{\text{w}} c_{\text{w}} + \theta_{2\text{w}} \Delta t \left( h_{\text{w}} A_{\text{w}} + H_{\text{snk}} A_{\text{snk}} \right)  \right\rbrack

for the wall temperature at the end of the time interval.

The
:math:`\sum{{\overline{w}}_{\text{out}} T_{\text{out}}}` term
in :eq:`(5.3-8)` involves a compressible volume liquid temperature averaged
over the time step. For the hydraulic calculations in :numref:`section-5.2`, this
term is evaluated using the temperature at the beginning of the step as
the average; but for the compressible volume temperature calculations
this term is evaluated as

.. math::
   :label: eq-5.4-71

   \sum{{\overline{w}}_{\text{out}} T_{\text{out}}} = \sum_{\text{i}}{\theta_{1} \left( i \right)} \left| w_{3} \left( i \right)  \right| T_{3} + \theta_{2} \left( i \right) \left| w_{4} \right| T_{4}

where the summation is over all liquid segments, :math:`i`, in which the flow
is out of the compressible volume. Then

.. math::
   :label: eq-5.4-72

   \Delta t \left\{ \sum{{\overline{w}}_{\text{in}} T_{\text{in}} - \sum{{\overline{w}}_{\text{out}} T_{\text{out}}}} \right\} = S_{3} + S_{4} T_{4}

where

.. math::
   :label: eq-5.4-73

   S_{3} = \Delta t \sum_{\text{k}}{\left\lbrack \theta_{1} \left( k \right) \left| w_{3} \left( k \right)  \right| T_{3\text{ex}} \left( k \right) + \theta_{2} \left( k \right) \left| w_{4} \left( k \right)  \right| T_{4\text{ex}} \left( k \right)  \right\rbrack} \\
   - \Delta t \sum_{\text{i}}\theta_{1} \left( k \right) \left| \ w_{3} \left( k \right)  \right| T_{3}

.. math::
   :label: eq-5.4-74

   S_{4} =  - \Delta t \sum_{\text{i}}{\theta_{2} \left( i \right)} \left| w_{4} \left( i \right)  \right|

:math:`T_{3\text{ex}}`, :math:`T_{4\text{ex}}` = the temperature of the
liquid leaving liquid segment :math:`k` at the beginning and end of the time
semiinterval

In Eq. :eq:`eq-5.4-73` and :eq:`eq-5.4-74` the :math:`k` summations are over all liquid
segments in which the flow is out of the compressible volume. Combining
:eq:`(5.3-8)`, :eq:`eq-5.4-70`, and :eq:`eq-5.4-72` gives

.. math::
   :label: eq-5.4-75

   T_{4} = \left\{ m_{3} T_{3} + S_{3} + \frac{d_{1} d_{3} d_{6} \left( T_{\text{snk}} - \theta_{1} T_{3} \right)}{c_{\text{l}}} + \frac{E_{\text{src}}}{c_{\text{l}}} + \frac{d_{1} d_{2} d_{5}}{c_{\text{l}}} \left( T_{\text{w}3} - \theta_{1\text{w}} T_{3} \right) \right\} \big/ \\
   \left\lbrack m_{4} - S_{4} + \frac{d_{1} d_{3}}{c_{\text{l}}} \left( d_{2} + \theta_{2\text{w}} d_{6} \right) \right\rbrack

where

.. math::
   :label: eq-5.4-76

   d_{1} = \Delta t h_{\text{w}} A_{\text{w}}

.. math::
   :label: eq-5.4-77

   d_{2} = m_{\text{w}} c_{\text{w}}

.. math::
   :label: eq-5.4-78

   d_{6} = \Delta t H_{\text{snk}} A_{\text{snk}}

.. math::
   :label: eq-5.4-79

   d_{5} = \frac{1}{d_{2} + \theta_{2\text{w}} d_{1} + \theta_{2\text{w}} d_{6}}

.. math::
   :label: eq-5.4-80

   d_{3} = \theta_{2\text{w}} d_{5}

:math:`E_{\text{src}}` = a heat source due heat transfer other components the
volume liquid, as :numref:`section-5.4.6`.

In the code, first :eq:`eq-5.4-75` is solved for :math:`T_4`; and then
:eq:`eq-5.4-70` is solved for :math:`T_{\text{w}4}`.

.. _section-5.4.4.1:

Thick-Walled Compressible Volumes
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

In the traditional CV temperature calculation, described above, the compressible volume wall is assumed to have
a uniform or time independent temperature profile. This approximation is valid when the wall thickness is
thin and the heat capacity of the wall is much less than the heat capacity of the coolant. In the case of
a thick compressible volume wall, i.e. the reactor vessel wall, users have the ability to model the temperature
evolution within the wall. This option, referred to as the thick-walled compressible volume modeling option, utilizes the
same pressure and flow calculations as the traditional CV, hereafter referred to as the thin-walled CV option, but explicitly accounts for
the heat transfer through the wall using a nodal approach, shown in :numref:`thickCVfig`.

.. _thickCVfig:
..  figure:: media/thick-walled-cv.png
	:align: center
	:figclass: align-center

	Geometric representation of a thin-walled (top) and thick-walled (bottom) compressible volume.


A thick-walled compressible volume is divided into `s` nodes. The first and last node are considered surface
nodes, which are half the thickness of the inner nodes. At this time, the material properties within the
wall are assumed to be temperature independent and the heat transfer area between each node is constant.
The boundary conditions at the inner and outer surface of the wall utilize Newton's law of cooling. It is assumed
that no heat generation occurs within the CV wall. The temperature solution of the CV coolant is consistent between
the thin-walled and thick-walled implementation.

.. _section-5.4.4.1.1:

Basic Equations
""""""""""""""""

By combining :eq:`(5.3-7)` and :eq:`eq-5.4-72`, the conservation of energy equation
for a thick-walled CV liquid can be written as

.. math::
   :label: thick-cv1

   T_{4}m_{4} = T_{3}m_{3} + S_3 + S_4T_{4} + \frac{Q}{c_l}\Delta t

By replacing the average wall temperature, with the wall surface temperature :eq:`eq-5.4-68` can be written
as

.. math::
   :label: thick-cv2

   Q\Delta t = \Delta t h_wA_w \left( \theta_1\left(T_{w1,3}-T_{3}\right)+\theta_2\left(T_{w1,4}-T_{4}\right)\right)

where

:math:`T_{w1,3}` :math:`T_{w1,4}` = the compressible volume wall inner surface temperature at the beginning and end of the time step

A similar energy balance can be performed at the inner surface of the compressible volume wall.

.. math::
   :label: thick-cv7

   (mc)_{w1}T_{w1,4} = (mc)_{w1}T_{w1,3}-Q\Delta t + Q_{w1,w2} \Delta t

.. math::
   :label: thick-cv8

   Q_{w1,w2}\Delta t = \Delta t h_{wi}A_{w} \left( \theta_1\left(T_{w2,3}-T_{w1,3}\right)+\theta_2\left(T_{w2,4}-T_{w1,4}\right)\right)

where

.. math::
   :label: thick-cv9

   h_{wi} = \frac{k}{dx}

and

:math:`T_{w2,3}` :math:`T_{w2,4}` = the compressible volume wall temperature at node j=2 at the beginning and end of the time step

:math:`k`  = the compressible volume wall thermal conductivity

:math:`s`  = the number of wall nodes

:math:`dx`  = the compressible volume wall node thickness, :math:`\frac{tWall}{s-1}`

:math:`mc_{w1}`  = :math:`mc_{ws}` = the compressible volume wall surface node heat capacity, :math:`\frac{MCp_{wall}}{2(s-1)}`

The energy balance for the inner wall node, j,  will follow a similar pattern

.. math::
   :label: thick-cv10

   (mc)_{wj}T_{wj,4} = (mc)_{wj}T_{wj,3}-Q_{wj-1,wj}\Delta t + Q_{wj,wj+1} \Delta t

.. math::
   :label: thick-cv11

   Q_{wj-1,wj}\Delta t = \Delta t h_{wi}A_{w} \left( \theta_1\left(T_{wj,3}-T_{wj-1,3}\right)+\theta_2\left(T_{wj,4}-T_{wj-1,4}\right)\right)

where

:math:`mc_{wj}`  = the compressible volume wall inner node heat capacity, :math:`\frac{MCp_{wall}}{s-1}`

Finally, the energy balance for the outer surface node can be written

.. math::
   :label: thick-cv12

   (mc)_{ws}T_{ws,4} = (mc)_{ws}T_{ws,3}-Q_{ws-1,ws}\Delta t + Q_{ws,snk} \Delta t

.. math::
   :label: thick-cv13

   Q_{ws,snk}\Delta t = \Delta t (hA)_{snk} \left( T_{snk} - \left(\theta_1T_{ws,3}+\theta_2T_{ws,4}\right)\right)

:eq:`thick-cv1` through :eq:`thick-cv13` can be rearranged into a tri-diagonal matrix with s+1 rows.
Each transient time step, SAS solves for the temperature of the coolant and wall nodes using standard tri-diagonal inversion in subroutine INVRT3.
During steady state initialization, an adiabatic boundary condition is applied at the outer surface of the CV wall. As a result, all wall node
temperatures can be set to the coolant temperature.


.. _section-5.4.4.2:

.. include::    input-CV.rst