.. _section-12.appendices:

Appendices
----------

Derivation of the Expression for the Spatial Derivative of the Liquid Temperature at a Liquid-Vapor Interface
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The derivation of Eq. :ref:`12.5-37 <eq-12.5-37>`, the expression for :math:`\frac{\partial T_{l}}{\partial \xi}\big|_{\xi = 0}`, from the general
heat conduction equation involves a somewhat lengthy process which will
be described in this appendix. The starting point is Eq. :ref:`12.5-34 <eq-12.5-34>`, the
general heat conduction equation, written as

(A12.1‑1)

.. _eq-A12.1-1:

.. math:: \frac{\partial ^{2} T\left( \xi, t' \right)}{\partial \xi^{2}} + \frac{Q\left( \xi, t' \right)}{k_{l}} = \frac{1}{\alpha}\frac{\partial T \left(\xi,t' \right)}{\partial t'}

where the nomenclature is defined in :numref:`section-12.5`. As discussed in
:numref:`section-12.5`, the boundary conditions for Eq. :ref:`A12.1-1 <eq-A12.1-1>` are :math:`T\left(0, t' \right)`
equal to the vapor temperature and :math:`T \left(\xi, t' \right)` finite, while the
initial condition is that :math:`T\left( \infty, 0 \right)` is known. If the Laplace
transform is applied to Eq. :ref:`A12.1-1 <eq-A12.1-1>`, the resulting equation is

(A12.1‑2)

.. _eq-A12.1-2:

.. math:: \frac{\partial ^{2} \overline{T} \left( \xi, s \right)}{\partial \xi ^{2}} + \frac{\overline{Q} \left( \xi, s \right)}{k_{l}} = \frac{1}{\alpha}\left(s \overline{T} \left(\xi, s \right) - T\left( \xi, 0 \right) \right)

where :math:`\overline{T}` and :math:`\overline{Q}` and are the Laplace transforms of :math:`T` and :math:`Q`,
respectively, and :math:`s` is the transform variable. Equation :ref:`A12.1-2 <eq-A12.1-2>` will be
somewhat easier to work with if the function :math:`g\left( \xi, s \right)` is defined as

(A12.1‑3)

.. _eq-A12.1-3:

.. math:: g\left( \xi, s \right) = -\frac{\overline{Q} \left(\xi, s \right)}{k_{l}}-\frac{T\left( \xi , 0 \right)}{\alpha}

so that the transformed equation becomes

(A12.1‑4)

.. _eq-A12.1-4:

.. math:: \frac{\partial ^{2} \overline{T}}{\partial \xi ^{2}} - \frac{s}{\alpha} \overline{T} = g

The arguments :math:`\xi` and :math:`s` have been suppressed in Eq. :ref:`A12.1-4 <eq-A12.1-4>` for simplicity
of notation. Equation :ref:`A12.1-4 <eq-A12.1-4>` is a second-order partial differential
equation in :math:`\xi`, which can be solved in a straightforward manner. First,
one additional notational simplification will be introduced by defining
the variable :math:`q` as

(A12.1‑5)

.. _eq-A12.1-5:

.. math:: q = \sqrt{\frac{s}{\alpha}}

which gives

(A12.1‑6)

.. _eq-A12.1-6:

.. math:: \frac{\partial^{2} \overline{T}}{\partial \xi^{2}} - q^{2} \overline{T} = g

The solution to this equation can be divided into a homogeneous solution :math:`\overline{T}_{h}`
and a particular solution :math:`\overline{T}_{p}`

(A12.1‑7)

.. _eq-A12.1-7:

.. math:: \overline{T} = \overline{T}_{h} + \overline{T}_{p}

The homogeneous solution is just the solution to the equation

(A12.1‑8)

.. _eq-A12.1-8:

.. math:: \frac{\partial^{2} \overline{T}_{h}}{\partial \xi} - q^{2} \overline{T}_{h} = 0

so that :math:`\overline{T}_h` has the form

(A12.1‑9)

.. _eq-A12.1-9:

.. math:: \overline{T}_{h} = C_{1} \text{exp} \left( q \xi \right) - C_{2} \text{exp} \left(-q \xi \right)

where :math:`C_{1}` and :math:`C_{2}` are constants to be determined
from the boundary conditions.

Finding the functional form of the particular solution is a more complex
process than was finding the form of the homogeneous solution. The
particular solution satisfies the equation

(A12.1‑10)

.. _eq-A10.1-10:

.. math:: \frac{\partial^{2} \overline{T}_{p}}{\partial \xi^{2}} - q^{2} \overline{T}_{p} = g

which can be rewritten as

(A12.1‑11)

.. _eq-A12.1-11:

.. math:: \left( \frac{\partial}{\partial \xi} - q \right) \left(\frac{\partial}{\partial \xi} + q \right) \overline{T}_{p} = g

If the function :math:`u` is defined as

(A12.1‑12)

.. _eq-A12.1-12:

.. math:: u = \frac{\partial \overline{T}_p}{\partial \xi} + q \overline{T}_{p}

then Eq. :ref:`A12.1-11 <eq-A12.1-11>` takes the simpler form

(A12.1‑13)

.. _eq-A12.1-13:

.. math:: \frac{\partial u}{\partial \xi} - qu = g

Equation :ref:`A12.1-13 <eq-A12.1-13>` is a simple first-order equation which is easily
solved. First, multiply the equation by :math:`e^{-q \xi}`:

(A12.1‑14)

.. _eq-A12.1-14:

.. math:: \frac{\partial u}{\partial \xi} e^{-q \xi} - que^{-q \xi} = ge^{-q \xi}

which can be written more simply as

(A12.1‑15)

.. _eq-A12.1-15:

.. math:: \frac{\partial}{\partial \xi} \left( u e^{-q \xi} \right) = ge^{-q \xi}

Equation :ref:`A12.1-15 <eq-A12.1-15>` can then be solved for u by integrating from :math:`0 \text{ to } \xi`,

(A12.1‑16)

.. _eq-A12.1-16:

.. math:: ue^{-q \xi} = \int_{0}^{\xi} ge^{-q \xi'} d\xi'

or

(A12.1‑17)

.. _eq-A12.1-17:

.. math:: u = e^{q \xi} \int_{0}^{\xi} ge^{-q \xi'} d\xi'

If this expression is substituted into Eq. :ref:`A12.1-12 <eq-A12.1-12>`, the following
equation for the particular solution results:

(A12.1‑18)

.. _eq-A12.1-18:

.. math:: \frac{\partial \overline{T}_{p}}{\partial \xi} + q \overline{T}_{p} = e^{q \xi} \int_{0}^{\xi} ge^{-q \xi'} \partial \xi'

Equation :ref:`A12.1-18 <eq-A12.1-18>` is solved using the same procedure as was employed to
solve Eq. :ref:`A12.1 <eq-A12.1-18>` for :math:`u`, only this time, the multiplier is :math:`e^{q \xi}`,
giving

(A12.1‑19)

.. _eq-A12.1-19:

.. math:: \frac{\partial}{\partial\xi}\left( \overline{T}_{p}e^{q\xi} \right) = e^{2q\xi}\int_{0}^{\xi}{ge^{- q\xi''}d\xi''}

which gives the following expression for :math:`\overline{T}_{p}`:

(A12.1‑20)

.. _eq-A12.1-20:

.. math:: \overline{T}_{p} = e^{- q\xi}\int_{0}^{\xi}e^{2q\xi'}\left( \int_{0}^{\xi'}{ge^{- q\xi'}d\xi''} \right)d\xi''

Using integration by parts, Eq. :ref:`A12.1-20 <eq-A12.1-20>` can be modified from a double
integral to the difference of two integrals, giving

(A12.1‑21)

.. _eq-A12.1-21:

.. math:: \overline{T}_{p} = e^{q\xi}\int_{0}^{\xi}{\frac{g}{2q}e}^{- q\xi'}d\xi' - e^{- q\xi}\int_{0}^{\xi}{\frac{g}{2q}e}^{q\xi'}d\xi'

The Laplace transform of the liquid temperature is then just the sum of
the expression for :math:`\overline{T}_{n}` from Eq. :ref:`A12.1-9 <eq-A12.1-9>` and that for :math:`\overline{T}_{p}` from Eq. :ref:`A12.1-21 <eq-A12.1-21>`:

(A12.1‑22)

.. _eq-A12.1-22:

.. math:: \overline{T} = \overline{T}_{h} + \overline{T}_{p}
.. math:: = C_{1} \text{exp} \left(q \xi \right) + C_{2} \text{exp}\left(-q \xi \right)  + \text{exp}\left( q \xi \right) \int_{0}^{\xi} \frac{g}{2q} \text{exp} \left(-q \xi' \right) d \xi'
.. math:: {} - \text{exp}\left(-q \xi \right) \int_{0}^{\xi} \frac{g}{2q} \text{exp} \left(q \xi' \right) d\xi'

The constants :math:`C_{1}` and :math:`C_{2}` in Eq. :ref:`A12.1-22 <eq-A12.1-22>` can be
evaluated by imposing the boundary conditions stated at the beginning of
the appendix. The condition at :math:`\xi = 0`  gives

(A12.1‑23)

.. _eq-A12.1-23:

.. math:: \overline{T} \left(0 , s \right) = C_{1} + C_{2}

while that for :math:`\xi \rightarrow \infty` requires that

(A12.1‑24)

.. _eq-A12.1-24:

.. math:: C_{1} + \int_{0}^{\infty} \frac{g}{2q} \text{exp} \left(-q \xi' \right) d \xi' = 0

If these are applied to Eq. :ref:`A12.1-22 <eq-A12.1-22>`, the resulting expression for :math:`\overline{T}` is

(A12.1‑25)

.. _eq-A12.1-25:

.. math::  \overline{T}\left(\xi, s \right) = -\text{exp}\left(q \xi \right) \int_{0}^{\infty} \frac{g}{2q}\text{exp} \left( -q \xi' \right) d\xi' + \overline{T}\left(0,s\right) \text{exp} \left(-q \xi \right)
.. math:: + \text{exp} \left(-q \xi \right) \int_{0}^{\infty} \frac{g}{2q} \text{exp}\left(-q \xi' \right) d \xi' + \text{exp}\left(q \xi \right) \int_{0}^{\xi} \frac{g}{2q} \text{exp} \left(-q \xi' \right) d\xi'
.. math:: - \text{exp}\left( -q  \xi \right) \int_{0}^{\xi} \frac{g}{2q} \text{exp} \left(q \xi' \right) d\xi'

Taking the derivative of Eq. :ref:`A12.1-25 <eq-A12.1-25>` with respect to :math:`\xi` and evaluating
the result at :math:`\xi = 0` gives

(A12.1‑26)

.. _eq-A12.1-26:

.. math:: \frac{\partial \overline{T}}{\partial \xi} \bigg|_{\xi = 0} = -q \int_{0}^{\infty} \frac{g}{2q} \text{exp} \left(-q \xi' \right) d \xi' - q \overline{T} \left(0, s \right)
.. math:: -q \int_{0}^{\infty} \frac{g}{2q} \text{exp} \left(-q \xi' \right)d\xi' + \frac{g}{2q} - \frac{g}{2q}

which, substituting in the functions represented by :math:`q` and :math:`g`,
produces

(A12.1‑27)

.. _eq-A12.1-27:

.. math:: \frac{\partial \overline{T}}{\partial \xi} \bigg|_{\xi = 0} = - \overline{T} \left(0, s \right) \sqrt{\frac{s}{\alpha}} + \int_{0}^{\infty} \frac{\overline{Q} \left( \xi', s \right)}{k_{l}} \text{exp} \left(-\xi' \sqrt{\frac{s}{\alpha}} \right) d\xi'
.. math:: + \int_{0}^{\infty} \frac{T\left(\xi', 0 \right)}{\alpha} \text{exp} \left(-\xi' \sqrt{\frac{s}{\alpha}} \right) d\xi'

All that remains now is to take the inverse Laplace transform of Eq.
:ref:`A12.1-27 <eq-A12.1-27>`. Representing the inverse transform by :math:`L^{-1}`, the
necessary inverse transforms are

(A12.1‑28)

.. _eq-A12.1-28:

.. math:: L^{-1} \left[ \frac{\partial \overline{T}}{\partial \xi} \bigg|_{\xi = 0} \right] = \frac{\partial T}{\partial \xi} \bigg|_{\xi = 0}

(A12.1‑29)

.. _eq-A12.1-29:

.. math:: L^{-1} \left[ \overline{T} \left(0, s\right) \sqrt{\frac{s}{\alpha}} \right] = L^{-1} \left[\overline{T} \left(0, s \right) \frac{s}{\sqrt{s \alpha}} \right]
.. math:: = L^{-1} \left[s \overline{T} \left(0 , s \right) \frac{1}{\sqrt{\alpha}{\sqrt{s}}} \right]
.. math:: = \int_{0}^{t'} \frac{1}{\sqrt{\pi\alpha}} \frac{1}{\sqrt{t'-\tau}} \left( \frac{\partial T(0,\tau)}{\partial\tau} \right) d\tau

by convolution

(A12.1‑30)

.. _eq-A12.1-30:

.. math:: L^{-1} \left[ T \left( \xi, 0 \right) \text{exp} \left(-\xi \sqrt{\frac{s}{\alpha}} \right) \right] = T \left( \xi, 0 \right) L^{-1} \left[ \text{exp} \left(- \frac{\xi}{\sqrt{\alpha}} \sqrt{s} \right) \right]
.. math:: = T \left(\xi, 0 \right) \frac{\xi}{2 \sqrt{\pi \alpha \left(t' \right)^{3}}} \text{exp} \left( \frac{-\xi^{2}}{4 \alpha t'} \right)

(A12.1‑31)

.. _eq-A12.1-31:

.. math:: L^{-1} \left[ \overline{Q} \left(\xi, s \right) \text{exp} \left(-\xi \sqrt{\frac{s}{\alpha}} \right) \right] = \int_{0}^{t'} Q\left( \xi, \tau \right) \frac{\xi}{2 \sqrt{\pi \alpha \left(t' - \tau \right)^{3}}} \text{exp} \left(-\frac{\xi^{2}}{4\alpha\left(t' - \tau \right)} \right) d\tau

The above inverse transforms can be found in any good handbook which
lists inverse Laplace transforms. Taking the inverse transform of Eq.
:ref:`A12.1-27 <eq-A12.1-27>` and using the above expressions for the individual inverse
transforms finally produces Eq. :ref:`12.5-37 <eq-12.5-37>`:

(A12.1‑32)

.. _eq-A12.1-32:

.. math:: \frac{\partial T \left(t' \right)}{\partial \xi} \bigg|_{\xi = 0} = -\frac{1}{\sqrt{\pi \alpha}} \int_{0}^{t'} \frac{\partial T \left(0, \tau \right)}{\partial \tau} \frac{1}{\sqrt{t' - \tau}} d\tau
.. math:: -\frac{T\left(0,0\right)}{\sqrt{\alpha \pi t'}} + \int_{0}^{\infty} d\xi \int_{0}^{t'} \frac{\xi Q \left(\xi, \tau \right) \text{exp} \left[-\frac{\xi^{2}}{4 \alpha \left(t' - \tau \right)} \right]}{2k_{l}\sqrt{\pi \alpha \left(t' - \tau \right)^{3}}} d \tau
.. math:: + \int_{0}^{\infty} \frac{T\left( \xi, 0 \right) \xi \text{exp}\left[ -\frac{\xi^{2}} {4 \alpha t'} \right]}{2 \alpha \sqrt{\pi \alpha \left(t' \right)^{3}}} d\xi

Gaussian Elimination Solution of Linearized Vapor-Pressure-Gradient Equations
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The series of equations represented by Eq. :ref:`12.6-164 <eq-12.6-164a>` is solved as
shown in the steps below. Recall that :ref:`initially<eq-12.6-161>` :math:`a_{2,J2 - 1} = a_{2,J1} = 1`.


.. rubric:: Forward Reduction
..

    1. Divide the second equation by :math:`b_{2,J1}`:

    .. math:: b_{i,J1} \rightarrow b_{i,J1}/b_{2,J1}, i = 1 \dots 4 \quad g_{J1} \rightarrow g_{J1}/b_{2,J1}.

    2. Divide the third equation by :math:`c_{2,J1}`:

    .. math:: c_{i,J1} \rightarrow c_{i,J1}/c_{2,J1}, i = 1 \dots 4 \quad h_{J1} \rightarrow h_{J1}/c_{2,J1}

    3. Subtract the first equation from the second:

    .. math:: b_{i,J1} \rightarrow b_{i,J1} - a_{1,J1} \quad b_{2,J1} \rightarrow 0 \quad g_{J1} \rightarrow g_{J1} - d_{J1}

    4. Subtract the first equation from the third:

    .. math:: c_{1,J1} \rightarrow c_{1,J1} - a_{1,J1} \quad c_{2,J1} \rightarrow 0 \quad h_{J1} \rightarrow h_{J1} - d_{J1}

    5. Divide the second equation by :math:`b_{1,J1}`:

    .. math:: b_{i,J1} \rightarrow b_{i,J1}/b_{1,J1}, i=1 \dots 4 \quad g_{J1} \rightarrow g_{J1}/b_{1,J1}

    6. Divide the third equation by :math:`c_{1,J1}`:

    .. math:: c_{i,J1} \rightarrow c_{i,J1} / c_{1,J1}, i = 1 \dots 4 \quad h_{J1} \rightarrow h_{J1} / c_{1,J1}

    7. Subtract the second equation from the third:

    .. math:: c_{1,J1} \rightarrow 0 \quad c_{3,J1} \rightarrow c_{3,J1} - {\widetilde{b}}_{3,J1} \quad c_{4,J1} \rightarrow c_{4,J1} - {\widetilde{b}}_{4,J1}

    .. math::  h_{J1} \rightarrow h_{J1} - {\widetilde{g}}_{J1}

Repeat Steps 8-15 for :math:`j=J1 + 1, J1 + 2, \dots, J2-1`. Then proceed to Step 16.

    8.  Divide by :math:`c_{3,j-1}`:

    .. math:: c_{4,j-1} \rightarrow c_{4,j-1} / c_{3, j-1} \quad c_{3, j-1} \rightarrow 1 \quad h_{j-1} \rightarrow h_{j-1}/c_{3,j-1} \quad \left(c_{1,j-1} = 0 \quad c_{2, j - 1} = 0\right)

    9.  Divide by :math:`b_{1,j}`:

    .. math:: b_{i, j} \rightarrow b_{i, j} / b_{1, j}, i = 1 \dots 4 \quad g_{j} \rightarrow g_{j} / b_{1,j}

    10. Divide by :math:`c_{1,j}`:

    .. math:: c_{i,j} \rightarrow c_{i,j} / c_{1,j}, i = 1 \dots 4 \quad h_{j} \rightarrow h_{j} / c_{1,j}

    11. Subtract step 8 from step 9:

    .. math:: b_{2,j} \rightarrow b_{2,j} - c_{4,j-1} \quad b_{1,j} \rightarrow 0 \quad g_{j} \rightarrow g_{j} - h_{j-1}

    12. Subtract step 8 from step 10:

    .. math:: c_{2,j} \rightarrow c_{2,j} - c_{4, j - 1} \quad c_{1, j} \rightarrow 0 \quad h_{j} \rightarrow h_{j} - h_{j - 1}

    13. Divide by :math:`b_{2,j}`:

    .. math:: b_{i,j} \rightarrow b_{i,j} / b_{2, j}, i = 3,4 \quad b_{2,j} \rightarrow 1 \quad g_{j} \rightarrow g_{j} / b_{2,j}

    14. Divide by :math:`c_{2,j}`:

    .. math:: c_{i,j} \rightarrow c_{i,j} / c_{2, j}, i = 3,4 \quad c_{2,j} \rightarrow 1 \quad h_{j} \rightarrow h_{j} / c _{2,j}

    15. Subtract step 13 from step 14:

    .. math:: c_{i,j} \rightarrow c_{i,j} - b_{i,j}, i = 3, 4 \quad c_{2,j} \rightarrow 0 \quad h_{j} \rightarrow h_{j} - g_{j}

Continue

    16. Divide by :math:`c_{4,J2-1}`:

    .. math:: c_{3, J2 - 1} \rightarrow c_{3, J2 - 1} / c_{4, J2 - 1} \quad c_{4, J2 - 1} \rightarrow 1 \quad h_{J2 - 1} \rightarrow h_{J2 - 1} / c_{4, J2 - 1}

    17. Subtract:

    .. math:: a_{1, J2 - 1} \rightarrow a_{1, J2 - 1} - c_{3, J2 - 1} \quad a_{2, J2 - 1} \rightarrow 0 \quad d_{J2 - 1} \rightarrow d_{J2 - 1} - h_{J2 - 1}

.. rubric:: Back Substitution
..

    18. Solve for upper interface pressure:

    .. math:: \Delta p^{i}(J2) = d_{J2 - 1} /a_{1,J2 - 1}

    19. Solve for upper interface flow:

    .. math:: \Delta W^{i} (J2) = h_{J2 - 1} - c_{3, J2 - 1} \Delta p^{i} (J2)

    20.

    .. math:: \Delta W (J2 - 1) = \widetilde{g}_{J2 - 1} - \widetilde{b}_{3, J2 - 1} \Delta p^{i} (J2) - \widetilde{b}_{4, J2 - 1} \Delta W^{i} (J2)

    21.

    .. math:: \Delta p (J2 - 1) = h_{J2 - 1} - c_{4, J2 - 1} \Delta W (J2 - 1)

    Do steps 22 and 23 for
    :math:`j = J2-2, J2-3, \ldots, J1 + 1`.

    22.

    .. math:: \Delta W(j) =  g_{j} - b_{3,j} \Delta p(j+1) - b_{4, j} \Delta W(j+1)

    23.

    .. math:: \Delta p(j) = h_{j} - c_{4,j} \Delta W(j)

    24. Solve for lower interface pressure:

    .. math:: \Delta p^{i}(J1) = \widetilde{g}_{J1} - \widetilde{b}_{3, J1} \Delta p(J1+1) - \widetilde{b}_{4, J1} \Delta W(J1+1)

    25. Solve for lower interface flow:

    .. math:: \Delta W^{i}(J1) = d_{J1} - a_{1,J1} \Delta p^{i} (J1)